forked from integrated_whb/integrated_whb_vue
init
parent
f8b71eccbf
commit
0bba51d4d9
|
@ -21,3 +21,9 @@ export const styleText =
|
|||
'<style type="text/css" media="print">\n' +
|
||||
" @page { size: landscape; }\n" +
|
||||
"</style>";
|
||||
|
||||
export const SPECIAL_ENTERPRISES = [
|
||||
"fe58b51278094635800b944e4ae3a871",
|
||||
"0fa689dd674546b69ebd77728ffd1caa",
|
||||
"13cf0f4ec77e4d98ae8cdd9c3386ae0c",
|
||||
];
|
||||
|
|
|
@ -125,6 +125,27 @@ export const layoutFnGetPersonnelType = async () => {
|
|||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 清单类型
|
||||
export const layoutFnGetInventoryType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "4a3d0d99b0ea4e268c11dd0b18866917",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 排查类型
|
||||
export const layoutFnGetTroubleshootingType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "dc92de8a375c4b638b1b9f8d374e6426",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 清单级别
|
||||
export const layoutFnGetInventoryLevel = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "4a661fa8aedc4d158c9cddaa9d2ec47e",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 职务
|
||||
export const layoutFnGetDuties = async () => {
|
||||
const resData = await getLevelsCorp({
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
import { post } from "@/request/axios.js";
|
||||
|
||||
export const getInventoryManagementList = (params) =>
|
||||
post("/listmanager/list", params); // 清单管理列表
|
||||
export const setInventoryManagementDisable = (params) =>
|
||||
post("/listmanager/delete", params); // 清单管理禁用
|
||||
export const setInventoryManagementEnable = (params) =>
|
||||
post("/listmanager/enable", params); // 清单管理启用
|
||||
export const setInventoryManagementBatchDeleteTemporary = (params) =>
|
||||
post("/listmanager/deleteAlltemp", params); // 清单管理批量删除临时清单
|
||||
export const setInventoryManagementBatchDelete = (params) =>
|
||||
post("/listmanager/deleteAll", params); // 清单管理批量删除
|
||||
export const getInventoryManagementRouteView = (params) =>
|
||||
post("/listmanager/getRoute", params); // 清单管理查看巡检路线
|
||||
export const setInventoryManagementRoute = (params) =>
|
||||
post("/listmanager/setRout", params); // 清单管理巡检路线提交
|
|
@ -4,6 +4,7 @@
|
|||
<div class="tc mt-20">
|
||||
<h1>{{ info.CORP_NAME }}</h1>
|
||||
</div>
|
||||
<!-- TODO-->
|
||||
<layout-qr-code :src="info.CORPINFO_ID" />
|
||||
</div>
|
||||
<template #footer>
|
|
@ -193,7 +193,7 @@
|
|||
</el-button>
|
||||
<el-button @click="data.qrCodeDialogVisible = true">二维码</el-button>
|
||||
</div>
|
||||
<print :info="data.info" v-model:visible="data.qrCodeDialogVisible" />
|
||||
<qr-code :info="data.info" v-model:visible="data.qrCodeDialogVisible" />
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
|
@ -202,7 +202,7 @@ import { getEnterpriseInfo } from "@/request/enterprise_management.js";
|
|||
import { addingPrefixToFile } from "@/assets/js/utils.js";
|
||||
import { reactive } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import Print from "./components/print.vue";
|
||||
import QrCode from "./components/qr_code.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const data = reactive({
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="设置巡检路线">
|
||||
<div id="printContent">
|
||||
<el-divider content-position="left"> {{ info.NAME }}巡检路线 </el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="清单名称" :span="2">
|
||||
{{ info.NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="部门">
|
||||
{{ info.DEPARTMENT_NAME_ALL }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="岗位">
|
||||
{{ info.POST_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责人">
|
||||
{{ info.USER_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="排查类型">
|
||||
{{ info.SCREENTYPENAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="排查周期">
|
||||
{{ info.PERIODNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="清单类型">
|
||||
{{ info.TYPENAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设置巡检路线" :span="2">
|
||||
<div style="display: flex; flex-wrap: wrap">
|
||||
<div
|
||||
style="display: flex; align-items: center"
|
||||
v-for="(item, index) in list"
|
||||
:key="item.IDENTIFICATIONPARTS_ID"
|
||||
:draggable="true"
|
||||
@dragenter="fnDragEnter(item.IDENTIFICATIONPARTS_ID)"
|
||||
@dragstart="fnDragStart(item.IDENTIFICATIONPARTS_ID)"
|
||||
>
|
||||
<el-tag>{{ index + 1 }}.{{ item.PARTSNAME }}</el-tag>
|
||||
<el-icon v-if="index < list.length - 1">
|
||||
<Right />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button type="primary" v-print="'#printContent'">打印</el-button>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Right } from "@element-plus/icons-vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { setInventoryManagementRoute } from "@/request/hazard_investigation.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:list"]);
|
||||
const { visible, list } = useVModels(props, emits);
|
||||
const currentStart = ref("");
|
||||
const currentEnd = ref("");
|
||||
const fnDragStart = (id) => {
|
||||
currentStart.value = id;
|
||||
};
|
||||
const fnDragEnter = (id) => {
|
||||
currentEnd.value = id;
|
||||
const startIndex = list.value.findIndex((item) => {
|
||||
return item.IDENTIFICATIONPARTS_ID === currentStart.value;
|
||||
});
|
||||
const endIndex = list.value.findIndex((item) => {
|
||||
return item.IDENTIFICATIONPARTS_ID === currentEnd.value;
|
||||
});
|
||||
list.value = fnMoveList(list.value, startIndex, "swap", endIndex);
|
||||
};
|
||||
const fnMoveList = (enteArr, index, upDown, swapIndex = index + 1) => {
|
||||
const arr = JSON.parse(JSON.stringify(enteArr));
|
||||
if (upDown === "up") {
|
||||
arr.splice(index - 1, 0, arr[index]);
|
||||
arr.splice(index + 1, 1);
|
||||
} else if (upDown === "down") {
|
||||
arr.splice(index + 2, 0, arr[index]);
|
||||
arr.splice(index, 1);
|
||||
} else if (upDown === "start") {
|
||||
arr.splice(0, 0, arr[index]);
|
||||
arr.splice(index + 1, 1);
|
||||
} else if (upDown === "end") {
|
||||
arr.splice(arr.length, 0, arr[index]);
|
||||
arr.splice(index, 1);
|
||||
} else if (upDown === "swap") {
|
||||
arr[swapIndex] = arr.splice(index, 1, arr[swapIndex])[0];
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await setInventoryManagementRoute({
|
||||
LISTMANAGER_ID: props.info.LISTMANAGER_ID,
|
||||
ROUTE: JSON.stringify(list.value),
|
||||
});
|
||||
ElMessage.success("设置成功");
|
||||
fnClose();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,55 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="清单二维码">
|
||||
<div id="printContainer">
|
||||
<el-divider content-position="left"> 清单信息 </el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="清单名称">
|
||||
{{ info.NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="排查清单类型">
|
||||
{{ info.SCREENTYPENAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属部门">
|
||||
{{ info.DEPARTMENT_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属岗位">
|
||||
{{ info.POST_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="排查周期">
|
||||
{{ info.PERIODNAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="清单类型">
|
||||
{{ info.TYPENAME }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<layout-qr-code :src="info.LISTMANAGER_ID" />
|
||||
<el-divider content-position="left">APP-待排查-清单扫描</el-divider>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
<el-button v-print="'#printContainer'" type="primary">打 印</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModel } from "@vueuse/core";
|
||||
import LayoutQrCode from "@/components/qr_code/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
info: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const visible = useVModel(props, "visible", emits);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
|
@ -0,0 +1,360 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="90px"
|
||||
@submit.prevent="fnResetPaginationTransfer"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单名称" prop="KEYWORDS">
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="人员" prop="USERNAME">
|
||||
<el-input
|
||||
v-model="searchForm.USERNAME"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门" prop="DEPTIDS">
|
||||
<layout-department
|
||||
v-model="searchForm.DEPTIDS"
|
||||
multiple
|
||||
show-checkbox
|
||||
collapse-tags
|
||||
root-disabled="N"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单类型" prop="TYPE">
|
||||
<el-select v-model="searchForm.TYPE">
|
||||
<el-option
|
||||
v-for="item in inventoryTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="排查类型" prop="RISKCHECKLISTTYPE">
|
||||
<el-select v-model="searchForm.RISKCHECKLISTTYPE">
|
||||
<el-option
|
||||
v-for="item in troubleshootingTypeList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="清单级别" prop="LISTINGLEVEL">
|
||||
<el-select v-model="searchForm.LISTINGLEVEL">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ BIANMA: '1', NAME: '公司' },
|
||||
...inventoryLevelList,
|
||||
]"
|
||||
:key="item.BIANMA"
|
||||
:label="item.NAME"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
:data="list"
|
||||
v-model:pagination="pagination"
|
||||
@get-data="fnGetDataTransfer"
|
||||
row-key="LISTMANAGER_ID"
|
||||
>
|
||||
<el-table-column reserve-selection type="selection" width="55" />
|
||||
<el-table-column label="序号" width="70">
|
||||
<template v-slot="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="清单名称" />
|
||||
<el-table-column prop="DEPARTMENT_NAME_ALL" label="部门" />
|
||||
<el-table-column prop="POST_NAME" label="岗位" />
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="人员"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="PERIODNAME"
|
||||
label="排查周期"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="SCREENTYPENAME"
|
||||
label="排查类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TYPENAME"
|
||||
label="清单类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="SPECIAL_ENTERPRISES.includes(CORPINFO_ID)"
|
||||
prop="TASK_TYPE_NAME"
|
||||
label="任务类型"
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.ISDELETE === '0'">启用</span>
|
||||
<span v-else-if="row.ISDELETE === '1'">禁用</span>
|
||||
<span v-else-if="row.ISDELETE === '-99'">未开始</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="470">
|
||||
<template v-slot="{ row }">
|
||||
<el-button v-if="buttonJurisdiction.edit" type="primary" text link>
|
||||
打印
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.edit"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnListQRCode(row)"
|
||||
>
|
||||
清单二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
(row.cdcount === 0 &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit) &&
|
||||
row.TYPE !== 'listType0006') ||
|
||||
row.ISDELETE === '-99'
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '0' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnDisable(row.LISTMANAGER_ID)"
|
||||
>
|
||||
禁用
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
row.ISDELETE === '1' &&
|
||||
(row.USER_ID === USER_ID || buttonJurisdiction.edit)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="fnEnable(row.LISTMANAGER_ID)"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button type="primary" text link> 部位二维码 </el-button>
|
||||
<el-button type="primary" text link @click="fnInspectionRoute(row)">
|
||||
巡检路线
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.TASK_TYPE && row.TASK_TYPE !== ''"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
>
|
||||
设置包保责任类型
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #button>
|
||||
<el-button v-if="buttonJurisdiction.add" type="primary">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
<el-button type="primary"> 继承清单 </el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<qr-code
|
||||
:info="data.qrCodeDialog.info"
|
||||
v-model:visible="data.qrCodeDialog.visible"
|
||||
/>
|
||||
<inspection-route
|
||||
v-model:visible="data.inspectionRouteDialog.visible"
|
||||
v-model:list="data.inspectionRouteDialog.list"
|
||||
:info="data.inspectionRouteDialog.info"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import { reactive } from "vue";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import {
|
||||
layoutFnGetInventoryLevel,
|
||||
layoutFnGetInventoryType,
|
||||
layoutFnGetTroubleshootingType,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { SPECIAL_ENTERPRISES } from "@/assets/js/constant.js";
|
||||
import { useUserStore } from "@/pinia/user.js";
|
||||
import {
|
||||
getInventoryManagementList,
|
||||
getInventoryManagementRouteView,
|
||||
setInventoryManagementBatchDelete,
|
||||
setInventoryManagementBatchDeleteTemporary,
|
||||
setInventoryManagementDisable,
|
||||
setInventoryManagementEnable,
|
||||
} from "@/request/hazard_investigation.js";
|
||||
import QrCode from "./components/qr_code.vue";
|
||||
import InspectionRoute from "./components/inspection_route.vue";
|
||||
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||
useListData(getInventoryManagementList);
|
||||
const userStore = useUserStore();
|
||||
const USER_ID = userStore.getUserInfo.USER_ID;
|
||||
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
|
||||
const buttonJurisdiction = await useButtonJurisdiction("listmanager");
|
||||
const inventoryTypeList = await layoutFnGetInventoryType();
|
||||
const troubleshootingTypeList = await layoutFnGetTroubleshootingType();
|
||||
const inventoryLevelList = await layoutFnGetInventoryLevel();
|
||||
const data = reactive({
|
||||
qrCodeDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
inspectionRouteDialog: {
|
||||
visible: false,
|
||||
list: [],
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnListQRCode = (row) => {
|
||||
data.qrCodeDialog.visible = true;
|
||||
data.qrCodeDialog.info = row;
|
||||
};
|
||||
const fnInspectionRoute = async (row) => {
|
||||
const resData = await getInventoryManagementRouteView({
|
||||
LISTMANAGER_ID: row.LISTMANAGER_ID,
|
||||
});
|
||||
data.inspectionRouteDialog.list = resData.varList;
|
||||
data.inspectionRouteDialog.info = row;
|
||||
data.inspectionRouteDialog.visible = true;
|
||||
};
|
||||
const fnDisable = debounce(
|
||||
1000,
|
||||
async (LISTMANAGER_ID) => {
|
||||
await ElMessageBox.confirm("确定要禁用吗?", { type: "warning" });
|
||||
await setInventoryManagementDisable({ LISTMANAGER_ID });
|
||||
ElMessage.success("禁用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnEnable = debounce(
|
||||
1000,
|
||||
async (LISTMANAGER_ID) => {
|
||||
await ElMessageBox.confirm("确定要启用吗?", { type: "warning" });
|
||||
await setInventoryManagementEnable({ LISTMANAGER_ID });
|
||||
ElMessage.success("启用成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
const DATA_IDS1 = [];
|
||||
const DATA_IDS2 = [];
|
||||
selectionData.forEach((item) => {
|
||||
if (item.TYPE === "listType0006") {
|
||||
DATA_IDS1.push(item.LISTMANAGER_ID);
|
||||
} else {
|
||||
DATA_IDS2.push(item.LISTMANAGER_ID);
|
||||
}
|
||||
});
|
||||
if (DATA_IDS1.length > 0) {
|
||||
await ElMessageBox.confirm(
|
||||
"临时清单会彻底被删除不可恢复,确定要删除吗?",
|
||||
{ type: "warning" }
|
||||
);
|
||||
await setInventoryManagementBatchDeleteTemporary({
|
||||
DATA_IDS: DATA_IDS1.join(","),
|
||||
});
|
||||
} else {
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", {
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
await setInventoryManagementBatchDelete({ DATA_IDS: DATA_IDS2.join(",") });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="打印">
|
||||
<el-dialog v-model="visible" title="二维码">
|
||||
<div id="printContent">
|
||||
<div
|
||||
v-for="item in list"
|
||||
|
@ -18,6 +18,7 @@
|
|||
{{ item.DEPT_NAME }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<!-- TODO-->
|
||||
<layout-qr-code :src="item.IDENTIFICATIONPARTS_ID + item.LEVELID" />
|
||||
</div>
|
||||
</div>
|
|
@ -56,7 +56,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" width="280">
|
||||
<template v-slot="{ row }">
|
||||
<el-button type="primary" text link @click="fnPrint(row)">
|
||||
<el-button type="primary" text link @click="fnQrCode(row)">
|
||||
二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
|
@ -126,9 +126,9 @@
|
|||
:type="data.addOrEditDialog.type"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
<print
|
||||
v-model:visible="data.printDialog.visible"
|
||||
:list="data.printDialog.list"
|
||||
<qr-code
|
||||
v-model:visible="data.qrCodeDialog.visible"
|
||||
:list="data.qrCodeDialog.list"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -149,7 +149,7 @@ import { nextTick, reactive } from "vue";
|
|||
import LayoutImportFile from "@/components/import_file/index.vue";
|
||||
import Add from "./components/add.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import Print from "./components/print.vue";
|
||||
import QrCode from "./components/qr_code.vue";
|
||||
import LayoutTooltipImg from "@/components/tooltip_img/index.vue";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
|
||||
|
@ -167,7 +167,7 @@ const data = reactive({
|
|||
file: [],
|
||||
},
|
||||
},
|
||||
printDialog: {
|
||||
qrCodeDialog: {
|
||||
visible: false,
|
||||
list: [],
|
||||
},
|
||||
|
@ -216,20 +216,24 @@ const fnExport = async () => {
|
|||
"&DATA_IDS=" +
|
||||
DATA_IDS;
|
||||
};
|
||||
const fnBatchDelete = async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData
|
||||
.map((item) => item.IDENTIFICATIONPARTS_ID)
|
||||
.join(",");
|
||||
await setIdentifyingPartsBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
};
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData
|
||||
.map((item) => item.IDENTIFICATIONPARTS_ID)
|
||||
.join(",");
|
||||
await setIdentifyingPartsBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPagination();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnAddOrEdit = async (IDENTIFICATIONPARTS_ID, type) => {
|
||||
data.addOrEditDialog.visible = true;
|
||||
await nextTick();
|
||||
|
@ -240,17 +244,18 @@ const fnAddOrEdit = async (IDENTIFICATIONPARTS_ID, type) => {
|
|||
data.addOrEditDialog.form.file = addingPrefixToFile(resData.imgs);
|
||||
}
|
||||
};
|
||||
const fnPrint = (row) => {
|
||||
data.printDialog.visible = true;
|
||||
data.printDialog.list = [row];
|
||||
const fnQrCode = (row) => {
|
||||
data.qrCodeDialog.visible = true;
|
||||
data.qrCodeDialog.list = [row];
|
||||
};
|
||||
const fnBatchPrint = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选择需要打印的数据");
|
||||
return;
|
||||
}
|
||||
data.printDialog.list = selectionData;
|
||||
data.printDialog.visible = true;
|
||||
data.qrCodeDialog.list = selectionData;
|
||||
data.qrCodeDialog.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -284,18 +284,22 @@ const fnExport = async () => {
|
|||
"&DATA_IDS=" +
|
||||
DATA_IDS;
|
||||
};
|
||||
const fnBatchDelete = async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData.map((item) => item.RISKPOINT_ID).join(",");
|
||||
await setRiskControlLedgerBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
};
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData.map((item) => item.RISKPOINT_ID).join(",");
|
||||
await setRiskControlLedgerBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnAddOrEdit = async (RISKPOINT_ID, type) => {
|
||||
data.addOrEditDialog.visible = true;
|
||||
await nextTick();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="打印">
|
||||
<el-dialog v-model="visible" title="二维码">
|
||||
<div id="printContent">
|
||||
<div v-for="item in list" :key="item.RISKUNIT_ID" class="page_break">
|
||||
<el-divider content-position="left">风险点(单元)信息</el-divider>
|
||||
|
@ -17,6 +17,7 @@
|
|||
{{ item.HEADMAN }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<!-- TODO-->
|
||||
<layout-qr-code :src="item.RISKUNIT_ID" />
|
||||
</div>
|
||||
</div>
|
|
@ -66,7 +66,7 @@
|
|||
<el-table-column prop="RISKUNITNAME" label="风险点(单元)" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="{ row }">
|
||||
<el-button type="primary" text link @click="fnPrint(row)">
|
||||
<el-button type="primary" text link @click="fnQrCode(row)">
|
||||
二维码
|
||||
</el-button>
|
||||
<el-button
|
||||
|
@ -135,9 +135,9 @@
|
|||
:type="data.addOrEditDialog.type"
|
||||
@get-data="fnResetPaginationTransfer"
|
||||
/>
|
||||
<print
|
||||
v-model:visible="data.printDialog.visible"
|
||||
:list="data.printDialog.list"
|
||||
<qr-code
|
||||
v-model:visible="data.qrCodeDialog.visible"
|
||||
:list="data.qrCodeDialog.list"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -159,7 +159,7 @@ import { nextTick, reactive } from "vue";
|
|||
import LayoutImportFile from "@/components/import_file/index.vue";
|
||||
import Add from "./components/add.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import Print from "./components/print.vue";
|
||||
import QrCode from "./components/qr_code.vue";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
|
||||
const router = useRouter();
|
||||
|
@ -175,7 +175,7 @@ const data = reactive({
|
|||
RISKUNITNAME: "",
|
||||
},
|
||||
},
|
||||
printDialog: {
|
||||
qrCodeDialog: {
|
||||
visible: false,
|
||||
list: [],
|
||||
},
|
||||
|
@ -232,18 +232,22 @@ const fnExport = async () => {
|
|||
"&DATA_IDS=" +
|
||||
DATA_IDS;
|
||||
};
|
||||
const fnBatchDelete = async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData.map((item) => item.RISKUNIT_ID).join(",");
|
||||
await setRiskPointBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
};
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData.map((item) => item.RISKUNIT_ID).join(",");
|
||||
await setRiskPointBatchDelete({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const fnAddOrEdit = async (RISKUNIT_ID, type) => {
|
||||
data.addOrEditDialog.visible = true;
|
||||
await nextTick();
|
||||
|
@ -253,17 +257,18 @@ const fnAddOrEdit = async (RISKUNIT_ID, type) => {
|
|||
data.addOrEditDialog.form = resData.pd;
|
||||
}
|
||||
};
|
||||
const fnPrint = (row) => {
|
||||
data.printDialog.visible = true;
|
||||
data.printDialog.list = [row];
|
||||
const fnQrCode = (row) => {
|
||||
data.qrCodeDialog.visible = true;
|
||||
data.qrCodeDialog.list = [row];
|
||||
};
|
||||
const fnBatchPrint = () => {
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选择需要打印的数据");
|
||||
return;
|
||||
}
|
||||
data.printDialog.list = selectionData;
|
||||
data.printDialog.visible = true;
|
||||
data.qrCodeDialog.list = selectionData;
|
||||
data.qrCodeDialog.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue