|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="borderless" v-loading="loading">
|
|
|
+ <div class="borderless" v-loading="pageLoading">
|
|
|
<div class="customer-head">
|
|
|
<div class="customer-back">
|
|
|
<!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
|
|
@@ -11,7 +11,7 @@
|
|
|
>返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <div class="add-customer-btn">
|
|
|
+ <div class="add-customer-btn" v-if="showBut">
|
|
|
<el-button
|
|
|
type="info"
|
|
|
@click.stop="editCustomer('save')"
|
|
@@ -31,6 +31,7 @@
|
|
|
type="primary"
|
|
|
:disabled="disabled"
|
|
|
@click="editCustomer('submit')"
|
|
|
+ :loading="subLoading"
|
|
|
v-if="detailData.status != 1"
|
|
|
>{{ form.id ? "确认修改" : "确认新增" }}
|
|
|
</el-button>
|
|
@@ -459,7 +460,8 @@ export default {
|
|
|
oldorderFeesList: [],
|
|
|
oldorderFilesList: [],
|
|
|
subLoading: false,
|
|
|
- showBut:true,
|
|
|
+ pageLoading: true,
|
|
|
+ showBut: true
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -692,19 +694,28 @@ export default {
|
|
|
this.dialogVisible = !this.dialogVisible;
|
|
|
},
|
|
|
getDetail(id) {
|
|
|
- detail(id).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.data = res.data.data.deliveryItemsList;
|
|
|
- this.orderFeesList = res.data.data.deliveryFeesList;
|
|
|
- this.orderFilesList = res.data.data.deliveryFilesList;
|
|
|
- this.configuration.dicData = this.form.corpName;
|
|
|
- this.oldform = res.data.data;
|
|
|
- this.olddata = this.deepClone(res.data.data.deliveryItemsList);
|
|
|
- this.oldorderFeesList = this.deepClone(res.data.data.deliveryFeesList);
|
|
|
- this.oldorderFilesList = this.deepClone(
|
|
|
- res.data.data.deliveryFilesList
|
|
|
- );
|
|
|
- });
|
|
|
+ this.showBut = false;
|
|
|
+ this.pageLoading = true;
|
|
|
+ detail(id)
|
|
|
+ .then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.data = res.data.data.deliveryItemsList;
|
|
|
+ this.orderFeesList = res.data.data.deliveryFeesList;
|
|
|
+ this.orderFilesList = res.data.data.deliveryFilesList;
|
|
|
+ this.configuration.dicData = this.form.corpName;
|
|
|
+ this.oldform = res.data.data;
|
|
|
+ this.olddata = this.deepClone(res.data.data.deliveryItemsList);
|
|
|
+ this.oldorderFeesList = this.deepClone(
|
|
|
+ res.data.data.deliveryFeesList
|
|
|
+ );
|
|
|
+ this.oldorderFilesList = this.deepClone(
|
|
|
+ res.data.data.deliveryFilesList
|
|
|
+ );
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.showBut = true;
|
|
|
+ this.pageLoading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//修改提交触发
|
|
|
editCustomer(status, status2) {
|
|
@@ -725,30 +736,35 @@ export default {
|
|
|
}
|
|
|
const orderFilesList = this.$refs.uploadFile.submitData();
|
|
|
if (status == "submit") {
|
|
|
+ this.subLoading = true;
|
|
|
submit({
|
|
|
...this.form,
|
|
|
deliveryItemsList: this.data,
|
|
|
deliveryFeesList: orderFeesList,
|
|
|
deliveryFilesList: orderFilesList
|
|
|
- }).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- this.data = res.data.data.deliveryItemsList;
|
|
|
- this.orderFeesList = res.data.data.deliveryFeesList;
|
|
|
- this.orderFilesList = res.data.data.deliveryFilesList;
|
|
|
- this.oldform = res.data.data;
|
|
|
- this.olddata = this.deepClone(res.data.data.deliveryItemsList);
|
|
|
- this.oldorderFeesList = this.deepClone(
|
|
|
- res.data.data.deliveryFeesList
|
|
|
- );
|
|
|
- this.oldorderFilesList = this.deepClone(
|
|
|
- res.data.data.deliveryFilesList
|
|
|
- );
|
|
|
- this.configuration.dicData = this.form.corpName;
|
|
|
- this.$message.success(this.form.id ? "修改成功" : "提交成功");
|
|
|
- if (status2 == "goBack") {
|
|
|
- this.$emit("goBack");
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.data = res.data.data.deliveryItemsList;
|
|
|
+ this.orderFeesList = res.data.data.deliveryFeesList;
|
|
|
+ this.orderFilesList = res.data.data.deliveryFilesList;
|
|
|
+ this.oldform = res.data.data;
|
|
|
+ this.olddata = this.deepClone(res.data.data.deliveryItemsList);
|
|
|
+ this.oldorderFeesList = this.deepClone(
|
|
|
+ res.data.data.deliveryFeesList
|
|
|
+ );
|
|
|
+ this.oldorderFilesList = this.deepClone(
|
|
|
+ res.data.data.deliveryFilesList
|
|
|
+ );
|
|
|
+ this.configuration.dicData = this.form.corpName;
|
|
|
+ this.$message.success(this.form.id ? "修改成功" : "提交成功");
|
|
|
+ if (status2 == "goBack") {
|
|
|
+ this.$emit("goBack");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.subLoading = false;
|
|
|
+ });
|
|
|
}
|
|
|
if (status == "save") {
|
|
|
this.$confirm("此操作将确认收货, 是否继续?", "提示", {
|