领料发布

This commit is contained in:
bb_pan 2025-09-11 10:52:03 +08:00
parent 99c318a345
commit 5c71891cfe
2 changed files with 34 additions and 8 deletions

View File

@ -129,6 +129,7 @@
width="600px"
append-to-body
@close="closeView"
v-loading="loading"
>
<el-form ref="maForm" :model="maForm" :rules="rules" label-width="120px">
<el-row :gutter="24">
@ -266,6 +267,7 @@ export default {
},
data() {
return {
isSubmit: false,
taskId: "",
// isEdit: false,
//
@ -511,6 +513,9 @@ export default {
return this.$modal.msgError(errorInfo);
}
console.log("xxxxxxxxxxxxxxxxxxxxxx", itemsTemp)
if (this.isSubmit) return
this.isSubmit = true
this.loading = true
applySubmit({
leaseApplyDetailsList: itemsTemp,
leaseApplyInfo: leaseApplyInfo,
@ -524,7 +529,11 @@ export default {
this.$emit("addToolsSuccess");
}
this.loading = false;
});
this.isSubmit = false
}).catch(() => {
this.loading = false
this.isSubmit = false
})
}
})

View File

@ -46,7 +46,7 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">领料申请</el-button>
</el-col>
<el-col :span="1.5">
<el-col :span="1.5" v-hasPermi="['purchase:person:notice']">
<el-button type="success" plain icon="el-icon-plus" size="mini" @click="handleSendAll">发布</el-button>
</el-col>
<el-col :span="1.5">
@ -453,6 +453,7 @@ export default {
data() {
return {
//
isSubmit: false,
loading: true,
loadingTwo: true,
updateTime: '',
@ -1173,12 +1174,20 @@ export default {
const param = { id: row.id, taskId: row.taskId }
this.$modal
.confirm('是否确认发布所选择的数据项?')
.then(function () {
return applySend(param)
})
.then(() => {
this.getList()
this.$modal.msgSuccess('发布成功')
.then(async () => {
try {
if (this.isSubmit) return
this.isSubmit = true
this.loading = true
await applySend(param)
this.getList()
this.$modal.msgSuccess('发布成功')
} catch (error) {
console.log('🚀 ~ handleSend ~ error:', error)
} finally {
this.isSubmit = false
this.loading = false
}
})
.catch(() => {})
},
@ -1191,11 +1200,19 @@ export default {
})
return
} else {
if (this.isSubmit) return
this.isSubmit = true
this.loading = true
applySendAll(this.sendTemp).then(response => {
this.isSubmit = false
this.loading = false
if (response.code == 200) {
this.$modal.msgSuccess('发布成功')
}
this.getList()
}).catch(() => {
this.isSubmit = false
this.loading = false
})
}
},