Commit fe721437 by wangzhihui

积分需求对接

1 parent dd762e7e
......@@ -187,6 +187,7 @@ export default {
},
data() {
return {
submitParams:'',
verificationCodeVisible: false,
merchantTestVisible: false,
rulesTestParams: {},
......@@ -400,7 +401,6 @@ export default {
djzhySubMerchantId,
djzhySubMerchantName
} = this.financialObj
// console.log(realityShopMerchantName, dizhySubMerchantId, this.financialObj, 'this.financialObj')
return {
realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1)
realityPlatformMerchantName, // 实际分账平台方商户名称
......@@ -490,6 +490,11 @@ export default {
Promise.all(eventArr).then(() => {
this.checkSelectEmpty()
})
this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{
console.log(obj)
this.financialObj.realityPlatformMerchantId=obj.merchantId
this.financialObj.realityPlatformMerchantName=obj.merchantName
})
},
methods: {
...mapActions("FinancialRules", ["reset"]),
......@@ -544,7 +549,6 @@ export default {
pageSize: 100000
}).then((result) => {
result = result.list
console.log(result, "result")
this.classificationObj = result.reduce(
(prev, item) => {
const {
......@@ -1187,7 +1191,6 @@ export default {
})
},
getSubmitData() {
// console.log(this.routerInfo.scene, 'getSubmitData')
return {
...this.getParams(),
sceneType: this.routerInfo.scene // 在后面避免被覆盖
......@@ -1467,7 +1470,6 @@ export default {
})
},
removeTab(targetName) {
console.log(targetName)
// 获取当前tab 对应的对象
const goodsTypeGroupRules = this.getAllParams()
console.log(goodsTypeGroupRules, "goodsTypeGroupRules")
......
......@@ -105,6 +105,7 @@ export default {
},
data() {
return {
submitParams:'',
effectStartDateDate: "",
effectStartDate: false, // 规则时间 true 表示可以立即生效 是否立即生效
sceneList,
......@@ -888,7 +889,13 @@ export default {
this.submitFormData()
},
// 提交信息
async submitFormData() {
async submit() {
let res = await this.verifyFormData()
if (!this.checkParamsType(res)) {
return this.$message.error("请完善对账规则")
}
// 检验已经通过了
this.errorIndex = -1
const {
shopMerchantTotalFeeCalculateType,
shopMerchantExpenseCategoryValue,
......@@ -906,14 +913,8 @@ export default {
partnerMerchantTotalFeeCalculateType,
partnerMerchantExpenseCategoryValue
}
const result = await saveRuleApi({ json: JSON.stringify(params) })
if (result) {
this.$message({
message: "提交成功",
type: "success"
})
this.$router.push({ name: "merchantManage" })
}
this.submitParams=params
console.log( this.submitParams)
},
// 校验所有form数据
async verifyFormData() {
......@@ -954,10 +955,6 @@ export default {
}
console.log(this.goodsTypeGroupRulesAll, "this.goodsTypeGroupRulesAll")
return this.goodsTypeGroupRulesAll
},
// 取消
handleReset() {
this.$router.go(-1)
}
},
beforeDestroy() {
......
......@@ -485,8 +485,10 @@ export default {
},
// table
// 分账金额设置 对应的选项
// 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户
tableSelectOptions: {
get() {
console.log(this.financialLedgerParty, "this.financialLedgerParty")
const info = this.financialLedgerParty
// 平台方
const platformSideobj = {
......
......@@ -82,7 +82,7 @@ export default {
}
},
// 分账对象选项 1:平台方 2:服务商 3:导流方 4:子商户
// 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户
tableSelectOptions: {
type: Array,
default: () => []
......@@ -94,7 +94,7 @@ export default {
const name = {
1: "平台方",
2: "服务商",
3: "导流方",
3: "流量方",
4: "平台方"
}
const type = val.targetMerchantType
......@@ -176,7 +176,6 @@ export default {
},
tableSelectOptions: {
handler() {
console.log(this.tableSelectOptions, "🚀🚀")
// this.initList()
this.changFormList()
},
......@@ -215,6 +214,7 @@ export default {
this.form = form
},
changFormList() {
console.log(this.form,'this.form')
// 判断id是否有在选项里面 没有就去掉
for (const key in this.form) {
const element = this.form[key]
......
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-24 21:48:44
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-02-25 17:57:05
* @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 编辑 - 运营确认 -->
<template>
<d2-container class="edit-contract" v-loading="isLoad">
......@@ -10,9 +18,9 @@
<!-- 上架商品及测算 -->
<goods-info></goods-info>
<!-- 分账配置 -->
<division-config></division-config>
<division-config ref="divisionConfig"></division-config>
<!-- 对账配置 -->
<finance-config></finance-config>
<finance-config ref="financeConfig"></finance-config>
<div style="margin-top: 40px;text-align: center;">
<el-button type="primary" @click="handleConfirm(1)">
提交
......@@ -71,7 +79,10 @@ export default {
console.log('新建---')
this.addMerVisible = !this.addMerVisible
},
handleConfirm() {},
handleConfirm() {
this.$refs.divisionConfig.submit()
this.$refs.financeConfig.submit()
},
handleCancel() {
this.close({ tagName: '/shelfManage' })
this.$router.push({ name: 'shelfManage' })
......
......@@ -94,6 +94,7 @@
:isBlock="true"
ref="refundFormRef"
label-width="220px"
:form-ref="handleFormRef"
default-width="400px"
:form-rules="formRules"
:form-obj="refundForm"
......@@ -127,11 +128,10 @@ export default {
if (!value) {
return callback(new Error("请输入退回积分"))
}
console.log(Number.isInteger(+value))
if (!Number.isInteger(+value)) {
callback(new Error("请输入数字值"))
} else {
if (value > 18) {
if (value > this.refundForm.maXPoints) {
callback(new Error("输入的积分超过当前订单最大积分"))
} else {
callback()
......@@ -140,6 +140,7 @@ export default {
}
return {
show: true,
handleFormRef: 'handleFormRef',
refundVisible: false,
activeName: "4",
tabPaneList: [
......@@ -309,13 +310,16 @@ export default {
}
],
refundForm: {
id: ""
id: "",
orderCode: "",
refundType: "",
refundPoints: ""
},
formRules: {
refundType: [
{ required: true, message: "请选择退款类型", trigger: "change" }
],
integral: [{ validator: checkIntegral, trigger: "blur" }]
refundPoints: [{ validator: checkIntegral, trigger: "blur" }]
},
refundFormData: [
{
......@@ -324,17 +328,22 @@ export default {
type: "radio",
optionId: "confId",
optionLabel: "confName",
isDisabled: false,
optionList: [
{ confId: "1", confName: "全额退款" },
{ confId: "2", confName: "部分退款" }
{ confId: 1, confName: "全额退款" },
{ confId: 2, confName: "部分退款" }
],
handleRadioChange: (val) => {}
handleRadioChange: (val) => {
console.log(val)
this.updateDisable()
}
},
{
label: "退回积分",
name: "integral",
name: "refundPoints",
type: "input",
width: "290px"
width: "290px",
isDisabled: false
}
]
}
......@@ -486,8 +495,8 @@ export default {
this.tableParams.tableColumns = arr
}
setTimeout(() => {
this.show = true
})
this.show = true
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
......@@ -602,6 +611,19 @@ export default {
handleRefund(data) {
this.refundVisible = true
this.refundForm.id = data.id
this.refundForm.orderCode = data.orderCode
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundForm.refundPoints = 10000
this.refundForm.maXPoints =10000
if(data.operator==true){
//对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
this.refundFormData[0].optionList[0].isDisabled=true
}
this.updateDisable()
},
updateDisable() {
let disabled = this.refundForm.refundType == 2 ? false : true
this.refundFormData[1].isDisabled = disabled
},
//关闭标记退款
handleRefundClose() {
......@@ -610,10 +632,13 @@ export default {
},
// 确定标记退款
handleRefundConfirm() {
this.$refs.refundFormRef.validate((valid) => {
console.log(this.$refs.refundFormRef)
this.$refs.refundFormRef.$refs[this.handleFormRef].validate((valid) => {
if (valid) {
markAsRefunded({
orderCode: data.orderCode
orderCode: this.refundForm.orderCode,
refundType:this.refundForm.refundType,
refundPoints:this.refundForm.refundPoints
}).then((res) => {
if (res) {
this.$message.success("退款成功!")
......
......@@ -746,9 +746,15 @@ export default {
},
// 提交信息
async submitFormData() {
let res = await this.verifyFormData()
if (!this.checkParamsType(res)) {
return this.$message.error("请完善对账规则")
}
// 检验已经通过了
this.errorIndex = -1
this.effectStartDateDate = effectStartDate ? effectStartDate + ' 00:00:00' : ''
const { shopMerchantTotalFeeCalculateType, shopMerchantExpenseCategoryValue, partnerMerchantTotalFeeCalculateType, partnerMerchantExpenseCategoryValue } = this.formObj
const params = {
smsCode: this.smsCode,
effectStartDate: this.effectStartDateDate,
merchantId: this.merchantRow.merchantId,
sceneType: this.merchantRow.scene,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!