测试问题修改

master
zhangdi 2 months ago
parent 55440b1fd9
commit c67bc258f2
  1. 23
      src/views/firstOrder/components/outDialog.vue

@ -308,9 +308,15 @@
class="dialog-footer" class="dialog-footer"
v-if="outDialogType != 'details'" v-if="outDialogType != 'details'"
> >
<el-button @click="handleCloseDetail()"> </el-button> <el-button @click="handleCloseDetail()" :loading="saveLoading"
<el-button type="primary" @click="submit(1)">暂存</el-button> > </el-button
<el-button type="primary" @click="submit(2)">提交</el-button> >
<el-button type="primary" @click="submit(1)" :loading="saveLoading"
>暂存</el-button
>
<el-button type="primary" @click="submit(2)" :loading="saveLoading"
>提交</el-button
>
</span> </span>
</el-dialog> </el-dialog>
<!-- 批量出库 选择数据源弹窗 --> <!-- 批量出库 选择数据源弹窗 -->
@ -496,7 +502,8 @@ export default {
}, },
quarterYearMap: {}, quarterYearMap: {},
quarterQuarterMap: {}, quarterQuarterMap: {},
materials:[],// materials: [], //
saveLoading: false,
}; };
}, },
computed: { computed: {
@ -712,7 +719,6 @@ export default {
}); });
if (res.data && res.data.result) { if (res.data && res.data.result) {
this.departmentList = res.data.result; this.departmentList = res.data.result;
console.log(this.departmentList, "departmentList");
} else { } else {
this.departmentList = []; this.departmentList = [];
} }
@ -799,7 +805,6 @@ export default {
this.inBatchForm.optionType === "YH" ? "易耗品" : "耐用品" this.inBatchForm.optionType === "YH" ? "易耗品" : "耐用品"
}数据失败${error.message}` }数据失败${error.message}`
); );
console.error("批量提交接口调用失败:", error);
} }
}, },
// //
@ -916,6 +921,7 @@ export default {
this.sizeForm.optionType = this.inBatchForm.optionType; this.sizeForm.optionType = this.inBatchForm.optionType;
} }
try { try {
this.saveLoading = true;
const res = await submitData(this.sizeForm); const res = await submitData(this.sizeForm);
if (res.data.success) { if (res.data.success) {
this.$message({ this.$message({
@ -923,11 +929,14 @@ export default {
message: "提交成功", message: "提交成功",
}); });
this.$emit("submitSuccess"); this.$emit("submitSuccess");
this.saveLoading = false;
this.handleCloseDetail(); this.handleCloseDetail();
} else { } else {
this.saveLoading = false;
this.$message.error(res.data.message || "提交失败"); this.$message.error(res.data.message || "提交失败");
} }
} catch (error) { } catch (error) {
this.saveLoading = false;
this.$message.error(error.message || "服务器错误"); this.$message.error(error.message || "服务器错误");
} }
}, },
@ -936,7 +945,6 @@ export default {
async inInit() { async inInit() {
if (this.outDialogType == "details" || this.outDialogType == "edit") { if (this.outDialogType == "details" || this.outDialogType == "edit") {
editList(this.id).then((res) => { editList(this.id).then((res) => {
console.log(res.data.result, "详情数据");
const { ldOneOutStorage, ldOneOutStorageDetails } = const { ldOneOutStorage, ldOneOutStorageDetails } =
res.data.result || {}; res.data.result || {};
// this.sizeForm = res.data.result.ldOneOutStorage // this.sizeForm = res.data.result.ldOneOutStorage
@ -950,7 +958,6 @@ export default {
this.batchSelectionVisible = false; this.batchSelectionVisible = false;
if (this.sizeForm.options == 2 && this.sizeForm.optionType == "YH") { if (this.sizeForm.options == 2 && this.sizeForm.optionType == "YH") {
this.getMaterialList(); this.getMaterialList();
} }
this.$set(this.sizeForm, "inTableData", ldOneOutStorageDetails); this.$set(this.sizeForm, "inTableData", ldOneOutStorageDetails);

Loading…
Cancel
Save