From 377b3968da25cb307b04ad05916805a6ef325dab Mon Sep 17 00:00:00 2001
From: yunuo970428 <405378304@qq.com>
Date: Tue, 30 Jul 2024 13:41:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AE=A2=E6=88=B7=E7=AE=A1?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/api/client/customermanagement.js | 8 +-
yxt-as-ui/src/router/index.js | 6 +
.../customermanagement/customermanagement.vue | 134 +++++++++++++++++-
.../customermanagement/relation/person.vue | 113 +++++++++++++++
.../customermanagement/relation/vehicle.vue | 5 +-
.../relation/vehicleAdd.vue | 11 +-
6 files changed, 267 insertions(+), 10 deletions(-)
create mode 100644 yxt-as-ui/src/views/client/customermanagement/relation/person.vue
diff --git a/yxt-as-ui/src/api/client/customermanagement.js b/yxt-as-ui/src/api/client/customermanagement.js
index bccfdfcfb1..5991669c97 100644
--- a/yxt-as-ui/src/api/client/customermanagement.js
+++ b/yxt-as-ui/src/api/client/customermanagement.js
@@ -44,7 +44,7 @@ export default {
// 定点企业禁用
disableState: function(data) {
return request({
- url: '/crm/v1/crmcustomerorg/disableState',
+ url: '/crm/v1/crmcustomertemp/disableState',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
@@ -53,7 +53,7 @@ export default {
// 定点企业启用
enable: function(data) {
return request({
- url: '/crm/v1/crmcustomerorg/enable',
+ url: '/crm/v1/crmcustomertemp/enable',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
@@ -103,7 +103,7 @@ export default {
// 对接人列表
personList: function(params) {
return request({
- url: '/as/v1/ascustomerperson/personList',
+ url: '/crm/v1/crmmaintenanceenterpriseperson/personList',
method: 'get',
params: params
})
@@ -111,7 +111,7 @@ export default {
// 删除对接人信息
delPersonBySids: function(data) {
return request({
- url: '/as/v1/ascustomerperson/delBySids',
+ url: '/crm/v1/crmmaintenanceenterpriseperson/delBySids',
method: 'DELETE',
data: data,
headers: { 'Content-Type': 'application/json' }
diff --git a/yxt-as-ui/src/router/index.js b/yxt-as-ui/src/router/index.js
index 0492665998..de51a10848 100644
--- a/yxt-as-ui/src/router/index.js
+++ b/yxt-as-ui/src/router/index.js
@@ -431,6 +431,12 @@ export const constantRoutes = [{
name: 'CustomerManagement',
meta: { title: '客户管理', noCache: true }
},
+ {
+ path: '/filing/maintenanceEnterprise',
+ component: () => import('@/views/client/filing/maintenanceEnterprise.vue'),
+ name: 'MaintenanceEnterprise',
+ meta: { title: '定点企业备案', noCache: true }
+ },
{
path: '/customerunit/customerunit',
component: () => import('@/views/client/customerunit/customerunit.vue'),
diff --git a/yxt-as-ui/src/views/client/customermanagement/customermanagement.vue b/yxt-as-ui/src/views/client/customermanagement/customermanagement.vue
index 0b6b4d2748..9b2b421bd0 100644
--- a/yxt-as-ui/src/views/client/customermanagement/customermanagement.vue
+++ b/yxt-as-ui/src/views/client/customermanagement/customermanagement.vue
@@ -58,6 +58,18 @@
+
+
+
+
+ {{ scope.row.isEnable == '1' ? '已启用' : scope.row.isEnable == '0' ? '禁用' : '' }}
+
+
+
+
+ {{ scope.row.personCount }}
+
+
{{ scope.row.vehCount }}
@@ -82,6 +94,10 @@
+
+
+
+
@@ -121,6 +137,8 @@ import customermanagementAdd from './customermanagementAdd'
import customermanagementInfo from './customermanagementInfo'
import vehicle from './relation/vehicle'
import vehicleAdd from './relation/vehicleAdd'
+import maintenanceEnterpriseAdd from '../filing/maintenanceEnterpriseAdd'
+import person from './relation/person'
import { typeValues } from '@/api/Common/dictcommons'
export default {
@@ -132,12 +150,35 @@ export default {
customermanagementAdd,
customermanagementInfo,
vehicle,
- vehicleAdd
+ vehicleAdd,
+ maintenanceEnterpriseAdd,
+ person
},
data() {
return {
btndisabled: false,
btnList: [
+ {
+ type: 'primary',
+ size: 'small',
+ icon: '',
+ btnKey: 'toFiling',
+ btnLabel: '定点企业备案'
+ },
+ {
+ type: 'primary',
+ size: 'small',
+ icon: '',
+ btnKey: 'toForbidden',
+ btnLabel: '禁用'
+ },
+ {
+ type: 'primary',
+ size: 'small',
+ icon: '',
+ btnKey: 'toEnable',
+ btnLabel: '启用'
+ },
{
type: 'primary',
size: 'small',
@@ -187,6 +228,7 @@ export default {
tableKey: 0,
list: [],
sids: [], // 用于导出的时候保存已选择的SIDs
+ multipleSelection: [],
merType: [],
induslevel: [],
visitWay_list: [],
@@ -263,6 +305,15 @@ export default {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
+ case 'toFiling':
+ this.toFiling()
+ break
+ case 'toForbidden':
+ this.toForbidden()
+ break
+ case 'toEnable':
+ this.toEnable()
+ break
case 'toAdd':
this.toAdd()
break
@@ -288,6 +339,7 @@ export default {
// 信息条数 获取点击时当前的sid
handleSelectionChange(row) {
const aa = []
+ this.multipleSelection = row
row.forEach(element => {
aa.push(element.sid)
})
@@ -341,6 +393,78 @@ export default {
}
this.getList()
},
+ toFiling() {
+ if (this.sids.length === 1) {
+ for (var i = 0; i < this.multipleSelection.length; i++) {
+ if (this.multipleSelection[i].isDesignatedEnterprise === '1' || !this.multipleSelection[i].isFilingIndate) {
+ this.$message({ showClose: true, type: 'error', message: '因该条记录中是否为定点企业为是且备案有效期仍在有效期内,需要进行补充备案操作' })
+ return
+ }
+ }
+ this.viewState = 7
+ this.$refs['divAddFiling'].dataInit(this.sids[0])
+ } else {
+ this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
+ }
+ },
+ toForbidden() {
+ if (this.sids.length === 0) {
+ this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行操作' })
+ return
+ }
+ const tip = '请确认是否禁用所选 ' + this.sids.length + ' 条记录?'
+ this.$confirm(tip, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ req.disableState(this.sids).then(resp => {
+ if (resp.success) {
+ this.$message({ type: 'success', message: resp.msg, showClose: true })
+ }
+ this.getList()
+ loading.close()
+ }).catch(e => {
+ loading.close()
+ })
+ }).catch(() => {
+ })
+ },
+ toEnable() {
+ if (this.sids.length === 0) {
+ this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行操作' })
+ return
+ }
+ const tip = '请确认是否启用所选 ' + this.sids.length + ' 条记录?'
+ this.$confirm(tip, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ req.enable(this.sids).then(resp => {
+ if (resp.success) {
+ this.$message({ type: 'success', message: resp.msg, showClose: true })
+ }
+ this.getList()
+ loading.close()
+ }).catch(e => {
+ loading.close()
+ })
+ }).catch(() => {
+ })
+ },
toAdd() {
this.dialogVisible = true
this.formobj = {
@@ -387,6 +511,10 @@ export default {
},
addVehicle() {
if (this.sids.length === 1) {
+ if (this.multipleSelection[0].isDesignatedEnterprise === '1' || !this.multipleSelection[0].isFilingIndate) {
+ this.$message({ showClose: true, type: 'error', message: '因该条记录中是否为定点企业为是且备案有效期仍在有效期内,需要进行补充备案操作' })
+ return
+ }
this.viewState = 6
this.$refs['divAddVehicle'].showAdd(this.sids[0])
} else {
@@ -397,6 +525,10 @@ export default {
this.viewState = 5
this.$refs['divVehicle'].showInfo(row)
},
+ lookPerson(row) {
+ this.viewState = 8
+ this.$refs['divPerson'].showInfo(row)
+ },
doExport() {},
// 删除
doDel() {
diff --git a/yxt-as-ui/src/views/client/customermanagement/relation/person.vue b/yxt-as-ui/src/views/client/customermanagement/relation/person.vue
new file mode 100644
index 0000000000..0741441d7d
--- /dev/null
+++ b/yxt-as-ui/src/views/client/customermanagement/relation/person.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+ 车辆列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yxt-as-ui/src/views/client/customermanagement/relation/vehicle.vue b/yxt-as-ui/src/views/client/customermanagement/relation/vehicle.vue
index 2439489b25..0ab13aceae 100644
--- a/yxt-as-ui/src/views/client/customermanagement/relation/vehicle.vue
+++ b/yxt-as-ui/src/views/client/customermanagement/relation/vehicle.vue
@@ -49,6 +49,7 @@ export default {
},
data() {
return {
+ isDesignatedEnterprise: false,
viewTitle: '',
viewState: 1,
submitdisabled: false,
@@ -68,6 +69,7 @@ export default {
this.$refs['form_obj'].clearValidate()
})
this.formobj.sid = row.sid
+ this.isDesignatedEnterprise = row.isDesignatedEnterprise
req.vehList({ sid: row.sid }).then((res) => {
if (res.success) {
this.formobj.list = res.data
@@ -85,7 +87,7 @@ export default {
handleEdit() {
if (this.sids.length === 1) {
this.viewState = 2
- this.$refs['divAdd'].showEdit(this.sids[0])
+ this.$refs['divAdd'].showEdit(this.sids[0], this.isDesignatedEnterprise)
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
}
@@ -138,6 +140,7 @@ export default {
sid: '',
list: []
}
+ this.isDesignatedEnterprise = false
this.submitdisabled = false
this.$emit('doback')
}
diff --git a/yxt-as-ui/src/views/client/customermanagement/relation/vehicleAdd.vue b/yxt-as-ui/src/views/client/customermanagement/relation/vehicleAdd.vue
index 45fa178e77..0f24287545 100644
--- a/yxt-as-ui/src/views/client/customermanagement/relation/vehicleAdd.vue
+++ b/yxt-as-ui/src/views/client/customermanagement/relation/vehicleAdd.vue
@@ -14,17 +14,17 @@
*车牌号
-
+
*车架号
-
+
发动机号
-
+
车型
@@ -160,6 +160,7 @@ export default {
viewTitle: '',
viewState: 1,
submitdisabled: false,
+ isDesignatedEnterprise: false, // 是否为定点企业为是时,编辑车辆信息时车牌号、车架号、发动机号不允许修改
formobj: {
customerVehSid: '',
customerSid: '',
@@ -205,11 +206,12 @@ export default {
})
this.formobj.customerSid = sid
},
- showEdit(sid) {
+ showEdit(sid, isDesignatedEnterprise) {
this.viewTitle = '【编辑】车辆'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
+ this.isDesignatedEnterprise = isDesignatedEnterprise
req.details(sid).then((res) => {
if (res.success) {
this.formobj = res.data
@@ -285,6 +287,7 @@ export default {
carRemarks: '',
byRemarks: ''
}
+ this.isDesignatedEnterprise = false
this.submitdisabled = false
this.$emit('doback')
},