|
@@ -97,15 +97,10 @@
|
|
|
<!-- 联络人姓名 -->
|
|
<!-- 联络人姓名 -->
|
|
|
<template v-if="item.type === 'contactName'">
|
|
<template v-if="item.type === 'contactName'">
|
|
|
<el-select
|
|
<el-select
|
|
|
- :disabled="item.disabled"
|
|
|
|
|
|
|
+ :readonly="contactNameDisabled"
|
|
|
v-model="formData[item.prop]"
|
|
v-model="formData[item.prop]"
|
|
|
filterable
|
|
filterable
|
|
|
- remote
|
|
|
|
|
- reserve-keyword
|
|
|
|
|
:placeholder="item.placeholder"
|
|
:placeholder="item.placeholder"
|
|
|
- :remote-method="remoteuserNameMethod"
|
|
|
|
|
- :loading="userLoading"
|
|
|
|
|
- remote-show-suffix
|
|
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
@@ -153,7 +148,7 @@ import { reactive, ref } from 'vue';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import useSystemStore from '@/store/main';
|
|
import useSystemStore from '@/store/main';
|
|
|
import { outTypeList, outDeptTree } from '@/libs/commonMeth';
|
|
import { outTypeList, outDeptTree } from '@/libs/commonMeth';
|
|
|
-import { TreeOptions } from '@/types/global';
|
|
|
|
|
|
|
+import { TreeOptions, IOptions } from '@/types/global';
|
|
|
const bj_msg_recipient = outTypeList('bj_msg_recipient'); //短信接收人
|
|
const bj_msg_recipient = outTypeList('bj_msg_recipient'); //短信接收人
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
// 定义props
|
|
// 定义props
|
|
@@ -183,24 +178,18 @@ const systemStore = useSystemStore();
|
|
|
|
|
|
|
|
const { pageDetailInfo, pageOperateType } = storeToRefs(systemStore);
|
|
const { pageDetailInfo, pageOperateType } = storeToRefs(systemStore);
|
|
|
|
|
|
|
|
-interface userNameListItem {
|
|
|
|
|
- value: string;
|
|
|
|
|
- label: string;
|
|
|
|
|
-}
|
|
|
|
|
-const alluserNameOptions = ref<userNameListItem[]>([]);
|
|
|
|
|
-const userLoading = ref(false);
|
|
|
|
|
-const userNameOptions = ref<userNameListItem[]>([]);
|
|
|
|
|
-const remoteuserNameMethod = (query: string) => {
|
|
|
|
|
|
|
+const contactNameDisabled = ref(true);
|
|
|
|
|
+const userNameOptions = ref<IOptions[]>([]);
|
|
|
|
|
+const queryUserNameOptions = (query: string) => {
|
|
|
|
|
+ userNameOptions.value = [];
|
|
|
if (query) {
|
|
if (query) {
|
|
|
- userLoading.value = true;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- userLoading.value = false;
|
|
|
|
|
- userNameOptions.value = alluserNameOptions.value.filter(item => {
|
|
|
|
|
- return item.label.toLowerCase().includes(query.toLowerCase());
|
|
|
|
|
- });
|
|
|
|
|
- }, 200);
|
|
|
|
|
- } else {
|
|
|
|
|
- userNameOptions.value = alluserNameOptions.value;
|
|
|
|
|
|
|
+ // const postData: any = await changeInventoryStatus(row.liaisonId, status);
|
|
|
|
|
+ // if (postData.code === 200) {
|
|
|
|
|
+ // userNameOptions.value = postData.data;
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // userNameOptions.value = [];
|
|
|
|
|
+ // }
|
|
|
|
|
+ contactNameDisabled.value = false;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -305,6 +294,7 @@ watch(
|
|
|
() => formData.value,
|
|
() => formData.value,
|
|
|
(newVal, oldVal) => {
|
|
(newVal, oldVal) => {
|
|
|
if (newVal?.unitName !== oldVal?.unitName) {
|
|
if (newVal?.unitName !== oldVal?.unitName) {
|
|
|
|
|
+ queryUserNameOptions(newVal.unitName);
|
|
|
console.log('unitName:', newVal.unitName, oldVal?.unitName);
|
|
console.log('unitName:', newVal.unitName, oldVal?.unitName);
|
|
|
}
|
|
}
|
|
|
if (newVal?.contactName !== oldVal?.contactName) {
|
|
if (newVal?.contactName !== oldVal?.contactName) {
|