zsk 2 years ago
commit 28074687c4

@ -1,477 +1,250 @@
<template> <template>
<!--我的职位--> <div>
<div class="p-manage-myJob"> <div class="g_bg_f g_br_4">
<div class="m-select g_flex_row_between g_pt_16"> <div class="g_pt_18 g_pl_24 g_pb_18 g_fw_600 ">基本信息</div>
<div class="g_flex_row_start"> <a-divider class="g_mt_0 g_mb_24" />
<div class="g_w_320 g-search-btn g_mr_16"> <div class="g_flex_row_between g_pl_24 g_pr_24">
<a-input-search v-model:value="tableData.keyword" placeholder="请输入姓名/手机号" @search="searchList" @change="handleChangeSearch" allowClear /> <div>
<a-form :model="baseInfo" name="basic" autocomplete="off" @finish="submitBaseInfo" @validate="validateForm" ref="storeInfoRef" style="width: 630px">
<div class="g_flex_row_between flex_nr">
<a-form-item name="agencyName" class="g_flex_1" :rules="[{ required: false, message: '请输入企业简称' }]">
<template #label>
<div class="g_c_6">主体</div>
</template>
<div v-if="!editStatus">{{ baseInfo.agencyName || "" }}</div>
<a-input placeholder="请输入企业简称" v-else v-model:value="baseInfo.agencyName" class="" />
</a-form-item>
<a-form-item name="agencyName" class="g_flex_1 g_ml_32" :rules="[{ required: false, message: '请输入企业简称' }]">
<template #label>
<div class="g_c_6">当前估值</div>
</template>
<div v-if="!editStatus">{{ baseInfo.agencyName || "5000" }}</div>
<a-input placeholder="请输入企业简称" v-else v-model:value="baseInfo.agencyName" class="" />
</a-form-item>
</div>
<div class="g_flex_row_between flex_nr">
<a-form-item name="agencyName" class="g_flex_1" :rules="[{ required: false, message: '请输入企业简称' }]">
<template #label>
<div class="g_c_6">当前总股本</div>
</template>
<div v-if="!editStatus">{{ baseInfo.agencyName || "39,771.50" }}</div>
<a-input placeholder="请输入企业简称" v-else v-model:value="baseInfo.agencyName" class="" />
</a-form-item>
<a-form-item name="agencyName" class="g_flex_1 g_ml_32" :rules="[{ required: false, message: '请输入企业简称' }]">
<template #label>
<div class="g_c_6">每股价格</div>
</template>
<div v-if="!editStatus">{{ baseInfo.agencyName || "32.21" }}</div>
<a-input placeholder="请输入企业简称" v-else v-model:value="baseInfo.agencyName" class="" />
</a-form-item>
</div>
</a-form>
</div>
<div>
<a-button type="primary" @click="editStatus = !editStatus">编辑</a-button>
</div> </div>
</div>
<div>
<a-button type="primary" @click="openAdd" :icon="h(PlusOutlined)">新增用户</a-button>
<!-- <a-button type="" class="g_border_d g_ml_16" @click="handleToForm('add', { id: 0 })" :icon="h(DownloadOutlined)">导出模版</a-button> -->
<!--
<a-dropdown :trigger="['click']">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="goShareList"></a-menu-item>
<a-menu-item key="2" @click="handleToForm('add',{id:0})"></a-menu-item>
</a-menu>
</template>
<a-button>
新增职位
<DownOutlined style="zoom:.8" />
</a-button>
</a-dropdown> -->
</div> </div>
</div> </div>
<div class="m-table g_mt_20 antd-table"> <div class="g_bg_f g_br_4 g_mt_16">
<a-table sticky :columns="columns" :data-source="tableData.records" size="middle" :pagination="false" :loading="tableData.loading" class="g_clear_scroll" style="max-width: calc(100% - 0px)"> <div class="g_pt_18 g_pl_24 g_pr_24 g_pb_18 g_flex_row_between">
<template #bodyCell="{ column, record }"> <div class="g_fw_600">股权结构</div>
<template v-if="column.key === 'job'"> <div>
<!-- @click="goDetail(record)" --> <a-button @click="editStatus = !editStatus"><DownloadOutlined />导出模版</a-button>
<div class="btn g_fs_14 g_cursor_point g_mr_13 g_flex_row_start"> <a-button type="primary" class="g_ml_10" @click="editStatus = !editStatus"><PlusOutlined />导入文件</a-button>
<div class="g_ell_1">{{ "" }}</div> </div>
</div> </div>
</template> <a-divider class="g_mt_0 g_mb_20" />
<template v-if="column.key === 'age'"> <div class="g_flex_row_between g_pl_24 g_pr_24 g_pb_20">
<div class="g_ell_1">{{ record.sex + " " + record.age }}</div> <a-table sticky :columns="columns" :data-source="gpjgList" size="middle" @change="tableChange" :pagination="false" class="g_clear_scroll" :scroll="{ x: '500px' }">
</template> <template #headerCell="{ column }">
<template v-if="column.key === 'price'"> <template v-if="column.key === 'name'">
<!-- <div v-html="record.price"></div> --> <div class="g_fw_600">姓名</div>
</template>
</template> </template>
<template v-if="column.key === 'status'"> </a-table>
<a-switch @change="(e) => handleStatus(e, record)" :checked="record.status == 1 ? true : false" checked-children="" un-checked-children="" /> </div>
</div>
<div class="g_bg_f g_br_4 g_mt_16">
<div class="g_pt_18 g_pl_24 g_pr_24 g_pb_18 g_flex_row_between">
<div class="g_fw_600">增资扩股变化</div>
<div>
<a-button @click="editStatus = !editStatus"><DownloadOutlined />导出模版</a-button>
<a-button type="primary" class="g_ml_10" @click="editStatus = !editStatus"><PlusOutlined />导入文件</a-button>
</div>
</div>
<a-divider class="g_mt_0 g_mb_20" />
<div class="g_flex_row_between g_pl_24 g_pr_24 g_pb_20">
<a-table sticky :columns="columns1" :data-source="zzkgList" size="middle" @change="tableChange" :pagination="false" class="g_clear_scroll" :scroll="{ x: '500px' }">
<template #headerCell="{ column }">
<template v-if="column.key === 'name'">
<div class="g_fw_600">姓名</div>
</template>
</template> </template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'state'"> <template v-if="column.key === 'state'">
<div class="g_flex_row_between"> <div class="g_c_main">删除</div>
<!-- <div </template>
class="btn g_fs_14 g_mr_13"
:class="'g_c_main g_cursor_point'"
:style="{
cursor: !record.statusBool ? 'not-allowed' : '',
color: !record.statusBool ? '#d8d8d8' : '#1677ff',
}"
@click="handleApplication(record)"
>
报名
</div> -->
<div class="btn g_c_main g_fs_14 g_cursor_point g_mr_13" @click="handleToForm('edit', record)">编辑</div>
<div class="btn g_c_main g_fs_14 g_cursor_point" @click="handleDel(record)"></div>
</div>
</template> </template>
</template> </a-table>
<!-- <template #summary class="fixed-obj">
<div style="width: 70vw" class="g_pb_16 g_pt_16">
<a-table-summary fixed="bottom"> </a-table-summary>
</div>
</template> -->
</a-table>
<div class="g_pb_16 g_pt_16 g_pageBottom" v-if="tableData.records.length > 0">
<a-pagination v-model:current="tableData.page" v-model:page-size="tableData.size" :total="tableData.total" :pageSize="tableData.size" :show-total="(total) => `${total}`" @change="handleModalPage" @showSizeChange="handleModalSize" :show-quick-jumper="tableData.total < tableData.size ? false : true" :showSizeChanger="tableData.total < tableData.size ? false : true" :hideOnSinglePage="false" />
</div> </div>
</div> </div>
<!-- <a-modal v-model:open="modalInfo.isShow"
:title="modalInfo.title"
width="640px"
centered
:destroyOnClose="true"
:forceRender="true"
>
<div class="g_pt_30 modal-box">
<a-form :model="modalInfo.form"
name="basic"
:label-col="{ span: 6 }"
:wrapper-col="{ span: 18 }"
autocomplete="off"
style="width: 80%;"
class="g_ml_51"
>
<a-form-item label="职位要求标签" name="name" required>
<a-input style="width: 100%" placeholder="请输入职位要求标签" v-model:value="modalInfo.form.name" />
</a-form-item>
<a-form-item label="标签类型" name="typeClassify" required>
<a-select v-model:value="modalInfo.form.typeClassify"
:getPopupContainer="(triggerNode) => triggerNode.parentNode.parentNode"
placeholder="请选择职位分类"
@change="handleUpdateSelect"
>
<a-select-option v-for="item in typeClassifyList" :value="item.id" :title="item.id">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="说明" name="desp">
<a-textarea :rows='6' style="width: 100%" placeholder="请输入职位说明" v-model:value="modalInfo.form.desp" />
</a-form-item>
</a-form>
</div>
<template #footer>
<a-button @click="modalInfo.isShow = false">关闭</a-button>
<a-button @click="submitForm" type="primary">确定</a-button>
</template>
</a-modal> -->
<a-modal v-model:open="showAdd" :title="modalInfo.title" style="width: 734px" :destroyOnClose="true">
<div class="g_pt_30 modal-box">
<a-form :model="modalInfo.form"
name="basic"
:label-col="{ span: 6 }"
:wrapper-col="{ span: 18 }"
autocomplete="off"
style="width: 80%;"
class="g_ml_51"
>
<a-form-item label="姓名" name="name" required>
<a-input style="width: 100%" placeholder="请输入姓名" v-model:value="modalInfo.form.name" />
</a-form-item>
<a-form-item label="电话" name="name" required>
<a-input style="width: 100%" placeholder="请输入电话" v-model:value="modalInfo.form.username" />
</a-form-item>
<a-form-item label="身份证号" name="name">
<a-input style="width: 100%" placeholder="请输入身份证号" v-model:value="modalInfo.form.idcard" />
</a-form-item>
<a-form-item label="备注" name="desp">
<a-textarea :rows='6' style="width: 100%" placeholder="请输入备注" v-model:value="modalInfo.form.description" />
</a-form-item>
</a-form>
</div>
<template #footer>
<a-button @click="showAdd = false" >关闭</a-button>
<a-button @click="submitForm" type="primary">确定</a-button>
</template>
</a-modal>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, onMounted, getCurrentInstance, h, watch } from "vue"; import { DownloadOutlined, PlusOutlined } from "@ant-design/icons-vue";
import { PlusOutlined, EllipsisOutlined, UploadOutlined, DownOutlined } from "@ant-design/icons-vue"; import { ref, onMounted, getCurrentInstance, watch, onBeforeUnmount } from "vue";
import { Modal, message } from "ant-design-vue"; const commonJS = getCurrentInstance().appContext.app.config.globalProperties.G;
import { useRouter, useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router";
import { getUserListApi, updateUserStatusApi, addUserApi, delUserApi,updateUserApi } from "../../api/userList/userList";
import { DownloadOutlined } from "@ant-design/icons-vue";
import idCardPanel from "../components/upload/image.vue";
/* #################### 初始化事件 #################### */
const router = useRouter(); // const router = useRouter(); //
const route = useRoute(); const route = useRoute();
const commonJS = getCurrentInstance().appContext.app.config.globalProperties.G; import { useStore } from "@/stores/counter";
const speed = ref(0); const storeJS = useStore();
const showAdd = ref(0); onMounted(() => {});
onMounted(() => { const baseInfo = ref({});
getTable(); const editStatus = ref(false);
}); const gpjgList = ref([
/** {
* 搜索事件 rank: 1,
*/ name: "汪涵光",
const searchList = (e) => { number: 1120448,
console.log("searchList", e); precent: "32.43%",
tableData.value.page = 1; },
getTable(); {
}; rank: 2,
/* #################### 顶部事件 #################### */ name: "汪涵光",
const handleChangeSearch = (e) => { number: 1120448,
if (tableData.value.keyword == "") { precent: "32.43%",
getTable(); },
} {
}; rank: 3,
const modalInfo = ref({ name: "汪涵光",
title:'新增用户', number: 1120448,
id:0, precent: "32.43%",
form:{ },
name:"", ]);
username:'', const zzkgList = ref([
idcard:'', {
description:'' rank: 1,
} name: "初始团队",
}) number: 1120448,
cost: "100万",
stockCost: "100万",
const submitForm = ()=>{ moreMoney: "200万",
let url = '',params = {}; },
params = { {
name:modalInfo.value.form.name, rank: 2,
username:modalInfo.value.form.username, name: "初始团队",
idcard:modalInfo.value.form.idcard, number: 1120448,
description:modalInfo.value.form.description, cost: "100万",
password:'123456', stockCost: "100万",
id:modalInfo.value.id moreMoney: "200万",
} },
{
rank: 3,
if (!commonJS.regular(modalInfo.value.form.username, 'tel')) { name: "初始团队",
message.warning('请输入正确的手机号') number: 1120448,
return false cost: "100万",
} stockCost: "100万",
moreMoney: "200万",
},
if(modalInfo.value.id){ ]);
delete params.password; const submitBaseInfo = () => {};
updateUserApi(params).then((res)=>{ const validateForm = () => {};
showAdd.value = false; let columns = ref([
message.success("修改成功");
getTable();
});
}else{
addUserApi(params).then((res)=>{
showAdd.value = false;
message.success("新增成功");
getTable();
});
}
}
const handleToForm = ($type, $data) => {
showAdd.value = true;
console.log($data.id);
modalInfo.value = {
isShow:true,
title:'修改用户',
form:{
name:$data.name,
username:$data.username,
idcard:$data.idcard,
description:$data.description,
},
id:$data.id
}
// updateUserApi({
// description: "",
// idcard: "123123123123123123",
// name: "",
// username: "13214534564",
// password: 123456,
// status: 0,
// username: "",
// }).then(() => {
// message.success("");
// getTable();
// });
// if ($data.id > 0) {
// router.push({
// path: "/merchantManagement/jobForm",
// query: {
// id: $data.id ? $data.id : 0,
// type: $type,
// templateId: $data.templateId ? $data.templateId : 0,
// },
// });
// } else {
// router.push({
// path: "/merchantManagement/jobForm",
// query: {
// id: $data.id ? $data.id : 0,
// type: $type,
// },
// });
// }
};
/* #################### 表格事件 #################### */
const tableData = ref({
keyword: "",
page: 1,
limit: 20,
total: 0,
count: 0,
loading: false,
records: [],
jobType2Num: "-",
jobType1Num: "-",
});
const getTable = () => {
console.log(tableData.value);
tableData.value.loading = true;
getUserListApi({ limit: tableData.value.limit, page: tableData.value.page, keyword: tableData.value.keyword }).then((res) => {
console.log(res);
tableData.value = { ...res.data, keyword: tableData.value.keyword, page: res.data.current, limit: res.data.size };
tableData.value.records.forEach((item, index) => {
item.rank = index + 1;
});
});
};
const openAdd = () =>{
showAdd.value = true
modalInfo.value.title = "新增用户"
modalInfo.value.id = 0;
modalInfo.value = {
form:{
name:"",
username:'',
idcard:'',
description:''
}
}
}
const columns = ref([
{ {
title: "序号", title: "序号",
key: "rank", key: "rank",
dataIndex: "rank", dataIndex: "rank",
width: "50px", width: "50px",
ellipsis: true, ellipsis: true,
fixed: "left",
}, },
{ {
title: "姓名", title: "姓名",
key: "name", key: "name",
dataIndex: "name", dataIndex: "name",
width: "110px", // width: "220px",
ellipsis: true,
fixed: "left",
}, },
{ {
title: "电话", title: "股数",
key: "username", key: "number",
dataIndex: "username", dataIndex: "number",
width: "300px",
// minWidth: 100,
ellipsis: true, ellipsis: true,
width: "140px",
}, },
{ {
title: "身份证号", title: "百分比",
key: "idcard", key: "precent",
dataIndex: "idcard", dataIndex: "precent",
width: "200px", width: "300px",
// minWidth: 100,
ellipsis: true, ellipsis: true,
}, },
]);
let columns1 = ref([
{ {
title: "备注", title: "序号",
key: "description", key: "rank",
dataIndex: "description", dataIndex: "rank",
width: "50px",
ellipsis: true, ellipsis: true,
fixed: "left",
}, },
{ {
title: "状态", title: "项目",
key: "status", key: "name",
dataIndex: "status", dataIndex: "name",
// width: "220px",
ellipsis: true,
fixed: "left",
},
{
title: "股本数",
key: "number",
dataIndex: "number",
width: "100px",
// minWidth: 100,
ellipsis: true,
},
{
title: "估值",
key: "cost",
dataIndex: "cost",
width: "100px",
// minWidth: 100,
ellipsis: true,
},
{
title: "股价",
key: "stockCost",
dataIndex: "stockCost",
width: "100px",
// minWidth: 100,
ellipsis: true,
},
{
title: "增资金额",
key: "moreMoney",
dataIndex: "moreMoney",
width: "100px",
// minWidth: 100,
ellipsis: true, ellipsis: true,
width: "75px",
}, },
{ {
title: "操作", title: "操作",
key: "state", key: "state",
dataIndex: "state", dataIndex: "state",
width: "90px", width: "60px",
// minWidth: 100,
ellipsis: true, ellipsis: true,
}, },
]); ]);
/**
* 切换用户状态
*/
const handleStatus = (e, $data) => {
updateUserStatusApi({ id: $data.id, status: e ? 1 : 0 }).then(() => {
message.success("更新成功");
getTable();
});
};
const addInfo = ref({});
const goDetail = ($item) => {
console.log($item);
//
if ($item.jobType == 1) {
//
router.push({
path: "/merchantManagement/shareJobDetail",
query: {
id: $item.templateId,
shared: $item.shared,
form: "joblist",
},
});
} else {
//
router.push({
path: "/merchantManagement/jobDetail",
query: {
id: $item.id,
},
});
}
};
const handleApplication = (record) => {
console.log(record);
if (!record.statusBool) {
return false;
}
//
router.push({
path: "/merchantManagement/recordJob",
query: {
company: record.boss,
job: record.job,
jobId: record.id,
templateId: record.templateId,
jobType: record.jobType,
},
});
};
const handleDel = ($data) => {
commonJS.gConfirmModal(
"删除",
"确认删除该用户吗?",
() => {
delUserApi($data.id).then(() => {
message.success("删除成功");
getTable();
});
},
() => {}
);
};
/* #################### 分页器事件 #################### */
const handleModalPage = ($page, $size) => {
//
console.log($page);
console.log($size);
tableData.value.page = $page;
getTable();
};
const handleModalSize = ($page, $size) => {
// size
tableData.value.page = 1;
tableData.value.size = $size;
getTable();
};
</script> </script>
<style lang="less"> <style lang="less" scoped></style>
.ant-table-cell:empty::before{
content: "-";
}
.p-manage-myJob {
position: relative;
min-height: calc(100vh - 213px);
width: 100%;
height: 100px;
.btn-active {
width: 40px;
height: 24px;
margin-left: 6.5px;
font-size: 12px;
color: #f6343e;
background-color: #fff3f3;
padding: 1px 3px;
zoom: 0.6;
margin-top: 8px;
text-align: center;
}
}
.ant-spin-blur .ant-empty {
opacity: 0;
}
</style>

@ -5,13 +5,13 @@
<div class="m-nav g_pl_17 g_mb_16 g_pt_16 g_bg_f0 g_flex_row_start g_flex_none"> <div class="m-nav g_pl_17 g_mb_16 g_pt_16 g_bg_f0 g_flex_row_start g_flex_none">
<Breadcrumb /> <Breadcrumb />
</div> </div>
<div class="m-worp g_flex_1" :class="pageName == 'firmInfo' || pageName == 'shareJob' || pageName == 'upstreamDetail'|| pageName == 'downstreamDetail' ? '' : 'g_bg_f'"> <div class="m-worp g_flex_1" :class="pageName == 'firmInfo' || pageName == 'shareJob' || pageName == 'upstreamDetail' || pageName == 'downstreamDetail'|| pageName == 'projectData' ? '' : 'g_bg_f'">
<div class="m-router g_pb_16" :class="{ <div class="m-router g_pb_16" :class="{
'g_pl_12 g_pr_12' : !(pageName == 'memberInfo' || 'g_pl_12 g_pr_12' : !(pageName == 'memberInfo' ||
pageName == 'firmInfo' || pageName == 'firmInfo' ||
pageName == 'shareJob' || pageName == 'shareJob' ||
pageName == 'shareJobDetail' || pageName == 'upstreamDetail'|| pageName == 'downstreamDetail'), pageName == 'shareJobDetail' || pageName == 'upstreamDetail'|| pageName == 'downstreamDetail'|| pageName == 'projectData'),
'g_pb_0' : pageName == 'shareJobDetail'|| pageName == 'upstreamDetail'|| pageName == 'downstreamDetail' 'g_pb_0' : pageName == 'shareJobDetail'|| pageName == 'upstreamDetail'|| pageName == 'downstreamDetail'
} }
" :style="{ " :style="{

@ -105,13 +105,12 @@ const loginType = ref(1);
// //
const loginInfo = ref({ const loginInfo = ref({
username: "", username: "bocai",
password: "", password: "123456",
code: "", code: "",
}); });
const loginInfoForm = ref(); const loginInfoForm = ref();
const watchValidate = (e1) => { const watchValidate = (e1) => {
// setTimeout(() => { // setTimeout(() => {
// loginInfoForm.value.clearValidate(); // loginInfoForm.value.clearValidate();
// }, 3000); // }, 3000);

Loading…
Cancel
Save