材料站-退料保存后刷新
This commit is contained in:
parent
fe302379bb
commit
fad4f0dc06
|
|
@ -336,7 +336,7 @@ export default {
|
||||||
teamId: null,
|
teamId: null,
|
||||||
proId: null,
|
proId: null,
|
||||||
agreementId: null, //协议id
|
agreementId: null, //协议id
|
||||||
agreementIds:[],
|
agreementIds: [],
|
||||||
agreementCode: null, //协议code
|
agreementCode: null, //协议code
|
||||||
// companyId: '', //登录信息中取
|
// companyId: '', //登录信息中取
|
||||||
// createBy: '', //用户名
|
// createBy: '', //用户名
|
||||||
|
|
@ -668,42 +668,59 @@ export default {
|
||||||
this.$message.error('退料数量不能为空!')
|
this.$message.error('退料数量不能为空!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.queryParams.backApplyInfo = {
|
// 弹框二次确认
|
||||||
id: this.rowId,
|
this.$confirm(`是否确认${isBack == 1 ? '退料' : '暂存'}`, '提示', {
|
||||||
backPerson: this.queryParams.backPerson,
|
confirmButtonText: '确定',
|
||||||
phone: this.queryParams.phone,
|
cancelButtonText: '取消',
|
||||||
remark: this.queryParams.remark,
|
type: 'warning'
|
||||||
agreementIds: this.queryParams.agreementIds,
|
}).then(async () => {
|
||||||
isBack,
|
const loading = this.$loading()
|
||||||
taskId: this.queryParams.taskId,
|
try {
|
||||||
createBy: sessionStorage.getItem('userName')
|
this.queryParams.backApplyInfo = {
|
||||||
}
|
id: this.rowId,
|
||||||
if (this.rowId != '') {
|
backPerson: this.queryParams.backPerson,
|
||||||
let params = {
|
phone: this.queryParams.phone,
|
||||||
backApplyInfo: this.queryParams.backApplyInfo,
|
remark: this.queryParams.remark,
|
||||||
backApplyDetailsList: this.queryParams.equipmentList
|
agreementIds: this.queryParams.agreementIds,
|
||||||
|
isBack,
|
||||||
|
taskId: this.queryParams.taskId,
|
||||||
|
createBy: sessionStorage.getItem('userName')
|
||||||
|
}
|
||||||
|
if (this.rowId != '') {
|
||||||
|
let params = {
|
||||||
|
backApplyInfo: this.queryParams.backApplyInfo,
|
||||||
|
backApplyDetailsList: this.queryParams.equipmentList
|
||||||
|
}
|
||||||
|
if (params.backApplyInfo.signUrl) delete params.backApplyInfo.signUrl
|
||||||
|
const res = await editBackApply(params)
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message({ type: 'success', message: res.msg })
|
||||||
|
setTimeout(() => {
|
||||||
|
// this.$emit('goBackPage')
|
||||||
|
// 刷新页面
|
||||||
|
this.$tab.refreshPage({ path: '/materialsStation/toolsBack/back' })
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let params = {
|
||||||
|
backApplyInfo: this.queryParams.backApplyInfo,
|
||||||
|
backApplyDetailsList: this.queryParams.equipmentList
|
||||||
|
}
|
||||||
|
const res = await addBackApply(params)
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message({ type: 'success', message: res.msg })
|
||||||
|
setTimeout(() => {
|
||||||
|
// this.$emit('goBackPage')
|
||||||
|
this.$tab.refreshPage({ path: '/materialsStation/toolsBack/back' })
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ handleAdd ~ error:', error)
|
||||||
|
} finally {
|
||||||
|
loading.close()
|
||||||
}
|
}
|
||||||
if (params.backApplyInfo.signUrl) delete params.backApplyInfo.signUrl
|
})
|
||||||
const res = await editBackApply(params)
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$message({ type: 'success', message: res.msg })
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$emit('goBackPage')
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let params = {
|
|
||||||
backApplyInfo: this.queryParams.backApplyInfo,
|
|
||||||
backApplyDetailsList: this.queryParams.equipmentList
|
|
||||||
}
|
|
||||||
const res = await addBackApply(params)
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$message({ type: 'success', message: res.msg })
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$emit('goBackPage')
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue