Commit ecd5eed0 by wangzhihui

阳光激励分润

1 parent dabc26d7
...@@ -1069,40 +1069,43 @@ export default { ...@@ -1069,40 +1069,43 @@ export default {
(infoValid) => { (infoValid) => {
//开启分润 //开启分润
if (this.isValid("remnantPoints")) { if (this.isValid("remnantPoints")) {
infoValid = true
this.clearValid("refundPoints") this.clearValid("refundPoints")
} }
if (this.isValid("remnantPoints2")) { if (this.isValid("remnantPoints2")) {
infoValid = true
this.clearValid("refundPoints2") this.clearValid("refundPoints2")
} }
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (this.ref) if (infoValid && valid) {
if (infoValid && valid) { this.okParams = deepClone(this.infoForm)
this.okParams = deepClone(this.infoForm) const attachmentList = this.okParams.attachmentList
const attachmentList = this.okParams.attachmentList for (var i = 0; i < attachmentList.length; i++) {
for (var i = 0; i < attachmentList.length; i++) { if (attachmentList[i].fileUrl == "") {
if (attachmentList[i].fileUrl == "") { attachmentList.splice(i, 1)
attachmentList.splice(i, 1) i-- // 需要将i减1,因为数组长度已经减少了1
i-- // 需要将i减1,因为数组长度已经减少了1
}
} }
this.okParams.bankAccountNo =
this.okParams.bankAccountNo.replace(/\s*/g, "")
this.okParams.yqMerchantName =
this.baseData.yqMerchantList.find(
(item) => item.yqMerchantId == this.okParams.yqMerchantId
)?.yqMerchantName || ""
this.okParams.shopMerchantName =
this.baseData.shopMerchantList.find(
(item) => item.merchantId == this.okParams.shopMerchantId
)?.merchantName || ""
this.dealMerchant()
// console.log('this.okParams------------', this.okParams)
addRefundApplyRecord(this.okParams).then((res) => {
this.notice.okTips("操作成功")
this.visible = true
})
} }
this.okParams.bankAccountNo = this.okParams.bankAccountNo.replace(
/\s*/g,
""
)
this.okParams.yqMerchantName =
this.baseData.yqMerchantList.find(
(item) => item.yqMerchantId == this.okParams.yqMerchantId
)?.yqMerchantName || ""
this.okParams.shopMerchantName =
this.baseData.shopMerchantList.find(
(item) => item.merchantId == this.okParams.shopMerchantId
)?.merchantName || ""
this.dealMerchant()
// console.log('this.okParams------------', this.okParams)
addRefundApplyRecord(this.okParams).then((res) => {
this.notice.okTips("操作成功")
this.visible = true
})
}
}) })
} }
) )
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
<el-col <el-col
:span="8" :span="8"
v-if=" v-if="
detailInfo.status == '已审核' || detailInfo.failType == '退款' detailInfo.status == '已审核' || detailInfo.failType == '退款'
" "
> >
<el-form-item label="订单总积分:" class="halfItem"> <el-form-item label="订单总积分:" class="halfItem">
...@@ -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;
} }
......
...@@ -165,11 +165,11 @@ export default { ...@@ -165,11 +165,11 @@ export default {
if (isNaN(value) || value <= 0) { if (isNaN(value) || value <= 0) {
callback(new Error("输入大于0的数字")) callback(new Error("输入大于0的数字"))
} else { } else {
callback() callback()
} }
} }
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,
if (res) { employeeName: this.refundForm.employeeName
this.$message.success("退款成功!") })
this.refundVisible = false .then((res) => {
this.refundForm.id = "" if (res) {
this.handleSearch() this.$message.success("退款成功!")
} this.refundVisible = false
}).finally(()=>{ this.refundForm.id = ""
this.isRefund=true this.handleSearch()
}) }
} })
}) .finally(() => {
this.isRefund = true
})
}
})
} }
}, },
//刷新 //刷新
handleRefresh() { handleRefresh() {
...@@ -829,4 +840,4 @@ export default { ...@@ -829,4 +840,4 @@ export default {
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!