Commit 61675d28 by wuqian

feat:修复九猫客户管理测试BUG

parent cc9f4476
...@@ -426,8 +426,8 @@ export default { ...@@ -426,8 +426,8 @@ export default {
display: inline-block; display: inline-block;
} */ } */
.img_wrap { .img_wrap {
width: 58px; width: 50px;
height: 58px; height: 49px;
border: 1px solid #ddd; border: 1px solid #ddd;
background: #fff; background: #fff;
cursor: pointer; cursor: pointer;
......
...@@ -56,7 +56,7 @@ const routes = [ ...@@ -56,7 +56,7 @@ const routes = [
meta: { title: '工单管理' } meta: { title: '工单管理' }
}, },
{ {
path: '/saas/user', path: '/saas/users',
component: () => import('@/views/system/users.vue'), component: () => import('@/views/system/users.vue'),
name: 'system_user', name: 'system_user',
meta: { title: '用户管理' } meta: { title: '用户管理' }
......
...@@ -438,17 +438,17 @@ export default { ...@@ -438,17 +438,17 @@ export default {
path: '', path: '',
label: '用户管理', label: '用户管理',
icon: 'el-icon-s-order', icon: 'el-icon-s-order',
index: 'user', index: '/saas/users',
children: []
},
{
id: 2,
path: '',
label: '角色管理',
icon: 'el-icon-s-order',
index: 'user',
children: [] children: []
}, },
// {
// id: 2,
// path: '',
// label: '角色管理',
// icon: 'el-icon-s-order',
// index: 'user',
// children: []
// },
{ {
id: 3, id: 3,
path: '', path: '',
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
开通erp 开通erp
</el-button> </el-button>
</el-form-item> --> </el-form-item> -->
<el-form-item> <!-- <el-form-item>
<el-button <el-button
type="danger" type="danger"
size="small" size="small"
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
@click="deleteData"> @click="deleteData">
删除 删除
</el-button> </el-button>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</div> </div>
<div class="table-wrap" v-loading="loading"> <div class="table-wrap" v-loading="loading">
......
...@@ -81,7 +81,9 @@ ...@@ -81,7 +81,9 @@
<el-select <el-select
v-model="editForm.operationUserId" v-model="editForm.operationUserId"
placeholder="请选择客户运营" placeholder="请选择客户运营"
style="width: 250px"> style="width: 250px"
filterable
clearable>
<el-option <el-option
v-for="item in userLists" v-for="item in userLists"
:key="item.id" :key="item.id"
...@@ -96,6 +98,7 @@ ...@@ -96,6 +98,7 @@
v-model="editForm.remark" v-model="editForm.remark"
clearable clearable
style="width: 250px" style="width: 250px"
:rows="2"
type="textarea" type="textarea"
placeholder="请输入备注" /> placeholder="请输入备注" />
</el-form-item> </el-form-item>
...@@ -277,7 +280,7 @@ export default { ...@@ -277,7 +280,7 @@ export default {
return TITLE_MAP[this.commandTitle] || '' return TITLE_MAP[this.commandTitle] || ''
}, },
// 开通ERP|编辑时 + ERP服务是已开通、开通失败和已关闭时,全部必填,出现ERP信息表单 // 开通ERP|编辑时 + ERP服务是已开通、开通失败和已关闭时,全部必填,出现ERP信息表单
// 新增客户|编辑 + ERP服务是未开通时,只校验"业务对接人"必填,不出现ERP信息表单 // 新增客户|编辑 + ERP服务是未开通时,只校验必填项,不出现ERP信息表单
isFullValidate() { isFullValidate() {
return ( return (
this.commandTitle === 'openErp' || this.commandTitle === 'openErp' ||
...@@ -288,8 +291,9 @@ export default { ...@@ -288,8 +291,9 @@ export default {
const requiredRule = (message, trigger = 'blur') => [ const requiredRule = (message, trigger = 'blur') => [
{ required: true, message, trigger } { required: true, message, trigger }
] ]
// 仅"业务对接人"必填 // 仅"业务对接人"、"公司名称"必填
const baseRules = { const baseRules = {
companyName: requiredRule('请输入公司名称'),
contactUserName: requiredRule('请输入业务对接人') contactUserName: requiredRule('请输入业务对接人')
} }
// 其他情况:维持原有全部必填 // 其他情况:维持原有全部必填
...@@ -326,7 +330,10 @@ export default { ...@@ -326,7 +330,10 @@ export default {
}, },
set(val) { set(val) {
const list = Array.isArray(val) ? val : [] const list = Array.isArray(val) ? val : []
const imagePath = list.map((ee) => ee.imagePath || '').filter(Boolean).join(',') const imagePath = list
.map((ee) => ee.imagePath || '')
.filter(Boolean)
.join(',')
this.$set(this.editForm, 'businessLicenseUri', imagePath) this.$set(this.editForm, 'businessLicenseUri', imagePath)
} }
} }
...@@ -352,15 +359,21 @@ export default { ...@@ -352,15 +359,21 @@ export default {
// 上传/重排后同步到 editForm.businessLicenseUri(v-model change 已自动同步,这里再做一次防御性赋值) // 上传/重排后同步到 editForm.businessLicenseUri(v-model change 已自动同步,这里再做一次防御性赋值)
selectImg(file) { selectImg(file) {
const list = Array.isArray(file) ? file : [] const list = Array.isArray(file) ? file : []
const imagePath = list.map((ee) => ee.imagePath || '').filter(Boolean).join(',') const imagePath = list
.map((ee) => ee.imagePath || '')
.filter(Boolean)
.join(',')
this.$set(this.editForm, 'businessLicenseUri', imagePath) this.$set(this.editForm, 'businessLicenseUri', imagePath)
}, },
// 删除图片:上传组件 splice 后不会 emit change,从组件读取当前 fileList 并手动同步 // 删除图片:上传组件 splice 后不会 emit change,从组件读取当前 fileList 并手动同步
onImgRemove() { onImgRemove() {
this.$nextTick(() => { this.$nextTick(() => {
const ref = this.$refs.uploadRef const ref = this.$refs.uploadRef
const fileList = (ref && Array.isArray(ref.fileList)) ? ref.fileList : [] const fileList = ref && Array.isArray(ref.fileList) ? ref.fileList : []
const imagePath = fileList.map((ee) => ee.imagePath || '').filter(Boolean).join(',') const imagePath = fileList
.map((ee) => ee.imagePath || '')
.filter(Boolean)
.join(',')
this.$set(this.editForm, 'businessLicenseUri', imagePath) this.$set(this.editForm, 'businessLicenseUri', imagePath)
}) })
}, },
......
...@@ -55,6 +55,20 @@ ...@@ -55,6 +55,20 @@
placeholder="请输入客户编码" placeholder="请输入客户编码"
clearable></el-input> clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="客户运营">
<el-select
v-model="searchForm.operationUserId"
placeholder="请选择客户运营"
style="width: 130px"
clearable
filterable>
<el-option
v-for="item in userLists"
:key="item.id"
:label="item.realName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label> <el-form-item label>
<el-button @click="getTableList()" type="primary" size="mini"> <el-button @click="getTableList()" type="primary" size="mini">
查询 查询
...@@ -391,7 +405,7 @@ export default { ...@@ -391,7 +405,7 @@ export default {
const isOpen = status === '已开通' const isOpen = status === '已开通'
const isActivating = status === '开通中' const isActivating = status === '开通中'
const canOpen = ['未开通', '开通失败'].includes(status) const canOpen = ['未开通', '开通失败'].includes(status)
const canDelete = ['已关闭', '开通失败'].includes(status) const canDelete = ['未开通', '已关闭', '开通失败'].includes(status)
const imgStyle = { const imgStyle = {
width: '24px', width: '24px',
height: '24px', height: '24px',
...@@ -429,9 +443,13 @@ export default { ...@@ -429,9 +443,13 @@ export default {
onCommand={(cmd) => this.handleOperation(cmd, item)}> onCommand={(cmd) => this.handleOperation(cmd, item)}>
<span style={{ lineHeight: 1, display: 'inline-block' }}> <span style={{ lineHeight: 1, display: 'inline-block' }}>
<img <img
title="更多" title={isActivating ? '开通中,更多操作不可点击' : '更多'}
src={require('@/assets/images/more.png')} src={require('@/assets/images/more.png')}
style={imgStyle} style={{
...imgStyle,
opacity: isActivating ? 0.4 : 1,
cursor: isActivating ? 'not-allowed' : 'pointer'
}}
/> />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
...@@ -667,12 +685,16 @@ export default { ...@@ -667,12 +685,16 @@ export default {
this.$message.error('加载详情失败') this.$message.error('加载详情失败')
}) })
}, },
closeCustomerInfo(v) { async closeCustomerInfo(v) {
this.$confirm('确定对当前客户进行关闭ERP操作?', '提示', { try {
await this.$confirm('确定对当前客户进行关闭ERP操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async () => { })
} catch {
return
}
try { try {
const res = await post('customer/info/closeService', { const res = await post('customer/info/closeService', {
customerId: v.id, customerId: v.id,
...@@ -684,7 +706,6 @@ export default { ...@@ -684,7 +706,6 @@ export default {
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
})
}, },
giftOrderInfo(v) { giftOrderInfo(v) {
this.currentRow = v this.currentRow = v
...@@ -722,12 +743,16 @@ export default { ...@@ -722,12 +743,16 @@ export default {
} }
}) })
}, },
deleteSection(v) { async deleteSection(v) {
this.$confirm('确定删除选中的信息?', '提示', { try {
await this.$confirm('确定删除选中的信息?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async () => { })
} catch {
return
}
try { try {
const res = await remove(`customer/info/delete/${v.id}`) const res = await remove(`customer/info/delete/${v.id}`)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -736,7 +761,6 @@ export default { ...@@ -736,7 +761,6 @@ export default {
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
})
}, },
async logInfo(v) { async logInfo(v) {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment