Commit 76c79a3c by 胡悦

修复交易流水号发起退款时退款子项与可退总价为空

1 parent 76886a30
...@@ -21,13 +21,14 @@ ...@@ -21,13 +21,14 @@
<el-form-item style="margin-bottom: 24px;" label="订单金额:" :key="item.orderCode"> <el-form-item style="margin-bottom: 24px;" label="订单金额:" :key="item.orderCode">
{{ item.price }}元 {{ item.price }}元
</el-form-item> </el-form-item>
<el-form-item label="退款子项:" :key="item.refundSubOrderCode"> <!-- orderType == 2 交易流水号发起退款 不显示下面两项 -->
<el-form-item v-if="orderType == 1" label="退款子项:" :key="item.refundSubOrderCode">
<el-tooltip class="item" effect="dark" :content="item.refundSubOrderCode" placement="top-start"> <el-tooltip class="item" effect="dark" :content="item.refundSubOrderCode" placement="top-start">
<div class="refund-sub">{{ item.refundSubOrderCode }}</div> <div class="refund-sub">{{ item.refundSubOrderCode }}</div>
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
<el-form-item label="可退总价:" :key="item.total"> <el-form-item v-if="orderType == 1" label="可退总价:" :key="item.total">
{{ item.total }}元 {{ item.total }}元
</el-form-item> </el-form-item>
</template> </template>
...@@ -201,7 +202,7 @@ export default { ...@@ -201,7 +202,7 @@ export default {
if (!value) { if (!value) {
return callback(new Error("请输入金额,支持输入1~999999的数字,支持小数点后2位")) return callback(new Error("请输入金额,支持输入1~999999的数字,支持小数点后2位"))
} }
if (value > this.detail.total) { if (this.orderType == 1 && value > this.detail.total) {
callback(new Error('本次退款金额不可超过可退总价')) callback(new Error('本次退款金额不可超过可退总价'))
} else { } else {
callback() callback()
...@@ -344,7 +345,7 @@ export default { ...@@ -344,7 +345,7 @@ export default {
optionLabel: "confLabel", optionLabel: "confLabel",
optionsName: "refundList", optionsName: "refundList",
optionList: [], optionList: [],
isDisabled: true, isDisabled: false,
style: { width: "520px" }, style: { width: "520px" },
handleRadioChange: () => {} handleRadioChange: () => {}
}, },
...@@ -695,6 +696,9 @@ export default { ...@@ -695,6 +696,9 @@ export default {
mounted() { mounted() {
this.infoForm.orderType = this.orderType this.infoForm.orderType = this.orderType
if (this.orderType == 1) {
this.infoEditFormData[this.findAttrIdx("refundType")].isDisabled = true
}
console.log(this.detail, '===========detail') console.log(this.detail, '===========detail')
// 入口:精品升级、会员权益升级、次新车转化,售后众筹、积分商城 // 入口:精品升级、会员权益升级、次新车转化,售后众筹、积分商城
if (this.detail) { if (this.detail) {
...@@ -1127,8 +1131,8 @@ export default { ...@@ -1127,8 +1131,8 @@ export default {
this.dealMerchant() this.dealMerchant()
// console.log('this.okParams------------', this.okParams) // console.log('this.okParams------------', this.okParams)
// 新增退款子项 // 新增退款子项
this.okParams.refundSubOrderCode = this.detail.refundSubOrderCode if (this.detail?.refundSubOrderCode) this.okParams.refundSubOrderCode = this.detail.refundSubOrderCode
this.okParams.refundableTotalPrice = this.detail.total if (this.detail?.total) this.okParams.refundableTotalPrice = this.detail.total
addRefundApplyRecord(this.okParams).then((res) => { addRefundApplyRecord(this.okParams).then((res) => {
this.notice.okTips("操作成功") this.notice.okTips("操作成功")
this.visible = true this.visible = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!