|
@@ -1,7 +1,10 @@
|
|
|
<template>
|
|
|
<div class="mainContentBox common-layout">
|
|
|
<el-container>
|
|
|
- <el-aside width="600px" style="height: 800px">
|
|
|
+ <el-aside
|
|
|
+ width="600px"
|
|
|
+ style="min-height: 800px; max-height: calc(100vh - 200px)"
|
|
|
+ >
|
|
|
<avue-crud
|
|
|
ref="crudRef"
|
|
|
v-model:search="search"
|
|
@@ -12,8 +15,9 @@
|
|
|
@cell-click="handleCellClick"
|
|
|
@search-change="searchChange"
|
|
|
@size-change="dataList"
|
|
|
+ @search-reset="resetChange"
|
|
|
@current-change="dataList"
|
|
|
-
|
|
|
+ @selection-change="selectionChange"
|
|
|
>
|
|
|
<template #seqNo="{ row }">
|
|
|
<el-tag :type="chooseTagType(row.level, 'css')">{{
|
|
@@ -38,9 +42,9 @@
|
|
|
<el-descriptions-item label="产品规格">{{
|
|
|
productReviewInfo.materialModel
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="计划编号">{{productReviewInfo.orderCode}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="铭牌号">-</el-descriptions-item>
|
|
|
<el-descriptions-item label="是否返工">
|
|
|
- <el-tag size="small">{{productReviewInfo.rework}}</el-tag>
|
|
|
+ <el-tag size="small">{{ productReviewInfo.rework }}</el-tag>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="工单出站">{{
|
|
|
productReviewInfo.outNum
|
|
@@ -48,9 +52,11 @@
|
|
|
<el-descriptions-item label="交付日期">{{
|
|
|
productReviewInfo.planStartEnd
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="工单报故">
|
|
|
- <el-tag size="small">{{productReviewInfo.bug}}</el-tag>
|
|
|
- </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="工单报故"
|
|
|
+ ><el-tag size="small">{{
|
|
|
+ productReviewInfo.bug
|
|
|
+ }}</el-tag></el-descriptions-item
|
|
|
+ >
|
|
|
</el-descriptions>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
@@ -151,6 +157,19 @@
|
|
|
</template>
|
|
|
<media-com ref="mediaComRef"
|
|
|
/></el-tab-pane>
|
|
|
+ <el-tab-pane name="excelComRef" label="表格数据"
|
|
|
+ ><template #label>
|
|
|
+ <span
|
|
|
+ >表格数据
|
|
|
+ <el-badge
|
|
|
+ :value="tabCount.excel"
|
|
|
+ class="item"
|
|
|
+ type="primary"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <ExcelCom ref="excelComRef"
|
|
|
+ /></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
@@ -169,6 +188,7 @@ import CheckCom from "@/views/pro/traceability/components/checkCom.vue";
|
|
|
import EquitCom from "@/views/pro/traceability/components/equitCom.vue";
|
|
|
import FaultCom from "@/views/pro/traceability/components/faultCom.vue";
|
|
|
import MediaCom from "./components/mediaCom.vue";
|
|
|
+import ExcelCom from "./components/excelCom.vue";
|
|
|
|
|
|
// 传入一个url,后面不带/
|
|
|
const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
@@ -176,7 +196,8 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
|
src: "/api/v1/process/web/traceability",
|
|
|
});
|
|
|
|
|
|
-const { dataList, createRow, updateRow, deleteRow, searchChange } = Methords; //增删改查
|
|
|
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
|
|
|
+ Methords; //增删改查
|
|
|
const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
|
const { checkBtnPerm } = Utils; //按钮权限等工具
|
|
|
|
|
@@ -189,6 +210,7 @@ const checkComRef = ref(null);
|
|
|
const equitComRef = ref(null);
|
|
|
const faultComRef = ref(null);
|
|
|
const mediaComRef = ref(null);
|
|
|
+const excelComRef = ref(null);
|
|
|
let defaultTabName = ref("traceabilityComRef");
|
|
|
//tab页组件
|
|
|
const tabNameComRef = new Map([
|
|
@@ -199,10 +221,12 @@ const tabNameComRef = new Map([
|
|
|
["equitComRef", equitComRef],
|
|
|
["faultComRef", faultComRef],
|
|
|
["mediaComRef", mediaComRef],
|
|
|
+ ["excelComRef", excelComRef],
|
|
|
]);
|
|
|
let temRow = ref({});
|
|
|
const tabsEvent = (pane, ev) => {
|
|
|
defaultTabName.value = pane.props.name;
|
|
|
+ //console.log(pane.props.name, temRow.value.seqNo);
|
|
|
if (temRow.value.seqNo) {
|
|
|
tabNameComRef.get(pane.props.name)?.value.refreshTra(temRow.value);
|
|
|
}
|
|
@@ -211,17 +235,11 @@ const tabsEvent = (pane, ev) => {
|
|
|
const chooseTagType = (row, type) => {
|
|
|
let daynamicType = "";
|
|
|
if (type == "text") {
|
|
|
- daynamicType = row === 'order'
|
|
|
- ? "订单"
|
|
|
- : row === 'workOrder'
|
|
|
- ? "工单"
|
|
|
- : "流转卡号";
|
|
|
+ daynamicType =
|
|
|
+ row === "order" ? "订单" : row === "workOrder" ? "工单" : "流转卡号";
|
|
|
} else {
|
|
|
- daynamicType = row === 'order'
|
|
|
- ? "success"
|
|
|
- : row === 'workOrder'
|
|
|
- ? "warning"
|
|
|
- : "primary";
|
|
|
+ daynamicType =
|
|
|
+ row === "order" ? "success" : row === "workOrder" ? "warning" : "primary";
|
|
|
}
|
|
|
return daynamicType;
|
|
|
};
|
|
@@ -235,7 +253,7 @@ let productReviewInfo = reactive({
|
|
|
workOrderCode: "",
|
|
|
outNum: "",
|
|
|
rework: "-",
|
|
|
- bug: "-"
|
|
|
+ bug: "-",
|
|
|
});
|
|
|
|
|
|
let tabCount = reactive({
|
|
@@ -246,15 +264,15 @@ let tabCount = reactive({
|
|
|
equit: "",
|
|
|
fault: "",
|
|
|
medias: "",
|
|
|
+ excel: "",
|
|
|
});
|
|
|
|
|
|
const handleCellClick = (row, column, event) => {
|
|
|
- productReviewInfo.orderCode = row.orderCode
|
|
|
- if(row.level === 'order'){
|
|
|
- productReviewInfo.bug = '-'
|
|
|
+ if (row.level === "order") {
|
|
|
+ productReviewInfo.bug = "-";
|
|
|
}
|
|
|
- if(row.orderType){
|
|
|
- productReviewInfo.rework = row.orderType === '2' ? '是' : '否'
|
|
|
+ if (row.orderType) {
|
|
|
+ productReviewInfo.rework = row.orderType === "2" ? "是" : "否";
|
|
|
}
|
|
|
//获取出单的数量
|
|
|
if (data.value) {
|
|
@@ -262,9 +280,9 @@ const handleCellClick = (row, column, event) => {
|
|
|
if (topTree) {
|
|
|
for (let secondTree of topTree.children) {
|
|
|
if (row.workOrderCode == secondTree.workOrderCode) {
|
|
|
- productReviewInfo.rework = topTree.orderType === '2' ? '是' : '否'
|
|
|
+ productReviewInfo.rework = topTree.orderType === "2" ? "是" : "否";
|
|
|
+ productReviewInfo.bug = secondTree.bugNum === 0 ? "否" : "是";
|
|
|
productReviewInfo.outNum = secondTree.children.length;
|
|
|
- productReviewInfo.bug = secondTree.bugNum === 0 ? '否' : '是'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -279,7 +297,10 @@ const handleCellClick = (row, column, event) => {
|
|
|
tabNameComRef.get(defaultTabName.value)?.value.refreshTra(temRow.value);
|
|
|
}
|
|
|
//每次点击都要获取tab页面的数量
|
|
|
- traceabilityTabCount({workOrderCode: row.workOrderCode, seqNo: row.seqNo }).then(({ data }) => {
|
|
|
+ traceabilityTabCount({
|
|
|
+ seqNo: row.seqNo,
|
|
|
+ workOrderCode: row.workOrderCode,
|
|
|
+ }).then(({ data }) => {
|
|
|
tabCount = Object.assign(tabCount, data);
|
|
|
});
|
|
|
if (row.workOrderCode == productReviewInfo.workOrderCode) {
|
|
@@ -287,7 +308,7 @@ const handleCellClick = (row, column, event) => {
|
|
|
return;
|
|
|
}
|
|
|
//产品信息
|
|
|
- getMaterialDetailsByseqNo(row.workOrderCode,row.seqNo).then(({ data }) => {
|
|
|
+ getMaterialDetailsByseqNo(row.workOrderCode, row.seqNo).then(({ data }) => {
|
|
|
productReviewInfo = Object.assign(productReviewInfo, data);
|
|
|
productReviewInfo.workOrderCode = row.workOrderCode;
|
|
|
// productReviewInfo.outNum =
|