提交
This commit is contained in:
parent
2cfd4ab76e
commit
828c3e090c
@ -27,3 +27,11 @@ export function adminDelete(params: any) {
|
||||
export function adminDetail(params: any) {
|
||||
return request.get({ url: '/auth.admin/detail', params })
|
||||
}
|
||||
// 生成合同
|
||||
export function generateGontract(params: any) {
|
||||
return request.get({ url: '/auth.admin/Draftingcontracts', params })
|
||||
}
|
||||
// 发送短信
|
||||
export function sendMsgApi(params: any) {
|
||||
return request.get({ url: '/auth.admin/postsms', params })
|
||||
}
|
||||
|
@ -49,7 +49,7 @@
|
||||
placeholder="请输入片区经理"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否签约" class="w-[308px]" prop="is_contract">
|
||||
<el-form-item label="是否签约" prop="is_contract">
|
||||
<el-select
|
||||
v-model="queryParams.is_contract"
|
||||
placeholder="是否签约"
|
||||
@ -118,34 +118,6 @@
|
||||
>下属公司</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
query: {
|
||||
id: row.id,
|
||||
read: true
|
||||
}
|
||||
}"
|
||||
>详情</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('company/subordinate/lists'),
|
||||
query: {
|
||||
company_id: row.id,
|
||||
read: true
|
||||
}
|
||||
}"
|
||||
>下属公司</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button v-perms="['company/add:edit']" type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
@ -222,7 +194,8 @@
|
||||
<script lang="ts" setup name="companyLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiCompanyLists, apiCompanyDelete, generateGontract, sendMsgApi } from '@/api/company'
|
||||
import { apiCompanyLists, apiCompanyDelete } from '@/api/company'
|
||||
import { generateGontract, sendMsgApi } from '@/api/perms/admin'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import { dictDataLists } from '@/api/setting/dict'
|
||||
|
@ -16,38 +16,70 @@
|
||||
<template #default="{ row }">
|
||||
<div style="display: flex">
|
||||
<el-button type="primary" link>
|
||||
<router-link :to="{
|
||||
path: getRoutePath('auth.admin/lists'),
|
||||
query: {
|
||||
company_id: row.id,
|
||||
read: true
|
||||
}
|
||||
}">查看成员</router-link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('auth.admin/lists'),
|
||||
query: {
|
||||
company_id: row.id,
|
||||
read: true
|
||||
}
|
||||
}"
|
||||
>查看成员</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
||||
<router-link :to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
query: {
|
||||
id: row.id,
|
||||
read: true
|
||||
}
|
||||
}">详情</router-link>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
query: {
|
||||
id: row.id,
|
||||
read: true
|
||||
}
|
||||
}"
|
||||
>详情</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link>
|
||||
<router-link :to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
query: {
|
||||
id: row.id,
|
||||
edit: true
|
||||
}
|
||||
}">编辑</router-link>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('company/add:edit'),
|
||||
query: {
|
||||
id: row.id,
|
||||
edit: true
|
||||
}
|
||||
}"
|
||||
>编辑</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button v-perms="['company/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">删除</el-button>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link
|
||||
@click="showCreateConctPop(row)">生成合同</el-button>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link
|
||||
@click="; (showPop = true), (contractId = row.id)">发送短信</el-button>
|
||||
<el-button
|
||||
v-perms="['company/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
@click="showCreateConctPop(row)"
|
||||
>生成合同</el-button
|
||||
>
|
||||
<el-button
|
||||
v-perms="['company/edit', 'company/add']"
|
||||
type="primary"
|
||||
link
|
||||
@click=";(showPop = true), (contractId = row.id)"
|
||||
>发送短信</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -66,7 +98,9 @@
|
||||
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||
</div>
|
||||
<p class="btn_menu">
|
||||
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct">确认创建</el-button>
|
||||
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct"
|
||||
>确认创建</el-button
|
||||
>
|
||||
<el-button type="primary" size="large" v-else @click="sendMsg">确认</el-button>
|
||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||
</p>
|
||||
@ -77,8 +111,8 @@
|
||||
<script lang="ts" setup name="companyLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiCompanyLists, apiCompanyDelete, apiSubordinateList, generateGontract, sendMsgApi } from '@/api/company'
|
||||
|
||||
import { apiCompanyLists, apiCompanyDelete, apiSubordinateList } from '@/api/company'
|
||||
import { generateGontract, sendMsgApi } from '@/api/perms/admin'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import { dictDataLists } from '@/api/setting/dict'
|
||||
@ -98,7 +132,7 @@ const offPop = () => {
|
||||
// 创建合同的id
|
||||
const contractId = ref('')
|
||||
const showCreateConctPop = (row) => {
|
||||
; (showPop.value = true), (showConctactPop.value = true), (contractId.value = row.id)
|
||||
;(showPop.value = true), (showConctactPop.value = true), (contractId.value = row.id)
|
||||
}
|
||||
const creContct = () => {
|
||||
generateGontract({ id: contractId.value })
|
||||
@ -167,7 +201,6 @@ getLists()
|
||||
.btn {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
|
@ -1,79 +1,76 @@
|
||||
<template>
|
||||
<el-dialog @confirm="handleSubmit" title="合同详情" v-model="show">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="公司" prop="company_id">
|
||||
<el-input v-model="formData.company_id" :disabled="true" clearable placeholder="请输入公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
|
||||
|
||||
<el-input v-model="formData.contract_type" :disabled="true" clearable placeholder="请输入合同类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input v-model="formData.contract_no" :disabled="true" clearable placeholder="暂无合同编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文件" prop="file">
|
||||
<el-input v-model="formData.file" :disabled="true" clearable placeholder="暂无文件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-input v-model="formData.status" :disabled="true" clearable placeholder="暂无状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="甲方" prop="party_a">
|
||||
<el-input v-model="formData.party_a" :disabled="true" clearable placeholder="暂无甲方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="乙方" prop="party_b">
|
||||
<el-input v-model="formData.party_b" :disabled="true" clearable placeholder="暂无乙方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="片区经理" prop="area_manager">
|
||||
<el-input v-model="formData.area_manager" :disabled="true" clearable placeholder="暂无经理" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="type">
|
||||
<el-input v-model="formData.type" :disabled="true" clearable placeholder="暂无状态" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn_men">
|
||||
<el-button @click="show = false">取消</el-button>
|
||||
<el-button type="primary" @click="show = false">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog @confirm="handleSubmit" title="合同详情" v-model="show">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="公司" prop="company_id">
|
||||
<el-input v-model="formData.company_id" :disabled="true" clearable placeholder="请输入公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-input v-model="formData.contract_type" :disabled="true" clearable placeholder="请输入合同类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input v-model="formData.contract_no" :disabled="true" clearable placeholder="暂无合同编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文件" prop="file">
|
||||
<el-input v-model="formData.file" :disabled="true" clearable placeholder="暂无文件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-input v-model="formData.status" :disabled="true" clearable placeholder="暂无状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="甲方" prop="party_a">
|
||||
<el-input v-model="formData.party_a" :disabled="true" clearable placeholder="暂无甲方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="乙方" prop="party_b">
|
||||
<el-input v-model="formData.party_b" :disabled="true" clearable placeholder="暂无乙方" />
|
||||
</el-form-item>
|
||||
<el-form-item label="片区经理" prop="area_manager">
|
||||
<el-input v-model="formData.area_manager" :disabled="true" clearable placeholder="暂无经理" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="type">
|
||||
<el-input v-model="formData.type" :disabled="true" clearable placeholder="暂无状态" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn_men">
|
||||
<el-button @click="show=false">取消</el-button>
|
||||
<el-button type="primary" @click="show=false" >确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineExpose } from "vue";
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
company_id: "",
|
||||
contract_type: "",
|
||||
contract_no: "",
|
||||
file: "",
|
||||
status: "",
|
||||
party_a: "",
|
||||
party_b: "",
|
||||
area_manager: "",
|
||||
id: "",
|
||||
company_id: "",
|
||||
contract_type: "",
|
||||
contract_no: "",
|
||||
file: "",
|
||||
status: "",
|
||||
party_a: "",
|
||||
party_b: "",
|
||||
area_manager: "",
|
||||
});
|
||||
const show = ref(false);
|
||||
const shoeEditFn = (flag) => {
|
||||
show.value = flag;
|
||||
show.value = flag;
|
||||
};
|
||||
// 传值赋值
|
||||
const setFormData = async (data) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key];
|
||||
}
|
||||
console.log(formData)
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
shoeEditFn,
|
||||
setFormData,
|
||||
shoeEditFn,
|
||||
setFormData,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn_men {
|
||||
text-align: right;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@ -56,13 +56,10 @@
|
||||
@click="handleEdit(row)">编辑</el-button>
|
||||
<el-button v-if="row.root != 1" v-perms="['auth.admin/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">删除</el-button>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link @click="
|
||||
; (showPop = true),
|
||||
(showConctactPop = true),
|
||||
(contractId = row.id)
|
||||
">生成合同</el-button>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link
|
||||
@click="; (showPop = true), (contractId = row.id)">发送短信</el-button>
|
||||
@click="showPop = true, showConctactPop = true, contractId = row.id">生成个人合同</el-button>
|
||||
<el-button v-perms="['company/edit', 'company/add']" type="primary" link
|
||||
@click=" showPop = true, contractId = row.id">发送短信</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -75,12 +72,8 @@
|
||||
<edit-popup v-if="showEdit" ref="editRef" :isCheck="isCheck" @success="getLists" @close="showEdit = false" />
|
||||
<el-dialog v-model="showPop" @close="offPop">
|
||||
<h1>重要提醒</h1>
|
||||
<div class="content" v-if="showConctactPop">
|
||||
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||
</div>
|
||||
<div class="content" v-else>
|
||||
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||
</div>
|
||||
<div class="content" v-if="showConctactPop">请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.</div>
|
||||
<div class="content" v-else>确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约</div>
|
||||
<p class="btn_menu">
|
||||
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct">确认创建</el-button>
|
||||
<el-button type="primary" size="large" v-else @click="sendMsg">确认</el-button>
|
||||
@ -91,42 +84,47 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="admin">
|
||||
import { adminEdit, adminLists, adminDelete } from '@/api/perms/admin'
|
||||
import { generateGontract, sendMsgApi } from '@/api/company'
|
||||
import { roleAll } from '@/api/perms/role'
|
||||
import { useDictOptions } from '@/hooks/useDictOptions'
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const route = useRoute()
|
||||
|
||||
import {
|
||||
adminEdit,
|
||||
adminLists,
|
||||
adminDelete,
|
||||
generateGontract,
|
||||
sendMsgApi,
|
||||
} from "@/api/perms/admin";
|
||||
import { roleAll } from "@/api/perms/role";
|
||||
import { useDictOptions } from "@/hooks/useDictOptions";
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
name: '',
|
||||
role_id: '',
|
||||
company_id: route.query.company_id || ''
|
||||
})
|
||||
const contractId = ref('')
|
||||
name: "",
|
||||
role_id: "",
|
||||
});
|
||||
const contractId = ref("");
|
||||
// 弹窗
|
||||
const showPop = ref(false)
|
||||
const showConctactPop = ref(false)
|
||||
const showPop = ref(false);
|
||||
const showConctactPop = ref(false);
|
||||
const offPop = () => {
|
||||
showPop.value = false
|
||||
showConctactPop.value = false
|
||||
}
|
||||
showPop.value = false;
|
||||
showConctactPop.value = false;
|
||||
};
|
||||
const creContct = () => {
|
||||
generateGontract({ id: contractId.value })
|
||||
offPop()
|
||||
}
|
||||
// feedback.msgSuccess("复制成功");
|
||||
generateGontract({ id: contractId.value }).then(() => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
});
|
||||
offPop();
|
||||
};
|
||||
const sendMsg = () => {
|
||||
sendMsgApi({ id: contractId.value }).then((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
offPop()
|
||||
}
|
||||
feedback.msgSuccess("发送成功");
|
||||
});
|
||||
offPop();
|
||||
};
|
||||
//
|
||||
const showEdit = ref(false)
|
||||
const showEdit = ref(false);
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: adminLists,
|
||||
params: formData,
|
||||
@ -145,39 +143,34 @@ const changeStatus = (data: any) => {
|
||||
});
|
||||
};
|
||||
// 查看
|
||||
const isCheck = ref(false)
|
||||
const isCheck = ref(false);
|
||||
const handleCheck = async (data: any) => {
|
||||
isCheck.value = true
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.isCheckFn(true)
|
||||
}
|
||||
isCheck.value = true;
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
const handleAdd = async () => {
|
||||
isCheck.value = false
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
editRef.value?.isCheckFn(false)
|
||||
|
||||
}
|
||||
isCheck.value = false;
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
};
|
||||
|
||||
const handleEdit = async (data: any) => {
|
||||
isCheck.value = false
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.isCheckFn(false)
|
||||
|
||||
}
|
||||
isCheck.value = false;
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
const handleDelete = async (id: number) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await adminDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
await feedback.confirm("确定要删除?");
|
||||
await adminDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
const { optionsData } = useDictOptions<{
|
||||
role: any[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user