Commit f5b026ca by chenwq

订单管理

1 parent 60e700aa
......@@ -176,6 +176,7 @@ export default {
optionLabel: 'confLabel',
optionsName: 'refundList',
optionList: [],
isDisabled: false,
style: { width: '520px' },
handleRadioChange: () => { }
},
......@@ -400,6 +401,7 @@ export default {
type: Array,
default: () => { }
},
// 标记精品升级,区分退款审核弹窗字段
scene: {
type: String,
default: ''
......@@ -460,13 +462,16 @@ export default {
console.log("this.detail", this.detail)
console.log("this.orderList", this.orderList)
this.infoForm.orderType = this.orderType
// 入口:精品升级、会员权益升级、次新车转化,售后众筹、积分商城
if (this.detail) {
this.orderInfoList.push({
orderCode: this.detail.orderCode,
price: this.detail.totalPrice
})
this.infoForm.bizOrderCodeList.push(this.detail.orderCode)
// 加判断---------------
// 判断是否部分退款
this.judgeRefundType()
// 订单的退款的基本信息
this.getOrderDefaultInfo()
} else if (this.orderList && this.orderList.length > 0) {
let yqIdTemp = this.orderList[0].yqMerchantId
......@@ -516,6 +521,17 @@ export default {
}
},
findAttrIdx(attrName) {
return this.infoEditFormData.findIndex(item => item.name == attrName)
},
judgeRefundType() {
if (this.detail.refundType == 2) {
this.infoForm.refundType = '2'
this.infoEditFormData[this.findAttrIdx('refundType')].isDisabled = true
}
},
getOrderDefaultInfo() {
var params = {
orderCode: this.detail.orderCode
......@@ -526,13 +542,18 @@ export default {
this.infoForm.yqMerchantName = res.yqMerchantName
this.infoForm.shopMerchantId = res.shopMerchantId
this.infoForm.shopMerchantName = res.shopMerchantName
this.infoForm.shopRefundAmount = +res.shopDivisionMoney
this.infoForm.installMerchantId = res.installMerchantId
this.infoForm.installMerchantName = res.installMerchantName
this.infoForm.installCost = +res.installCost
this.infoForm.marketingMerchantId = res.marketingMerchantId
this.infoForm.marketingMerchantName = res.marketingMerchantName
this.infoForm.marketingCost = res.marketingCost + res.rewardAndPenaltyCost
/** refundType:1-全额退款,2-部分退款
* 部分退款时,除了“所属服务对接”和“所属流量方”,其他不写入
* */
if (this.detail.refundType != 2) {
this.infoForm.shopRefundAmount = +res.shopDivisionMoney
this.infoForm.installMerchantId = res.installMerchantId
this.infoForm.installMerchantName = res.installMerchantName
this.infoForm.installCost = +res.installCost
this.infoForm.marketingMerchantId = res.marketingMerchantId
this.infoForm.marketingMerchantName = res.marketingMerchantName
this.infoForm.marketingCost = res.marketingCost + res.rewardAndPenaltyCost
}
})
},
......
......@@ -86,6 +86,13 @@ export default {
trigger: "blur"
}
],
payReason: [
{
required: true,
message: "请输入付款事由",
trigger: "blur"
}
],
attachmentList: [
{
required: false,
......@@ -142,6 +149,15 @@ export default {
}
}
}, {
label: "付款事由",
name: "payReason",
type: "input",
maxlength: 50,
inputType: "textarea",
showLimit: true,
rows: 2,
width: "370px"
}, {
label: "结算凭证",
name: "attachmentList",
isHide: true,
......
......@@ -208,7 +208,7 @@
:data="scope.scope" />
</span>
<!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag">
<span v-if="[1, 2].includes(scope.scope.tailOrderStatus) && signRefundFlag">
<el-button type="text"
size="mini"
style="margin-left: 10px"
......
......@@ -230,7 +230,7 @@
:data="scope.scope" />
</span>
<!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag">
<span v-if="[1, 2].includes(scope.scope.tailOrderStatus) && signRefundFlag">
<el-button type="text"
size="mini"
style="margin-left: 10px"
......
......@@ -177,7 +177,7 @@
:data="scope.scope" />
</span>
<!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag">
<span v-if="[1, 2].includes(scope.scope.tailOrderStatus) && signRefundFlag">
<el-button type="text"
size="mini"
style="margin-left: 10px"
......
......@@ -1285,7 +1285,7 @@ export default {
query: {
detail: JSON.stringify(data.row),
signRefundFlag: this.signRefundFlag,
scene: 'jpsj'
scene: 'jpsj' // 标记精品升级,区分退款审核弹窗字段
}
})
},
......
......@@ -9,8 +9,13 @@
退款审核中
</span>
<span v-else>
<!--
1、订单状态:已支付-status-4
2、订单状态:已评价-status-6
3、已退款且部分尾款:①已退款-status-12;②部分退款-refundType-2
-->
<el-button size="mini"
v-if="signRefundFlag && [4, 6].includes(detail.status)"
v-if="signRefundFlag && ([4, 6].includes(detail.status) || ([12].includes(detail.status) && [2].includes(detail.refundType)))"
class="signRefundBtn"
@click="refund">
<img class="signRefundIcon"
......
......@@ -120,7 +120,9 @@ export default {
title: '',
platformMerchantId: '',
status: '',
matchBizOrderCode: ''
matchBizOrderCode: '',
payee: '',
applyTime: ''
},
searchFormSearch: {},
showFormData: [{
......@@ -171,6 +173,18 @@ export default {
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '收款人',
name: 'payee',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '申请时间',
name: "applyTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}],
getListApi: refundApplyRecordPage,
tableParams: {
......@@ -308,11 +322,27 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch = this.getParams()
resolve()
})
},
getParams() {
var params = deepClone(this.searchForm)
if (this.searchForm.applyTime?.length) {
params.startCreatedDate =
new Date(this.searchForm.applyTime[0])
.toLocaleDateString()
.replace(/\//g, "-") + " 00:00:00"
params.endCreatedDate =
new Date(this.searchForm.applyTime[1])
.toLocaleDateString()
.replace(/\//g, "-") + " 23:59:59"
}
delete params.applyTime
return params
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!