缺件申报修改

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

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

Loading…
Cancel
Save