Commit d6fb6fd1 by zhuzhequan

Merge branch 'dev_jm_user' of http://47.122.114.111:9999/chehuidong/saas-manage…

Merge branch 'dev_jm_user' of http://47.122.114.111:9999/chehuidong/saas-manage into dev_customer_follow
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
parents 124f05e2 61675d28
......@@ -426,8 +426,8 @@ export default {
display: inline-block;
} */
.img_wrap {
width: 58px;
height: 58px;
width: 50px;
height: 49px;
border: 1px solid #ddd;
background: #fff;
cursor: pointer;
......
......@@ -56,7 +56,7 @@ const routes = [
meta: { title: '工单管理' }
},
{
path: '/saas/user',
path: '/saas/users',
component: () => import('@/views/system/users.vue'),
name: 'system_user',
meta: { title: '用户管理' }
......
......@@ -438,17 +438,17 @@ export default {
path: '',
label: '用户管理',
icon: 'el-icon-s-order',
index: 'user',
children: []
},
{
id: 2,
path: '',
label: '角色管理',
icon: 'el-icon-s-order',
index: 'user',
index: '/saas/users',
children: []
},
// {
// id: 2,
// path: '',
// label: '角色管理',
// icon: 'el-icon-s-order',
// index: 'user',
// children: []
// },
{
id: 3,
path: '',
......
......@@ -74,7 +74,7 @@
开通erp
</el-button>
</el-form-item> -->
<el-form-item>
<!-- <el-form-item>
<el-button
type="danger"
size="small"
......@@ -82,7 +82,7 @@
@click="deleteData">
删除
</el-button>
</el-form-item>
</el-form-item> -->
</el-form>
</div>
<div class="table-wrap" v-loading="loading">
......
......@@ -81,7 +81,9 @@
<el-select
v-model="editForm.operationUserId"
placeholder="请选择客户运营"
style="width: 250px">
style="width: 250px"
filterable
clearable>
<el-option
v-for="item in userLists"
:key="item.id"
......@@ -96,6 +98,7 @@
v-model="editForm.remark"
clearable
style="width: 250px"
:rows="2"
type="textarea"
placeholder="请输入备注" />
</el-form-item>
......@@ -277,7 +280,7 @@ export default {
return TITLE_MAP[this.commandTitle] || ''
},
// 开通ERP|编辑时 + ERP服务是已开通、开通失败和已关闭时,全部必填,出现ERP信息表单
// 新增客户|编辑 + ERP服务是未开通时,只校验"业务对接人"必填,不出现ERP信息表单
// 新增客户|编辑 + ERP服务是未开通时,只校验必填项,不出现ERP信息表单
isFullValidate() {
return (
this.commandTitle === 'openErp' ||
......@@ -288,8 +291,9 @@ export default {
const requiredRule = (message, trigger = 'blur') => [
{ required: true, message, trigger }
]
// 仅"业务对接人"必填
// 仅"业务对接人"、"公司名称"必填
const baseRules = {
companyName: requiredRule('请输入公司名称'),
contactUserName: requiredRule('请输入业务对接人')
}
// 其他情况:维持原有全部必填
......@@ -326,7 +330,10 @@ export default {
},
set(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)
}
}
......@@ -352,15 +359,21 @@ export default {
// 上传/重排后同步到 editForm.businessLicenseUri(v-model change 已自动同步,这里再做一次防御性赋值)
selectImg(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)
},
// 删除图片:上传组件 splice 后不会 emit change,从组件读取当前 fileList 并手动同步
onImgRemove() {
this.$nextTick(() => {
const ref = this.$refs.uploadRef
const fileList = (ref && Array.isArray(ref.fileList)) ? ref.fileList : []
const imagePath = fileList.map((ee) => ee.imagePath || '').filter(Boolean).join(',')
const fileList = ref && Array.isArray(ref.fileList) ? ref.fileList : []
const imagePath = fileList
.map((ee) => ee.imagePath || '')
.filter(Boolean)
.join(',')
this.$set(this.editForm, 'businessLicenseUri', imagePath)
})
},
......
......@@ -55,6 +55,20 @@
placeholder="请输入客户编码"
clearable></el-input>
</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-button @click="getTableList()" type="primary" size="mini">
查询
......@@ -418,7 +432,7 @@ export default {
const isOpen = status === '已开通'
const isActivating = status === '开通中'
const canOpen = ['未开通', '开通失败'].includes(status)
const canDelete = ['已关闭', '开通失败'].includes(status)
const canDelete = ['未开通', '已关闭', '开通失败'].includes(status)
const imgStyle = {
width: '24px',
height: '24px',
......@@ -456,9 +470,13 @@ export default {
onCommand={(cmd) => this.handleOperation(cmd, item)}>
<span style={{ lineHeight: 1, display: 'inline-block' }}>
<img
title="更多"
title={isActivating ? '开通中,更多操作不可点击' : '更多'}
src={require('@/assets/images/more.png')}
style={imgStyle}
style={{
...imgStyle,
opacity: isActivating ? 0.4 : 1,
cursor: isActivating ? 'not-allowed' : 'pointer'
}}
/>
</span>
<el-dropdown-menu slot="dropdown">
......@@ -705,24 +723,27 @@ export default {
this.$message.error('加载详情失败')
})
},
closeCustomerInfo(v) {
this.$confirm('确定对当前客户进行关闭ERP操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
const res = await post('customer/info/closeService', {
customerId: v.id,
serviceType: 1
})
if (res.code !== 200) return
this.$message.success('关闭ERP成功!')
this.getTableList()
} catch (e) {
console.error(e)
}
})
async closeCustomerInfo(v) {
try {
await this.$confirm('确定对当前客户进行关闭ERP操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
} catch {
return
}
try {
const res = await post('customer/info/closeService', {
customerId: v.id,
serviceType: 1
})
if (res.code !== 200) return
this.$message.success('关闭ERP成功!')
this.getTableList()
} catch (e) {
console.error(e)
}
},
giftOrderInfo(v) {
this.currentRow = v
......@@ -760,21 +781,24 @@ export default {
}
})
},
deleteSection(v) {
this.$confirm('确定删除选中的信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
const res = await remove(`customer/info/delete/${v.id}`)
if (res.code !== 200) return
this.$message.success('删除成功!')
this.getTableList()
} catch (e) {
console.error(e)
}
})
async deleteSection(v) {
try {
await this.$confirm('确定删除选中的信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
} catch {
return
}
try {
const res = await remove(`customer/info/delete/${v.id}`)
if (res.code !== 200) return
this.$message.success('删除成功!')
this.getTableList()
} catch (e) {
console.error(e)
}
},
async logInfo(v) {
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