生产管理接口联调

dev-scheduling
jinna 2 months ago
parent 4406b66225
commit 5e43eb2940
  1. 14
      src/views/productionManagement/components/batchesDialog.vue
  2. 15
      src/views/productionManagement/components/productionMonitoringDialog.vue
  3. 4
      src/views/productionManagement/productionMonitoring.vue
  4. 4
      src/views/productionManagement/sinTerWorkOrder/index.vue

@ -48,7 +48,7 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit()"> </el-button> <el-button type="primary" @click="submit()" :loading="saveLoading"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -69,6 +69,7 @@ export default {
}, },
data() { data() {
return { return {
saveLoading: false,
isOpen: false, isOpen: false,
batchesForm: {}, batchesForm: {},
batchesRules: { batchesRules: {
@ -87,6 +88,7 @@ export default {
submit() { submit() {
this.$refs.batchesForm.validate(valid => { this.$refs.batchesForm.validate(valid => {
if (valid) { if (valid) {
this.saveLoading = true;
let query = { let query = {
id: this.itemData[0].woId, id: this.itemData[0].woId,
batchNo: this.itemData[0].batchNo, batchNo: this.itemData[0].batchNo,
@ -95,13 +97,17 @@ export default {
makeQty: this.batchesForm.makeQty, makeQty: this.batchesForm.makeQty,
batchReason: this.batchesForm.batchReason, batchReason: this.batchesForm.batchReason,
}; };
inBatches(query).then((res) => { inBatches(query)
if (res.code == 200) { .then(res => {
this.$message.success('操作成功'); this.$message.success('操作成功');
this.saveLoading = false;
this.closeDialog(); this.closeDialog();
} })
.catch(err => {
this.saveLoading = false;
}); });
} else { } else {
this.saveLoading = false;
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
} }

@ -11,7 +11,7 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit" :loading="loadingSave"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -31,6 +31,7 @@ export default {
}, },
data() { data() {
return { return {
loadingSave:false,
openShow: false, openShow: false,
form: { form: {
priority: '', priority: '',
@ -74,16 +75,22 @@ export default {
//msg //msg
this.$refs.form.validate((valid, done, msg) => { this.$refs.form.validate((valid, done, msg) => {
if (valid) { if (valid) {
this.loadingSave = true
// this.$emit('submitPriority', this.form); // this.$emit('submitPriority', this.form);
updatePrioritye({ updatePrioritye({
demandDate: this.form.demandDate, demandDate: this.form.demandDate,
priority: this.form.priority, priority:Number(this.form.priority),
id: this.itemData[0].woId, woId: this.itemData[0].woId,
}).then(res => { }).then(res => {
this.loadingSave = false
this.$message.success('操作成功'); this.$message.success('操作成功');
this.closeDialog(); this.closeDialog();
}); }).catch(err=>{
this.loadingSave = false
done()
})
} else { } else {
this.loadingSave = false
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
} }

@ -703,9 +703,9 @@ export default {
this.showClose = false; this.showClose = false;
this.showAbnormal = false; this.showAbnormal = false;
this.isPriorityOpen = false; this.isPriorityOpen = false;
if (type) { // if (type) {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
} // }
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;

@ -582,9 +582,9 @@ export default {
this.showClose = false; this.showClose = false;
this.showAbnormal = false; this.showAbnormal = false;
this.isPriorityOpen = false; this.isPriorityOpen = false;
if (type) { // if (type) {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
} // }
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;

Loading…
Cancel
Save