|
@@ -58,7 +58,8 @@ export default {
|
|
|
dealerLevel: [
|
|
|
{ required: true, message: '请选择商户级别', trigger: 'change' }
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+ dealerLevelBak: undefined
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -66,30 +67,39 @@ export default {
|
|
|
this.form.dealerSn = row.dealerSn
|
|
|
this.form.dealerName = row.dealerName
|
|
|
this.form.dealerLevel = row.dealerLevel
|
|
|
+ this.dealerLevelBak = row.dealerLevel
|
|
|
},
|
|
|
onSubmit () {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.$confirm({
|
|
|
- title: '提示',
|
|
|
- content: '商户价格级别变更后,该商户关联的经销商关系绑定将同步解除,确定变更该商户级别吗?',
|
|
|
- centered: true,
|
|
|
- onOk () {
|
|
|
- const params = JSON.parse(JSON.stringify(_this.form))
|
|
|
- updateDealerLevel(params).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.$message.success(res.message)
|
|
|
- _this.$emit('ok')
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ if (_this.form.dealerLevel != _this.dealerLevelBak) {
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '商户价格级别变更后,该商户关联的经销商关系绑定将同步解除,确定变更该商户级别吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.submitForm()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.submitForm()
|
|
|
+ }
|
|
|
} else {
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ submitForm () {
|
|
|
+ const _this = this
|
|
|
+ const params = JSON.parse(JSON.stringify(_this.form))
|
|
|
+ updateDealerLevel(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$emit('ok')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
cansel () {
|
|
|
this.$emit('close')
|
|
|
this.$refs.ruleForm.resetFields()
|