Commit 896e5d89 authored by zs嵩's avatar zs嵩

6

parent d6f9e018
......@@ -74,7 +74,7 @@
<div class="fills">订单列表</div>
</div>
<el-table class="mt10 table2" ref="orderTable" border default-expand-all :data="batchApplyDetailsInfoVO.orderFeeDetailsVOList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column type="selection" width="50" align="center"></el-table-column>
<el-table-column :label="$t('序号')" width="50" type="index" align="center" />
<el-table-column prop="orderNo" :label="$t('订单号')" align="center" width="150">
<template slot-scope="{ row }">
......@@ -188,7 +188,7 @@
<div style="padding: 20px">
<work-flow xmlkey="batch_order_free_apply" v-model="selectedUsers" />
</div>
<div style="text-align: center; margin-top: 20px">
<div style="text-align: center; padding: 30px 0">
<el-button type="primary" @click="submit">{{ $t("提交") }} </el-button>
</div>
</div>
......@@ -299,7 +299,6 @@ export default {
methods: {
// 表格多选
handleSelectionChange(selection) {
this.multipleSelection = selection
this.ids = selection.map((item) => item.orderId)
},
formatAmount(row, index) {
......@@ -350,23 +349,23 @@ export default {
if (applicationFee) {
if (cval === 2) {
this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.forEach((item, i) => {
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.realityChargeVolume * applicationFee, 2)
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.realityChargeVolume * applicationFee, 2) || 0
})
} else if (cval === 3) {
this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.forEach((item, i) => {
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.sumVolume * applicationFee, 2)
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.sumVolume * applicationFee, 2) || 0
})
} else if (cval === 4) {
this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.forEach((item, i) => {
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.realityChargeWeight * applicationFee, 2)
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.realityChargeWeight * applicationFee, 2) || 0
})
} else if (cval === 5) {
this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.forEach((item, i) => {
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.sumWeight * applicationFee, 2)
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(item.sumWeight * applicationFee, 2) || 0
})
} else {
this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.forEach((item, i) => {
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(1 * applicationFee, 2)
item.orderFeeApplicationBaseVOList[index]["applicationFee"] = this.$formatNumber(1 * applicationFee, 2) || 0
})
}
}
......@@ -427,6 +426,15 @@ export default {
})
},
async submit() {
if (!this.batchApplyDetailsInfoVO.feeDetailsVOList.length) {
this.$message.error("请添加费用")
return
}
if (!this.batchApplyDetailsInfoVO.reason) {
this.$message.error("请填写申请原因")
return
}
// 判断费用申请是否有未填项
// console.log("提交的费用信息列表", this.feeList)
await new Promise((resolve) => {
......@@ -436,6 +444,11 @@ export default {
})
) {
this.$confirm(this.$t("确定要删除所有无费用的订单吗?")).then(() => {
this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.forEach((item, index) => {
if (!item.orderFeeApplicationBaseVOList.filter((m) => !m.isDel).length) {
this.batchApplyDetailsInfoVO.splice(index, 1)
}
})
resolve()
})
} else {
......@@ -447,7 +460,7 @@ export default {
if (
!this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.some((item, index) => {
return item.orderFeeApplicationBaseVOList.some((m) => {
if (!m.isDel && (!item["feeType"] || item.applicationFee == null || item.applicationFee == undefined || !item["applicationFeeCurrency"] || !item["payType"])) {
if (!m.isDel && (!m.feeType || m.applicationFee == null || m.applicationFee == undefined || m.applicationFee == "" || !m["applicationFeeCurrency"] || !m["payType"])) {
this.$message.error("请填写完整费用申请信息")
return true
}
......@@ -458,13 +471,19 @@ export default {
}
})
if (!this.batchApplyDetailsInfoVO.reason) {
this.$message.error("请填写申请原因")
return
let orderFeeDetailsVOList = this.batchApplyDetailsInfoVO.orderFeeDetailsVOList.filter((item) => {
return new Set(this.ids).has(item.id)
})
if(!orderFeeDetailsVOList.length) {
this.$message.error("请选择订单")
}
feeApplicationBatch({
batchApplyDetailsInfoVO: this.batchApplyDetailsInfoVO,
batchApplyDetailsInfoVO: {
...this.batchApplyDetailsInfoVO,
orderFeeDetailsVOList
},
copyUserId: this.selectedUsers
}).then((r) => {
if (r.code === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment