|
@@ -16,7 +16,7 @@
|
|
:label-col="labelCol"
|
|
:label-col="labelCol"
|
|
:wrapper-col="wrapperCol"
|
|
:wrapper-col="wrapperCol"
|
|
>
|
|
>
|
|
- <a-form-model-item label="用户姓名">
|
|
|
|
|
|
+ <a-form-model-item label="用户名称">
|
|
{{ form.name }}
|
|
{{ form.name }}
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="所属营销分区" prop="subareaSn">
|
|
<a-form-model-item label="所属营销分区" prop="subareaSn">
|
|
@@ -33,7 +33,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { VSelect } from '@/components'
|
|
import { VSelect } from '@/components'
|
|
-import { updateDealerLevel } from '@/api/dealer'
|
|
|
|
|
|
+import { userSubareaSave } from '@/api/power-user'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
export default {
|
|
export default {
|
|
name: 'UpdateArea',
|
|
name: 'UpdateArea',
|
|
@@ -47,7 +47,7 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
isShow: this.openUdModal, // 是否打开弹框
|
|
isShow: this.openUdModal, // 是否打开弹框
|
|
- title: '级别设置',
|
|
|
|
|
|
+ title: '分区设置',
|
|
labelCol: { span: 5 },
|
|
labelCol: { span: 5 },
|
|
wrapperCol: { span: 16 },
|
|
wrapperCol: { span: 16 },
|
|
other: '',
|
|
other: '',
|
|
@@ -57,10 +57,10 @@ export default {
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
subareaSn: [
|
|
subareaSn: [
|
|
- { required: true, message: '请选择所属营销分区', trigger: ['change', 'blur'] }
|
|
|
|
|
|
+ { required: true, message: '请选择所属营销分区', trigger: 'blur' }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
- subareaSnBak: undefined
|
|
|
|
|
|
+ nowData: undefined
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -68,7 +68,7 @@ export default {
|
|
this.form.id = row.id
|
|
this.form.id = row.id
|
|
this.form.name = row.name
|
|
this.form.name = row.name
|
|
this.form.subareaSn = row.subareaSn || undefined
|
|
this.form.subareaSn = row.subareaSn || undefined
|
|
- this.subareaSnBak = row.subareaSn
|
|
|
|
|
|
+ this.nowData = row
|
|
},
|
|
},
|
|
onSubmit () {
|
|
onSubmit () {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -82,10 +82,14 @@ export default {
|
|
},
|
|
},
|
|
submitForm () {
|
|
submitForm () {
|
|
const _this = this
|
|
const _this = this
|
|
- const params = JSON.parse(JSON.stringify(_this.form))
|
|
|
|
- updateDealerLevel(params).then(res => {
|
|
|
|
|
|
+ const params = {
|
|
|
|
+ userSn: _this.nowData.sn,
|
|
|
|
+ subareaSn: _this.form.subareaSn
|
|
|
|
+ }
|
|
|
|
+ userSubareaSave(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
|
|
+ _this.isShow = false
|
|
_this.$emit('ok')
|
|
_this.$emit('ok')
|
|
}
|
|
}
|
|
})
|
|
})
|