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) {
}
/* TODO: 用来查询单项出入库记录的废弃详情信息 */
export function findSingleLogDetail(singleLogIdAndFqYs) {
export function findSingleLogDetail(singleLogIdAndPn) {
return request({
url: '/wbwarehouselog/detail',
method: 'post',
data: singleLogIdAndFqYs,
data: singleLogIdAndPn,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
......
......@@ -138,7 +138,7 @@
append-to-body
@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-col :span="12">
......@@ -181,7 +181,7 @@
<el-form-item label="fq_dd:" prop="fq_dd">
{{ singleDetails.fq_dd }}
</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 }}
</el-form-item>
<el-form-item label="fq_yy:" prop="fq_yy">
......@@ -389,7 +389,7 @@ export default {
// TODO: 表单里的单项详情参数
singleDetails: {},
// TODO: 获取表单单项详情的参数
singleLogIdAndFqYs: {},
singleLogIdAndPn: {},
activateAbandonedState: false
}
},
......@@ -479,14 +479,24 @@ export default {
},
/** TODO: 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.queryEntity = {
tableSortMark: 0,
entity: {
pn: '',
lot: '',
plocation: '',
poperate: '',
ptype: ''
}
}
this.dateRange = []
this.handleQuery()
},
/* TODO: 控制单项表单关闭的详情 */
handleClose() {
this.activateAbandonedState = false
this.singleLogIdAndFqYs = {}
this.singleLogIdAndPn= {}
},
/* TODO: 进行排序 */
changeTableSort: function(val) {
......@@ -507,28 +517,18 @@ export default {
this.singleDetails = { ...row }
} else {
/* TODO: 设置单项详情的查询的条件 */
this.singleLogIdAndFqYs['businessId'] = row.businessId
this.singleLogIdAndFqYs['fqYs'] = row.fqYs
this.singleLogIdAndPn['businessId'] = row.businessId
this.singleLogIdAndPn['pn'] = row.pn
/* TODO: 进行查询,如果返回的code为200,则表示返回的值成功 */
findSingleLogDetail(this.singleLogIdAndFqYs).then(
findSingleLogDetail(this.singleLogIdAndPn).then(
response => {
if (response.code === 200) {
this.singleDetails = Object.assign({}, response.data, { ...row })
/* TODO: 如果库状态==='4' 并且返回的状态码为200的时候,才会将可变的详情字段设置为true,去激活并打开 */
this.activateAbandonedState = true
} else {
/* TODO: 如果状态码不对则不会激活可变字段,只会对普通字段进行赋值,并且抛出错误信息response.message */
this.$message({
showClose: true,
message: response.message,
type: 'warning'
})
this.singleDetails = { ...row }
}
/* 激活打开废弃信息栏 */
this.activateAbandonedState = true
this.title = '记录详情'
this.singleDetails = Object.assign({}, response.data, { ...row })
}
)
}
this.title = '记录详情'
this.openDetails = true
},
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