Commit 3c2d8a81 by yuzhenWang

修改客户模块bug发布测试

parent 691c925f
......@@ -90,9 +90,7 @@ const menuList = ref([])
const quickList = ref([])
const confirmCountry = item => {
menuList.value[0].value = item.areaCode
console.log('====================================')
console.log('menuList.value', menuList.value)
console.log('====================================')
hanleCountryClose()
}
const openCountryDrawer = item => {
......@@ -113,17 +111,25 @@ const resetClick = () => {
})
}
const confirmClick = () => {
let error = true
let info = JSON.parse(JSON.stringify(props.drawerInfo))
//收集填写的电话传给父组件
let phone = {}
menuList.value.forEach(e => {
if (!e.value) {
error = false
proxy.$message.warning('请填写' + e.name)
return
}
phone[e.key] = e.value
})
if (!error) return
for (const key in props.drawerInfo) {
if (key === info.key) {
info[key] = phone
}
}
emit('confirmDrawer', info)
drawer.value = false
}
......
......@@ -185,7 +185,7 @@ import Phone from '@/views/components/phone'
import Address from '@/views/components/address'
import { getDicts } from '@/api/system/dict/data'
import { watch,nextTick } from 'vue'
import { watch, nextTick } from 'vue'
import { addCustomer, getCustomerDetail, editCustomer, getCustomerList } from '@/api/sign/fna'
const props = defineProps({
......@@ -280,7 +280,6 @@ const data = reactive({
})
const { form, rules, processedCustomerData, queryParams, oldCustomerData } = toRefs(data)
const exportInfo = () => {
if (props.customerBizId && editStatus.value) {
proxy.$modal.confirm(`请先点击编辑在导入客户信息`, { showCancel: '0', title: '填写提示' })
......@@ -534,24 +533,17 @@ const setFormValue = (obj, formData, exportValue) => {
}
}
}
form.value[field.key] = `${phoneObj[field.code] || ''} ${phoneObj[field.key] || ''}`
phoneObj.phoneString = `${phoneObj[field.code] || ''} ${phoneObj[field.key] || ''}`
if (tempPhoneList.length > 0) {
tempPhoneList.forEach(item => {
if (item.phoneString !== phoneObj.phoneString) {
tempPhoneList.push(phoneObj)
}
})
} else {
if (phoneObj[field.key]) {
phoneObj.phoneString = form.value[field.key] = `${phoneObj[field.code]} ${
phoneObj[field.key]
}`
tempPhoneList.push(phoneObj)
}
phoneObj.objType = field.drawerType
phoneObj.key = field.key
phoneObj.phoneCode = field.code
saveKey.value[field.key] = phoneObj
// phoneQuickList.value.push(phoneObj)
break
case 'address':
let addressObj = null
......@@ -615,6 +607,8 @@ const setFormValue = (obj, formData, exportValue) => {
}
}
})
console.log('tempPhoneList', tempPhoneList)
phoneQuickList.value = removeDuplicates(tempPhoneList, 'phoneString')
addressQuickList.value = removeDuplicates(tempAddressList, 'addressString')
......
......@@ -113,7 +113,13 @@
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)">修改</el-button>
<!-- v-if="scope.row.status == 'COMPLETED'" -->
<el-button link type="primary" @click="handleDelete(scope.row)">删除</el-button>
<el-button
v-if="scope.row.status == 'COMPLETED'"
link
type="primary"
@click="handleDelete(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
......
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