Commit d5d35b48 by 胡悦

修改经营业务类型和主营品牌

1 parent 77f499f1
......@@ -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,18 @@ 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(',')
const getCheckedArr = this.$refs.baseInfoForm.$refs.brandListTree.getCheckedArr
const merchantBrandMain = getCheckedArr.map(item => item.id)
params.merchantBrandMain = merchantBrandMain.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 +319,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 +345,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 +393,9 @@ export default {
})
},
getCarbrandTree() {
// this.$apis.baseInfo.brandList({ needCarSeries: true }).then(res => {
// this.brandData = res
// })
this.$apis.store.getCarbrandTree({}).then(res => {
this.brandData = res
})
......@@ -401,9 +407,10 @@ export default {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.accountAddForm.parentId = this.$route.params.id
this.$refs.baseInfoForm.checkBusinessType()
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-checkbox v-for="item in businessOption" :label="item.dictValue" :key="item">{{ item.dictLabel }}</el-checkbox>
<el-col :span="24">
<el-form-item label="经营业务类型">
<el-checkbox-group v-model="accountAddForm.businessType">
<el-checkbox v-for="item in businessType" :label="item.dictValue" :disabled="item.dictValue <= 6" :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>
......@@ -101,10 +101,11 @@
<el-row>
<el-col :span="12">
<el-form-item label="主营品牌">
<el-input size="small" v-model="filterText"></el-input>
<select-brand :brandListTree="brandListTree" ref="brandListTree"></select-brand>
<!-- <el-input size="small" v-model="filterText"></el-input>
<div class="brand-tree">
<el-tree :data="brandData" show-checkbox default-expand-all node-key="id" ref="brandTree" highlight-current :props="defaultProps" :filter-node-method="filterNode" @check="clickDeal"></el-tree>
</div>
</div> -->
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -141,10 +142,12 @@
<script>
import util from '@/utils/util'
import mapView from '@/components/mapView/index'
import SelectBrand from '../../baseInfo/selectBrand.vue'
export default {
name: 'base',
components: {
mapView
mapView,
SelectBrand
},
props: {
accountAddForm: {
......@@ -187,7 +190,8 @@ export default {
{ required: true, message: '请输入联系电话', trigger: 'blur' },
{ validator: validatePhone, trigger: 'blur' }
]
}
},
brandListTree: []
}
},
watch: {
......@@ -196,6 +200,42 @@ export default {
}
},
methods: {
checkBrandList(merchantBrandMain) {
this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain)
if (!this.accountAddForm.merchantBrandMain) {
this.accountAddForm.merchantBrandMain = []
} else {
this.accountAddForm.merchantBrandMain = this.accountAddForm.merchantBrandMain.split(',')
}
this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
},
checkBusinessType(type) {
if (!type) {
this.accountAddForm.businessType = [1, 2, 3, 4, 5, 6]
} else {
const businessType = type.split(',')
this.$set(
this.accountAddForm,
'businessType',
businessType.map(item => (item = parseInt(item)))
)
}
},
async brandList() {
this.$refs.brandListTree.loading = true
this.businessType = await this.$apis.store.findAllDictData({ dictType: 'business_type' })
const brandListTree = await this.$apis.baseInfo.brandList({ needCarSeries: true })
brandListTree.forEach(item => {
let child = item.childs
child.forEach(k => {
delete k.childs
})
})
this.brandListTree = brandListTree
this.$nextTick(() => {
this.$refs.brandListTree.loading = false
})
},
hanleSelectMap() {
this.dialogMapVisible = true
this.$nextTick(() => {
......@@ -275,7 +315,9 @@ export default {
}
},
mounted() {}
mounted() {
this.brandList()
}
}
</script>
......
......@@ -126,9 +126,9 @@
</span>
</el-col>
<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.businessTypeName ? firstPageObj.businessTypeName : '-' }}</span>
</el-col>
</el-row>
<el-row>
......
......@@ -306,14 +306,17 @@ 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.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(',')
params.merchantFiles = JSON.stringify(params.merchantFiles)
const getCheckedArr = this.$refs.baseInfoForm.$refs.brandListTree.getCheckedArr
const merchantBrandMain = getCheckedArr.map(item => item.id)
params.merchantBrandMain = merchantBrandMain.join(',')
Promise.all([pm1, pm2]).then(() => {
this.$apis.store.updateMerchant(params).then(res => {
if (res) {
......@@ -359,7 +362,7 @@ 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, merchantBrandMain, businessType, 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
this.accountInfoForm.merchantLoginAccount = merchantLoginAccount
this.accountInfoForm.merchantLoginPassword = merchantLoginPassword
this.accountTypes = accountTypes
......@@ -399,7 +402,7 @@ export default {
for (let i in merchantBrand) {
merchantBrand[i] = parseInt(merchantBrand[i])
}
this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand)
// this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand)
this.accountAddForm = Object.assign(this.accountAddForm, {
isloginName: isloginName ? true : false,
lat,
......@@ -418,8 +421,11 @@ export default {
parentId,
channelId,
status,
accounttypeId: accountType
accounttypeId: accountType,
merchantBrandMain
})
this.$refs.baseInfoForm.checkBrandList(merchantBrandMain)
this.$refs.baseInfoForm.checkBusinessType(businessType)
this.$nextTick(() => {
this.$refs.baseInfoForm.$refs.baseForm.validate()
this.editStatus = false
......
<!--
* @Author: your name
* @Date: 2022-03-03 17:45:22
* @LastEditTime: 2022-03-04 16:53:04
* @LastEditTime: 2022-03-14 21:52:43
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\createGuide.vue
......@@ -17,7 +17,7 @@
</div>
<div class="step-content">
打开企微后台登录地址:
<el-link type="primary" target="_blank" :underline="false" href="https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome">https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome</el-link>
<el-link type="primary" target="_blank" :underline="false" href="https://work.weixin.qq.com/login">https://work.weixin.qq.com/login</el-link>
企微管理员用企微或者微信扫码进行登录
</div>
</div>
......@@ -38,7 +38,7 @@
<div class="step-title" style="margin-bottom: 16px">在【嘀加企微管家】应用页下方,根据接入方式,找到对应功能(自建应用模式和应用代开发模式为2存1,不会同时出现,企微管理员只需关注“审批设置”在企微后台那里 展示,点进去配置即可)</div>
<div class="half-step">
<div class="half-title">自建应用模式:</div>
<div class="half-content third-content">在【开发者接口】模块,找到“审批接口”,点击【设置】,进入设置页</div>
<div class="half-content third-content" :style="{ height: thirdHeight + 'px' }">在【开发者接口】模块,找到“审批接口”,点击【设置】,进入设置页</div>
<img class="step3-img" src="../../../src/assets/guide/02@3x.png" alt="" />
</div>
<div class="half-step m-l-md">
......@@ -85,7 +85,7 @@
</div>
<div class="half-step m-l-md">
<div class="half-title">应用代开发模式:</div>
<div class="half-content five-content">需进入模板的配置页,在浏览器链接中,复制如图位置的字符,即可获取审批 模板的ID</div>
<div class="half-content five-content" :style="{ height: fiveHeight + 'px' }">需进入模板的配置页,在浏览器链接中,复制如图位置的字符,即可获取审批 模板的ID</div>
<img class="step5-img" src="../../../src/assets/guide/09@3x.png" alt="" />
</div>
</div>
......@@ -104,23 +104,15 @@ export default {
footerLeft: 0,
footerWidth: 0,
// 当屏幕太小导致换行,出现对不齐问题
fiveHeight: 20,
thirdHeight: 20
fiveHeight: 40,
thirdHeight: 40
}
},
mounted() {
// setTimeout(() => {
// this.lineHeight = document.querySelector('.guide-content').clientHeight - 92
// this.resize()
window.onresize = () => {
// this.resize()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.thirdHeight = document.querySelector('.third-content').clientHeight
this.fiveHeight = document.querySelector('.five-content').clientHeight
}
// window.addEventListener('resize', this.resize())
// }, 1000 / 60)
},
beforeDestroy() {
// 事件注销
......@@ -129,20 +121,6 @@ export default {
methods: {
handleCancel() {
this.$router.push({ path: '/approvalConfig/index' })
},
resize() {
// this.resetData()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.thirdHeight = document.querySelector('.third-content').clientHeight
this.fiveHeight = document.querySelector('.five-content').clientHeight
},
resetData() {
this.lineHeight = 2200
this.footerLeft = 0
this.footerWidth = 0
this.fiveHeight = 20
this.thirdHeight = 20
}
}
}
......
<!--
* @Author: your name
* @Date: 2022-03-02 18:28:20
* @LastEditTime: 2022-03-12 14:18:52
* @LastEditTime: 2022-03-14 21:49:57
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\index.vue
......@@ -77,7 +77,6 @@ export default {
this.getApprove()
},
mounted() {
this.oldConfig = util.deepClone(this.config)
this.clientHeight = document.documentElement.scrollHeight - 140
},
methods: {
......@@ -121,6 +120,7 @@ export default {
// const merchantId = 44209572
this.$apis.approvalConfig.getApproveDetail({ merchantId }).then(res => {
this.config.approveTemplateId = res
this.oldConfig = util.deepClone(this.config)
})
}
}
......
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-03-07 14:43:18
* @LastEditTime: 2022-03-14 21:32:45
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
......@@ -15,9 +15,9 @@
<el-input v-model="infoForm.merchantAddress" placeholder="请选择商户地址" readonly="readonly"></el-input>
<el-button @click="hanleSelectMap" type="primary">选择地址</el-button>
</el-form-item>
<el-form-item size="small" label="业务类型">
<el-form-item size="small" label="经营业务类型">
<el-checkbox-group v-model="infoForm.businessType">
<el-checkbox :label="item.dictValue" v-for="item in businessType" :key="item.dictValue">{{ item.dictLabel }}</el-checkbox>
<el-checkbox :label="item.dictValue" v-for="item in businessType" :disabled="item.dictValue <= 6" :key="item.dictValue">{{ item.dictLabel }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item size="small" label="营业时间" class="time-row">
......@@ -88,7 +88,7 @@ export default {
channelId
}
if (!businessType) {
this.infoForm.businessType = []
this.infoForm.businessType = [1, 2, 3, 4, 5, 6]
} else {
const businessType = this.infoForm.businessType.split(',')
this.infoForm.businessType = businessType.map(item => (item = parseInt(item)))
......@@ -139,7 +139,7 @@ export default {
if (params.bussinessTime) {
params.bussinessBegintime = params.bussinessTime[0]
params.bussinessEndtime = params.bussinessTime[1]
}else {
} else {
params.bussinessBegintime = ''
params.bussinessEndtime = ''
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!