Commit e1963598 by 前端

Merge branch 'SAAS+V4.52.0-0429' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.52.0-0429
2 parents ea6887ad ecd5eed0
...@@ -11,10 +11,15 @@ ...@@ -11,10 +11,15 @@
<p class="title">业务信息</p> <p class="title">业务信息</p>
<el-form class="edit-sub-block" label-width="150px" :inline="true"> <el-form class="edit-sub-block" label-width="150px" :inline="true">
<template v-for="item in orderInfoList"> <template v-for="item in orderInfoList">
<el-form-item :label="orderType == 2 ? '交易参考号:' : '订单编码:'"> <el-form-item
:label="orderType == 2 ? '交易参考号:' : '订单编码:'"
:key="item.orderCode"
>
{{ item.orderCode }} {{ item.orderCode }}
</el-form-item> </el-form-item>
<el-form-item label="订单金额:"> {{ item.price }}元 </el-form-item> <el-form-item label="订单金额:" :key="item.orderCode">
{{ item.price }}元
</el-form-item>
</template> </template>
</el-form> </el-form>
<glsx-combi-form <glsx-combi-form
...@@ -35,7 +40,6 @@ ...@@ -35,7 +40,6 @@
:style="{ width: formDefaultObj.defaultWidth }" :style="{ width: formDefaultObj.defaultWidth }"
clearable clearable
:disabled="scope.scope.isDisabled" :disabled="scope.scope.isDisabled"
@input="handleUpgradeNum"
> >
</el-input> </el-input>
<div class="tips"> <div class="tips">
...@@ -46,6 +50,23 @@ ...@@ -46,6 +50,23 @@
}} }}
</div> </div>
</template> </template>
<template slot="refundPoints2" slot-scope="scope">
<el-input
placeholder="请输入退款金额"
v-model="infoForm.refundPoints2"
:style="{ width: formDefaultObj.defaultWidth }"
clearable
:disabled="scope.scope.isDisabled"
>
</el-input>
<div class="tips">
剩余积分:{{
infoForm.remnantPoints2 === 0
? infoForm.remnantPoints2
: infoForm.remnantPoints2 || "-"
}}
</div>
</template>
</glsx-combi-form> </glsx-combi-form>
<p class="title">退款信息</p> <p class="title">退款信息</p>
<glsx-combi-form <glsx-combi-form
...@@ -191,6 +212,7 @@ export default { ...@@ -191,6 +212,7 @@ export default {
orderType: null, // 订单类型(1.订单,2.待补录订单) orderType: null, // 订单类型(1.订单,2.待补录订单)
title: "", title: "",
refundPoints: "", refundPoints: "",
refundPoints2: "",
platformMerchantId: "", platformMerchantId: "",
payAmount: "", payAmount: "",
payReason: "", payReason: "",
...@@ -280,6 +302,16 @@ export default { ...@@ -280,6 +302,16 @@ export default {
isDisabled: true, isDisabled: true,
addHtml: "refundPoints" addHtml: "refundPoints"
} }
],
refund2: [
{
label: "退还积分",
name: "refundPoints2",
type: "input",
isClear: true,
isDisabled: true,
addHtml: "refundPoints2"
}
] ]
}, },
// 业务信息 // 业务信息
...@@ -332,6 +364,13 @@ export default { ...@@ -332,6 +364,13 @@ export default {
trigger: "blur" trigger: "blur"
} }
], ],
refundPoints2: [
{
required: true,
message: "请输入退还积分",
trigger: "blur"
}
],
yqMerchantId: [ yqMerchantId: [
{ {
required: true, required: true,
...@@ -549,7 +588,12 @@ export default { ...@@ -549,7 +588,12 @@ export default {
watch: { watch: {
"infoForm.refundType"(newValue) { "infoForm.refundType"(newValue) {
// immediate: true // immediate: true
this.judgeRefundPoints(newValue) //开启分润
if (this.infoForm.deliveryUserId) {
this.judgeRefundPoints(newValue, "refundPoints2")
}
this.judgeRefundPoints(newValue, "refundPoints")
this.judgeRefundPointsValue()
}, },
"infoForm.attachmentList": { "infoForm.attachmentList": {
handler(newVal) { handler(newVal) {
...@@ -664,16 +708,19 @@ export default { ...@@ -664,16 +708,19 @@ export default {
methods: { methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
judgeRefundPoints(newValue) {
if (this.infoEditFormData[this.findAttrIdx("refundPoints")]) { judgeRefundPointsValue() {
if (this.infoForm.deliveryUserId) {
this.infoForm.refundPoints2 = this.infoForm.remnantPoints2
}
this.infoForm.refundPoints = this.infoForm.remnantPoints
},
judgeRefundPoints(newValue, key) {
if (this.infoEditFormData[this.findAttrIdx(key)]) {
if (newValue == 2) { if (newValue == 2) {
this.infoEditFormData[ this.infoEditFormData[this.findAttrIdx(key)].isDisabled = false
this.findAttrIdx("refundPoints")
].isDisabled = false
} else { } else {
this.infoEditFormData[ this.infoEditFormData[this.findAttrIdx(key)].isDisabled = true
this.findAttrIdx("refundPoints")
].isDisabled = true
} }
this.infoEditFormData = deepClone(this.infoEditFormData) this.infoEditFormData = deepClone(this.infoEditFormData)
} }
...@@ -728,10 +775,39 @@ export default { ...@@ -728,10 +775,39 @@ export default {
this.infoForm.shopMerchantName = res.shopMerchantName this.infoForm.shopMerchantName = res.shopMerchantName
this.infoForm.remnantPoints = res.remnantPoints this.infoForm.remnantPoints = res.remnantPoints
this.infoForm.refundPoints = res.remnantPoints this.infoForm.refundPoints = res.remnantPoints
this.infoForm.remnantPoints2 = res.remnantPoints2
this.infoForm.refundPoints2 = res.remnantPoints2
this.infoForm.employeeUserId = res.userId
this.infoForm.employeeName = res.employeeName
this.infoForm.deliveryUserId = res.deliveryUserId
? res.deliveryUserId
: ""
this.infoForm.deliveryEmployeeName = res.deliveryEmployeeName
if (!this.infoForm.deliveryUserId) {
//没用开启分润保持之前逻辑
if (this.infoForm.refundPoints === 0 || this.infoForm.refundPoints) { if (this.infoForm.refundPoints === 0 || this.infoForm.refundPoints) {
this.infoEditFormData.push(...deepClone(this.attrObj.refund)) this.infoEditFormData.push(...deepClone(this.attrObj.refund))
} }
this.judgeRefundPoints(this.detail.refundType) this.judgeRefundPoints(this.detail.refundType, "refundPoints")
} else {
//开启分润
this.infoEditFormData.push(...deepClone(this.attrObj.refund))
this.infoEditFormData[
this.findAttrIdx("refundPoints")
].label = `退还积分(${this.infoForm.employeeName})`
this.infoEditFormData.push(...deepClone(this.attrObj.refund2))
this.infoEditFormData[
this.findAttrIdx("refundPoints2")
].label = `退还积分(${this.infoForm.deliveryEmployeeName})`
this.judgeRefundPoints(this.detail.refundType, "refundPoints")
this.judgeRefundPoints(this.detail.refundType, "refundPoints2")
}
// if (this.infoForm.refundPoints2 === 0 || this.infoForm.refundPoints2) {
// }/
/** refundType:1-全额退款,2-部分退款 /** refundType:1-全额退款,2-部分退款
* 部分退款时,除了“所属服务对接”和“所属流量方”,其他不写入 * 部分退款时,除了“所属服务对接”和“所属流量方”,其他不写入
* */ * */
...@@ -978,10 +1054,28 @@ export default { ...@@ -978,10 +1054,28 @@ export default {
this.okParams.hasOwnProperty(item) && delete this.okParams[item] this.okParams.hasOwnProperty(item) && delete this.okParams[item]
}) })
}, },
clearValid(key) {
this.$refs.infoEditFormRef.$refs[this.editChildRef].clearValidate(key)
},
isValid(key) {
return (
this.infoForm.deliveryUserId &&
!this.infoForm[key] &&
this.infoForm[key] !== 0
)
},
handleAddConfirm() { handleAddConfirm() {
this.$refs.infoEditFormRef.$refs[this.editChildRef].validate( this.$refs.infoEditFormRef.$refs[this.editChildRef].validate(
(infoValid) => { (infoValid) => {
//开启分润
if (this.isValid("remnantPoints")) {
infoValid = true
this.clearValid("refundPoints")
}
if (this.isValid("remnantPoints2")) {
infoValid = true
this.clearValid("refundPoints2")
}
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (infoValid && valid) { if (infoValid && valid) {
this.okParams = deepClone(this.infoForm) this.okParams = deepClone(this.infoForm)
......
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
id: { id: {
type: Number, type: Number,
default: "" default: ""
}, }
}, },
computed: { computed: {
dialogShow: { dialogShow: {
...@@ -272,9 +272,8 @@ export default { ...@@ -272,9 +272,8 @@ export default {
width: "1080px" width: "1080px"
} }
}, },
addScore:0, addScore: 0,
detailInfo: { detailInfo: {},
},
operationList: [], operationList: [],
loading: false, loading: false,
imgVisible: false, imgVisible: false,
...@@ -310,7 +309,7 @@ export default { ...@@ -310,7 +309,7 @@ export default {
if ( if (
this.detailInfo.status == "已审核" || this.detailInfo.status == "已审核" ||
this.detailInfo.failType == '退款' this.detailInfo.failType == "退款"
) { ) {
this.getScore() this.getScore()
this.getOrderOperateData() this.getOrderOperateData()
...@@ -322,18 +321,12 @@ export default { ...@@ -322,18 +321,12 @@ export default {
getOrderByScore({ getOrderByScore({
orderCode: this.detailInfo.orderCode orderCode: this.detailInfo.orderCode
}).then((res) => { }).then((res) => {
this.addScore = res.addScore this.addScore = res.addScore
// this.$set(this.detailInfo, "addScore", res.addScore) // this.$set(this.detailInfo, "addScore", res.addScore)
}) })
}, },
getOrderOperateData() { getOrderOperateData() {
let params = { operationType: 1} let params = { operationType: 1, id: this.id }
if(this.detailInfo.status=='已失效'){
params.id=this.id
}else{
params.orderCode=this.detailInfo.orderCode
}
getOperationRecord(params).then((res) => { getOperationRecord(params).then((res) => {
console.log(res) console.log(res)
this.operationList = res this.operationList = res
...@@ -515,7 +508,7 @@ export default { ...@@ -515,7 +508,7 @@ export default {
} }
</style> </style>
<style > <style>
.detailDialog-tooltip-width { .detailDialog-tooltip-width {
max-width: 500px; max-width: 500px;
} }
......
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
} }
} }
return { return {
isRefund:true, isRefund: true,
show: true, show: true,
handleFormRef: "handleFormRef", handleFormRef: "handleFormRef",
refundVisible: false, refundVisible: false,
...@@ -346,7 +346,7 @@ export default { ...@@ -346,7 +346,7 @@ export default {
refundType: "", refundType: "",
refundPoints: "", refundPoints: "",
firstInto: true, firstInto: true,
refundAmount:'' refundAmount: ""
}, },
formRules: { formRules: {
refundType: [ refundType: [
...@@ -652,6 +652,8 @@ export default { ...@@ -652,6 +652,8 @@ export default {
//标记退款 //标记退款
handleRefund(data) { handleRefund(data) {
this.refundVisible = true this.refundVisible = true
this.refundForm.employeeUserId = data.staffUuid
this.refundForm.employeeName = data.staffName
this.refundForm.orderCode = data.orderCode this.refundForm.orderCode = data.orderCode
this.refundForm.tempPoints = data.integralIncome this.refundForm.tempPoints = data.integralIncome
this.refundForm.refundPoints = data.integralIncome //退还积分 this.refundForm.refundPoints = data.integralIncome //退还积分
...@@ -670,13 +672,17 @@ export default { ...@@ -670,13 +672,17 @@ export default {
// this.refundForm.remainAmount = res.remainAmount //剩余金额 // this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = true this.refundForm.firstInto = true
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退), this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundFormData[this.findAttrIdx("refundType")].optionList[0].isDisabled = false this.refundFormData[
this.findAttrIdx("refundType")
].optionList[0].isDisabled = false
} else { } else {
this.refundForm.remainingScore = res.remainingScore this.refundForm.remainingScore = res.remainingScore
// this.refundForm.remainAmount = res.remainAmount //剩余金额 // this.refundForm.remainAmount = res.remainAmount //剩余金额
this.refundForm.firstInto = false this.refundForm.firstInto = false
this.refundForm.refundType = 2 this.refundForm.refundType = 2
this.refundFormData[this.findAttrIdx("refundType")].optionList[0].isDisabled = true this.refundFormData[
this.findAttrIdx("refundType")
].optionList[0].isDisabled = true
} }
this.updateDisable() this.updateDisable()
}) })
...@@ -686,8 +692,10 @@ export default { ...@@ -686,8 +692,10 @@ export default {
if (this.refundForm.refundType == 1) { if (this.refundForm.refundType == 1) {
this.refundForm.refundPoints = this.refundForm.tempPoints this.refundForm.refundPoints = this.refundForm.tempPoints
} }
this.refundFormData[this.findAttrIdx("refundPoints")].isDisabled = disabled this.refundFormData[this.findAttrIdx("refundPoints")].isDisabled =
this.refundFormData[this.findAttrIdx("refundAmount")].isDisabled = disabled disabled
this.refundFormData[this.findAttrIdx("refundAmount")].isDisabled =
disabled
this.refundFormData = deepClone(this.refundFormData) this.refundFormData = deepClone(this.refundFormData)
}, },
findAttrIdx(attrName) { findAttrIdx(attrName) {
...@@ -700,29 +708,32 @@ export default { ...@@ -700,29 +708,32 @@ export default {
}, },
// 确定标记退款 // 确定标记退款
handleRefundConfirm() { handleRefundConfirm() {
if(this.isRefund){ if (this.isRefund) {
this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => { this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => {
if (valid) { if (valid) {
this.isRefund=false this.isRefund = false
markAsRefunded({ markAsRefunded({
orderCode: this.refundForm.orderCode, orderCode: this.refundForm.orderCode,
refundType: this.refundForm.refundType, refundType: this.refundForm.refundType,
refundPoints: this.refundForm.refundPoints, refundPoints: this.refundForm.refundPoints,
refundAmount:this.refundForm.refundAmount refundAmount: this.refundForm.refundAmount,
}).then((res) => { employeeUserId: this.refundForm.employeeUserId,
employeeName: this.refundForm.employeeName
})
.then((res) => {
if (res) { if (res) {
this.$message.success("退款成功!") this.$message.success("退款成功!")
this.refundVisible = false this.refundVisible = false
this.refundForm.id = "" this.refundForm.id = ""
this.handleSearch() this.handleSearch()
} }
}).finally(()=>{ })
this.isRefund=true .finally(() => {
this.isRefund = true
}) })
} }
}) })
} }
}, },
//刷新 //刷新
handleRefresh() { handleRefresh() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!