From 2e2e80ddc765dbeff8980b7abf53a474e213d540 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 18 五月 2026 10:09:05 +0800
Subject: [PATCH] 不合格处理:选择不合格订单添加外购下单选项
---
src/components/Table/lims-table.vue | 2
src/views/business/inspectionView/index.vue | 2
src/views/business/inspectionTask/inspection.vue | 36 ++++---
src/views/business/unpass/index-manage.vue | 253 +++++++++++++++++++++++++++++++++++++++++++++-----
4 files changed, 247 insertions(+), 46 deletions(-)
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index ad7f9dc..ef3af96 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -60,7 +60,7 @@
<el-tag v-else-if="item.formatType!=null" :title="scope.row[item.prop] | formatters(item.formatData)"
:type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] |
formatters(item.formatData) }}</el-tag>
- <span v-else>{{item.formatData}}</span>
+ <span v-else>{{scope.row[item.prop] | formatters(item.formatData)}}</span>
</div>
<!-- 鎸夐挳 -->
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index ef65f7e..d4c101b 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -3079,24 +3079,27 @@
this.param[a.id].insValue.find(
(m) => m.c == insValue[i].c && m.r == insValue[i].r
).u = insValue[i].u;
- // this.param[a.id].insValue[i].v.v = insValue[i].v
- // this.param[a.id].insValue[i].u = insValue[i].u
}
}
} catch (e) {}
try {
- // 璁惧缂栧彿璧嬪��
- let equipValue = JSON.parse(a.insProductResult.equipValue);
- for (let i = 0; i < equipValue.length; i++) {
- // 鏅�氳澶囪祴鍊�
- this.param[a.id].equipValue[i].v.v = equipValue[i].v;
+ if(a.insProductResult){
+ // 璁惧缂栧彿璧嬪��
+ let equipValue = JSON.parse(a.insProductResult.equipValue);
+ for (let i = 0; i < equipValue.length; i++) {
+ // 鏅�氳澶囪祴鍊�
+ this.param[a.id].equipValue[i].v.v = equipValue[i].v;
+ }
}
- } catch (e) {}
+ } catch (e) {
+ console.log("璁惧缂栧彿璧嬪��----", e);
+ }
try {
// 璁惧鍚嶇О璧嬪��
- let equipName = JSON.parse(a.insProductResult.equipName);
- for (let i = 0; i < equipName.length; i++) {
- equipName[i].v !== "" &&
+ if(a.insProductResult){
+ let equipName = JSON.parse(a.insProductResult.equipName);
+ for (let i = 0; i < equipName.length; i++) {
+ equipName[i].v !== "" &&
equipName[i].v.map((val) => {
const index = this.equipOptions.findIndex(
(item) => item.value === val
@@ -3106,10 +3109,11 @@
val = this.equipOptions[index].deviceName;
}
});
- }
- for (let i = 0; i < equipName.length; i++) {
- // 鏅�氳澶囧悕绉拌祴鍊�
- this.param[a.id].equipName[i].v.v = equipName[i].v;
+ }
+ for (let i = 0; i < equipName.length; i++) {
+ // 鏅�氳澶囧悕绉拌祴鍊�
+ this.param[a.id].equipName[i].v.v = equipName[i].v;
+ }
}
} catch (e) {
console.log("璁惧鍚嶇О璧嬪��----", e);
@@ -3843,7 +3847,7 @@
toFixed(v, ct) {
if (v && ct && ct.fa) {
if (ct.fa.includes(".")) {
- let num = ct.fa.slice(4).length;
+ let num = ct.fa.split(".")[1].length;
return Number(v).toFixed(num);
} else {
return v;
diff --git a/src/views/business/inspectionView/index.vue b/src/views/business/inspectionView/index.vue
index 95ecd98..4da51e0 100644
--- a/src/views/business/inspectionView/index.vue
+++ b/src/views/business/inspectionView/index.vue
@@ -2845,7 +2845,7 @@
toFixed(v, ct) {
if (v && ct && ct.fa) {
if (ct.fa.includes(".")) {
- let num = ct.fa.slice(4).length;
+ let num = ct.fa.split(".")[1].length;
return Number(v).toFixed(num);
} else {
return v;
diff --git a/src/views/business/unpass/index-manage.vue b/src/views/business/unpass/index-manage.vue
index cb5d776..d5da046 100644
--- a/src/views/business/unpass/index-manage.vue
+++ b/src/views/business/unpass/index-manage.vue
@@ -98,10 +98,10 @@
</el-dialog>
<el-dialog
title="閫夋嫨涓嶅悎鏍艰鍗�"
- :show-close="false"
:close-on-press-escape="false"
:close-on-click-modal="false"
:visible.sync="insOrderVisible"
+ @closed="resetInsOrderForm"
width="50%">
<el-row :gutter="20" style="margin-bottom:10px">
<el-col :span="12">
@@ -111,18 +111,39 @@
<el-button size="small" type="primary" @click="searchInsOrderList">鎼滅储</el-button>
</el-col>
</el-row>
- <lims-table ref="insOrderTable"
- :tableData="insOrderDataList"
- :column="insOrderTableDataColumn"
- :isSelection="true"
- :selectionSelectable="insOrderSelectable"
- :handleSelectionChange="selectMethod"
- :rowClassName="insOrderRowClassName"
- @pagination="insOrderPageination"
- :height="500"
- :page="insOrderPage"
- :tableLoading="insOrderTableLoading">
- </lims-table>
+ <el-tabs v-model="activeName" @tab-click="searchInsOrderList">
+ <el-tab-pane label="鍘熸潗鏂欎笅鍗�" name="raw">
+ <lims-table ref="rawInsOrderTable"
+ v-if="activeName==='raw'"
+ :tableData="insOrderDataList"
+ :column="insOrderTableDataColumn"
+ :isSelection="true"
+ :selectionSelectable="insOrderSelectable"
+ :handleSelectionChange="selectRawMethod"
+ :rowClassName="insOrderRowClassName"
+ @pagination="insOrderPageination"
+ :height="500"
+ :page="insOrderPage"
+ :tableLoading="insOrderTableLoading">
+ </lims-table>
+ </el-tab-pane>
+ <el-tab-pane label="澶栬喘涓嬪崟" name="wg">
+ <lims-table ref="wgInsOrderTable"
+ v-if="activeName==='wg'"
+ :tableData="wgInsOrderDataList"
+ :column="wgInsOrderTableDataColumn"
+ :isSelection="true"
+ :selectionSelectable="insOrderSelectable"
+ :handleSelectionChange="selectWgMethod"
+ :rowClassName="insOrderRowClassName"
+ @pagination="wgInsOrderPageination"
+ :height="500"
+ :page="wgInsOrderPage"
+ :tableLoading="insOrderTableLoading">
+ </lims-table>
+ </el-tab-pane>
+ </el-tabs>
+
<span slot="footer" class="dialog-footer">
<el-button @click="resetInsOrderForm">鍙� 娑�</el-button>
<el-button type="primary" @click="openAddUnqualifiedHandlerView">纭� 瀹�</el-button>
@@ -142,6 +163,7 @@
<script>
import {getIfsByAll} from "@/api/business/rawMaterialOrder";
+import { getIfsByAll as getIfsByWgAll } from "@/api/business/outsourcingFinishProductInspection";
import UnPassDialog from "./components/unPassDialog.vue";
import OAProcess from "./components/OAProcess.vue";
import limsTable from "@/components/Table/lims-table.vue";
@@ -156,6 +178,7 @@
dicts: ['material_prop_type','oa_workflow_state','categories_no_conformities','attribution_no_conformities'],
data() {
return {
+ activeName: 'raw',
lotBatchNo:null,
insOrderVisible:false,
insOrderTableLoading:false,
@@ -224,7 +247,6 @@
{ label: '闆朵欢鎻忚堪', prop: 'partDesc' },
{ label: '渚涘簲鍟嗙紪鐮�', prop: 'supplierId',width:'140' },
{ label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width:'140' },
- { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc',width:'160' },
{
dataType: 'tag',
label: '鍏嶆',
@@ -294,6 +316,140 @@
size: 20,
current: 1
},
+ wgInsOrderTableDataColumn:[
+ {
+ label: 'IFS鍩�',
+ prop: 'contract',
+ width: '120px',
+ dataType: 'tag',
+ formatData: (params) => {
+ return params
+ },
+ formatType: (params) => {
+ if (params === 'ZTNS') {
+ return ''
+ } else if (params === 'KJNS') {
+ return 'success'
+ }else {
+ return null
+ }
+ }
+
+ },
+ { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: "160px", },
+ {
+ dataType: 'tag',
+ label: '妫�楠岀姸鎬�',
+ prop: 'inspectStatus',
+ formatData: (params) => {
+ if (params == 0) {
+ return '妫�楠屼腑'
+ } else if (params == 1) {
+ return '鍚堟牸'
+ } else if (params == 2) {
+ return '涓嶅悎鏍�'
+ } else if (params == 3) {
+ return '鏈笅鍗�'
+ } else if (params == 4) {
+ return '璁╂鏀捐'
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (params == 0) {
+ return 'warning'
+ } else if (params == 1) {
+ return 'success'
+ } else if (params == 2) {
+ return 'danger'
+ } else if (params == 3) {
+ return 'info'
+ } else if (params == 4) {
+ return ''
+ } else {
+ return null
+ }
+ }
+ },
+ { label: '璁㈠崟鍙�', prop: 'orderNo' },
+ { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore', width: '130px' },
+ { label: '涓嬪彂鏃堕棿', prop: 'sendTime', width: '130px' },
+ { label: '鎵瑰彿', prop: 'updateBatchNo', width: '130px' },
+ { label: '闆朵欢鍙�', prop: 'partNo', width: '140px' },
+ { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
+ {
+ dataType: 'tag',
+ label: '鍏嶆',
+ prop: 'isExemption',
+ formatData: (params) => {
+ if (params == 1) {
+ return '鍏嶆'
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (params == 1) {
+ return 'success'
+ } else {
+ return null
+ }
+ }
+ },
+ {
+ label: '鏍峰搧鍚嶇О',
+ prop: 'sampleName',
+ width: "160px",
+ },
+ { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+ { label: '妫�楠屼汉', prop: 'userName' },
+ {
+ label: '鐗╂枡灞炴��',
+ prop: 'materialProp',
+ formatData: (params) => {
+ if (!params) return null
+
+ for (let i = 0; i < this.dict.type.material_prop_type.length; i++) {
+ const item = this.dict.type.material_prop_type[i]
+ if (item.value == params) {
+ return item.label
+ }
+ }
+ return null
+ }
+ },
+ {
+ dataType: 'tag',
+ label: '鐗╂枡绫诲瀷',
+ prop: 'isExpire',
+ formatData: (params) => {
+ if (params == 1) {
+ return '杩囨湡鐗╂枡'
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (params == 1) {
+ return 'info'
+ } else {
+ return null
+ }
+ }
+ },
+ { label: '鍗曚綅', prop: 'buyUnitMeas' },
+ { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+ { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+ ],
+ wgInsOrderPage:{
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ wgInsOrderTableLoading:false,
+ wgInsOrderDataList:[],
handlerId: null,
contract:null,
entity: {
@@ -522,9 +678,21 @@
return this.isDisabledInsOrderRow(row) ? 'disabled-selection-row' : ''
},
resetInsOrderForm(){
+ this.activeName = 'raw'
this.insOrderDataList = []
+ this.wgInsOrderDataList = []
this.lotBatchNo = null
this.orderId = ''
+ this.insOrderPage = {
+ total: 0,
+ size: 20,
+ current: 1,
+ }
+ this.wgInsOrderPage = {
+ total: 0,
+ size: 20,
+ current: 1,
+ }
this.$nextTick(()=>{
this.insOrderVisible = false
})
@@ -537,23 +705,38 @@
const params = {
updateBatchNo: this.lotBatchNo,
isInspect: 1,
- ...this.insOrderPage
}
- getIfsByAll(params).then(res => {
- this.insOrderTableLoading = false
- if (res.code === 200) {
- this.insOrderDataList = res.data.records
- this.insOrderPage.total = res.data.total
- }
- }).catch(err => {
- this.insOrderTableLoading = false
- })
+ if(this.activeName==='raw'){
+ getIfsByAll({...params,...this.insOrderPage}).then(res => {
+ this.insOrderTableLoading = false
+ if (res.code === 200) {
+ this.insOrderDataList = res.data.records
+ this.insOrderPage.total = res.data.total
+ }
+ }).catch(err => {
+ this.insOrderTableLoading = false
+ })
+ }else if(this.activeName==='wg'){
+ getIfsByWgAll({...params,...this.wgInsOrderPage}).then(res => {
+ this.insOrderTableLoading = false
+ if (res.code === 200) {
+ this.wgInsOrderDataList = res.data.records
+ this.wgInsOrderPage.total = res.data.total
+ }
+ }).catch(err => {
+ this.insOrderTableLoading = false
+ })
+ }
},
insOrderPageination(page){
this.insOrderPage.size = page.limit
this.searchInsOrderList()
},
- selectMethod(val){
+ wgInsOrderPageination(page){
+ this.wgInsOrderPage.size = page.limit
+ this.searchInsOrderList()
+ },
+ selectRawMethod(val){
if (!val || val.length === 0) {
this.orderId = ''
return
@@ -562,9 +745,23 @@
const currentRow = val[val.length - 1]
this.orderId = this.getInsOrderRowId(currentRow)
- if (val.length > 1 && this.$refs.insOrderTable && this.$refs.insOrderTable.$refs.multipleTable) {
- this.$refs.insOrderTable.$refs.multipleTable.clearSelection()
- this.$refs.insOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true)
+ if (val.length > 1 && this.$refs.rawInsOrderTable && this.$refs.rawInsOrderTable.$refs.multipleTable) {
+ this.$refs.rawInsOrderTable.$refs.multipleTable.clearSelection()
+ this.$refs.rawInsOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true)
+ }
+ },
+ selectWgMethod(val){
+ if (!val || val.length === 0) {
+ this.orderId = ''
+ return
+ }
+
+ const currentRow = val[val.length - 1]
+ this.orderId = this.getInsOrderRowId(currentRow)
+
+ if (val.length > 1 && this.$refs.wgInsOrderTable && this.$refs.wgInsOrderTable.$refs.multipleTable) {
+ this.$refs.wgInsOrderTable.$refs.multipleTable.clearSelection()
+ this.$refs.wgInsOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true)
}
},
//鎵撳紑鏂板涓嶅悎鏍煎鐞嗗脊妗�
--
Gitblit v1.9.3