缺件申报修改

dev-scheduling
zhangdi 21 hours ago
parent 9943f00ea0
commit 48fe0cb207
  1. 73
      src/views/productionManagement/shortageApplication/components/declareAdd.vue

@ -9,7 +9,9 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-button type="primary" @click="queryBatchNo" :loading="batchLoading">查询批次号</el-button>
<el-button type="primary" @click="queryBatchNo" :loading="batchLoading"
>查询批次号</el-button
>
</el-col>
</el-row>
@ -112,8 +114,8 @@ export default {
},
data() {
return {
saveLoading:false,
batchLoading:false,
saveLoading: false,
batchLoading: false,
openShow: false,
wcData: [],
formError: '', //
@ -155,18 +157,22 @@ export default {
this.openShow = this.showDialog;
this.getWorkCenterList();
//
},
methods: {
//
queryBatchNo(){
queryBatchNo() {
this.batchLoading = true;
queryBatch({partCode: this.form.partCode}).then(res=>{
this.form.tableData = res.data.data || [];
this.batchLoading = false;
}).catch(err=>{
this.batchLoading = false;
})
queryBatch({ partCode: this.form.partCode })
.then(res => {
if (res.data.data) {
this.form.tableData.push(res.data.data);
}
// this.form.tableData = res.data.data || [];
this.batchLoading = false;
})
.catch(err => {
this.batchLoading = false;
});
},
getWorkCenterList() {
getWorkCenterList().then(res => {
@ -221,32 +227,33 @@ export default {
});
return;
}
this.saveLoading = true
this.saveLoading = true;
//
saveDeclare(this.form.tableData).then(res=>{
this.$message.success('操作成功');
this.saveLoading = false
saveDeclare(this.form.tableData)
.then(res => {
this.$message.success('操作成功');
this.saveLoading = false;
this.closeDialog();
}).catch(err=>{
this.saveLoading = false
})
// try {
// const res = saveDeclare(this.form.tableData);
// if (res.code === 200) {
// this.$message.success('');
// this.closeDialog();
// this.$emit('submitSuccess', submitData);
// } else {
// this.$message.error(res.msg || '');
// }
})
.catch(err => {
this.saveLoading = false;
});
// try {
// const res = saveDeclare(this.form.tableData);
// if (res.code === 200) {
// this.$message.success('');
// this.closeDialog();
// this.$emit('submitSuccess', submitData);
// } else {
// this.$message.error(res.msg || '');
// }
// } catch (err) {
// this.$message.error(err);
// console.error('', err);
// }
// } catch (err) {
// this.$message.error(err);
// console.error('', err);
// }
});
},
},
@ -283,7 +290,7 @@ export default {
font-size: 14px;
line-height: 1.5;
}
:deep(.el-table .el-table__cell) {
:deep(.el-table .el-table-body .el-table__cell) {
height: 50px !important;
padding: 0 !important;
line-height: 50px !important;

Loading…
Cancel
Save