更新
This commit is contained in:
parent
9f3a4cb44c
commit
12c3facf77
@ -44,3 +44,8 @@ export function generateGontract(params: any) {
|
||||
export function authentication(params: any) {
|
||||
return request.get({ url: '/company/authentication', params })
|
||||
}
|
||||
|
||||
// 平台公司
|
||||
export function companyListTwo(params: any) {
|
||||
return request.get({ url: '/company/list_two', params })
|
||||
}
|
@ -429,7 +429,7 @@
|
||||
placeholder="请选择签约方"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
:disabled="partyDisabled"
|
||||
:disabled="!partyDisabled || isDisabled"
|
||||
@click="openCompany"
|
||||
></el-input>
|
||||
<!-- <el-select
|
||||
@ -947,7 +947,7 @@ const getDetails = async () => {
|
||||
});
|
||||
if (data.company_type == 16) {
|
||||
indexType.value = 30;
|
||||
partyDisabled.value = false;
|
||||
partyDisabled.value = true;
|
||||
}
|
||||
Object.keys(formData).forEach((key) => {
|
||||
const stringArr = [
|
||||
|
@ -226,7 +226,7 @@
|
||||
v-perms="['company/initiate_contract']"
|
||||
type="primary"
|
||||
link
|
||||
@click="ShowInitiateContractPop(row)"
|
||||
@click="showChangeCompany(row)"
|
||||
>生成合同</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -240,7 +240,7 @@
|
||||
v-perms="['company/postsms']"
|
||||
type="primary"
|
||||
link
|
||||
@click="(showPop = true), (contractId = row.id);"
|
||||
@click="(showPop = true), (contractId = row.id)"
|
||||
>发送短信</el-button
|
||||
>
|
||||
</template>
|
||||
@ -258,7 +258,88 @@
|
||||
@close="offInitiateContractPop"
|
||||
>
|
||||
<h1>重要提醒</h1>
|
||||
<div class="content">请确认信息是否有误</div>
|
||||
<div>
|
||||
<div class="content">请确认信息是否有误</div>
|
||||
<el-card>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="签约方"
|
||||
prop="field130"
|
||||
>
|
||||
<el-select
|
||||
v-model="contractFormData.party_a"
|
||||
placeholder="请选择签约方"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in company_list"
|
||||
:key="index"
|
||||
:label="item.company_name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="被签约公司"
|
||||
prop="field131"
|
||||
>
|
||||
<el-input
|
||||
:disabled="true"
|
||||
v-model="contractFormData.party_b_name"
|
||||
placeholder="请输入被签约公司"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="合同类型"
|
||||
prop="contract_type"
|
||||
>
|
||||
<el-select
|
||||
v-model="contractFormData.contract_type"
|
||||
placeholder="请选择合同类型"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in contract_type"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="100px"
|
||||
label="合同编号"
|
||||
prop="field133"
|
||||
>
|
||||
<el-input
|
||||
placeholder="系统自动生成"
|
||||
v-model="contractFormData.contract_no"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-card>
|
||||
</div>
|
||||
<p class="btn_menu">
|
||||
<el-button type="primary" size="large" @click="InitiateContract"
|
||||
>确认创建</el-button
|
||||
@ -297,16 +378,19 @@ import { useDictData } from "@/hooks/useDictOptions";
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import {
|
||||
apiCompanyLists,
|
||||
companyListTwo,
|
||||
apiCompanyDelete,
|
||||
generateGontract,
|
||||
sendMsgApi,
|
||||
authentication,
|
||||
apiCompanyDetail,
|
||||
initiate_contract,
|
||||
} from "@/api/company";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { getRoutePath } from "@/router";
|
||||
import DialogIndex from "./dialog_index.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
console.log(userStore.userInfo.company_id);
|
||||
@ -329,10 +413,50 @@ const offInitiateContractPop = () => {
|
||||
// 创建合同的id
|
||||
const contractId = ref("");
|
||||
|
||||
const ShowInitiateContractPop = (row) => {
|
||||
(InitiateContractPop.value = true),
|
||||
(showInitiateContractPop.value = true),
|
||||
(contractId.value = row.id);
|
||||
// 合同
|
||||
const contractFormData = ref({
|
||||
party_a: "",
|
||||
party_a_name: "",
|
||||
party_b: "",
|
||||
party_b_name: "",
|
||||
contract_type: "",
|
||||
contract_no: "",
|
||||
});
|
||||
|
||||
const company_list = ref([]);
|
||||
const contract_type = ref([]);
|
||||
|
||||
const getDetails = async (id: any) => {
|
||||
const data = await apiCompanyDetail({
|
||||
id: id,
|
||||
});
|
||||
companyListTwo().then((res) => {
|
||||
company_list.value = res;
|
||||
});
|
||||
dictDataLists({ type_id: 7 }).then((res) => {
|
||||
contract_type.value = res.lists;
|
||||
});
|
||||
contractFormData.value.party_b = data.id;
|
||||
contractFormData.value.party_b_name = data.company_name;
|
||||
if (userStore.userInfo.company.id) {
|
||||
contractFormData.value.party_a = userStore.userInfo.company.id;
|
||||
contractFormData.value.party_a_name =
|
||||
userStore.userInfo.company.company_name;
|
||||
} else {
|
||||
contractFormData.value.party_a = "";
|
||||
contractFormData.value.party_a_name = "";
|
||||
}
|
||||
};
|
||||
|
||||
const showChangeCompany = (row: any) => {
|
||||
contractId.value = row.id;
|
||||
getDetails(row.id);
|
||||
showPop.value = true;
|
||||
// ShowInitiateContractPop();
|
||||
};
|
||||
|
||||
const ShowInitiateContractPop = () => {
|
||||
(InitiateContractPop.value = true), (showInitiateContractPop.value = true);
|
||||
};
|
||||
const showCreateConctPop = (row) => {
|
||||
(showPop.value = true),
|
||||
@ -340,7 +464,10 @@ const showCreateConctPop = (row) => {
|
||||
(contractId.value = row.id);
|
||||
};
|
||||
const InitiateContract = () => {
|
||||
initiate_contract({ id: contractId.value }).catch((res) => {
|
||||
initiate_contract({
|
||||
id: contractId.value,
|
||||
...contractFormData.value,
|
||||
}).catch((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
offInitiateContractPop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user