This commit is contained in:
weipengfei 2023-08-21 09:55:08 +08:00
parent 2174cae23e
commit 109dd71b01
2 changed files with 11 additions and 9 deletions
src
utils
views/company

3
src/utils/dict.ts Normal file

@ -0,0 +1,3 @@
// 合同类型
export const dictContractTypeList: Array<String|Number> = [23,24,25]

@ -274,10 +274,10 @@
<el-card> <el-card>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label-width="100px" label="签约方" prop="field130"> <el-form-item label-width="100px" label="方" prop="field130">
<el-select <el-select
v-model="contractFormData.party_a" v-model="contractFormData.party_a"
placeholder="请选择签约方" placeholder="请选择方"
clearable clearable
:style="{ width: '100%' }" :style="{ width: '100%' }"
> >
@ -291,15 +291,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item label-width="100px" label="乙方" prop="field131">
label-width="100px"
label="被签约公司"
prop="field131"
>
<el-input <el-input
:disabled="true" :disabled="true"
v-model="contractFormData.party_b_name" v-model="contractFormData.party_b_name"
placeholder="请输入被签约公司" placeholder="请选择乙方"
clearable clearable
:style="{ width: '100%' }" :style="{ width: '100%' }"
></el-input> ></el-input>
@ -397,6 +393,7 @@ import { timeFormat } from "@/utils/util";
import feedback from "@/utils/feedback"; import feedback from "@/utils/feedback";
import { dictDataLists } from "@/api/setting/dict"; import { dictDataLists } from "@/api/setting/dict";
import { getRoutePath } from "@/router"; import { getRoutePath } from "@/router";
import { dictContractTypeList } from "@/utils/dict.ts";
import DialogIndex from "./dialog_index.vue"; import DialogIndex from "./dialog_index.vue";
const userStore = useUserStore(); const userStore = useUserStore();
@ -441,7 +438,9 @@ const getDetails = async (id: any) => {
company_list.value = res; company_list.value = res;
}); });
dictDataLists({ type_id: 7 }).then((res) => { dictDataLists({ type_id: 7 }).then((res) => {
contract_type.value = res.lists; contract_type.value = res.lists.filter((item: any) => {
return dictContractTypeList.find((t: String | Number) => t == item.id);
});
}); });
contractFormData.value.party_b = data.id; contractFormData.value.party_b = data.id;
contractFormData.value.party_b_name = data.company_name; contractFormData.value.party_b_name = data.company_name;