lcw
This commit is contained in:
@ -21,8 +21,15 @@
|
||||
<script setup>
|
||||
import { qcckPost , qcckGet} from "@/api/qcckApi.js";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { ref, reactive,defineEmits,getCurrentInstance } from 'vue';
|
||||
import { ref, reactive, defineEmits, getCurrentInstance } from 'vue';
|
||||
import {baxxNjryEdit} from "@/api/pxzx.js";
|
||||
const emit = defineEmits(["refresh"]);
|
||||
const props = defineProps({
|
||||
dict: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
});
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogForm = ref(false);
|
||||
const FormRef = ref();
|
||||
@ -33,40 +40,51 @@ const title = ref('新增');
|
||||
const rules = reactive({
|
||||
pxlx: [{ required: true, message: "请输入视频标题", trigger: "blur" }],
|
||||
});
|
||||
const formList = reactive([
|
||||
[
|
||||
{ label: "姓名", prop: "name", type: "input" },
|
||||
{ label: "证件号码", prop: "idNumber", type: "input" },
|
||||
{ label: "联系电话", prop: "contactInfo", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "是否年检", prop: "isUploaded", type: "input" },
|
||||
{ label: "培训项目", prop: "trainingProject", type: "input" },
|
||||
{ label: "年检时间", prop: "inspectionTime", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "体检报告", prop: "inspectionReport", type: "upload" },
|
||||
{ label: "无犯罪记录证明", prop: "wfzjlzm", type: "upload" },
|
||||
{ label: "保安证原件", prop: "bazzj", type: "upload" },
|
||||
],
|
||||
])
|
||||
const formList = ref([])
|
||||
|
||||
|
||||
// 初始化数据
|
||||
const init = (type, id,) => {
|
||||
const init = (type, row) => {
|
||||
dialogForm.value = true;
|
||||
title.value = type == 'add' ? '新增' : '详情';
|
||||
listQuery.value = row
|
||||
formList.value =[
|
||||
[
|
||||
{ label: "姓名", prop: "xm", type: "input" },
|
||||
{ label: "证件号码", prop: "zjhm", type: "input" },
|
||||
{ label: "联系电话", prop: "lxdh", type: "input" },
|
||||
],
|
||||
[
|
||||
{ label: "是否年检", prop: "njzt", type: "select",options:props.dict.D_BZ_SF },
|
||||
{ label: "培训项目", prop: "pxxm", type: "input" },
|
||||
{ label: "年检时间", prop: "inspectionTime", type: "date" },
|
||||
],
|
||||
{ label: "体检报告", prop: "tjzm", type: "upload" },
|
||||
{ label: "无犯罪记录证明", prop: "wfzzmjl", type: "upload" },
|
||||
{ label: "保安证原件", prop: "bazyj", type: "upload" },
|
||||
]
|
||||
};
|
||||
|
||||
const save = () => {
|
||||
FormRef.value.submit(()=>{
|
||||
FormRef.value.submit(() => {
|
||||
const promes = {
|
||||
...listQuery.value,
|
||||
ryzp:listQuery.value.ryzp?.map(item=>item.url),
|
||||
}
|
||||
baxxNjryEdit(promes).then(res=>{
|
||||
proxy.$message.success("保存成功");
|
||||
emit("refresh");
|
||||
close();
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
})
|
||||
// loading.value = true;
|
||||
// let url = title.value == '新增' ? `/mosty-jbld/jbldzsd/add` : `/mosty-jbld/jbldzsd/update`;
|
||||
// qcckPost(listQuery.value, url).then(() => {
|
||||
// loading.value = false;
|
||||
proxy.$message.success("保存成功");
|
||||
// emit("refresh");
|
||||
close();
|
||||
// close();
|
||||
// }).catch(() => {
|
||||
// loading.value = false;
|
||||
// })
|
||||
|
||||
@ -14,11 +14,16 @@
|
||||
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
||||
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth"
|
||||
@chooseData="chooseData">
|
||||
|
||||
<template #isUploaded="{row}">
|
||||
{{ row.bazyj&&row.tjzm&&row.wfzzmjl?'已上传':'未上传' }}
|
||||
</template>
|
||||
<template #njzt="{row}">
|
||||
<DictTag :options="D_BZ_SF" v-model:value="row.njzt" tag></DictTag>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" link @click="addEdit('detail', row.id)">详情</el-link>
|
||||
<el-link type="success" link @click="addEdit('add', '')">上传资料</el-link>
|
||||
<el-link type="primary" link @click="addEdit('detail', row)">详情</el-link>
|
||||
<el-link type="success" link @click="addEdit('add', row)">上传资料</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
||||
@ -27,7 +32,7 @@
|
||||
}"></Pages>
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<DetailForm ref="detailDiloag" @refresh="getList" />
|
||||
<DetailForm ref="detailDiloag" :dict="{D_BZ_SF}" />
|
||||
<!-- 培训申请 -->
|
||||
<PxApllication ref="pxApllication" />
|
||||
</div>
|
||||
@ -41,8 +46,11 @@ import Search from "@/components/aboutTable/Search.vue";
|
||||
import DetailForm from "./components/detailForm.vue";
|
||||
import PxApllication from "./components/pxApllication.vue";
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import {baxxNjryNjshPage} from '@/api/pxzx.js'
|
||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_SF } = proxy.$dict("D_BZ_SF");
|
||||
|
||||
const detailDiloag = ref();
|
||||
const pxApllication = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
@ -74,9 +82,9 @@ const pageData = reactive({
|
||||
{ label: "姓名", prop: "xm" },
|
||||
{ label: "证件号码", prop: "zjhm" },
|
||||
{ label: "联系方式", prop: "lxdh" },
|
||||
{ label: "是否上传资料", prop: "isUploaded" },
|
||||
{ label: "是否上传资料", prop: "isUploaded" ,showSolt:true},
|
||||
{ label: "申请时间", prop: "sqrq", },
|
||||
{ label: "资料审核是否通过", prop: "njzt"}
|
||||
{ label: "资料审核是否通过", prop: "njzt",showSolt:true}
|
||||
]
|
||||
});
|
||||
|
||||
@ -105,7 +113,7 @@ const changeSize = (val) => {
|
||||
const getList = () => {
|
||||
pageData.tableConfiger.loading = true;
|
||||
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
||||
qcckPost(data, "/mosty-base/baxx/njry/queryCurrent").then((res) => {
|
||||
baxxNjryNjshPage(data).then((res) => {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
pageData.tableConfiger.loading = false;
|
||||
@ -117,12 +125,12 @@ const getList = () => {
|
||||
|
||||
|
||||
// 详情
|
||||
const addEdit = (type, id) => {
|
||||
const addEdit = (type, row) => {
|
||||
nextTick(() => {
|
||||
if(type == 'pxsq'){
|
||||
pxApllication.value.init(type, id);
|
||||
pxApllication.value.init(type, row);
|
||||
}else{
|
||||
detailDiloag.value.init(type, id);
|
||||
detailDiloag.value.init(type, row);
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user