Commit ee792b8f by 前端

Merge branch 'huy_dev_v2.0.0' into 'v2.0.0'

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

See merge request !6
2 parents 09763bb2 6e13f2f8
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
status: '', status: '',
merchantFiles: [], merchantFiles: [],
merchantType: 1, merchantType: 1,
businessScope: [], businessType: [],
parentId: '', parentId: '',
isloginName: false isloginName: false
}, },
...@@ -296,16 +296,16 @@ export default { ...@@ -296,16 +296,16 @@ export default {
params.bussinessBegintime = params.bussinessTime[0] params.bussinessBegintime = params.bussinessTime[0]
params.bussinessEndtime = params.bussinessTime[1] params.bussinessEndtime = params.bussinessTime[1]
} }
if (params.businessScope) { if (params.businessType) {
params.businessScope = params.businessScope.join(',') params.businessType = params.businessType.join(',')
} }
params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',') params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0) params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0)
params.merchantAccountLevel = this.accountDetail.merchantAccountLevel params.merchantAccountLevel = this.accountDetail.merchantAccountLevel
params.status = 1 params.status = 1
params.channelId = this.accountDetail.channelId params.channelId = this.accountDetail.channelId
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name) // let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
params.businessScopeCustomize = businessScopeCustomize.join(',') // params.businessScopeCustomize = businessScopeCustomize.join(',')
params.accounttypeId = this.accounttypeId.join(',') params.accounttypeId = this.accounttypeId.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles) params.merchantFiles = JSON.stringify(params.merchantFiles)
params.merchantModel = this.accountDetail.merchantModel params.merchantModel = this.accountDetail.merchantModel
...@@ -317,6 +317,7 @@ export default { ...@@ -317,6 +317,7 @@ export default {
merchant = 'saveMerchant' merchant = 'saveMerchant'
} }
document.querySelector('#app').scrollTop = 0 document.querySelector('#app').scrollTop = 0
console.log(params)
Promise.all([pm1, pm2]).then(() => { Promise.all([pm1, pm2]).then(() => {
this.$apis.store[merchant](params).then(res => { this.$apis.store[merchant](params).then(res => {
if (res) { if (res) {
...@@ -342,7 +343,7 @@ export default { ...@@ -342,7 +343,7 @@ export default {
} }
this.$apis.store.findAllDictData(params).then(res => { this.$apis.store.findAllDictData(params).then(res => {
if (res) { if (res) {
if (dictType == 'business_scope') { if (dictType == 'business_type') {
this.businessOption = res this.businessOption = res
} }
} }
...@@ -390,6 +391,9 @@ export default { ...@@ -390,6 +391,9 @@ export default {
}) })
}, },
getCarbrandTree() { getCarbrandTree() {
// this.$apis.baseInfo.brandList({ needCarSeries: true }).then(res => {
// this.brandData = res
// })
this.$apis.store.getCarbrandTree({}).then(res => { this.$apis.store.getCarbrandTree({}).then(res => {
this.brandData = res this.brandData = res
}) })
...@@ -403,7 +407,7 @@ export default { ...@@ -403,7 +407,7 @@ export default {
this.accountAddForm.parentId = this.$route.params.id this.accountAddForm.parentId = this.$route.params.id
this.findMerchantDetail() this.findMerchantDetail()
this.getCarbrandTree() this.getCarbrandTree()
this.findAllDictData('business_scope') this.findAllDictData('business_type')
} }
} }
</script> </script>
......
...@@ -78,16 +78,16 @@ ...@@ -78,16 +78,16 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="24">
<el-form-item label="营业范围"> <el-form-item label="经营业务类型">
<el-checkbox-group v-model="accountAddForm.businessScope"> <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 v-for="item in businessOption" :label="item.dictValue" :key="item">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group> </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> <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-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> <i class="el-icon-remove el-icon-btn" @click="removeBusinessScope" v-else></i>
</div> </div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -126,9 +126,9 @@ ...@@ -126,9 +126,9 @@
</span> </span>
</el-col> </el-col>
<el-col :span="10" class="flexCol"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">营业范围:</span> <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="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span> <span class="itemValue">{{ firstPageObj.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
......
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
merchantAccountLevel: null, merchantAccountLevel: null,
parentId: null, parentId: null,
merchantModel: null, merchantModel: null,
businessScope: [], businessType: [],
bussinessTime: [], bussinessTime: [],
merchantFiles: [] merchantFiles: []
}, },
...@@ -306,13 +306,13 @@ export default { ...@@ -306,13 +306,13 @@ export default {
params.bussinessBegintime = '' params.bussinessBegintime = ''
params.bussinessEndtime = '' params.bussinessEndtime = ''
} }
if (params.businessScope) { if (params.businessType) {
params.businessScope = params.businessScope.join(',') params.businessType = params.businessType.join(',')
} }
params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',') params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0) params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0)
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name) // let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
params.businessScopeCustomize = businessScopeCustomize.join(',') // params.businessScopeCustomize = businessScopeCustomize.join(',')
params.merchantFiles = JSON.stringify(params.merchantFiles) params.merchantFiles = JSON.stringify(params.merchantFiles)
Promise.all([pm1, pm2]).then(() => { Promise.all([pm1, pm2]).then(() => {
this.$apis.store.updateMerchant(params).then(res => { this.$apis.store.updateMerchant(params).then(res => {
...@@ -326,7 +326,7 @@ export default { ...@@ -326,7 +326,7 @@ export default {
let accountLevel = this.$apis.store.findAllDictData({ dictType: 'account_level' }) let accountLevel = this.$apis.store.findAllDictData({ dictType: 'account_level' })
let accountType = this.$apis.store.findAllDictData({ dictType: 'account_type' }) let accountType = this.$apis.store.findAllDictData({ dictType: 'account_type' })
let businessOption = this.$apis.store.findAllDictData({ let businessOption = this.$apis.store.findAllDictData({
dictType: 'business_scope' dictType: 'business_type'
}) })
await Promise.all([accountLevel, accountType, businessOption]).then(res => { await Promise.all([accountLevel, accountType, businessOption]).then(res => {
;[this.accountLevel, this.accountType, this.businessOption] = res ;[this.accountLevel, this.accountType, this.businessOption] = res
...@@ -359,27 +359,27 @@ export default { ...@@ -359,27 +359,27 @@ export default {
}) })
}, },
renderView(res) { 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.merchantLoginAccount = merchantLoginAccount
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword this.accountInfoForm.merchantLoginPassword = merchantLoginPassword
this.accountTypes = accountTypes this.accountTypes = accountTypes
this.accountAddForm.businessScope = businessScope ? businessScope.split(',') : [] this.accountAddForm.businessType = businessType ? businessType.split(',') : []
if (this.accountAddForm.businessScope.length > 0) { if (this.accountAddForm.businessType.length > 0) {
for (let i in this.accountAddForm.businessScope) { for (let i in this.accountAddForm.businessType) {
this.accountAddForm.businessScope[i] = parseInt(this.accountAddForm.businessScope[i]) this.accountAddForm.businessType[i] = parseInt(this.accountAddForm.businessType[i])
} }
} }
this.accountAddForm.bussinessTime = [bussinessBegintime, bussinessEndtime] this.accountAddForm.bussinessTime = [bussinessBegintime, bussinessEndtime]
businessScopeCustomize = businessScopeCustomize ? businessScopeCustomize.split(',') : [] // businessScopeCustomize = businessScopeCustomize ? businessScopeCustomize.split(',') : []
if (businessScopeCustomize.length > 0) { // if (businessScopeCustomize.length > 0) {
this.businessScopeCustomize = businessScopeCustomize.map(item => { // this.businessScopeCustomize = businessScopeCustomize.map(item => {
return { // return {
name: item // name: item
} // }
}) // })
} else { // } else {
this.businessScopeCustomize = [{ name: '' }] // this.businessScopeCustomize = [{ name: '' }]
} // }
this.accounttypeId = accountType ? accountType.split(',') : [] this.accounttypeId = accountType ? accountType.split(',') : []
if (this.accounttypeId.length > 0) { if (this.accounttypeId.length > 0) {
this.accounttypeId = this.accounttypeId.map(item => { 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!