diff --git a/src/api/pxzx.js b/src/api/pxzx.js index 32110c7..06c5f7f 100644 --- a/src/api/pxzx.js +++ b/src/api/pxzx.js @@ -19,3 +19,59 @@ export const njryList = (data) => { data }); }; +export const njryPage = (data) => { + return request({ + url: api + "/baxx/njgl/page", + method: "POST", + data + }); +}; + +// 培训公司 +// /baxx/dwgl/list +export const dwglList = (data) => { + return request({ + url: api + "/baxx/dwgl/list", + method: "POST", + data + }); +}; +// 修改保安培训公司 +// /baxx/njgl / edit +export const njglEdit = (data) => { + return request({ + url: api + "/baxx/njgl/edit", + method: "POST", + data + }); +}; +export const njryNjshPage = (data) => { + return request({ + url: api + "/baxx/njry/njshPage", + method: "POST", + data + }); +}; +// /baxx/njry / page +export const baxxNjryPage = (data) => { + return request({ + url: api + "/baxx/njry/page", + method: "POST", + data + }); +}; +// /baxx/njry / edit +export const baxxNjryEdit = (data) => { + return request({ + url: api + "/baxx/njry/edit", + method: "POST", + data + }); +}; +export const baxxNjryNjshPage = (data) => { + return request({ + url: api + "/baxx/njry/njshPage", + method: "POST", + data + }); +}; diff --git a/src/views/Training/AnnualInspection/components/detailForm.vue b/src/views/Training/AnnualInspection/components/detailForm.vue index 4ae86f4..ea57a64 100644 --- a/src/views/Training/AnnualInspection/components/detailForm.vue +++ b/src/views/Training/AnnualInspection/components/detailForm.vue @@ -19,27 +19,33 @@ import FormMessage from "@/components/aboutTable/FormMessage.vue"; import { ref, reactive,defineEmits,getCurrentInstance } from 'vue'; const emit = defineEmits(["refresh"]); const { proxy } = getCurrentInstance(); +const props = defineProps({ + dict: { + default: [[]], //二维数组 + type: Array + } +}) const dialogForm = ref(false); const FormRef = ref(); const listQuery = ref({}); -const loading = ref(false); const formList = reactive([ [ - { label: "姓名", prop: "name", type: "input" }, - { label: "证件号码", prop: "idNumber", type: "input" }, - { label: "联系电话", prop: "contactInfo", type: "input" }, + { label: "姓名", prop: "xm", type: "input" }, + { label: "证件号码", prop: "sfzh", type: "input" }, + { label: "联系电话", prop: "lxdh", type: "input" }, ], [ - { label: "是否年检", prop: "isUploaded", type: "input" }, - { label: "年检时间", prop: "inspectionTime", type: "input" }, + { label: "是否年检", prop: "isnj", type:"select",options: props.dict.D_BZ_SF}, + { label: "年检时间", prop: "njsj", type: "date" }, ], ]) // 初始化数据 -const init = (type, id,) => { +const init = (type, row,) => { dialogForm.value = true; + listQuery.value=row }; const close = () => { diff --git a/src/views/Training/AnnualInspection/components/pxgs.vue b/src/views/Training/AnnualInspection/components/pxgs.vue index eb91adb..de8c36f 100644 --- a/src/views/Training/AnnualInspection/components/pxgs.vue +++ b/src/views/Training/AnnualInspection/components/pxgs.vue @@ -1,55 +1,82 @@ diff --git a/src/views/Training/AnnualInspection/index.vue b/src/views/Training/AnnualInspection/index.vue index 7660b35..c7b3359 100644 --- a/src/views/Training/AnnualInspection/index.vue +++ b/src/views/Training/AnnualInspection/index.vue @@ -1,8 +1,7 @@ @@ -39,35 +41,35 @@ import Search from "@/components/aboutTable/Search.vue"; import DetailForm from "./components/detailForm.vue"; import Pxgs from "./components/pxgs.vue"; import {getItem} from '@/utils/storage.js' -import { cyryPage} from "@/api/pxzx.js"; +import { cyryPage,njryPage} from "@/api/pxzx.js"; import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue"; const { proxy } = getCurrentInstance(); -const activeTab = ref(2) +const { D_BZ_SF ,D_BAXX_DWLX} = proxy.$dict("D_BZ_SF","D_BAXX_DWLX"); const detailDiloag = ref(); const pxgs = ref(); const searchBox = ref(); //搜索框 -const baseUrl = 'data:image/jpeg;base64,' + const searchConfiger = ref([ { label: "人员姓名", - prop: "name", + prop: "xm", showType: "input" }, { label: "证件号码", - prop: "idNumber", + prop: "sfzh", showType: "input" }, { label: "联系方式", - prop: "contactInfo", + prop: "lxdh", showType: "input" }, ]); const idEntityCard=getItem('idEntityCard') const queryFrom = ref({}); const pageData = reactive({ - tableData: [{name:'张三',idNumber:'44032519900101001X',contactInfo:'13800000000',isInspected:'是',inspectionTime:'2023-08-01'}], + tableData: [], keyCount: 0, tableConfiger: { rowHieght: 61, @@ -81,29 +83,24 @@ const pageData = reactive({ }, controlsWidth: 180, tableColumn: [ - { label: "姓名", prop: "name", width: 100 }, - { label: "证件号码", prop: "idNumber" }, - { label: "联系方式", prop: "contactInfo" }, - { label: "是否年检", prop: "isInspected" }, - { label: "年检时间", prop: "inspectionTime", width: 120 } + { label: "姓名", prop: "xm", width: 100 }, + { label: "证件号码", prop: "sfzh" }, + { label: "联系方式", prop: "lxdh" }, + { label: "是否年检", prop: "isnj" ,showSolt: true}, + { label: "年检时间", prop: "njsj" } ] }); onMounted(() => { getInfo(); tabHeightFn(); }); - -const changeTab = (val) => { - console.log(val,'=====ll'); -} - // 搜索 const onSearch = (val) => { queryFrom.value = { ...val }; pageData.pageConfiger.pageCurrent = 1; getList(); }; - +const gsId=ref('') const changeNo = (val) => { pageData.pageConfiger.pageNum = val; getList(); @@ -115,8 +112,11 @@ const changeSize = (val) => { const getInfo = () => { let promes = { sfzh: idEntityCard } cyryPage(promes).then(res => { - pageData.tableData = res.records || []; - pageData.total = res.total; + const data = res.records[0] || {}; + if (data) { + gsId.value=data.code + } + getList() }).finally(() => { pageData.tableConfiger.loading = false; }) @@ -124,30 +124,30 @@ const getInfo = () => { // 获取列表 const getList = () => { pageData.tableConfiger.loading = true; - // const promes = { - // ...pageData.pageConfiger, - // ...queryFrom.value - // } + const promes = { + ...pageData.pageConfiger, + ...queryFrom.value, + dwbm: gsId.value + } + njryPage(promes).then((res) => { + pageData.tableData = res.records || []; + pageData.total = res.total; + }).catch((err) => { + console.log(err); - // - // let data = { ...pageData.pageConfiger, ...queryFrom.value }; - // qcckGet(data, "/mosty-jbld/jbldzsd/selectPage").then((res) => { - // pageData.tableData = res.records || []; - // pageData.total = res.total; - // pageData.tableConfiger.loading = false; - // }).catch(() => { - // pageData.tableConfiger.loading = false; - // }); + }).finally(() => { + pageData.tableConfiger.loading = false; + }); }; // 详情 -const addEdit = (type, id) => { +const addEdit = (type, row) => { nextTick(() => { if(type == 'pxgs'){ - pxgs.value.init(id); + pxgs.value.init(row); }else{ - detailDiloag.value.init(type, id); + detailDiloag.value.init(type, row); } }) }; diff --git a/src/views/Training/AnnualInspectionApplicants/components/detailForm.vue b/src/views/Training/AnnualInspectionApplicants/components/detailForm.vue index 2c8b73a..50949f0 100644 --- a/src/views/Training/AnnualInspectionApplicants/components/detailForm.vue +++ b/src/views/Training/AnnualInspectionApplicants/components/detailForm.vue @@ -21,8 +21,15 @@