feat(phone-traffic-management): 添加拨打单位和班组信息字段
This commit is contained in:
@@ -81,6 +81,30 @@ const formSchema = computed(() => {
|
|||||||
filterable: true,
|
filterable: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '拨打单位',
|
||||||
|
prop: 'dispatchUnit',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入拨打单位',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '班组信息',
|
||||||
|
prop: 'team',
|
||||||
|
component: 'el-input',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入班组信息',
|
||||||
|
clearable: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@@ -189,6 +213,21 @@ const addressBookTableConfig = reactive({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'dispatchUnit',
|
||||||
|
label: '拨打单位',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'team',
|
||||||
|
label: '班组信息',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'team',
|
||||||
|
label: '拨打单位',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
@@ -339,7 +378,16 @@ const handleSubmitAddressBook = async (formInstance) => {
|
|||||||
if (!formInstance) return;
|
if (!formInstance) return;
|
||||||
let validate = await formInstance.validate()
|
let validate = await formInstance.validate()
|
||||||
if (!validate.isValidate) return;
|
if (!validate.isValidate) return;
|
||||||
|
if(formInstance.getValues().role=='0'&&!formInstance.getValues().team){
|
||||||
|
ElMessage.warning('请输入班组信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(formInstance.getValues().role=='1'&&!formInstance.getValues().dispatchUnit){
|
||||||
|
ElMessage.warning('请输入拨打单位');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (dialogType.value === "add") {
|
if (dialogType.value === "add") {
|
||||||
|
|
||||||
addContact(formInstance.getValues()).then(res => {
|
addContact(formInstance.getValues()).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg);
|
ElMessage.success(res.msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user