diff --git a/src/views/modules/customer/customerInformationManagement.vue b/src/views/modules/customer/customerInformationManagement.vue
index 767216e..013fc62 100644
--- a/src/views/modules/customer/customerInformationManagement.vue
+++ b/src/views/modules/customer/customerInformationManagement.vue
@@ -3,13 +3,18 @@
-
+
-
+
-
+
+
+
+
+
+
查询
@@ -179,8 +184,8 @@
-
-
+
+
@@ -520,29 +525,41 @@
-
+
+
-
+
+
@@ -631,7 +648,7 @@
@@ -1600,6 +1617,13 @@
message: ' ',
trigger: 'change'
}
+ ],
+ contactPhoneNumber1: [
+ {
+ required: true,
+ message: ' ',
+ trigger: 'change'
+ }
]
},
addressRules: {
@@ -2287,31 +2311,68 @@
this.$message.warning('请勾选要删除的联系人!')
return
}
- this.$confirm(`是否删除这 `+ this.contactSelections.length +` 条联系人信息?`, '提示', {
+ this.$confirm(`是否删除这 `+ this.contactSelections.length +` 条联系人信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- let tempData = {
- contactList: this.contactSelections
+ let tempContactName = null
+ for (let i = 0; i < this.contactSelections.length; i++){
+ // 判断是否有主联系人
+ if (this.contactSelections[i].primaryContact === 'Y') {
+ tempContactName = this.contactSelections[i].contactName
+ }
}
- customerContactDelete(tempData).then(({data}) => {
- if (data && data.code === 0) {
- this.getDataList()
- this.contactSelections = []
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
+ if (tempContactName !== '' || tempContactName != null) {
+ this.$confirm(tempContactName +` 为主联系人,是否确认删除?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ let tempData = {
+ contactList: this.contactSelections
+ }
+ customerContactDelete(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getCustomerContactList()
+ this.contactSelections = []
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
}
})
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
+ }).catch(() => {
+ })
+ } else {
+ let tempData = {
+ contactList: this.contactSelections
}
- })
+ customerContactDelete(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getCustomerContactList()
+ this.contactSelections = []
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
}).catch(() => {
})
},
@@ -2328,26 +2389,63 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- let tempData = {
- addressList: this.addressSelections
+ let tempAddressName = null
+ for (let i = 0; i < this.addressSelections.length; i++){
+ // 判断是否有主联系地址
+ if (this.addressSelections[i].primaryAddress === 'Y') {
+ tempAddressName = this.addressSelections[i].addressName
+ }
}
- customerAddressDelete(tempData).then(({data}) => {
- if (data && data.code === 0) {
- this.getCustomerAddressList()
- this.addressSelections = []
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
+ if (tempAddressName !== '' || tempAddressName != null) {
+ this.$confirm(tempAddressName +` 为主联系地址,是否确认删除?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ let tempData = {
+ addressList: this.addressSelections
+ }
+ customerAddressDelete(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getCustomerAddressList()
+ this.addressSelections = []
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
}
})
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
+ }).catch(() => {
+ })
+ } else {
+ let tempData = {
+ addressList: this.addressSelections
}
- })
+ customerAddressDelete(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getCustomerAddressList()
+ this.addressSelections = []
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
}).catch(() => {
})
},
@@ -2437,6 +2535,10 @@
this.$message.warning('请输入联系人!')
return
}
+ if (this.contactModalData.contactPhoneNumber1 === '' || this.contactModalData.contactPhoneNumber1 == null) {
+ this.$message.warning('请输入联系人电话(1)!')
+ return
+ }
if (this.contactModalData.position === '' || this.contactModalData.position == null) {
this.$message.warning('请输入公司职务!')
return
@@ -2732,6 +2834,11 @@
* 项目经理选择模态框
*/
managerChooseModal () {
+ // 清空穿梭框的选中值
+ this.$nextTick(() => {
+ this.$refs.managerTransfer.$refs.leftPanel.checked = []
+ this.$refs.managerTransfer.$refs.rightPanel.checked = []
+ })
let inData = {
site: this.projectInformationModalData.site,
projectId: this.projectInformationModalData.projectId,
@@ -2739,14 +2846,14 @@
searchOperatorWithSite(inData).then(({data}) => {
this.operatorList = data.rows
})
- this.projectManagerList = JSON.parse(JSON.stringify(this.projectInformationModalData.projectManagerList));
+ this.projectManagerList = JSON.parse(JSON.stringify(this.projectInformationModalData.projectManagerList))
this.managerFlag = true
},
/**
* 项目经理选择
*/
saveManagerList () {
- let projectManagerName = '';
+ let projectManagerName = ''
for (let i = 0; i < this.projectManagerList.length; i++) {
let select = this.operatorList.filter(item => item.operatorId === this.projectManagerList[i])
if (select.length > 0) {
@@ -2754,13 +2861,18 @@
}
}
this.projectInformationModalData.projectManagerName = projectManagerName
- this.projectInformationModalData.projectManagerList = JSON.parse(JSON.stringify(this.projectManagerList));
+ this.projectInformationModalData.projectManagerList = JSON.parse(JSON.stringify(this.projectManagerList))
this.managerFlag = false
},
/**
* 项目负责人选择模态框
*/
ownerChooseModal () {
+ // 清空穿梭框的选中值
+ this.$nextTick(() => {
+ this.$refs.ownerTransfer.$refs.leftPanel.checked = []
+ this.$refs.ownerTransfer.$refs.rightPanel.checked = []
+ })
let inData = {
site: this.projectInformationModalData.site,
projectId: this.projectInformationModalData.projectId,
@@ -2899,5 +3011,36 @@
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
+.el-transfer-panel {
+ border: 2px solid #17b3a3;
+ border-radius: 4px;
+ overflow: hidden;
+ background: #fff;
+ display: inline-block;
+ vertical-align: middle;
+ width: 200px;
+ max-height: 100%;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ position: relative;
+}
+
+.el-transfer-panel .el-transfer-panel__header {
+ height: 40px;
+ line-height: 40px;
+ background: #17b3a3;
+ margin: 0;
+ padding-left: 15px;
+ border-bottom: 1px solid #17b3a3;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ color: #000;
+}
+
+.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
+ font-size: 14px;
+ color: #303133;
+ font-weight: 400;
+}