|
@@ -4,25 +4,27 @@
|
|
|
:disabledBtn="disabledBtn"
|
|
|
width="600px"
|
|
|
:isShow.sync="isShow"
|
|
|
- :title="titleComputers(info.checkFrom, info.orderSn)"
|
|
|
+ :title="titleComputers(info)"
|
|
|
@close="close"
|
|
|
@submit="submitForm"
|
|
|
- :confirmName="info.orderSn ? '确定' : '确定支付'"
|
|
|
+ :confirmName="info.length > 0 && info[0].orderSn ? '确定' : '确定支付'"
|
|
|
>
|
|
|
- <template v-if="info.orderSn">
|
|
|
- <p style="margin-top: 0">
|
|
|
- 下单时间:{{ $methodsTools.onlyForma(form.buyTime) }}
|
|
|
- </p>
|
|
|
- <p style="margin-top: 0">订单单号:{{ form.orderSn }}</p>
|
|
|
- <p>
|
|
|
- <span class="color_1890ff">{{ form.applyName }}</span>
|
|
|
- </p>
|
|
|
- <div class="bgc_pink">
|
|
|
+ <template v-if="info.length > 0 && info[0].orderSn">
|
|
|
+ <div v-for="(item, index) in info" style="margin-bottom: 10px">
|
|
|
+ <p style="margin-top: 0">
|
|
|
+ 下单时间:{{ $methodsTools.onlyForma(item.orderTime) }}
|
|
|
+ </p>
|
|
|
+ <p style="margin-top: 0">订单单号:{{ item.orderSn }}</p>
|
|
|
<p>
|
|
|
- 待付账款:<span class="color_red"
|
|
|
- >¥{{ form.divideCompanyMoney }}</span
|
|
|
- >
|
|
|
+ <span class="color_1890ff">{{ item.applyName }}</span>
|
|
|
</p>
|
|
|
+ <div class="bgc_pink">
|
|
|
+ <p>
|
|
|
+ 待付账款:<span class="color_red"
|
|
|
+ >¥{{ item.divideCompanyMoney }}</span
|
|
|
+ >
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<el-form
|
|
|
:model="formData"
|
|
@@ -43,7 +45,7 @@
|
|
|
v-model="formData.checkReason"
|
|
|
></el-input> </el-form-item
|
|
|
></el-form>
|
|
|
- <template slot="slotBtn">
|
|
|
+ <template slot="slotBtn" v-if="info.length === 1">
|
|
|
<el-button @click="auditProgress = true">审核进度</el-button>
|
|
|
</template>
|
|
|
<audit-progress
|
|
@@ -125,9 +127,9 @@ export default {
|
|
|
default: false,
|
|
|
},
|
|
|
info: {
|
|
|
- type: Object,
|
|
|
+ type: Array,
|
|
|
default: () => {
|
|
|
- return {};
|
|
|
+ return [];
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -148,7 +150,7 @@ export default {
|
|
|
{ required: true, message: "请选择审核结果", trigger: "change" },
|
|
|
],
|
|
|
checkReason: [
|
|
|
- { required: true, message: "请输入审核意见", trigger: "blur" },
|
|
|
+ { required: false, message: "请输入审核意见", trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
formPay: {
|
|
@@ -176,9 +178,9 @@ export default {
|
|
|
mounted() {},
|
|
|
|
|
|
methods: {
|
|
|
- titleComputers(checkFrom, orderSn) {
|
|
|
+ titleComputers(info) {
|
|
|
var a = "";
|
|
|
- switch (checkFrom) {
|
|
|
+ switch (info[0]?.checkFrom) {
|
|
|
case 2:
|
|
|
a = "机构分成";
|
|
|
break;
|
|
@@ -191,7 +193,7 @@ export default {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- if (orderSn) {
|
|
|
+ if (info[0]?.orderSn) {
|
|
|
a += "审核";
|
|
|
} else {
|
|
|
a += "支付";
|
|
@@ -207,21 +209,26 @@ export default {
|
|
|
},
|
|
|
init() {
|
|
|
this.resetForm();
|
|
|
- this.$api[
|
|
|
- this.info.orderSn ? "systemtoporderdividedetail" : "dividelogdata"
|
|
|
- ](
|
|
|
- this.info.orderSn
|
|
|
- ? { orderSn: this.info.orderSn, checkFrom: this.info.checkFrom }
|
|
|
- : this.info.id
|
|
|
- ).then((res) => {
|
|
|
- this.form = res.data;
|
|
|
- this.$api.systemtenantbankId(res.data.tenantId).then((e) => {
|
|
|
- this.bankList = e.data || [];
|
|
|
+ if (!this.info[0].orderSn) {
|
|
|
+ this.$api.dividelogdata(this.info[0].id).then((res) => {
|
|
|
+ this.form = res.data;
|
|
|
+ this.$api.systemtenantbankId(res.data.tenantId).then((e) => {
|
|
|
+ this.bankList = e.data || [];
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ } else if (this.info.length === 1 && this.info[0].orderSn) {
|
|
|
+ this.$api
|
|
|
+ .systemtoporderdividedetail({
|
|
|
+ orderSn: this.info[0].orderSn,
|
|
|
+ checkFrom: this.info[0].checkFrom,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.form = res.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
close() {
|
|
|
- this.$refs[this.info.orderSn ? "formData" : "rulesPay"].resetFields();
|
|
|
+ this.$refs[this.info[0].orderSn ? "formData" : "rulesPay"].resetFields();
|
|
|
},
|
|
|
resetForm() {
|
|
|
this.form = {
|
|
@@ -234,7 +241,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
submitForm() {
|
|
|
- if (!this.info.orderSn) {
|
|
|
+ if (!this.info[0].orderSn) {
|
|
|
this.$refs["rulesPay"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$confirm("确定支付账款吗?", "提示", {
|
|
@@ -244,7 +251,7 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
let c = {
|
|
|
- divideModel: this.info.checkFrom - 1,
|
|
|
+ divideModel: this.info[0].checkFrom - 1,
|
|
|
divideLogId: this.form.id,
|
|
|
tenantId: this.form.tenantId,
|
|
|
...this.formPay,
|
|
@@ -272,15 +279,17 @@ export default {
|
|
|
this.$refs["formData"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.disabledBtn = true;
|
|
|
- this.$api
|
|
|
- .checkorderlogeditDivide({
|
|
|
- checkFrom: this.info.checkFrom,
|
|
|
- orderSn: this.form.orderSn,
|
|
|
+ var array = this.info.map((i) => {
|
|
|
+ return {
|
|
|
+ checkFrom: i.checkFrom,
|
|
|
+ orderSn: i.orderSn,
|
|
|
...this.formData,
|
|
|
- })
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.$api
|
|
|
+ .updateBatchDivideByEditBo(array)
|
|
|
.then((res) => {
|
|
|
this.isShow = false;
|
|
|
- this.$emit("update", this.info.divideLogId);
|
|
|
this.$emit("search");
|
|
|
})
|
|
|
.finally(() => {
|