Commit 4fd138a0 by cwq0219

商户管理-财务添加字段

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