|
@@ -1,7 +1,5 @@
|
|
|
<template>
|
|
|
<div class="mainContentBox">
|
|
|
-
|
|
|
-
|
|
|
<avue-crud
|
|
|
ref="crudRef"
|
|
|
v-model:search="search"
|
|
@@ -19,42 +17,52 @@
|
|
|
@selection-change="selectionChange"
|
|
|
>
|
|
|
<template #menu-left>
|
|
|
- <el-radio-group v-model="radio1" size="large" @change="searchChangeState">
|
|
|
+ <el-radio-group
|
|
|
+ v-model="radio1"
|
|
|
+ size="large"
|
|
|
+ @change="searchChangeState"
|
|
|
+ >
|
|
|
<el-radio-button label="未完成" value="1" />
|
|
|
<el-radio-button label="已完成" value="3" />
|
|
|
</el-radio-group>
|
|
|
- </template>
|
|
|
- <template #menu="{row,index,type}">
|
|
|
- <el-button @click="viewFault(row)"
|
|
|
- icon="el-icon-view"
|
|
|
- text
|
|
|
- type="primary"
|
|
|
- >查看</el-button>
|
|
|
- <el-button @click="faultEdit(row)"
|
|
|
- icon="el-icon-link"
|
|
|
- text
|
|
|
- type="primary"
|
|
|
- v-if="row.currentState==6"
|
|
|
- v-hasPerm="[ButtonPermKeys.FAULT.BTNS.faultHandle_handle]"
|
|
|
- >处理</el-button>
|
|
|
-
|
|
|
- <el-button @click="faultThaw(row)"
|
|
|
- icon="el-icon-open"
|
|
|
- text
|
|
|
- type="primary"
|
|
|
- v-hasPerm="[ButtonPermKeys.FAULT.BTNS.faultHandle_thaw]"
|
|
|
- v-if="row.currentState==4"
|
|
|
- >解冻</el-button>
|
|
|
- <el-button @click="faultExamine(row)"
|
|
|
- icon="el-icon-reading"
|
|
|
- text
|
|
|
- type="primary"
|
|
|
- v-hasPerm="[ButtonPermKeys.FAULT.BTNS.faultHandle_examine]"
|
|
|
- v-if="row.currentState==1"
|
|
|
- >审核</el-button>
|
|
|
</template>
|
|
|
+ <template #menu="{ row, index, type }">
|
|
|
+ <el-button
|
|
|
+ @click="viewFault(row)"
|
|
|
+ icon="el-icon-view"
|
|
|
+ text
|
|
|
+ type="primary"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="faultEdit(row)"
|
|
|
+ icon="el-icon-link"
|
|
|
+ text
|
|
|
+ type="primary"
|
|
|
+ v-if="row.currentState == 6"
|
|
|
+ v-hasPerm="[ButtonPermKeys.FAULT.BTNS.faultHandle_handle]"
|
|
|
+ >处理</el-button
|
|
|
+ >
|
|
|
|
|
|
-
|
|
|
+ <el-button
|
|
|
+ @click="faultThaw(row)"
|
|
|
+ icon="el-icon-open"
|
|
|
+ text
|
|
|
+ type="primary"
|
|
|
+ v-hasPerm="[ButtonPermKeys.FAULT.BTNS.faultHandle_thaw]"
|
|
|
+ v-if="row.currentState == 4"
|
|
|
+ >解冻</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ @click="faultExamine(row)"
|
|
|
+ icon="el-icon-reading"
|
|
|
+ text
|
|
|
+ type="primary"
|
|
|
+ v-hasPerm="[ButtonPermKeys.FAULT.BTNS.faultHandle_examine]"
|
|
|
+ v-if="row.currentState == 1"
|
|
|
+ >审核</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
|
|
|
<el-dialog
|
|
@@ -64,7 +72,7 @@
|
|
|
@close="dialog.visible = false"
|
|
|
:destroy-on-close="true"
|
|
|
>
|
|
|
- <fault-detail :escalationFaultId="fault.id" :dialog="dialog" />
|
|
|
+ <fault-detail :escalationFaultId="fault.id" :dialog="dialog" />
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog
|
|
@@ -74,7 +82,7 @@
|
|
|
@close="closeFaultDetail"
|
|
|
:destroy-on-close="true"
|
|
|
>
|
|
|
- <fault-handle :escalationId="faultInfo.id" :dia="dialog1" />
|
|
|
+ <fault-handle :escalationId="faultInfo.id" :dia="dialog1" />
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog
|
|
@@ -84,7 +92,11 @@
|
|
|
@close="closeFaultHandel"
|
|
|
:destroy-on-close="true"
|
|
|
>
|
|
|
- <fault-page :faultId="faultEs.id" :dial="dialog2" :workOrderCode="faultEs.workOrderCode"/>
|
|
|
+ <fault-page
|
|
|
+ :faultId="faultEs.id"
|
|
|
+ :dial="dialog2"
|
|
|
+ :workOrderCode="faultEs.workOrderCode"
|
|
|
+ />
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog
|
|
@@ -94,180 +106,187 @@
|
|
|
@close="closeFault"
|
|
|
:destroy-on-close="true"
|
|
|
>
|
|
|
- <FaultExamine :escFaultId="faultExa.id" :dialogPs="dialog3" />
|
|
|
+ <FaultExamine :escFaultId="faultExa.id" :dialogPs="dialog3" />
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
- import { ref, getCurrentInstance } from "vue";
|
|
|
- import { useCrud } from "@/hooks/userCrud";
|
|
|
- import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
- import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
- import { useCommonStoreHook, useDictionaryStore } from "@/store";
|
|
|
- import FaultExamine from "@/views/quality/faultHandle/components/fault-examine.vue"
|
|
|
- const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
- // 数据字典相关
|
|
|
- const { dicts } = useDictionaryStore();
|
|
|
-
|
|
|
- const test = () => {
|
|
|
- isShowTable.value = true;
|
|
|
- tableType.value = tableType.value == 1 ? 2 : 1;
|
|
|
- };
|
|
|
- const dialog = ref({
|
|
|
- title: "报故详情",
|
|
|
- visible: false,
|
|
|
- });
|
|
|
- const dialog1 = ref({
|
|
|
- title: "报故处理",
|
|
|
- visible: false,
|
|
|
- });
|
|
|
- const dialog2 = ref({
|
|
|
- title: "解冻",
|
|
|
- visible: false,
|
|
|
- });
|
|
|
- const dialog3 = ref({
|
|
|
- title: "审核",
|
|
|
- visible: false,
|
|
|
- });
|
|
|
-
|
|
|
- const closeFaultDetail=()=>{
|
|
|
- dialog1.visible = false;
|
|
|
- dataList();
|
|
|
- }
|
|
|
- const closeFaultHandel=()=>{
|
|
|
- dialog2.visible = false;
|
|
|
- dataList();
|
|
|
- }
|
|
|
- const fault=ref({});
|
|
|
- const faultInfo=ref({});
|
|
|
- const faultEs=ref({});
|
|
|
- const faultExa=ref({});
|
|
|
- const faultEdit=(row)=>{
|
|
|
-
|
|
|
- faultInfo.value.id=row.id;
|
|
|
-
|
|
|
- dialog1.value.visible=true;
|
|
|
- }
|
|
|
- const faultThaw=(row)=>{
|
|
|
- faultEs.value=row;
|
|
|
- dialog2.value.visible=true;
|
|
|
- }
|
|
|
-
|
|
|
- const faultExamine =(row)=>{
|
|
|
- faultExa.value.id=row.id;
|
|
|
- dialog3.value.visible=true;
|
|
|
- }
|
|
|
- const closeFault=()=>{
|
|
|
- dialog3.value.visible=false;
|
|
|
- dataList();
|
|
|
- }
|
|
|
- // 传入一个url,后面不带/
|
|
|
- const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
|
- useCrud({
|
|
|
- src: "/api/v1/process/escalationFault",
|
|
|
- });
|
|
|
- const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
|
|
|
- Methords; //增删改查
|
|
|
- const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
|
- const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
|
- // checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
|
|
|
- // const permission = reactive({
|
|
|
- // delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
|
|
|
- // addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
|
|
|
- // editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
|
|
|
- // menu: true,
|
|
|
- // });
|
|
|
+import { ref, getCurrentInstance } from "vue";
|
|
|
+import { useCrud } from "@/hooks/userCrud";
|
|
|
+import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
+import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
+import { useCommonStoreHook, useDictionaryStore } from "@/store";
|
|
|
+import FaultExamine from "@/views/quality/faultHandle/components/fault-examine.vue";
|
|
|
+const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
+// 数据字典相关
|
|
|
+const { dicts } = useDictionaryStore();
|
|
|
|
|
|
- const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
- const router = useRouter();
|
|
|
- const route = useRoute();
|
|
|
- const viewFault = (row) => {
|
|
|
+const test = () => {
|
|
|
+ isShowTable.value = true;
|
|
|
+ tableType.value = tableType.value == 1 ? 2 : 1;
|
|
|
+};
|
|
|
+const dialog = ref({
|
|
|
+ title: "报故详情",
|
|
|
+ visible: false,
|
|
|
+});
|
|
|
+const dialog1 = ref({
|
|
|
+ title: "报故处理",
|
|
|
+ visible: false,
|
|
|
+});
|
|
|
+const dialog2 = ref({
|
|
|
+ title: "解冻",
|
|
|
+ visible: false,
|
|
|
+});
|
|
|
+const dialog3 = ref({
|
|
|
+ title: "审核",
|
|
|
+ visible: false,
|
|
|
+});
|
|
|
|
|
|
- fault.value.id=row.id;
|
|
|
- console.info(fault)
|
|
|
- dialog.value.visible=true;
|
|
|
- };
|
|
|
- onMounted(() => {
|
|
|
- // console.log("crudRef", crudRef)
|
|
|
+const closeFaultDetail = () => {
|
|
|
+ dialog1.value.visible = false;
|
|
|
+ dataList();
|
|
|
+};
|
|
|
+const closeFaultHandel = () => {
|
|
|
+ dialog2.value.visible = false;
|
|
|
+ dataList();
|
|
|
+};
|
|
|
+const fault = ref({});
|
|
|
+const faultInfo = ref({});
|
|
|
+const faultEs = ref({});
|
|
|
+const faultExa = ref({});
|
|
|
+const faultEdit = (row) => {
|
|
|
+ faultInfo.value.id = row.id;
|
|
|
|
|
|
- search.value.id = route.query.id;
|
|
|
- search.value.state = radio1.value;
|
|
|
- dataList();
|
|
|
+ dialog1.value.visible = true;
|
|
|
+};
|
|
|
+const faultThaw = (row) => {
|
|
|
+ faultEs.value = row;
|
|
|
+ dialog2.value.visible = true;
|
|
|
+};
|
|
|
|
|
|
+const faultExamine = (row) => {
|
|
|
+ faultExa.value.id = row.id;
|
|
|
+ dialog3.value.visible = true;
|
|
|
+};
|
|
|
+const closeFault = () => {
|
|
|
+ dialog3.value.visible = false;
|
|
|
+ dataList();
|
|
|
+};
|
|
|
+// 传入一个url,后面不带/
|
|
|
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
|
+ useCrud({
|
|
|
+ src: "/api/v1/process/escalationFault",
|
|
|
});
|
|
|
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
|
|
|
+ Methords; //增删改查
|
|
|
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
|
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
|
+// checkBtnPerm(ButtonPermKeys.PLAN.BTNS.order_add) :permission="permission"
|
|
|
+// const permission = reactive({
|
|
|
+// delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
|
|
|
+// addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
|
|
|
+// editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
|
|
|
+// menu: true,
|
|
|
+// });
|
|
|
|
|
|
- const searchChangeState=()=>{
|
|
|
- search.value.state=radio1.value;
|
|
|
- dataList();
|
|
|
- }
|
|
|
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
+const router = useRouter();
|
|
|
+const route = useRoute();
|
|
|
+const viewFault = (row) => {
|
|
|
+ fault.value.id = row.id;
|
|
|
+ console.info(fault);
|
|
|
+ dialog.value.visible = true;
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ // console.log("crudRef", crudRef)
|
|
|
|
|
|
- const radio1 = ref('1')
|
|
|
+ search.value.id = route.query.id;
|
|
|
+ search.value.state = radio1.value;
|
|
|
+ dataList();
|
|
|
+});
|
|
|
|
|
|
- // 设置表格列或者其他自定义的option
|
|
|
- option.value = Object.assign(option.value, {
|
|
|
- addBtn: false,
|
|
|
- editBtn:false,
|
|
|
- delBtn:false,
|
|
|
- viewBtn:false,
|
|
|
- column: [
|
|
|
+const searchChangeState = () => {
|
|
|
+ search.value.state = radio1.value;
|
|
|
+ dataList();
|
|
|
+};
|
|
|
|
|
|
- {
|
|
|
- label: "审理单号",
|
|
|
- prop: "trackingNumber",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "工单号",
|
|
|
- prop: "workOrderCode",
|
|
|
- overHidden: true,
|
|
|
- search: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "订单号",
|
|
|
- prop: "orderCode",
|
|
|
- overHidden: true,
|
|
|
- width:120,
|
|
|
- search: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "不合格数量",
|
|
|
- overHidden: true,
|
|
|
- width:100,
|
|
|
- prop: "unqualifiedNum",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "产品编码", prop: "materialCode", overHidden: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- label: "产品名称", prop: "materialName", overHidden: true,
|
|
|
- width:100,
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- label: "流转卡号", prop: "seqNo", overHidden: true,search:true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "状态", prop: "state", overHidden: true,
|
|
|
- width:120,
|
|
|
- dicUrl:dictDataUtil.request_url + dictDataUtil.TYPE_CODE.escalation_fault_state,
|
|
|
- props: { label: "dictLabel", value: "dictValue" },
|
|
|
- },
|
|
|
- {
|
|
|
- label: "跟踪状态", prop: "currentState", overHidden: true,
|
|
|
- width:100,
|
|
|
- dicUrl:dictDataUtil.request_url + dictDataUtil.TYPE_CODE.fault_current_state,
|
|
|
- props: { label: "dictLabel", value: "dictValue" },
|
|
|
- },
|
|
|
- {
|
|
|
- label: "报故人", prop: "creator",
|
|
|
- overHidden: true,
|
|
|
- width:100,
|
|
|
- },
|
|
|
-
|
|
|
- ],
|
|
|
- });
|
|
|
+const radio1 = ref("1");
|
|
|
|
|
|
+// 设置表格列或者其他自定义的option
|
|
|
+option.value = Object.assign(option.value, {
|
|
|
+ addBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "审理单号",
|
|
|
+ prop: "trackingNumber",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工单号",
|
|
|
+ prop: "workOrderCode",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "订单号",
|
|
|
+ prop: "orderCode",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "不合格数量",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ prop: "unqualifiedNum",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "产品编码",
|
|
|
+ prop: "materialCode",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "产品名称",
|
|
|
+ prop: "materialName",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
|
|
|
+ {
|
|
|
+ label: "WIN码",
|
|
|
+ prop: "seqNo",
|
|
|
+ overHidden: true,
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "状态",
|
|
|
+ prop: "state",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ dicUrl:
|
|
|
+ dictDataUtil.request_url +
|
|
|
+ dictDataUtil.TYPE_CODE.escalation_fault_state,
|
|
|
+ props: { label: "dictLabel", value: "dictValue" },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "跟踪状态",
|
|
|
+ prop: "currentState",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ dicUrl:
|
|
|
+ dictDataUtil.request_url + dictDataUtil.TYPE_CODE.fault_current_state,
|
|
|
+ props: { label: "dictLabel", value: "dictValue" },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "报故人",
|
|
|
+ prop: "creator",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+});
|
|
|
</script>
|