| | |
| | | import EditPen from "~icons/ep/edit-pen"; |
| | | import Refresh from "~icons/ep/refresh"; |
| | | import AddFill from "~icons/ri/add-circle-line"; |
| | | import IconamoonEnterDuotone from "~icons/iconamoon/enter-duotone"; |
| | | 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({ |
| | | id: "" |
| | | }); |
| | | const { |
| | | form, |
| | | state, |
| | |
| | | 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="代理机构:"> |
| | | <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-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="代理机构:"> |
| | | <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"> |
| | | 重置 |
| | | </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" |
| | | :icon="useRenderIcon(AddFill)" |
| | |
| | | 新增项目 |
| | | </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(IconamoonEnterDuotone)" |
| | | @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 :nowID="nowItem?.id" @backListPage="backListPage" /> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |