|
@@ -56,18 +56,68 @@
|
|
|
<TraceabilityCom ref="traceabilityComRef" />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane name="materialsComRef" label="已采物料">
|
|
|
+ <template #label>
|
|
|
+ <span
|
|
|
+ >已采物料
|
|
|
+ <el-badge
|
|
|
+ :value="tabCount.materials"
|
|
|
+ class="item"
|
|
|
+ type="primary"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
<MaterialsCom ref="materialsComRef" />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane name="recordComRef" label="记录项">
|
|
|
+ <template #label>
|
|
|
+ <span
|
|
|
+ >记录项
|
|
|
+ <el-badge
|
|
|
+ :value="tabCount.record"
|
|
|
+ class="item"
|
|
|
+ type="primary"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
<RecordCom ref="recordComRef"
|
|
|
/></el-tab-pane>
|
|
|
<el-tab-pane name="checkComRef" label="点检判定">
|
|
|
+ <template #label>
|
|
|
+ <span
|
|
|
+ >点检判定
|
|
|
+ <el-badge
|
|
|
+ :value="tabCount.check"
|
|
|
+ class="item"
|
|
|
+ type="primary"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
<CheckCom ref="checkComRef" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane name="equitComRef" label="设备使用"
|
|
|
- ><EquitCom ref="equitComRef"
|
|
|
+ <el-tab-pane name="equitComRef" label="设备使用">
|
|
|
+ <template #label>
|
|
|
+ <span
|
|
|
+ >设备使用
|
|
|
+ <el-badge
|
|
|
+ :value="tabCount.equit"
|
|
|
+ class="item"
|
|
|
+ type="primary"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <EquitCom ref="equitComRef"
|
|
|
/></el-tab-pane>
|
|
|
<el-tab-pane name="faultComRef" label="报故记录">
|
|
|
+ <template #label>
|
|
|
+ <span
|
|
|
+ >报故记录
|
|
|
+ <el-badge
|
|
|
+ :value="tabCount.fault"
|
|
|
+ class="item"
|
|
|
+ type="primary"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
<FaultCom ref="faultComRef" />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane name="bugComRef" label="缺陷项">缺陷项</el-tab-pane>
|
|
@@ -84,7 +134,7 @@
|
|
|
import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
-
|
|
|
+import { traceabilityTabCount } from "@/api/process";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
import { getMaterialDetailsByseqNo, getOperationCompent } from "@/api/material";
|
|
|
import TraceabilityCom from "@/views/pro/traceability/components/traceabilityCom.vue";
|
|
@@ -125,7 +175,9 @@ const tabNameComRef = new Map([
|
|
|
let temRow = ref({});
|
|
|
const tabsEvent = (pane, ev) => {
|
|
|
defaultTabName.value = pane.props.name;
|
|
|
- tabNameComRef.get(pane.props.name)?.value.refreshTra(temRow.value);
|
|
|
+ if (temRow.value.seqNo) {
|
|
|
+ tabNameComRef.get(pane.props.name)?.value.refreshTra(temRow.value);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const chooseTagType = (row, type) => {
|
|
@@ -156,6 +208,15 @@ let productReviewInfo = reactive({
|
|
|
outNum: "",
|
|
|
});
|
|
|
|
|
|
+let tabCount = reactive({
|
|
|
+ traceability: "",
|
|
|
+ materials: "",
|
|
|
+ record: "",
|
|
|
+ check: "",
|
|
|
+ equit: "",
|
|
|
+ fault: "",
|
|
|
+});
|
|
|
+
|
|
|
const handleCellClick = (row, column, event) => {
|
|
|
//获取出单的数量
|
|
|
if (data.value) {
|
|
@@ -186,6 +247,9 @@ const handleCellClick = (row, column, event) => {
|
|
|
productReviewInfo.workOrderCode = row.workOrderCode;
|
|
|
// productReviewInfo.outNum =
|
|
|
});
|
|
|
+ traceabilityTabCount({ seqNo: row.seqNo }).then(({ data }) => {
|
|
|
+ tabCount = Object.assign(tabCount, data);
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
|