|
@@ -25,7 +25,7 @@
|
|
|
<el-descriptions-item label="产品名称">{{
|
|
|
productReviewInfo.materialName
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="序列号">{{
|
|
|
+ <el-descriptions-item label="流转卡号">{{
|
|
|
productReviewInfo.seqNo
|
|
|
}}</el-descriptions-item>
|
|
|
<el-descriptions-item label="物料编号">{{
|
|
@@ -38,28 +38,42 @@
|
|
|
<el-descriptions-item label="Remarks">
|
|
|
<el-tag size="small">否</el-tag>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="工单出站">5</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="工单出站">{{
|
|
|
+ productReviewInfo.outNum
|
|
|
+ }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="交付日期">{{
|
|
|
productReviewInfo.planStartEnd
|
|
|
}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
|
- <el-tabs type="border-card">
|
|
|
- <el-tab-pane label="生产履历">
|
|
|
+ <el-tabs
|
|
|
+ type="border-card"
|
|
|
+ @tab-click="tabsEvent"
|
|
|
+ v-model="defaultTabName"
|
|
|
+ >
|
|
|
+ <el-tab-pane name="traceabilityComRef" label="生产履历">
|
|
|
<TraceabilityCom ref="traceabilityComRef" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="已采物料">
|
|
|
- <template #label>
|
|
|
- <span
|
|
|
- >已采物料
|
|
|
- <el-badge value="8" class="item" type="primary" />
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- 已采物料
|
|
|
+ <el-tab-pane name="materialsComRef" label="已采物料">
|
|
|
+ <MaterialsCom ref="materialsComRef" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="recordComRef" label="记录项">
|
|
|
+ <RecordCom ref="recordComRef"
|
|
|
+ /></el-tab-pane>
|
|
|
+ <el-tab-pane name="checkComRef" label="点检判定">
|
|
|
+ <CheckCom ref="checkComRef" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="图片采集">图片采集</el-tab-pane>
|
|
|
- <el-tab-pane label="缺陷项">缺陷项</el-tab-pane>
|
|
|
+ <el-tab-pane name="equitComRef" label="设备使用"
|
|
|
+ ><EquitCom ref="equitComRef"
|
|
|
+ /></el-tab-pane>
|
|
|
+ <el-tab-pane name="faultComRef" label="报故记录">
|
|
|
+ <FaultCom ref="faultComRef" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="bugComRef" label="缺陷项">缺陷项</el-tab-pane>
|
|
|
+ <el-tab-pane name="imgComRef" label="图片采集"
|
|
|
+ >图片采集</el-tab-pane
|
|
|
+ >
|
|
|
</el-tabs>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
@@ -74,6 +88,11 @@ import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
import { getMaterialDetailsByseqNo, getOperationCompent } from "@/api/material";
|
|
|
import TraceabilityCom from "@/views/pro/traceability/components/traceabilityCom.vue";
|
|
|
+import MaterialsCom from "@/views/pro/traceability/components/materialsCom.vue";
|
|
|
+import RecordCom from "@/views/pro/traceability/components/recordCom.vue";
|
|
|
+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";
|
|
|
|
|
|
// 传入一个url,后面不带/
|
|
|
const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
@@ -88,6 +107,26 @@ const { checkBtnPerm } = Utils; //按钮权限等工具
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
|
|
|
const traceabilityComRef = ref(null);
|
|
|
+const materialsComRef = ref(null);
|
|
|
+const recordComRef = ref(null);
|
|
|
+const checkComRef = ref(null);
|
|
|
+const equitComRef = ref(null);
|
|
|
+const faultComRef = ref(null);
|
|
|
+let defaultTabName = ref("traceabilityComRef");
|
|
|
+//tab页组件
|
|
|
+const tabNameComRef = new Map([
|
|
|
+ ["traceabilityComRef", traceabilityComRef],
|
|
|
+ ["materialsComRef", materialsComRef],
|
|
|
+ ["recordComRef", recordComRef],
|
|
|
+ ["checkComRef", checkComRef],
|
|
|
+ ["equitComRef", equitComRef],
|
|
|
+ ["faultComRef", faultComRef],
|
|
|
+]);
|
|
|
+let temRow = ref({});
|
|
|
+const tabsEvent = (pane, ev) => {
|
|
|
+ defaultTabName.value = pane.props.name;
|
|
|
+ tabNameComRef.get(pane.props.name)?.value.refreshTra(temRow.value);
|
|
|
+};
|
|
|
|
|
|
const chooseTagType = (row, type) => {
|
|
|
let daynamicType = "";
|
|
@@ -96,7 +135,7 @@ const chooseTagType = (row, type) => {
|
|
|
? "订单"
|
|
|
: row.startsWith("GD")
|
|
|
? "工单"
|
|
|
- : "序列号";
|
|
|
+ : "流转卡号";
|
|
|
} else {
|
|
|
daynamicType = row.startsWith("DD")
|
|
|
? "success"
|
|
@@ -114,12 +153,29 @@ let productReviewInfo = reactive({
|
|
|
materialModel: "",
|
|
|
planStartEnd: "",
|
|
|
workOrderCode: "",
|
|
|
+ outNum: "",
|
|
|
});
|
|
|
+
|
|
|
const handleCellClick = (row, column, event) => {
|
|
|
+ //获取出单的数量
|
|
|
+ if (data.value) {
|
|
|
+ for (let topTree of data.value) {
|
|
|
+ if (topTree) {
|
|
|
+ for (let secondTree of topTree.children) {
|
|
|
+ if (row.workOrderCode == secondTree.workOrderCode) {
|
|
|
+ productReviewInfo.outNum = secondTree.children.length;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ temRow.value = row;
|
|
|
// 点击行时触发的逻辑
|
|
|
if (!row.children && row.seqNo && row.seqNo.length > 16) {
|
|
|
if (productReviewInfo.seqNo != row.seqNo) {
|
|
|
- traceabilityComRef.value.refreshTra(row.seqNo);
|
|
|
+ //物料履历
|
|
|
+ //traceabilityComRef.value.refreshTra(row);
|
|
|
+ tabNameComRef.get(defaultTabName.value)?.value.refreshTra(temRow.value);
|
|
|
}
|
|
|
if (row.workOrderCode == productReviewInfo.workOrderCode) {
|
|
|
productReviewInfo.seqNo = row.seqNo;
|
|
@@ -128,6 +184,7 @@ const handleCellClick = (row, column, event) => {
|
|
|
getMaterialDetailsByseqNo(row.seqNo).then(({ data }) => {
|
|
|
productReviewInfo = Object.assign(productReviewInfo, data);
|
|
|
productReviewInfo.workOrderCode = row.workOrderCode;
|
|
|
+ // productReviewInfo.outNum =
|
|
|
});
|
|
|
}
|
|
|
};
|
|
@@ -157,7 +214,7 @@ option.value = Object.assign(option.value, {
|
|
|
hide: true,
|
|
|
},
|
|
|
{
|
|
|
- label: "产品序列号",
|
|
|
+ label: "流转卡号",
|
|
|
prop: "seqNo",
|
|
|
search: true,
|
|
|
searchLabelWidth: "100",
|