Commit 690a3319 authored by CenXinYi's avatar CenXinYi

优化查询废弃详情

Signed-off-by: 's avatarCenXinYi <2810162984@qq.com>
parent 31e7dc39
...@@ -14,11 +14,11 @@ export function listLog(queryParams, queryMaps) { ...@@ -14,11 +14,11 @@ export function listLog(queryParams, queryMaps) {
} }
/* TODO: 用来查询单项出入库记录的废弃详情信息 */ /* TODO: 用来查询单项出入库记录的废弃详情信息 */
export function findSingleLogDetail(singleLogIdAndFqYs) { export function findSingleLogDetail(singleLogIdAndPn) {
return request({ return request({
url: '/wbwarehouselog/detail', url: '/wbwarehouselog/detail',
method: 'post', method: 'post',
data: singleLogIdAndFqYs, data: singleLogIdAndPn,
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
} }
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
append-to-body append-to-body
@closed="handleClose" @closed="handleClose"
> >
<el-form ref="formDetails" :model="singleDetails" size="small" label-width="90px"> <el-form ref="formDetails" :model="singleDetails" size="small" label-width="100px">
<el-row :gutter="10" justify="start" align="middle"> <el-row :gutter="10" justify="start" align="middle">
<el-col :span="12"> <el-col :span="12">
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
<el-form-item label="fq_dd:" prop="fq_dd"> <el-form-item label="fq_dd:" prop="fq_dd">
{{ singleDetails.fq_dd }} {{ singleDetails.fq_dd }}
</el-form-item> </el-form-item>
<el-form-item label="fq_mcode:" :label-width="10" prop="fq_mcode"> <el-form-item label="fq_mcode:" prop="fq_mcode">
{{ singleDetails.fq_mcode }} {{ singleDetails.fq_mcode }}
</el-form-item> </el-form-item>
<el-form-item label="fq_yy:" prop="fq_yy"> <el-form-item label="fq_yy:" prop="fq_yy">
...@@ -389,7 +389,7 @@ export default { ...@@ -389,7 +389,7 @@ export default {
// TODO: 表单里的单项详情参数 // TODO: 表单里的单项详情参数
singleDetails: {}, singleDetails: {},
// TODO: 获取表单单项详情的参数 // TODO: 获取表单单项详情的参数
singleLogIdAndFqYs: {}, singleLogIdAndPn: {},
activateAbandonedState: false activateAbandonedState: false
} }
}, },
...@@ -479,14 +479,24 @@ export default { ...@@ -479,14 +479,24 @@ export default {
}, },
/** TODO: 重置按钮操作 */ /** TODO: 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.queryEntity = {
tableSortMark: 0,
entity: {
pn: '',
lot: '',
plocation: '',
poperate: '',
ptype: ''
}
}
this.dateRange = []
this.handleQuery() this.handleQuery()
}, },
/* TODO: 控制单项表单关闭的详情 */ /* TODO: 控制单项表单关闭的详情 */
handleClose() { handleClose() {
this.activateAbandonedState = false this.activateAbandonedState = false
this.singleLogIdAndFqYs = {} this.singleLogIdAndPn= {}
}, },
/* TODO: 进行排序 */ /* TODO: 进行排序 */
changeTableSort: function(val) { changeTableSort: function(val) {
...@@ -507,28 +517,18 @@ export default { ...@@ -507,28 +517,18 @@ export default {
this.singleDetails = { ...row } this.singleDetails = { ...row }
} else { } else {
/* TODO: 设置单项详情的查询的条件 */ /* TODO: 设置单项详情的查询的条件 */
this.singleLogIdAndFqYs['businessId'] = row.businessId this.singleLogIdAndPn['businessId'] = row.businessId
this.singleLogIdAndFqYs['fqYs'] = row.fqYs this.singleLogIdAndPn['pn'] = row.pn
/* TODO: 进行查询,如果返回的code为200,则表示返回的值成功 */ /* TODO: 进行查询,如果返回的code为200,则表示返回的值成功 */
findSingleLogDetail(this.singleLogIdAndFqYs).then( findSingleLogDetail(this.singleLogIdAndPn).then(
response => { response => {
if (response.code === 200) { /* 激活打开废弃信息栏 */
this.singleDetails = Object.assign({}, response.data, { ...row })
/* TODO: 如果库状态==='4' 并且返回的状态码为200的时候,才会将可变的详情字段设置为true,去激活并打开 */
this.activateAbandonedState = true this.activateAbandonedState = true
} else { this.title = '记录详情'
/* TODO: 如果状态码不对则不会激活可变字段,只会对普通字段进行赋值,并且抛出错误信息response.message */ this.singleDetails = Object.assign({}, response.data, { ...row })
this.$message({
showClose: true,
message: response.message,
type: 'warning'
})
this.singleDetails = { ...row }
}
} }
) )
} }
this.title = '记录详情'
this.openDetails = true this.openDetails = true
}, },
handleExport() { handleExport() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment