|
@@ -18,6 +18,22 @@
|
|
>
|
|
>
|
|
<template #menu="{ row, index, type }">
|
|
<template #menu="{ row, index, type }">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ @click="showTable(row)"
|
|
|
|
+ icon="el-icon-view"
|
|
|
|
+ text
|
|
|
|
+ type="primary"
|
|
|
|
+ >查看</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ text
|
|
|
|
+ @click="doEdit(row, index)"
|
|
|
|
+ type="primary"
|
|
|
|
+ v-if="row.state === 0"
|
|
|
|
+ :size="size"
|
|
|
|
+ >编辑</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
@click="operation(row)"
|
|
@click="operation(row)"
|
|
icon="el-icon-link"
|
|
icon="el-icon-link"
|
|
text
|
|
text
|
|
@@ -52,8 +68,13 @@
|
|
@close="closeOperation"
|
|
@close="closeOperation"
|
|
:destroy-on-close="true"
|
|
:destroy-on-close="true"
|
|
>
|
|
>
|
|
- <ReworkItem :recordId="record.id" :dialog="dialog" />
|
|
|
|
|
|
+ <ReworkItem
|
|
|
|
+ :recordId="record.id"
|
|
|
|
+ :dialog="dialog"
|
|
|
|
+ :status="record.state"
|
|
|
|
+ />
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <ReworkShow v-model="showState" :tableData="tableData" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
@@ -63,7 +84,8 @@ import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
import { useCommonStoreHook, useDictionaryStore } from "@/store";
|
|
import { useCommonStoreHook, useDictionaryStore } from "@/store";
|
|
import ReworkItem from "@/views/quality/rework/components/rework-detail.vue";
|
|
import ReworkItem from "@/views/quality/rework/components/rework-detail.vue";
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
-import { handleReworkRecord } from "@/api/fault/index";
|
|
|
|
|
|
+import { handleReworkRecord, getReworkItem } from "@/api/fault/index";
|
|
|
|
+import ReworkShow from "@/views/quality/rework/components/rework-show.vue";
|
|
|
|
|
|
// 数据字典相关
|
|
// 数据字典相关
|
|
const { dicts } = useDictionaryStore();
|
|
const { dicts } = useDictionaryStore();
|
|
@@ -77,12 +99,15 @@ const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
|
|
Methords; //增删改查
|
|
Methords; //增删改查
|
|
const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
-
|
|
|
|
|
|
+const tableData = ref({});
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
const dialog = ref({
|
|
const dialog = ref({
|
|
title: "关联工序",
|
|
title: "关联工序",
|
|
visible: false,
|
|
visible: false,
|
|
});
|
|
});
|
|
|
|
+const doEdit = (row, index) => {
|
|
|
|
+ crudRef.value && crudRef.value.rowEdit(row, index);
|
|
|
|
+};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
dataList();
|
|
dataList();
|
|
});
|
|
});
|
|
@@ -91,10 +116,27 @@ const operation = (row) => {
|
|
record.value = row;
|
|
record.value = row;
|
|
dialog.value.visible = true;
|
|
dialog.value.visible = true;
|
|
};
|
|
};
|
|
|
|
+const showState = ref(false);
|
|
|
|
+const showTable = (row) => {
|
|
|
|
+ reworkItem.value.recordId = row.id;
|
|
|
|
+ getReworkItem(reworkItem.value).then((data) => {
|
|
|
|
+ if (data.code === "200") {
|
|
|
|
+ tableData.value = row;
|
|
|
|
+ tableData.value.itemList = data.data;
|
|
|
|
+ showState.value = true;
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: data.msg,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+};
|
|
const closeOperation = () => {
|
|
const closeOperation = () => {
|
|
dialog.value.visible = false;
|
|
dialog.value.visible = false;
|
|
};
|
|
};
|
|
const handleData = ref({});
|
|
const handleData = ref({});
|
|
|
|
+const reworkItem = ref({});
|
|
const handle = (row, index, state) => {
|
|
const handle = (row, index, state) => {
|
|
handleData.value.id = row.id;
|
|
handleData.value.id = row.id;
|
|
handleData.value.state = state;
|
|
handleData.value.state = state;
|
|
@@ -120,11 +162,12 @@ option.value = Object.assign(option.value, {
|
|
addBtn: false,
|
|
addBtn: false,
|
|
delBtn: false,
|
|
delBtn: false,
|
|
editBtn: false,
|
|
editBtn: false,
|
|
- viewBtn: true,
|
|
|
|
|
|
+ viewBtn: false,
|
|
column: [
|
|
column: [
|
|
{
|
|
{
|
|
label: "生产批号",
|
|
label: "生产批号",
|
|
prop: "workOrderCode",
|
|
prop: "workOrderCode",
|
|
|
|
+ editDisabled: true,
|
|
width: 160,
|
|
width: 160,
|
|
overHidden: true,
|
|
overHidden: true,
|
|
search: true,
|
|
search: true,
|
|
@@ -132,20 +175,24 @@ option.value = Object.assign(option.value, {
|
|
{
|
|
{
|
|
label: "产品名称",
|
|
label: "产品名称",
|
|
prop: "materialName",
|
|
prop: "materialName",
|
|
|
|
+ editDisabled: true,
|
|
search: true,
|
|
search: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "数量",
|
|
label: "数量",
|
|
|
|
+ editDisabled: true,
|
|
prop: "num",
|
|
prop: "num",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "管号",
|
|
label: "管号",
|
|
prop: "seqNos",
|
|
prop: "seqNos",
|
|
|
|
+ editDisabled: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "管号",
|
|
label: "管号",
|
|
prop: "seqNo",
|
|
prop: "seqNo",
|
|
search: true,
|
|
search: true,
|
|
|
|
+ editDisabled: true,
|
|
hide: true,
|
|
hide: true,
|
|
display: false,
|
|
display: false,
|
|
},
|
|
},
|
|
@@ -186,6 +233,7 @@ option.value = Object.assign(option.value, {
|
|
{
|
|
{
|
|
label: "返工提出者",
|
|
label: "返工提出者",
|
|
prop: "creator",
|
|
prop: "creator",
|
|
|
|
+ editDisplay: false,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "日期",
|
|
label: "日期",
|
|
@@ -194,6 +242,7 @@ option.value = Object.assign(option.value, {
|
|
width: 160,
|
|
width: 160,
|
|
format: "YYYY-MM-DD",
|
|
format: "YYYY-MM-DD",
|
|
valueFormat: "YYYY-MM-DD",
|
|
valueFormat: "YYYY-MM-DD",
|
|
|
|
+ editDisplay: false,
|
|
overHidden: true,
|
|
overHidden: true,
|
|
},
|
|
},
|
|
{
|
|
{
|