|
@@ -150,8 +150,9 @@ export default {
|
|
id: undefined,
|
|
id: undefined,
|
|
accountType: undefined, // 记帐类型
|
|
accountType: undefined, // 记帐类型
|
|
accountNameSn: undefined, // 记账名称
|
|
accountNameSn: undefined, // 记账名称
|
|
- subareaSnList: undefined, // 所属区域
|
|
|
|
- subareaNameList: undefined,
|
|
|
|
|
|
+ subareaSn: undefined, // 所属区域
|
|
|
|
+ subareaName: undefined,
|
|
|
|
+ subareaAreaSn: undefined, // 分区
|
|
provinceSn: undefined, // 省份
|
|
provinceSn: undefined, // 省份
|
|
provinceName: '',
|
|
provinceName: '',
|
|
citySn: undefined, // 市
|
|
citySn: undefined, // 市
|
|
@@ -188,19 +189,14 @@ export default {
|
|
this.form.citySn = row.citySn
|
|
this.form.citySn = row.citySn
|
|
this.form.provinceName = row.provinceName
|
|
this.form.provinceName = row.provinceName
|
|
this.form.cityName = row.cityName
|
|
this.form.cityName = row.cityName
|
|
- if (row.subareaNameSet) {
|
|
|
|
- const a = row.subareaNameSet.filter(item => item !== '中国')
|
|
|
|
- this.form.subareaNameList = [a[0]]
|
|
|
|
- this.form.subareaSnList = [this.$refs.subareaBox.getValByName(this.form.subareaNameList)[0]]
|
|
|
|
- }
|
|
|
|
|
|
+ this.form.subareaSn = row.subareaSn
|
|
|
|
+ this.form.subareaAreaSn = row.subareaAreaSn
|
|
} else {
|
|
} else {
|
|
this.form.accountNameSn = ''
|
|
this.form.accountNameSn = ''
|
|
this.form.provinceSn = ''
|
|
this.form.provinceSn = ''
|
|
this.form.citySn = ''
|
|
this.form.citySn = ''
|
|
this.form.provinceName = ''
|
|
this.form.provinceName = ''
|
|
this.form.cityName = ''
|
|
this.form.cityName = ''
|
|
- this.form.subareaNameList = ''
|
|
|
|
- this.form.subareaSnList = ''
|
|
|
|
this.form.subareaSn = ''
|
|
this.form.subareaSn = ''
|
|
this.form.subareaAreaSn = ''
|
|
this.form.subareaAreaSn = ''
|
|
this.$refs.subareaBox.clearData()
|
|
this.$refs.subareaBox.clearData()
|
|
@@ -212,7 +208,6 @@ export default {
|
|
},
|
|
},
|
|
// 分区
|
|
// 分区
|
|
subareaChange(val, row){
|
|
subareaChange(val, row){
|
|
- this.form.subareaName = row.subareaName
|
|
|
|
this.form.subareaSn = val[0] ? val[0] : undefined
|
|
this.form.subareaSn = val[0] ? val[0] : undefined
|
|
this.form.subareaAreaSn = val[1] ? val[1] : undefined
|
|
this.form.subareaAreaSn = val[1] ? val[1] : undefined
|
|
},
|
|
},
|
|
@@ -287,13 +282,9 @@ export default {
|
|
form.citySn = form.citySn ? form.citySn : ''
|
|
form.citySn = form.citySn ? form.citySn : ''
|
|
form.cityName = form.cityName ? form.cityName : ''
|
|
form.cityName = form.cityName ? form.cityName : ''
|
|
form.expense = Math.abs(form.expense)
|
|
form.expense = Math.abs(form.expense)
|
|
- // 不是数组
|
|
|
|
- if (!Array.isArray(form.subareaSnList)) {
|
|
|
|
- form.subareaSnList = [form.subareaSnList]
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
console.log(form)
|
|
console.log(form)
|
|
- delete form.subareaNames
|
|
|
|
- delete form.subareaSns
|
|
|
|
|
|
+
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
expenseAcctDetailSave(form).then(res => {
|
|
expenseAcctDetailSave(form).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -315,6 +306,7 @@ export default {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.city.clearData()
|
|
this.$refs.city.clearData()
|
|
|
|
+ this.$refs.subareaBox.clearData()
|
|
})
|
|
})
|
|
this.form = {
|
|
this.form = {
|
|
id: undefined,
|
|
id: undefined,
|
|
@@ -340,7 +332,6 @@ export default {
|
|
this.form.cityName = ''
|
|
this.form.cityName = ''
|
|
this.form.expenseAccountSn = this.expenseAccountSn
|
|
this.form.expenseAccountSn = this.expenseAccountSn
|
|
this.form.expenseAccountNo = this.expenseAccountNo
|
|
this.form.expenseAccountNo = this.expenseAccountNo
|
|
- this.$refs.subareaBox.clearData()
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|