| | |
| | | getOrderStatusList, |
| | | getRegionList, |
| | | getDaimaleixingList, |
| | | addgetcontact, |
| | | caigourenAdd, |
| | | caigourenUpdate, |
| | | caigourenDelete, |
| | |
| | | } from "@/api/item/index"; |
| | | // import { usePublicHooks } from "../../hooks"; |
| | | import { addDialog } from "@/components/ReDialog"; |
| | | import { type Ref, reactive, ref, onMounted, h } from "vue"; |
| | | import { type Ref, reactive, ref, onMounted, h, computed } from "vue"; |
| | | import type { FormItemProps } from "./types"; |
| | | import { cloneDeep, deviceDetection, getKeyList } from "@pureadmin/utils"; |
| | | // import { useUserStoreHook } from "@/store/modules/user"; |
| | | import type { PaginationProps } from "@pureadmin/table"; |
| | | import { useUserStoreHook } from "@/store/modules/user"; |
| | | |
| | | import pdfPreview from "../../component/pdfPreview.vue"; |
| | | import pdfPreview from "../../component/pdfPreview2.vue"; |
| | | // const nowRole = computed(() => { |
| | | // return useUserStoreHook().nowRole; |
| | | // }); |
| | | const selectedNum = ref(0); |
| | | |
| | | export function useDept(tableRef: Ref) { |
| | | const nowRole = computed(() => { |
| | | return useUserStoreHook().nowRole; |
| | | }); |
| | | const form = reactive({ |
| | | // 新增日期范围,可为 null,类型为数组 |
| | | createDateRange: null, |
| | |
| | | // const { tagStyle } = usePublicHooks(); |
| | | const getOrderStatus = row => { |
| | | const res = state.orderStatusList.find(item => { |
| | | return row.orderStatus == item.status; |
| | | return row.orderStatus == item.value; |
| | | }); |
| | | return res?.label; |
| | | }; |
| | |
| | | { |
| | | label: "采购人", |
| | | prop: "caigourenmingcheng", |
| | | minWidth: 70 |
| | | minWidth: 120 |
| | | }, |
| | | { |
| | | label: "项目名称", |
| | |
| | | console.log(`current page: ${val}`); |
| | | } |
| | | |
| | | function resetForm(formEl) { |
| | | function resetForm() { |
| | | // if (!formEl) return; |
| | | // formEl.resetFields(); |
| | | // onSearch(); |
| | |
| | | return newTreeList; |
| | | } |
| | | |
| | | function openDialog(title = "新增", row?: FormItemProps) { |
| | | async function openDialog(title = "新增", row?: FormItemProps) { |
| | | const { result } = title == "新增" ? await addgetcontact() : {}; |
| | | |
| | | addDialog({ |
| | | title: `${title}项目`, |
| | | props: { |
| | |
| | | baomingfei: row?.baomingfei ?? null, // 报名费(可选) |
| | | toubiaobaozhengjin: row?.toubiaobaozhengjin ?? null, // 投标保证金(可选) |
| | | lianhetitoubiao: row?.lianhetitoubiao ?? null, // 联合体投标(可选) |
| | | kaibiaofangshi: row?.kaibiaofangshi ?? null, // 开标方式(可选) |
| | | kaibiaofangshi: row?.kaibiaofangshi ?? "纸质标", // 开标方式(可选) |
| | | shifoufenbao: row?.shifoufenbao ?? "false", // 是否分包(可选) |
| | | shifoutuisongxuanchuan: row?.shifoutuisongxuanchuan ?? "true", // 是否推送宣传(可选) |
| | | caigourenmingcheng: row?.caigourenmingcheng ?? null, // 采购人名称(可选) |
| | | caigourenmingcheng: |
| | | row?.caigourenmingcheng ?? result?.caigourenmingcheng, // 采购人名称(可选) |
| | | xingzhengquyu: row?.xingzhengquyu.split(",") ?? [], // 行政区域(可选) |
| | | xingzhengquyuName: row?.xingzhengquyuName ?? null, // 行政区域名称(可选) |
| | | jigoudaima: row?.jigoudaima ?? null, // 机构代码(可选) |
| | | jigoudaima: row?.jigoudaima ?? result?.jigoudaima, // 机构代码(可选) |
| | | daimaleixing: row?.daimaleixing ?? null, // 代码类型(可选) |
| | | lianxiren: row?.lianxiren ?? null, // 联系人(可选) |
| | | lianxidianhua: row?.lianxidianhua ?? null, // 联系电话(可选) |
| | | tongxindizhi: row?.tongxindizhi ?? null, // 通信地址(可选) |
| | | dianziyoujian: row?.dianziyoujian ?? null, // 电子邮件(可选) |
| | | xiangmujingbanren: row?.xiangmujingbanren ?? null, // 项目经办人(可选) |
| | | lianxiren: row?.lianxiren ?? result?.lianxiren, // 联系人(可选) |
| | | lianxidianhua: row?.lianxidianhua ?? result?.lianxidianhua, // 联系电话(可选) |
| | | tongxindizhi: row?.tongxindizhi ?? result?.tongxindizhi, // 通信地址(可选) |
| | | dianziyoujian: row?.dianziyoujian ?? result?.dianziyoujian, // 电子邮件(可选) |
| | | xiangmujingbanren: |
| | | row?.xiangmujingbanren ?? result?.xiangmujingbanren, // 项目经办人(可选) |
| | | zhiwu: row?.zhiwu ?? null, // 职务(可选) |
| | | jingbanrendianhua: row?.jingbanrendianhua ?? null, // 经办人电话(可选) |
| | | dailijigoumingcheng: row?.dailijigoumingcheng ?? null, // 代理机构名称(可选) |
| | | dailiLianxiren: row?.dailiLianxiren ?? null, // 代理机构联系人(可选) |
| | | dailiLianxidianhua: row?.dailiLianxidianhua ?? null, // 代理机构联系电话(可选) |
| | | dailiDianziyoujian: row?.dailiDianziyoujian ?? null, // 代理机构电子邮件(可选) |
| | | dailiTongxindizhi: row?.dailiTongxindizhi ?? null, // 代理机构通信地址(可选) |
| | | dailiXiangmujingli: row?.dailiXiangmujingli ?? null, // 代理机构项目经理(可选 |
| | | dailijingliLianxidianhua: row?.dailijingliLianxidianhua ?? null // 代理机构项目经理联系电话(可选) |
| | | dailijigoumingcheng: |
| | | row?.dailijigoumingcheng ?? result?.dailijigoumingcheng, // 代理机构名称(可选) |
| | | dailiLianxiren: row?.dailiLianxiren ?? result?.dailiLianxiren, // 代理机构联系人(可选) |
| | | dailiLianxidianhua: |
| | | row?.dailiLianxidianhua ?? result?.dailiLianxidianhua, // 代理机构联系电话(可选) |
| | | dailiDianziyoujian: |
| | | row?.dailiDianziyoujian ?? result?.dailiDianziyoujian, // 代理机构电子邮件(可选) |
| | | dailiTongxindizhi: |
| | | row?.dailiTongxindizhi ?? result?.dailiTongxindizhi, // 代理机构通信地址(可选) |
| | | dailiXiangmujingli: |
| | | row?.dailiXiangmujingli ?? result?.dailiXiangmujingli, // 代理机构项目经理(可选 |
| | | dailijingliLianxidianhua: |
| | | row?.dailijingliLianxidianhua ?? result?.dailijingliLianxidianhua // 代理机构项目经理联系电话(可选) |
| | | } |
| | | }, |
| | | width: "80%", |
| | |
| | | const FormRef = formRef.value.getRef(); |
| | | const curData = cloneDeep(options.props.formInline as FormItemProps); |
| | | async function chores() { |
| | | message(`您${title}了项目名称为${curData.projectName}的这条数据`, { |
| | | type: "success" |
| | | }); |
| | | // curData.dingbiaoguize = curData.dingbiaoguize.join(""); |
| | | curData.xingzhengquyu = curData.xingzhengquyu.join(","); |
| | | let res; |
| | |
| | | if (res.code == "200") { |
| | | done(); // 关闭弹框 |
| | | onSearch(); // 刷新表格数据 |
| | | message(`您${title}了项目名称为${curData.projectName}的这条数据`, { |
| | | type: "success" |
| | | }); |
| | | } else { |
| | | closeLoading(); |
| | | message(res.message, { |
| | |
| | | pagination, |
| | | checkboxAsRadio, |
| | | onSelectionCancel, |
| | | onbatchDel |
| | | onbatchDel, |
| | | nowRole |
| | | }; |
| | | } |