From 2293a1b58a3227a4870466e3699b6baf0af29303 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期一, 11 八月 2025 17:19:53 +0800 Subject: [PATCH] - --- src/views/system/dept/detail.vue | 101 ++++++ src/views/system/dept/utils/types.ts | 1 src/views/system/dept/index.vue | 530 ++++++++++++++++++----------------- src/views/system/aboutItem/index.vue | 11 src/api/item/aboutitem.ts | 31 ++ src/views/system/dept/form.vue | 12 src/api/item/index.ts | 3 src/views/system/aboutItem/utils/hook.tsx | 192 ++---------- 8 files changed, 461 insertions(+), 420 deletions(-) diff --git a/src/api/item/aboutitem.ts b/src/api/item/aboutitem.ts new file mode 100644 index 0000000..0f5bf85 --- /dev/null +++ b/src/api/item/aboutitem.ts @@ -0,0 +1,31 @@ +/** + * 锛堜笉寤鸿鍐欐垚 request.post(xxx)锛屽洜涓鸿繖鏍� post 鏃讹紝鏃犳硶 params 涓� data 鍚屾椂浼犲弬锛� + * + * 鍏虫敞椤圭洰鎺ュ彛闆嗗悎 + */ + +import { http } from "@/utils/http"; +import { baseUrlApi } from "../util"; +import type { Result, PageResult } from "../types"; + +// 渚涘簲鍟嗘敹钘忔垨鑰呭彇娑堟敹钘� +export const addCollection = (data?: object) => { + return http.request<Result>( + "post", + baseUrlApi("/api/suplierTendOrder/addCollection"), + { + data + } + ); +}; + +// 渚涘簲鍟嗘煡璇㈡敹钘� +export const pageCollection = (data?: object) => { + return http.request<PageResult>( + "post", + baseUrlApi("/api/suplierTendOrder/pageCollection"), + { + data + } + ); +}; diff --git a/src/api/item/index.ts b/src/api/item/index.ts index 9556952..0f8ee7a 100644 --- a/src/api/item/index.ts +++ b/src/api/item/index.ts @@ -1,8 +1,7 @@ /** * 锛堜笉寤鸿鍐欐垚 request.post(xxx)锛屽洜涓鸿繖鏍� post 鏃讹紝鏃犳硶 params 涓� data 鍚屾椂浼犲弬锛� * - * 娉ㄥ唽api鎺ュ彛闆嗗悎 - * @method login 鐧诲綍 + * 椤圭洰绠$悊鎺ュ彛闆嗗悎 */ import { http } from "@/utils/http"; diff --git a/src/views/system/aboutItem/index.vue b/src/views/system/aboutItem/index.vue index 127646a..3a05a1e 100644 --- a/src/views/system/aboutItem/index.vue +++ b/src/views/system/aboutItem/index.vue @@ -22,7 +22,6 @@ state, loading, columns, - CGRcolumns, selectedNum, dataList, onSearch, @@ -220,7 +219,7 @@ </el-card> <PureTableBar title="" - :columns="nowRole.code == 'CGR' ? CGRcolumns : columns" + :columns="columns" :tableRef="tableRef?.getTableRef()" @refresh="onSearch" @fullscreen="onFullscreen" @@ -286,16 +285,14 @@ :icon="useRenderIcon(EditPen)" @click="openDialog('淇敼', row)" /> - <!-- <el-button + <el-button class="reset-margin" link type="primary" :size="size" - :icon="useRenderIcon(AddFill)" + icon="arcticons:one-hand-operation" @click="openDialog('鏂板', { parentId: row.id } as any)" - > - 鏂板 - </el-button> --> + /> <el-popconfirm :title="`鏄惁纭鍒犻櫎椤圭洰鍚嶇О涓�${row.projectName}鐨勮繖鏉℃暟鎹甡" @confirm="handleDelete(row)" diff --git a/src/views/system/aboutItem/utils/hook.tsx b/src/views/system/aboutItem/utils/hook.tsx index 0608031..d451e05 100644 --- a/src/views/system/aboutItem/utils/hook.tsx +++ b/src/views/system/aboutItem/utils/hook.tsx @@ -1,36 +1,14 @@ -import dayjs from "dayjs"; +// import dayjs from "dayjs"; import editForm from "../form.vue"; import { handleTree } from "@/utils/tree"; import { message } from "@/utils/message"; -import { zhaobiaoPageOrder } from "@/api/item/index"; - -import { - getCaigoufangshiList, - getHangyepingmuList, - getOrderStatusList, - getRegionList, - getDaimaleixingList, - caigourenAdd, - caigourenUpdate, - caigourenDelete, - caigourenBatchDelete -} from "@/api/item/index"; -import { usePublicHooks } from "../../hooks"; +import { pageCollection } from "@/api/item/aboutitem"; import { addDialog } from "@/components/ReDialog"; import { type Ref, reactive, ref, onMounted, h, computed } from "vue"; import type { FormItemProps } from "./types"; -import { - cloneDeep, - isAllEmpty, - deviceDetection, - getKeyList -} from "@pureadmin/utils"; -import { useUserStoreHook } from "@/store/modules/user"; +import { cloneDeep, deviceDetection, getKeyList } from "@pureadmin/utils"; import type { PaginationProps } from "@pureadmin/table"; -const nowRole = computed(() => { - return useUserStoreHook().nowRole; -}); const selectedNum = ref(0); export function useDept(tableRef: Ref) { @@ -70,39 +48,38 @@ currentPage: 1, background: true }); - //鑾峰彇閲囪喘鏂瑰紡 - const getCaigoufangshiListFun = async () => { - const res = await getCaigoufangshiList(); - state.caigoufangshiList = res.result; - }; + // //鑾峰彇閲囪喘鏂瑰紡 + // const getCaigoufangshiListFun = async () => { + // const res = await getCaigoufangshiList(); + // state.caigoufangshiList = res.result; + // }; - //鑾峰彇琛屼笟鍝佺洰 - const getHangyepingmuListFun = async () => { - const res = await getHangyepingmuList(); - state.hangyepingmuList = res.result; - }; + // //鑾峰彇琛屼笟鍝佺洰 + // const getHangyepingmuListFun = async () => { + // const res = await getHangyepingmuList(); + // state.hangyepingmuList = res.result; + // }; - //鑾峰彇椤圭洰杩涘害 - const getOrderStatusListFun = async () => { - const res = await getOrderStatusList(); - state.orderStatusList = res.result; - }; + // //鑾峰彇椤圭洰杩涘害 + // const getOrderStatusListFun = async () => { + // const res = await getOrderStatusList(); + // state.orderStatusList = res.result; + // }; - // 鑾峰彇鍖哄煙 - const getRegionListFun = async () => { - const res = await getRegionList(); - state.regionList = res.result; - }; + // // 鑾峰彇鍖哄煙 + // const getRegionListFun = async () => { + // const res = await getRegionList(); + // state.regionList = res.result; + // }; - // 鑾峰彇浠g爜绫诲瀷 - const getDaimaleixingListFun = async () => { - const res = await getDaimaleixingList(); - state.daimaleixingList = res.result; - }; + // // 鑾峰彇浠g爜绫诲瀷 + // const getDaimaleixingListFun = async () => { + // const res = await getDaimaleixingList(); + // state.daimaleixingList = res.result; + // }; const formRef = ref(); const dataList = ref([]); const loading = ref(true); - const { tagStyle } = usePublicHooks(); const getOrderStatus = row => { const res = state.orderStatusList.find(item => { return row.orderStatus == item.status; @@ -117,128 +94,36 @@ reserveSelection: true // 鏁版嵁鍒锋柊鍚庝繚鐣欓�夐」 }, { - label: "閲囪喘浜�", + label: "鎶ュ悕鎴鏃堕棿", prop: "caigourenmingcheng", minWidth: 70 }, { - label: "椤圭洰鍚嶇О", + label: "鍖哄煙", prop: "projectName", width: 180, align: "left" }, { - label: "椤圭洰杩涘害", - prop: "orderStatus", + label: "椤圭洰鍚嶇О", + prop: "projectName", minWidth: 70, cellRenderer: ({ row, props }) => getOrderStatus(row) }, { - label: "鎶ュ悕璐�", + label: "椤圭洰缂栧彿", prop: "baomingfei", minWidth: 70 - }, - { - label: "鎶曟爣淇濊瘉閲�", - prop: "toubiaobaozhengjin", - minWidth: 70 - }, - { - label: "涓爣渚涘簲鍟�", - prop: "zhongbiaoName", - minWidth: 180 - }, - { - label: "璇勫涓撳", - prop: "zhuanjiaName", - minWidth: 70 - }, - { - label: "璐ㄧ枒", - prop: "zhiyi", - minWidth: 100, - cellRenderer: ({ row, props }) => ( - <span>{row.status === 1 ? "鏈�" : "鏃�"}</span> - ) - }, - { - label: "鎶曡瘔", - prop: "tousu", - minWidth: 100, - cellRenderer: ({ row, props }) => ( - // <el-tag size={props.size} style={tagStyle.value(row.status)}> - <span>{row.status === 1 ? "鏈�" : "鏃�"}</span> - // </el-tag> - ) - }, - { - label: "鎿嶄綔", - fixed: "right", - width: 80, - slot: "operation" - } - ]; - const CGRcolumns: TableColumnList = [ - { - label: "鍕鹃�夊垪", // 濡傛灉闇�瑕佽〃鏍煎閫夛紝姝ゅlabel蹇呴』璁剧疆 - type: "selection", - fixed: "left", - reserveSelection: true // 鏁版嵁鍒锋柊鍚庝繚鐣欓�夐」 }, { label: "浠g悊鏈烘瀯", - prop: "dailijigoumingcheng", - minWidth: 70 - }, - { - label: "椤圭洰鍚嶇О", - prop: "projectName", - width: 180, - align: "left" - }, - { - label: "椤圭洰杩涘害", - prop: "orderStatus", - minWidth: 70, - cellRenderer: ({ row, props }) => getOrderStatus(row) - }, - { - label: "鎶ュ悕璐�", - prop: "baomingfei", - minWidth: 70 - }, - { - label: "鎶曟爣淇濊瘉閲�", prop: "toubiaobaozhengjin", minWidth: 70 }, { - label: "涓爣渚涘簲鍟�", + label: "寮�鏍囨椂闂�", prop: "zhongbiaoName", minWidth: 180 - }, - { - label: "璇勫涓撳", - prop: "zhuanjiaName", - minWidth: 70 - }, - { - label: "璐ㄧ枒", - prop: "zhiyi", - minWidth: 100, - cellRenderer: ({ row, props }) => ( - <span>{row.status === 1 ? "鏈�" : "鏃�"}</span> - ) - }, - { - label: "鎶曡瘔", - prop: "tousu", - minWidth: 100, - cellRenderer: ({ row, props }) => ( - // <el-tag size={props.size} style={tagStyle.value(row.status)}> - <span>{row.status === 1 ? "鏈�" : "鏃�"}</span> - // </el-tag> - ) }, { label: "鎿嶄綔", @@ -306,11 +191,11 @@ }; async function onSearch() { const obj = cloneDeep(form); - obj.tousu = obj.tousu.join(""); - obj.zhiyi = obj.zhiyi.join(""); - obj.xingzhengquyu = obj.xingzhengquyu ? obj.xingzhengquyu.join("") : ""; + // obj.tousu = obj.tousu.join(""); + // obj.zhiyi = obj.zhiyi.join(""); + // obj.xingzhengquyu = obj.xingzhengquyu ? obj.xingzhengquyu.join("") : ""; loading.value = true; - const { result } = await zhaobiaoPageOrder(obj); // 杩欓噷鏄繑鍥炰竴缁存暟缁勭粨鏋勶紝鍓嶇鑷澶勭悊鎴愭爲缁撴瀯锛岃繑鍥炴牸寮忚姹傦細鍞竴id鍔犵埗鑺傜偣parentId锛宲arentId鍙栫埗鑺傜偣id + const { result } = await pageCollection(obj); // 杩欓噷鏄繑鍥炰竴缁存暟缁勭粨鏋勶紝鍓嶇鑷澶勭悊鎴愭爲缁撴瀯锛岃繑鍥炴牸寮忚姹傦細鍞竴id鍔犵埗鑺傜偣parentId锛宲arentId鍙栫埗鑺傜偣id const newData = result.items; loading.value = false; pagination.total = result.total; @@ -467,7 +352,6 @@ state, loading, columns, - CGRcolumns, dataList, selectedNum, /** 鎼滅储 */ diff --git a/src/views/system/dept/detail.vue b/src/views/system/dept/detail.vue new file mode 100644 index 0000000..b3b7c3c --- /dev/null +++ b/src/views/system/dept/detail.vue @@ -0,0 +1,101 @@ +<script setup lang="ts"> +import { ref, reactive, onMounted, computed, PropType } from "vue"; +import { useRenderIcon } from "@/components/ReIcon/src/hooks"; +import { useDept } from "./utils/hook"; +import { FormItemProps } from "./utils/types"; + +interface Emits { + (e: "backListPage"): void; +} +const emit = defineEmits<Emits>(); +const props = defineProps({ + nowInfo: Object as PropType<FormItemProps> +}); +import Delete from "~icons/ep/delete"; +import EditPen from "~icons/ep/edit-pen"; +import IconParkSolidBack from "~icons/icon-park-solid/back"; + +const { + state, + loading, + selectedNum, + dataList, + onSearch, + resetForm, + openDialog, + handleDelete, + handleSelectionChange, + handleSizeChange, + handleCurrentChange, + pagination, + checkboxAsRadio, + onSelectionCancel, + onbatchDel +} = useDept(ref({})); +defineOptions({ + name: "itemdetail" +}); +onMounted(() => { + console.log(props.nowInfo); +}); +const backListPage = () => { + emit("backListPage"); +}; +</script> + +<template> + <div> + <el-card> + <template v-slot:header> + <div class="flex justify-between"> + <div>{{ nowInfo.projectName }}</div> + <div> + <el-button + class="reset-margin" + link + type="primary" + :icon="useRenderIcon(EditPen)" + @click="openDialog('淇敼', nowInfo)" + /> + <el-button + class="reset-margin" + link + type="primary" + :icon="useRenderIcon(Delete)" + @click="openDialog('淇敼', nowInfo)" + /> + <el-button + class="reset-margin" + link + type="primary" + :icon="useRenderIcon(IconParkSolidBack)" + @click="backListPage" + /> + </div> + </div> + </template> + <div> + <el-descriptions class="margin-top" :column="3" :size="size" border> + <el-descriptions-item label="椤圭洰缂栧彿"> + {{ nowInfo.projectCode }} + </el-descriptions-item> + <el-descriptions-item label="琛屼笟鍝佺洰" + >18100000000</el-descriptions-item + > + <el-descriptions-item label="閲囪喘鏂瑰紡"> + {{ nowInfo.caigoufangshiName }} + </el-descriptions-item> + <el-descriptions-item label="鑱斿悎浣撴姇鏍�"> + {{ nowInfo.lianhetitoubiao }} + </el-descriptions-item> + <el-descriptions-item label="Remarks"> + <el-tag size="small">School</el-tag> + </el-descriptions-item> + <el-descriptions-item label="Address" /> + </el-descriptions> + </div> + </el-card> + </div> +</template> + +<style lang="scss" scoped></style> diff --git a/src/views/system/dept/form.vue b/src/views/system/dept/form.vue index 88586e0..2e46642 100644 --- a/src/views/system/dept/form.vue +++ b/src/views/system/dept/form.vue @@ -16,6 +16,7 @@ projectName: "", // 椤圭洰鍚嶇О锛堝繀濉級 hangyepinmu: null, // 琛屼笟鍝佺洰锛堝彲閫夛級 caigoufangshi: null, // 閲囪喘鏂瑰紡锛堝彲閫夛級 + caigoufangshiName: null, caigouyusuan: null, // 閲囪喘棰勭畻锛堝彲閫夛級 dingbiaoguize: null, // 瀹氭爣瑙勫垯锛堝彲閫夛級 baomingfei: null, // 鎶ュ悕璐癸紙鍙�夛級 @@ -56,6 +57,13 @@ const handleChange = value => { console.log(value); }; +const selectChange = value => { + let obj = state.caigoufangshiList.find(item => { + return item.value == value; + }); + newFormInline.value.caigoufangshiName = obj.label; +}; + defineExpose({ getRef }); onMounted(async () => {}); </script> @@ -88,9 +96,10 @@ </el-form-item> </re-col> <re-col :value="6" :xs="24" :sm="24"> - <el-form-item label="椤圭洰缂栧彿" prop="projectCode"> + <el-form-item label="椤圭洰缂栧彿"> <el-input v-model="newFormInline.projectCode" + disabled clearable placeholder="璇疯緭鍏ラ」鐩紪鍙�" /> @@ -119,6 +128,7 @@ v-model="newFormInline.caigoufangshi" placeholder="璇烽�夋嫨閲囪喘鏂瑰紡" style="width: 240px" + @change="selectChange" > <el-option v-for="item in state.caigoufangshiList" diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index bc56d7a..2dd5f3b 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -8,15 +8,17 @@ import EditPen from "~icons/ep/edit-pen"; import Refresh from "~icons/ep/refresh"; import AddFill from "~icons/ri/add-circle-line"; +import IonEnterOutline from "~icons/ion/enter-outline"; import { useUserStoreHook } from "@/store/modules/user"; defineOptions({ name: "SystemDept" }); - +import Detail from "./detail.vue"; const formRef = ref(); const tableRef = ref(); - +const isList = ref(true); +const nowItem = ref({}); const { form, state, @@ -45,197 +47,209 @@ const nowRole = computed(() => { return useUserStoreHook().nowRole; }); - +const enterDetail = item => { + isList.value = false; + nowItem.value = item; +}; +const backListPage = () => { + isList.value = true; +}; onMounted(() => {}); </script> <template> <div class="main"> <!-- class="search-form bg-bg_color w-full pl-8 pt-[12px] overflow-auto" --> - <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> - <el-form ref="formRef" :model="form" labelWidth="100"> - <el-row> - <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6"> - <el-form-item label="鏃堕棿锛�"> - <el-date-picker - v-model="form.createDateRange" - type="daterange" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - value-format="YYYY-MM-DD HH:mm:ss" - :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" - class="w-[100%]!" - /> - <!-- start-placeholder="寮�濮嬫棩鏈�" + <template v-if="isList"> + <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> + <el-form ref="formRef" :model="form" labelWidth="100"> + <el-row> + <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6"> + <el-form-item label="鏃堕棿锛�"> + <el-date-picker + v-model="form.createDateRange" + type="daterange" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + value-format="YYYY-MM-DD HH:mm:ss" + :default-time="[ + new Date('1 00:00:00'), + new Date('1 23:59:59') + ]" + class="w-[100%]!" + /> + <!-- start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" --> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6"> - <el-form-item label="鍖哄煙锛�"> - <el-cascader - v-model="form.xingzhengquyu" - class="w-full" - :options="state.regionList" - :props="{ - value: 'code', - label: 'name', - children: 'regions' - }" - clearable - filterable - placeholder="璇烽�夋嫨鍖哄煙" - /> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label="琛屼笟鍝佺洰锛�"> - <el-select - v-model="form.hangyepinmu" - placeholder="璇烽�夋嫨琛屼笟鍝佺洰" - clearable - class="w-[100%]!" - > - <el-option - v-for="item in state.hangyepingmuList" - :key="item.id" - :label="item.label" - :value="item.value" + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6"> + <el-form-item label="鍖哄煙锛�"> + <el-cascader + v-model="form.xingzhengquyu" + class="w-full" + :options="state.regionList" + :props="{ + value: 'code', + label: 'name', + children: 'regions' + }" + clearable + filterable + placeholder="璇烽�夋嫨鍖哄煙" /> - </el-select> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label="椤圭洰杩涘害锛�"> - <el-select - v-model="form.orderStatus" - placeholder="璇烽�夋嫨椤圭洰杩涘害" - clearable - class="w-[100%]!" - > - <el-option - v-for="item in state.orderStatusList" - :key="item.id" - :label="item.label" - :value="item.value" + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label="琛屼笟鍝佺洰锛�"> + <el-select + v-model="form.hangyepinmu" + placeholder="璇烽�夋嫨琛屼笟鍝佺洰" + clearable + class="w-[100%]!" + > + <el-option + v-for="item in state.hangyepingmuList" + :key="item.id" + :label="item.label" + :value="item.value" + /> + </el-select> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label="椤圭洰杩涘害锛�"> + <el-select + v-model="form.orderStatus" + placeholder="璇烽�夋嫨椤圭洰杩涘害" + clearable + class="w-[100%]!" + > + <el-option + v-for="item in state.orderStatusList" + :key="item.id" + :label="item.label" + :value="item.value" + /> + </el-select> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label="璐ㄧ枒锛�"> + <el-checkbox-group + v-model="form.zhiyi" + clearable + class="w-[100%]!" + @change="checkboxAsRadio(form.zhiyi)" + > + <el-checkbox label="鏈�" value="true" /> + <el-checkbox label="鏃�" value="false" /> + </el-checkbox-group> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label="鎶曡瘔锛�"> + <el-checkbox-group + v-model="form.tousu" + clearable + class="w-[100%]!" + @change="checkboxAsRadio(form.tousu)" + > + <el-checkbox label="鏈�" value="true" /> + <el-checkbox label="鏃�" value="false" /> + </el-checkbox-group> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label="椤圭洰鍚嶇О锛�"> + <el-input + v-model="form.projectName" + placeholder="璇疯緭鍏ラ」鐩悕绉�" + clearable + class="w-[100%]!" /> - </el-select> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label="璐ㄧ枒锛�"> - <el-checkbox-group - v-model="form.zhiyi" - clearable - class="w-[100%]!" - @change="checkboxAsRadio(form.zhiyi)" - > - <el-checkbox label="鏈�" value="true" /> - <el-checkbox label="鏃�" value="false" /> - </el-checkbox-group> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label="鎶曡瘔锛�"> - <el-checkbox-group - v-model="form.tousu" - clearable - class="w-[100%]!" - @change="checkboxAsRadio(form.tousu)" - > - <el-checkbox label="鏈�" value="true" /> - <el-checkbox label="鏃�" value="false" /> - </el-checkbox-group> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label="椤圭洰鍚嶇О锛�"> - <el-input - v-model="form.projectName" - placeholder="璇疯緭鍏ラ」鐩悕绉�" - clearable - class="w-[100%]!" - /> - </el-form-item> - </el-col> - <el-col - v-if="nowRole.code == 'CGR'" - :xs="24" - :sm="12" - :md="8" - :lg="6" - :xl="4" - > - <el-form-item label="浠g悊鏈烘瀯锛�"> - <el-input - v-model="form.dailijigoumingcheng" - placeholder="璇疯緭鍏ヤ唬鐞嗘満鏋�" - clearable - class="w-[100%]!" - /> - </el-form-item> - </el-col> - <el-col - v-if="nowRole.code == 'DLJG'" - :xs="24" - :sm="12" - :md="8" - :lg="6" - :xl="4" - > - <el-form-item label="閲囪喘浜猴細"> - <el-input - v-model="form.caigourenmingcheng" - placeholder="璇疯緭鍏ラ噰璐汉" - clearable - class="w-[100%]!" - /> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label="涓爣渚涘簲鍟嗭細"> - <el-input - v-model="form.zhongbiaoName" - placeholder="璇疯緭鍏ヤ腑鏍囦緵搴斿晢" - clearable - class="w-[100%]!" - /> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label="璇勫涓撳锛�"> - <el-input - v-model="form.zhuanjiaName" - placeholder="璇疯緭鍏ヨ瘎瀹′笓瀹�" - clearable - class="w-[100%]!" - /> - </el-form-item> - </el-col> - <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> - <el-form-item label-width="40"> - <el-button type="primary" :loading="loading" @click="onSearch"> - 鎼滅储 - </el-button> - <!-- <el-button + </el-form-item> + </el-col> + <el-col + v-if="nowRole.code == 'CGR'" + :xs="24" + :sm="12" + :md="8" + :lg="6" + :xl="4" + > + <el-form-item label="浠g悊鏈烘瀯锛�"> + <el-input + v-model="form.dailijigoumingcheng" + placeholder="璇疯緭鍏ヤ唬鐞嗘満鏋�" + clearable + class="w-[100%]!" + /> + </el-form-item> + </el-col> + <el-col + v-if="nowRole.code == 'DLJG'" + :xs="24" + :sm="12" + :md="8" + :lg="6" + :xl="4" + > + <el-form-item label="閲囪喘浜猴細"> + <el-input + v-model="form.caigourenmingcheng" + placeholder="璇疯緭鍏ラ噰璐汉" + clearable + class="w-[100%]!" + /> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label="涓爣渚涘簲鍟嗭細"> + <el-input + v-model="form.zhongbiaoName" + placeholder="璇疯緭鍏ヤ腑鏍囦緵搴斿晢" + clearable + class="w-[100%]!" + /> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label="璇勫涓撳锛�"> + <el-input + v-model="form.zhuanjiaName" + placeholder="璇疯緭鍏ヨ瘎瀹′笓瀹�" + clearable + class="w-[100%]!" + /> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> + <el-form-item label-width="40"> + <el-button type="primary" :loading="loading" @click="onSearch"> + 鎼滅储 + </el-button> + <!-- <el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)" > 閲嶇疆 </el-button> --> - <el-button type="primary" @click="openDialog()"> 鏂板 </el-button> - </el-form-item> - </el-col> - </el-row> - </el-form> - </el-card> - <PureTableBar - title="" - :columns="nowRole.code == 'CGR' ? CGRcolumns : columns" - :tableRef="tableRef?.getTableRef()" - @refresh="onSearch" - @fullscreen="onFullscreen" - > - <!-- <template #buttons> + <el-button type="primary" @click="openDialog()"> + 鏂板 + </el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </el-card> + <PureTableBar + title="" + :columns="nowRole.code == 'CGR' ? CGRcolumns : columns" + :tableRef="tableRef?.getTableRef()" + @refresh="onSearch" + @fullscreen="onFullscreen" + > + <!-- <template #buttons> <el-button type="primary" :icon="useRenderIcon(AddFill)" @@ -244,86 +258,90 @@ 鏂板椤圭洰 </el-button> </template> --> - <template v-slot="{ size, dynamicColumns }"> - <div - v-if="selectedNum > 0" - v-motion-fade - class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center" - > - <div class="flex-auto"> - <span - style="font-size: var(--el-font-size-base)" - class="text-[rgba(42,46,54,0.5)] dark:text-[rgba(220,220,242,0.5)]" - > - 宸查�� {{ selectedNum }} 椤� - </span> - <el-button type="primary" text @click="onSelectionCancel"> - 鍙栨秷閫夋嫨 - </el-button> - </div> - <el-popconfirm title="鏄惁纭鍒犻櫎?" @confirm="onbatchDel"> - <template #reference> - <el-button type="danger" text class="mr-1!"> 鎵归噺鍒犻櫎 </el-button> - </template> - </el-popconfirm> - </div> - <pure-table - ref="tableRef" - adaptive - :adaptiveConfig="{ offsetBottom: 105 }" - align-whole="center" - row-key="id" - showOverflowTooltip - table-layout="auto" - :loading="loading" - :data="dataList" - :columns="dynamicColumns" - :pagination="{ ...pagination, size }" - :header-cell-style="{ - background: 'var(--el-fill-color-light)', - color: 'var(--el-text-color-primary)' - }" - @selection-change="handleSelectionChange" - @page-size-change="handleSizeChange" - @page-current-change="handleCurrentChange" - > - <template #operation="{ row }"> - <el-button - class="reset-margin" - link - type="primary" - :size="size" - :icon="useRenderIcon(EditPen)" - @click="openDialog('淇敼', row)" - /> - <!-- <el-button - class="reset-margin" - link - type="primary" - :size="size" - :icon="useRenderIcon(AddFill)" - @click="openDialog('鏂板', { parentId: row.id } as any)" - > - 鏂板 - </el-button> --> - <el-popconfirm - :title="`鏄惁纭鍒犻櫎椤圭洰鍚嶇О涓�${row.projectName}鐨勮繖鏉℃暟鎹甡" - @confirm="handleDelete(row)" - > + <template v-slot="{ size, dynamicColumns }"> + <div + v-if="selectedNum > 0" + v-motion-fade + class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center" + > + <div class="flex-auto"> + <span + style="font-size: var(--el-font-size-base)" + class="text-[rgba(42,46,54,0.5)] dark:text-[rgba(220,220,242,0.5)]" + > + 宸查�� {{ selectedNum }} 椤� + </span> + <el-button type="primary" text @click="onSelectionCancel"> + 鍙栨秷閫夋嫨 + </el-button> + </div> + <el-popconfirm title="鏄惁纭鍒犻櫎?" @confirm="onbatchDel"> <template #reference> - <el-button - class="reset-margin" - link - type="primary" - :size="size" - :icon="useRenderIcon(Delete)" - /> + <el-button type="danger" text class="mr-1!"> + 鎵归噺鍒犻櫎 + </el-button> </template> </el-popconfirm> - </template> - </pure-table> - </template> - </PureTableBar> + </div> + <pure-table + ref="tableRef" + adaptive + :adaptiveConfig="{ offsetBottom: 105 }" + align-whole="center" + row-key="id" + showOverflowTooltip + table-layout="auto" + :loading="loading" + :data="dataList" + :columns="dynamicColumns" + :pagination="{ ...pagination, size }" + :header-cell-style="{ + background: 'var(--el-fill-color-light)', + color: 'var(--el-text-color-primary)' + }" + @selection-change="handleSelectionChange" + @page-size-change="handleSizeChange" + @page-current-change="handleCurrentChange" + > + <template #operation="{ row }"> + <!-- <el-button + class="reset-margin" + link + type="primary" + :size="size" + :icon="useRenderIcon(EditPen)" + @click="openDialog('淇敼', row)" + /> --> + <el-button + class="reset-margin" + link + type="primary" + :size="size" + :icon="useRenderIcon(IonEnterOutline)" + @click="enterDetail(row)" + /> + <!-- <el-popconfirm + :title="`鏄惁纭鍒犻櫎椤圭洰鍚嶇О涓�${row.projectName}鐨勮繖鏉℃暟鎹甡" + @confirm="handleDelete(row)" + > + <template #reference> + <el-button + class="reset-margin" + link + type="primary" + :size="size" + :icon="useRenderIcon(Delete)" + /> + </template> + </el-popconfirm> --> + </template> + </pure-table> + </template> + </PureTableBar> + </template> + <template v-else> + <detail :now-info="nowItem" @backListPage="backListPage" /> + </template> </div> </template> diff --git a/src/views/system/dept/utils/types.ts b/src/views/system/dept/utils/types.ts index 3e0eca8..f62fd2e 100644 --- a/src/views/system/dept/utils/types.ts +++ b/src/views/system/dept/utils/types.ts @@ -4,6 +4,7 @@ projectName: string; // 椤圭洰鍚嶇О锛堝繀濉級 hangyepinmu: any | null; // 琛屼笟鍝佺洰锛堝彲閫夛級 caigoufangshi: any | null; // 閲囪喘鏂瑰紡锛堝彲閫夛級 + caigoufangshiName: any | null; // 閲囪喘鏂瑰紡锛堝彲閫夛級 caigouyusuan: any | null; // 閲囪喘棰勭畻锛堝彲閫夛級 dingbiaoguize: any | null; // 瀹氭爣瑙勫垯锛堝彲閫夛級 baomingfei: any | null; // 鎶ュ悕璐癸紙鍙�夛級 -- Gitblit v1.9.1