Commit 4fd138a0 by cwq0219

商户管理-财务添加字段

1 parent 43d696c5
......@@ -102,15 +102,15 @@
</el-form-item>
<el-form-item
label="阳光激励费"
prop="incentiveCost"
prop="incentiveValue"
>
<el-input
size="mini"
v-model="form.incentiveCost"
v-model="form.incentiveValue"
placeholder="请输入阳光激励费"
class="input-with-select"
style="width: 240px;"
@input="handleIncentiveCost"
@input="handleincentiveValue"
>
<el-select
slot="prepend"
......@@ -219,7 +219,7 @@ export default {
partnerProfitPer: '',
merchantProfitValue: '',
incentiveType: 1,
incentiveCost: ''
incentiveValue: ''
},
adminInfo: {
name: '',
......@@ -241,7 +241,7 @@ export default {
merchantProfitType: [
{ required: true, message: '请选择结算比例', trigger: 'change' }
],
incentiveCost: [
incentiveValue: [
{ required: true, message: '请输入阳光激励费', trigger: 'change' }
],
partnerProfitType: [
......@@ -272,7 +272,7 @@ export default {
confLabel: '金额'
}],
oldVal: {
incentiveCost: ''
incentiveValue: ''
}
}
},
......@@ -331,63 +331,65 @@ export default {
})
},
handleIncentiveCost(newVal) {
this.form.incentiveCost = this.form.incentiveType === 1 ? limitPrice(newVal, this.oldVal.incentiveCost, 3, 0, 0, 100) : limitPrice(newVal, this.oldVal.incentiveCost, 6, 2)
this.oldVal.incentiveCost = this.form.incentiveCost
handleincentiveValue(newVal) {
this.form.incentiveValue = this.form.incentiveType === 1 ? limitPrice(newVal, this.oldVal.incentiveValue, 3, 0, 0, 100) : limitPrice(newVal, this.oldVal.incentiveValue, 6, 2)
this.oldVal.incentiveValue = this.form.incentiveValue
},
handleChangeType() {
this.form.incentiveCost = ''
this.oldVal.incentiveCost = ''
this.form.incentiveValue = ''
this.oldVal.incentiveValue = ''
},
onSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const form = this.form
const params = {
merchantId: this.merchantId,
channelType: this.channelType,
smsCode: form.smsCode
}
if (form.autoFlag) {
params.autoFlag = form.autoFlag
}
if (form.settleTimeType) {
params.settleTimeType = form.settleTimeType
}
if (form.settleAmountType) {
params.settleAmountType = form.settleAmountType
}
if (form.merchantSettleType) {
params.merchantSettleType = form.merchantSettleType
}
// if (valid) {
const form = this.form
const params = {
merchantId: this.merchantId,
channelType: this.channelType,
smsCode: form.smsCode
}
if (form.merchantProfitType === 1) {
params.merchantProfitValue = form.merchantProfitValue
} else {
params.merchantProfitValue = -1
}
if (form.autoFlag) {
params.autoFlag = form.autoFlag
}
if (form.settleTimeType) {
params.settleTimeType = form.settleTimeType
}
if (form.settleAmountType) {
params.settleAmountType = form.settleAmountType
}
if (form.merchantSettleType) {
params.merchantSettleType = form.merchantSettleType
}
if (form.partnerProfitType === 1) {
params.partnerProfitPer = form.partnerProfitPer
} else {
params.partnerProfitPer = -1
}
if (form.merchantProfitType === 1) {
params.merchantProfitValue = form.merchantProfitValue
} else {
params.merchantProfitValue = -1
}
updateRule(params).then((res) => {
this.$message({
message: '修改成功',
type: 'success'
})
this.close({ tagName: '/merchantManage' })
this.$router.push({
name: 'merchantManage'
})
})
if (form.partnerProfitType === 1) {
params.partnerProfitPer = form.partnerProfitPer
} else {
console.log('error submit!!')
return false
params.partnerProfitPer = -1
}
if (form.incentiveType) params.incentiveType = form.incentiveType
if (form.incentiveValue) params.incentiveValue = form.incentiveValue
console.log(params)
// updateRule(params).then((res) => {
// this.$message({
// message: '修改成功',
// type: 'success'
// })
// this.close({ tagName: '/merchantManage' })
// this.$router.push({
// name: 'merchantManage'
// })
// })
// } else {
// console.log('error submit!!')
// return false
// }
})
},
onCancel() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!