Commit 6e13f2f8 by 胡悦

修改营业范围为经营业务类型

1 parent bf249212
......@@ -137,7 +137,7 @@ export default {
status: '',
merchantFiles: [],
merchantType: 1,
businessScope: [],
businessType: [],
parentId: '',
isloginName: false
},
......@@ -181,7 +181,7 @@ export default {
deep: true
},
accountAddForm: {
handler() {
handler() {
this.editStatus = true
},
deep: true
......@@ -296,16 +296,16 @@ export default {
params.bussinessBegintime = params.bussinessTime[0]
params.bussinessEndtime = params.bussinessTime[1]
}
if (params.businessScope) {
params.businessScope = params.businessScope.join(',')
if (params.businessType) {
params.businessType = params.businessType.join(',')
}
params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0)
params.merchantAccountLevel = this.accountDetail.merchantAccountLevel
params.status = 1
params.channelId = this.accountDetail.channelId
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
params.businessScopeCustomize = businessScopeCustomize.join(',')
// let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
// params.businessScopeCustomize = businessScopeCustomize.join(',')
params.accounttypeId = this.accounttypeId.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles)
params.merchantModel = this.accountDetail.merchantModel
......@@ -317,6 +317,7 @@ export default {
merchant = 'saveMerchant'
}
document.querySelector('#app').scrollTop = 0
console.log(params)
Promise.all([pm1, pm2]).then(() => {
this.$apis.store[merchant](params).then(res => {
if (res) {
......@@ -342,7 +343,7 @@ export default {
}
this.$apis.store.findAllDictData(params).then(res => {
if (res) {
if (dictType == 'business_scope') {
if (dictType == 'business_type') {
this.businessOption = res
}
}
......@@ -390,6 +391,9 @@ export default {
})
},
getCarbrandTree() {
// this.$apis.baseInfo.brandList({ needCarSeries: true }).then(res => {
// this.brandData = res
// })
this.$apis.store.getCarbrandTree({}).then(res => {
this.brandData = res
})
......@@ -403,7 +407,7 @@ export default {
this.accountAddForm.parentId = this.$route.params.id
this.findMerchantDetail()
this.getCarbrandTree()
this.findAllDictData('business_scope')
this.findAllDictData('business_type')
}
}
</script>
......
......@@ -78,16 +78,16 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="营业范围">
<el-checkbox-group v-model="accountAddForm.businessScope">
<el-col :span="24">
<el-form-item label="经营业务类型">
<el-checkbox-group v-model="accountAddForm.businessType">
<el-checkbox v-for="item in businessOption" :label="item.dictValue" :key="item">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group>
<div class="scrm-flex-center" v-for="(item, index) in businessScopeCustomize" :key="index">
<!-- <div class="scrm-flex-center" v-for="(item, index) in businessScopeCustomize" :key="index">
<el-input size="small" v-model="businessScopeCustomize[index].name" placeholder="请自定义营业范围,建议不超过10个"></el-input>
<i class="el-icon-circle-plus el-icon-btn" @click="addBusinessScope" v-if="index == businessScopeCustomize.length - 1"></i>
<i class="el-icon-remove el-icon-btn" @click="removeBusinessScope" v-else></i>
</div>
</div> -->
</el-form-item>
</el-col>
</el-row>
......
......@@ -126,9 +126,9 @@
</span>
</el-col>
<el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">营业范围:</span>
<!-- roleData.businessScopName = roleData.businessScopName ? roleData.businessScopName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize -->
<span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span>
<span class="itemName itemNameCol2">经营业务类型:</span>
<!-- <span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span> -->
<span class="itemValue">{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span>
</el-col>
</el-row>
<el-row>
......
......@@ -141,7 +141,7 @@ export default {
merchantAccountLevel: null,
parentId: null,
merchantModel: null,
businessScope: [],
businessType: [],
bussinessTime: [],
merchantFiles: []
},
......@@ -306,13 +306,13 @@ export default {
params.bussinessBegintime = ''
params.bussinessEndtime = ''
}
if (params.businessScope) {
params.businessScope = params.businessScope.join(',')
if (params.businessType) {
params.businessType = params.businessType.join(',')
}
params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0)
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
params.businessScopeCustomize = businessScopeCustomize.join(',')
// let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
// params.businessScopeCustomize = businessScopeCustomize.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles)
Promise.all([pm1, pm2]).then(() => {
this.$apis.store.updateMerchant(params).then(res => {
......@@ -326,7 +326,7 @@ export default {
let accountLevel = this.$apis.store.findAllDictData({ dictType: 'account_level' })
let accountType = this.$apis.store.findAllDictData({ dictType: 'account_type' })
let businessOption = this.$apis.store.findAllDictData({
dictType: 'business_scope'
dictType: 'business_type'
})
await Promise.all([accountLevel, accountType, businessOption]).then(res => {
;[this.accountLevel, this.accountType, this.businessOption] = res
......@@ -359,27 +359,27 @@ export default {
})
},
renderView(res) {
let { isloginName, bussinessBegintime, bussinessEndtime, lat, lng, merchantAddress, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessScope, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId } = res
let { isloginName, bussinessBegintime, bussinessEndtime, lat, lng, merchantAddress, merchantName, merchantAbbreviation, merchantType, merchantOrgcode, merchantLegalPerson, merchantLegalPersonPhone, residentContact, residentPhone, merchantLoginAccount, merchantLoginPassword, merchantAccountLevel, businessType, businessScopeCustomize, merchantBrand, merchantFileResponses, merchantModel, accountTypes, accountType, accounttypeId, channelId, status, parentId } = res
this.accountInfoForm.merchantLoginAccount = merchantLoginAccount
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword
this.accountTypes = accountTypes
this.accountAddForm.businessScope = businessScope ? businessScope.split(',') : []
if (this.accountAddForm.businessScope.length > 0) {
for (let i in this.accountAddForm.businessScope) {
this.accountAddForm.businessScope[i] = parseInt(this.accountAddForm.businessScope[i])
this.accountAddForm.businessType = businessType ? businessType.split(',') : []
if (this.accountAddForm.businessType.length > 0) {
for (let i in this.accountAddForm.businessType) {
this.accountAddForm.businessType[i] = parseInt(this.accountAddForm.businessType[i])
}
}
this.accountAddForm.bussinessTime = [bussinessBegintime, bussinessEndtime]
businessScopeCustomize = businessScopeCustomize ? businessScopeCustomize.split(',') : []
if (businessScopeCustomize.length > 0) {
this.businessScopeCustomize = businessScopeCustomize.map(item => {
return {
name: item
}
})
} else {
this.businessScopeCustomize = [{ name: '' }]
}
// businessScopeCustomize = businessScopeCustomize ? businessScopeCustomize.split(',') : []
// if (businessScopeCustomize.length > 0) {
// this.businessScopeCustomize = businessScopeCustomize.map(item => {
// return {
// name: item
// }
// })
// } else {
// this.businessScopeCustomize = [{ name: '' }]
// }
this.accounttypeId = accountType ? accountType.split(',') : []
if (this.accounttypeId.length > 0) {
this.accounttypeId = this.accounttypeId.map(item => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!