From 2e4a6c4526b6c22808d5877f2050da852bfaebe7 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 30 十二月 2025 14:31:47 +0800
Subject: [PATCH] 外购成品检验功能迁移v1
---
src/views/business/outsourcingFinishProduct/index.vue | 1268 +++++++++++++++++++++++++++++
src/utils/bigEval.js | 118 ++
src/views/business/inspectionReview/index.vue | 9
src/views/business/rawMaterialInspection/index.vue | 108 +
src/views/business/reportPreparation/index.vue | 9
src/api/business/rawMaterialOrder.js | 7
src/views/business/inspectionTask/inspection.vue | 290 +++++-
src/router/index.js | 49 +
src/api/business/ifsOrderInspection.js | 19
src/views/business/inspectionTask/index.vue | 20
src/views/business/materialOrder/customsInspectionOrder.vue | 172 +++
src/views/business/materialOrder/index.vue | 18
src/api/business/ifsPartProps.js | 18
src/api/business/outsourcingFinishProductInspection.js | 36
src/views/business/productOrder/components/addOrder.vue | 50 +
src/main.js | 3
src/views/business/outsourcingFinishProduct/components/printDialog.vue | 347 ++++++++
17 files changed, 2,445 insertions(+), 96 deletions(-)
diff --git a/src/api/business/ifsOrderInspection.js b/src/api/business/ifsOrderInspection.js
new file mode 100644
index 0000000..ac66d28
--- /dev/null
+++ b/src/api/business/ifsOrderInspection.js
@@ -0,0 +1,19 @@
+//閿�鍞鍗曟姤妫�鏌ヨ鎺ュ彛
+import request from '@/utils/request'
+
+// 閿�鍞鍗曟姤妫�鏌ヨ鍏ㄩ儴
+export function getIfsByAll(query) {
+ return request({
+ url: '/ifsOrderInspection/getIfsByAll',
+ method: 'get',
+ params: query
+ })
+}
+// 閿�鍞鍗曟姤妫�鏌ョ湅宸插畬鎴愪俊鎭�
+export function getIfsByFinish(query) {
+ return request({
+ url: '/ifsOrderInspection/getIfsByFinish',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/api/business/ifsPartProps.js b/src/api/business/ifsPartProps.js
new file mode 100644
index 0000000..44d8915
--- /dev/null
+++ b/src/api/business/ifsPartProps.js
@@ -0,0 +1,18 @@
+//ifs闆朵欢灞炴�ф帴鍙�
+import request from '@/utils/request'
+
+// 鏂板鎴栦繚瀛橀浂浠跺睘鎬�
+export function saveOrUpdateProps(data) {
+ return request({
+ url: '/ifsPartProps/saveOrUpdateProps',
+ method: 'post',
+ data: data
+ })
+}
+// 鏌ヨifs璁㈠崟鐨勯浂浠跺睘鎬ц褰�
+export function getOneByIfsId(ifsId) {
+ return request({
+ url: '/ifsPartProps/getOneByIfsId/' + ifsId,
+ method: 'get'
+ })
+}
diff --git a/src/api/business/outsourcingFinishProductInspection.js b/src/api/business/outsourcingFinishProductInspection.js
new file mode 100644
index 0000000..cf81f6b
--- /dev/null
+++ b/src/api/business/outsourcingFinishProductInspection.js
@@ -0,0 +1,36 @@
+// 澶栬喘涓嬪崟椤甸潰鐩稿叧鎺ュ彛
+import request from '@/utils/request'
+
+// 鏌ヨIFS璁㈠崟-寰呮姤妫�
+export function getWarehouseSubmit(query) {
+ return request({
+ url: '/outsourcingFinishProduct/getWarehouseSubmit',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鏌ヨIFS璁㈠崟-寰呮楠�
+export function getIfsByStateOne(query) {
+ return request({
+ url: '/outsourcingFinishProduct/getIfsByStateOne',
+ method: 'get',
+ params: query
+ })
+}
+// 鏌ヨ鍘熸潗鏂欎笅鍗�-宸叉楠�
+export function getIfsByOver(query) {
+ return request({
+ url: '/outsourcingFinishProduct/getIfsByOver',
+ method: 'get',
+ params: query
+ })
+}
+// 鏌ヨ鍘熸潗鏂欎笅鍗�-鍏ㄩ儴
+export function getIfsByAll(query) {
+ return request({
+ url: '/outsourcingFinishProduct/getIfsByAll',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/api/business/rawMaterialOrder.js b/src/api/business/rawMaterialOrder.js
index a37df10..a95d6ec 100644
--- a/src/api/business/rawMaterialOrder.js
+++ b/src/api/business/rawMaterialOrder.js
@@ -295,3 +295,10 @@
data: query
})
}
+// 鏍规嵁ifsId鏌ヨ涓嬪崟鏁伴噺
+export function getOrderCountByIfsId(ifsId) {
+ return request({
+ url: '/rawMaterialOrder/getOrderCountByIfsId/'+ifsId,
+ method: 'get',
+ })
+}
diff --git a/src/main.js b/src/main.js
index 5f56508..16962eb 100644
--- a/src/main.js
+++ b/src/main.js
@@ -49,8 +49,9 @@
import { getToken } from "@/utils/auth";
// 鏃堕棿杞崲
import Moment from "moment";
-
+import Big from 'big.js'
// 鍏ㄥ眬鏂规硶鎸傝浇
+Vue.prototype.$Big = Big;
Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.parseTime = parseTime;
diff --git a/src/router/index.js b/src/router/index.js
index 682a3e4..28b3e63 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -174,6 +174,55 @@
name: "AddOrder",
meta: { title: "杩涜鎴愬搧涓嬪崟", activeMenu: "/business/productOrder",keepAlive: true },
},
+ {
+ // 澶栬喘涓嬪崟-杩涜澶栬喘涓嬪崟
+ path: "customsInspectionOrder",
+ component: () =>
+ import("@/views/business/productOrder/components/addOrder.vue"),
+ name: "CustomsInspectionOrder",
+ meta: {
+ title: "杩涜澶栬喘鎴愬搧涓嬪崟",
+ activeMenu: "/business/outsourcingFinishProduct",
+ keepAlive: true
+ },
+ },
+ ],
+ },
+ {
+ // 澶栬喘鎴愬搧涓嬪崟
+ path: "/outsourcingFinishProduct",
+ component: Layout,
+ hidden: true,
+ permissions: ["business:outsourcingFinishProduct"],
+ children: [
+ {
+ // 鏌ョ湅鎴愬搧涓嬪崟璇︽儏
+ path: "addView",
+ component: () =>
+ import("@/views/business/productOrder/components/addView.vue"),
+ name: "AddView",
+ meta: { title: "鏌ョ湅鎴愬搧涓嬪崟璇︽儏", activeMenu: "/business/outsourcingFinishProduct",keepAlive: true },
+ },
+ {
+ // 杩涜涓嬪崟-鎴愬搧涓嬪崟
+ path: "addOrder",
+ component: () =>
+ import("@/views/business/productOrder/components/addOrder.vue"),
+ name: "AddOrder",
+ meta: { title: "杩涜鎴愬搧涓嬪崟", activeMenu: "/business/outsourcingFinishProduct",keepAlive: true },
+ },
+ {
+ // 澶栬喘涓嬪崟-杩涜澶栬喘涓嬪崟
+ path: "customsInspectionOrder",
+ component: () =>
+ import("@/views/business/materialOrder/customsInspectionOrder"),
+ name: "CustomsInspectionOrder",
+ meta: {
+ title: "杩涜澶栬喘鎴愬搧涓嬪崟",
+ activeMenu: "/business/outsourcingFinishProduct",
+ keepAlive: true
+ },
+ },
],
},
{
diff --git a/src/utils/bigEval.js b/src/utils/bigEval.js
new file mode 100644
index 0000000..7d75892
--- /dev/null
+++ b/src/utils/bigEval.js
@@ -0,0 +1,118 @@
+import Big from "big.js";
+
+/**
+ * 瀹夊叏璁$畻鍣紙鏀寔 + - * / 鍜屾嫭鍙凤級
+ * @param {string} expr 鏁板琛ㄨ揪寮忥紝濡� "(0.1 + 0.2) * 3"
+ * @returns {string} 璁$畻缁撴灉瀛楃涓�
+ */
+export function bigEval(expr) {
+ console.log(expr)
+ // 姝ラ1锛氳瘝娉曞垎鏋�
+ const tokens = tokenize(expr);
+ // 姝ラ2锛氳浆鎹负閫嗘尝鍏拌〃杈惧紡锛堝悗缂�琛ㄨ揪寮忥級
+ const rpn = shuntingYard(tokens);
+ // 姝ラ3锛氭墽琛岃绠�
+ return evaluateRPN(rpn);
+}
+
+// 璇嶆硶鍒嗘瀽鍣�
+function tokenize(expr) {
+ const tokens = [];
+ let numBuffer = "";
+ let prevToken = null;
+
+ const flushNumber = () => {
+ if (numBuffer) {
+ // 鏂板锛氶獙璇佹暟瀛楁牸寮忥紙鏀寔璐熸暟銆佸皬鏁帮級
+ if (!/^-?(\d+(\.\d*)?|\.\d+)$/.test(numBuffer)) {
+ throw new Error(`鏃犳晥鏁板瓧鏍煎紡: ${numBuffer}`);
+ }
+ if (numBuffer.startsWith(".")) numBuffer = "0" + numBuffer;
+ tokens.push({ type: "number", value: numBuffer });
+ numBuffer = "";
+ }
+ };
+
+ for (let i = 0; i < expr.length; i++) {
+ const c = expr[i];
+ if (/\d|\./.test(c)) {
+ numBuffer += c;
+ } else if ("+-*/()".includes(c)) {
+ // 淇敼锛氬鍔� numBuffer 涓虹┖鐨勫垽鏂紝纭繚璐熷彿鍙兘浣滀负鏁板瓧鍓嶇紑锛堝叧閿慨澶嶏級
+ if (c === "-" && numBuffer === "" && (
+ !prevToken ||
+ (prevToken.type === "operator" && prevToken.value !== ")")
+ )) {
+ numBuffer += c;
+ } else {
+ flushNumber();
+ tokens.push({ type: "operator", value: c });
+ }
+ prevToken = tokens[tokens.length - 1];
+ } else if (c !== " ") {
+ throw new Error(`闈炴硶瀛楃: ${c}`);
+ }
+ }
+
+ flushNumber();
+ return tokens;
+}
+
+// 璋冨害鍦虹畻娉曠敓鎴愰�嗘尝鍏拌〃杈惧紡
+function shuntingYard(tokens) {
+ const output = [];
+ const stack = [];
+ const precedence = { "+": 1, "-": 1, "*": 2, "/": 2 };
+
+ for (const token of tokens) {
+ if (token.type === "number") {
+ output.push(token.value);
+ } else if (token.value === "(") {
+ stack.push(token.value);
+ } else if (token.value === ")") {
+ while (stack.length && stack[stack.length - 1] !== "(") {
+ output.push(stack.pop());
+ }
+ stack.pop(); // 寮瑰嚭宸︽嫭鍙�
+ } else {
+ while (
+ stack.length &&
+ stack[stack.length - 1] !== "(" &&
+ precedence[stack[stack.length - 1]] >= precedence[token.value]
+ ) {
+ output.push(stack.pop());
+ }
+ stack.push(token.value);
+ }
+ }
+
+ while (stack.length) output.push(stack.pop());
+ return output;
+}
+
+// 鎵ц閫嗘尝鍏拌〃杈惧紡璁$畻
+function evaluateRPN(rpn) {
+ const stack = [];
+
+ for (const token of rpn) {
+ if (/[-]?\d|\./.test(token)) {
+ stack.push(new Big(token));
+ } else {
+ const b = stack.pop();
+ const a = stack.pop();
+
+ switch (token) {
+ case "+": stack.push(a.plus(b)); break;
+ case "-": stack.push(a.minus(b)); break;
+ case "*": stack.push(a.times(b)); break;
+ case "/":
+ if (b.eq(0)) throw new Error("闄ゆ暟涓嶈兘涓洪浂");
+ stack.push(a.div(b));
+ break;
+ default: throw new Error(`鏈煡杩愮畻绗�: ${token}`);
+ }
+ }
+ }
+
+ return stack.pop().toString();
+}
diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index 567885f..c45085d 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -96,9 +96,11 @@
dataType: "tag",
formatData: (params) => {
if (params == 0) {
- return "鎴愬搧涓嬪崟";
- } else {
+ return "澶栬喘涓嬪崟";
+ } else if(params==1) {
return "鍘熸潗鏂欎笅鍗�";
+ }else{
+ return "濮旀墭涓嬪崟";
}
},
},
@@ -236,7 +238,8 @@
currentTime: null,
sonLaboratoryList: [],
typeSourceList: [
- { label: '鎴愬搧涓嬪崟', value: 0 },
+ { label: '濮旀墭涓嬪崟', value: -1 },
+ { label: '澶栬喘涓嬪崟', value: 0 },
{ label: '鍘熸潗鏂欎笅鍗�', value: 1 },
],
isCopper: null,
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index b6833ec..ce24aa0 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -278,8 +278,9 @@
},
claimVisible: false,
tabList: [
- { label: "濮旀墭", value: 0 },
+ { label: "濮旀墭", value: -1 },
{ label: "鍘熸潗鏂�", value: 1 },
+ { label: "澶栬喘", value: 0 },
],
active: 1,
tabIndex: 0,
@@ -287,7 +288,7 @@
planTotal: 0,
insStateList: [],
state: 0, // 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
- typeSource: null, // 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟
+ typeSource: -1, // 0:澶栬喘鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟
sonLaboratory: null, // 0:濮旀墭锛�1锛氬師鏉愭枡
activeFace: 0, // 1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝榛樿涓�0
currentId: null,
@@ -358,9 +359,11 @@
dataType: "tag",
formatData: (params) => {
if (params == 0) {
- return "鎴愬搧涓嬪崟";
- } else {
+ return "澶栬喘涓嬪崟";
+ } else if(params==1) {
return "鍘熸潗鏂欎笅鍗�";
+ }else{
+ return "濮旀墭涓嬪崟";
}
},
},
@@ -540,12 +543,14 @@
lookTableLoading: false,
// 鏁版嵁鏌ョ湅鐩稿叧瀛楁---缁撴潫
retestVisible: false,
- upIndex: 0
+ upIndex: 0,
+ tabLabel: ''
};
},
mounted() {
this.getAuthorizedPerson();
this.queryParams.userId = this.userId;
+ this.queryParams.typeSource = this.typeSource
this.currentTime = getYearAndMonthAndDays();
this.getDicts("urgency_level").then((response) => {
this.urgencyLevel = this.dictToValue(response.data);
@@ -564,6 +569,7 @@
this.getDicts("inspection_task_state").then((response) => {
this.inspectionTaskState = this.dictToValue(response.data);
});
+ this.queryParams.typeSource = this.typeSource
this.refreshTable();
},
methods: {
@@ -636,7 +642,8 @@
},
refreshTable(e) {
this.page.current = 1;
- this.queryParams.typeSource = this.tabIndex;
+ this.queryParams.tabLabel = this.tabLabel;
+ this.queryParams.typeSource = this.typeSource;
this.getList();
},
// 涓嬭浇鎶ュ憡
@@ -723,6 +730,7 @@
},
handleTab(m, i) {
this.tabIndex = i;
+ this.typeSource =m.value;
this.queryParams.sonLaboratory = "";
this.refreshTable();
},
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 808ee32..62d0464 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -1,7 +1,7 @@
<template>
<div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);">
<el-row class="title">
- <el-col :span="8" style="text-align: left">
+ <el-col v-if="insOrder.ifsOrderType!=='02wg'" :span="8" style="text-align: left">
<el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px"
style="text-align: right; padding-top: 0; display: inline">
<el-form-item label="娓╁害:" style="margin-bottom: 0">
@@ -16,10 +16,11 @@
</el-form-item>
</el-form>
</el-col>
- <el-col :span="16" style="text-align: right">
+ <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right">
+ <el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFS鐗╂枡灞炴�ф洿鏂�</el-button>
<el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button>
<el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button>
- <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary"
+ <el-button v-if="state == 1 && [0,1].includes(Number(typeSource))" size="small" type="primary"
@click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button>
<el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">鏍峰搧鍒囨崲</el-button>
<!-- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">浠诲姟鍒囨崲</el-button>-->
@@ -32,49 +33,94 @@
</el-col>
</el-row>
<div class="search">
- <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">
- <el-form-item label="濮旀墭缂栧彿:">
- <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏍峰搧缂栧彿:">
- <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">
- <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-tooltip>
- </el-form-item>
- <el-form-item label="鏍峰搧鍚嶇О:">
- <el-input v-model="currentSample.sample" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏍峰搧鏁伴噺:">
- <el-input v-model="sampleProduct.length" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鏍峰搧鍨嬪彿:">
- <el-input v-model="currentSample.model" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="涓嬪彂鏃堕棿:">
- <el-input v-model="insOrder.sendTime" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="绱ф�ョ▼搴�:">
- <el-input v-model="insOrder.typeName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="绾﹀畾鏃堕棿:">
- <el-input v-model="insOrder.appointed" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item v-if="typeSource === 1" label="鎶芥鏁伴噺:">
- <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:">
- <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" label-width="120px">
- <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>
- </el-form-item>
- <el-form-item label="澶囨敞:">
- <!-- <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>-->
+<!-- <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">-->
+<!-- <el-form-item label="濮旀墭缂栧彿:">-->
+<!-- <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧缂栧彿:">-->
+<!-- <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">-->
+<!-- <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-tooltip>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧鍚嶇О:">-->
+<!-- <el-input v-model="currentSample.sample" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧鏁伴噺:">-->
+<!-- <el-input v-model="sampleProduct.length" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鏍峰搧鍨嬪彿:">-->
+<!-- <el-input v-model="currentSample.model" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="涓嬪彂鏃堕棿:">-->
+<!-- <el-input v-model="insOrder.sendTime" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="绱ф�ョ▼搴�:">-->
+<!-- <el-input v-model="insOrder.typeName" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="绾﹀畾鏃堕棿:">-->
+<!-- <el-input v-model="insOrder.appointed" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item v-if="typeSource === 1" label="鎶芥鏁伴噺:">-->
+<!-- <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:">-->
+<!-- <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" label-width="120px">-->
+<!-- <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="澶囨敞:">-->
+<!-- <!– <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>–>-->
+<!-- <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"-->
+<!-- @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>-->
+<!-- <!– <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> –>-->
+<!-- </el-form-item>-->
+<!-- <template v-if="insOrder.isSplitOrder && insOrder.isSplitOrder===1">-->
+<!-- <el-form-item label="澶栨姢棰滆壊:">-->
+<!-- <el-input v-model="insOrder.outerColor" clearable disabled placeholder="" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="缁濈紭棰滆壊:">-->
+<!-- <el-input v-model="insOrder.insulationColor" clearable disabled placeholder="" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="鐩樺彿:">-->
+<!-- <el-input v-model="insOrder.drumNo" clearable disabled placeholder="" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- </template>-->
+<!-- </el-form>-->
+ <el-descriptions title="妫�楠屽崟姒傚喌" :column="4" border>
+ <template v-if="insOrder.ifsOrderType">
+ <el-descriptions-item label="闆朵欢鍙�">{{insOrder.partNo}}</el-descriptions-item>
+ <el-descriptions-item label="闆朵欢鍚嶇О">{{insOrder.partDetail}}</el-descriptions-item>
+ <el-descriptions-item label="鎵规鍙�">{{ insOrder.lotBatchNo }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍨嬪彿" >{{currentSample.model}}</el-descriptions-item>
+ <el-descriptions-item label="鎶芥鏁伴噺">{{insOrder.testQuantity}}</el-descriptions-item>
+ <el-descriptions-item label="鍘傚瀵嗗害">{{supplierDensity}}</el-descriptions-item>
+ <template v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'">
+ <el-descriptions-item label="杞藉叿缂栧彿">{{insOrder.drumNo}}</el-descriptions-item>
+ <el-descriptions-item label="璧峰绫虫爣(km)">{{insOrder.startMeterMark}}</el-descriptions-item>
+ <el-descriptions-item label="鎴绫虫爣(km)">{{insOrder.endMeterMark}}</el-descriptions-item>
+ <el-descriptions-item label="鍏ュ簱闀垮害(km)">{{calcInbondLength(insOrder.startMeterMark,insOrder.endMeterMark)}}</el-descriptions-item>
+ <el-descriptions-item label="缁濈紭棰滆壊">{{insOrder.insulationColor}}</el-descriptions-item>
+ <el-descriptions-item label="澶栨姢棰滆壊">{{insOrder.outerColor}}</el-descriptions-item>
+ <el-descriptions-item label="鍗板瓧淇℃伅">{{insOrder.letteringInfo}}</el-descriptions-item>
+ </template>
+ </template>
+ <template v-else>
+ <el-descriptions-item label="濮旀墭缂栧彿">{{ insOrder.entrustCode }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧缂栧彿">{{ currentSample.sampleCode }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍚嶇О">{{ currentSample.sample }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鏁伴噺">{{ sampleProduct.length }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍨嬪彿">{{ currentSample.model }}</el-descriptions-item>
+ <el-descriptions-item label="涓嬪彂鏃堕棿">{{ insOrder.sendTime }}</el-descriptions-item>
+ <el-descriptions-item label="绱ф�ョ▼搴�">{{ insOrder.typeName }}</el-descriptions-item>
+ <el-descriptions-item label="绾﹀畾鏃堕棿">{{ insOrder.appointed }}</el-descriptions-item>
+ </template>
+ <el-descriptions-item label="褰撳墠鏍峰搧浣嶆暟"><el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag></el-descriptions-item>
+ <el-descriptions-item label="澶囨敞">
<el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"
- @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
- <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
- </el-form-item>
- </el-form>
+ @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
+ </el-descriptions-item>
+ </el-descriptions>
</div>
<div class="center">
<div class="search" style="
@@ -517,6 +563,49 @@
:purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
<!--鏌ョ湅宸ユ椂寮规-->
<viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia>
+ <!-- IFS鐗╂枡灞炴�х紪杈戝脊妗�-->
+ <el-dialog
+ title="鏇存柊IFS搴撳瓨鐗╂枡鎵规灞炴��"
+ :visible.sync="ifsMaterialPropsVisible"
+ width="20%">
+ <el-form style="width:100%" :model="ifsMaterialPropsForm">
+ <el-form-item label="杞藉叿缂栧彿(Attr1):">
+ <el-input placeholder="杞藉叿缂栧彿" size="small" v-model="ifsMaterialPropsForm.drumNo"></el-input>
+ </el-form-item>
+ <el-form-item label="璧峰绫虫爣(Attr2):">
+ <el-input @blur="validateQuality()" placeholder="璧峰绫虫爣" size="small" v-model="ifsMaterialPropsForm.startMeterMark">
+ <span slot="suffix">km</span>
+ </el-input>
+ </el-form-item>
+ <el-form-item label="鎴绫虫爣(Attr3):">
+ <el-input @blur="validateQuality()" placeholder="鎴绫虫爣" size="small" v-model="ifsMaterialPropsForm.endMeterMark">
+ <span slot="suffix">km</span>
+ </el-input>
+ </el-form-item>
+ <!-- <el-form-item label="鍏ュ簱闀垮害">-->
+ <!-- <el-input v-model="ifsMaterialPropsForm.inboundLength"></el-input>-->
+ <!-- </el-form-item>-->
+ <el-form-item label="澶栨姢棰滆壊(Attr4):">
+ <el-select size="small" v-model="ifsMaterialPropsForm.outerColor">
+ <el-option v-for="(item,index) in outerColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="缁濈紭棰滆壊(Attr5):">
+ <el-select size="small" v-model="ifsMaterialPropsForm.insulationColor">
+ <el-option v-for="(item,index) in insulationColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍗板瓧淇℃伅(Attr8):">
+ <el-select size="small" v-model="ifsMaterialPropsForm.letteringInfo" placeholder="璇烽�夋嫨">
+ <el-option v-for="(item,index) in letteringInfoList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closePartPropDialog()">鍙� 娑�</el-button>
+ <el-button type="primary" @click="saveOrUpdatePartProp()">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -527,6 +616,7 @@
import AddUnPass from "../unpass/components/addUnPass.vue";
import InspectionWord from "./components/InspectionWord.vue";
import PurchaseVerification from "../unpass/components/PurchaseVerification.vue";
+import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js";
import {
doInsOrder,
getCableTag,
@@ -551,6 +641,7 @@
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
+import {getDicts} from "@/api/system/dict/data";
export default {
name: 'Inspection',
components: {
@@ -563,6 +654,21 @@
},
data() {
return {
+ outerColorList:[],
+ insulationColorList:[],
+ letteringInfoList: [],
+ ifsMaterialPropsForm:{
+ id:null,
+ ifsInventoryId: null,
+ drumNo: '', // 杞藉叿缂栧彿
+ startMeterMark: '', // 璧峰绫虫爣
+ endMeterMark: '', // 鎴绫虫爣
+ insulationColor: '', // 缁濈紭棰滆壊
+ outerColor: '', // 澶栨姢棰滆壊
+ inboundLength: '', // 鍏ュ簱闀垮害
+ letteringInfo: '', // 鍗板瓧淇℃伅
+ },
+ ifsMaterialPropsVisible:false,
sonLaboratory: null,
orderId: null,
state: null,
@@ -879,6 +985,87 @@
this.stopWorker();
},
methods: {
+ validateQuality(){
+ let inboundLength = Number(this.calcInbondLength(this.ifsMaterialPropsForm.startMeterMark,this.ifsMaterialPropsForm.endMeterMark));
+ let testQuantity = Number(this.insOrder.testQuantity);
+ if(inboundLength!=null && testQuantity!==inboundLength){
+ this.$message.warning(`鍏ュ簱闀垮害(${inboundLength}km)涓庢楠屾暟閲�(${testQuantity}km)涓嶇锛岃纭锛乣);
+ }
+ },
+ calcInbondLength(startMeterMark,endMeterMark){
+ let inboundLength = null;
+ if((startMeterMark!=null && startMeterMark!=='') && (endMeterMark!=null&&endMeterMark!=='')){
+ let minus = this.$Big(endMeterMark).minus(this.$Big(startMeterMark));
+ inboundLength = Math.abs(minus)
+ }
+ return inboundLength;
+ },
+ getLetteringInfoDicts(){
+ getDicts("lettering_info_type").then(res=>{
+ if(res.code==200){
+ this.letteringInfoList = res.data
+ }
+ })
+ },
+ getInsulationColorDicts(){
+ getDicts("insulation_color_type").then(res=>{
+ if(res.code==200){
+ this.insulationColorList = res.data
+ }
+ })
+ },
+ getOuterColorDicts(){
+ getDicts("outer_color_type").then(res=>{
+ if(res.code==200){
+ this.outerColorList = res.data
+ }
+ })
+ },
+ closePartPropDialog(){
+ this.ifsMaterialPropsForm = {
+ id:null,
+ ifsInventoryId: null,
+ drumNo: '', // 杞藉叿缂栧彿
+ startMeterMark: '', // 璧峰绫虫爣
+ endMeterMark: '', // 鎴绫虫爣
+ insulationColor: '', // 缁濈紭棰滆壊
+ outerColor: '', // 澶栨姢棰滆壊
+ inboundLength: '', // 鍏ュ簱闀垮害
+ letteringInfo: '', // 鍗板瓧淇℃伅
+ }
+ this.ifsMaterialPropsVisible = false;
+ },
+ getPartProps(ifsId){
+ getOneByIfsId(ifsId).then((res)=>{
+ if(res.code==200 && res.data){
+ this.ifsMaterialPropsForm = res.data;
+ }
+ })
+ },
+ saveOrUpdatePartProp(){
+ this.ifsMaterialPropsForm.ifsInventoryId = this.insOrder.ifsInventoryId
+ saveOrUpdateProps({
+ ...this.ifsMaterialPropsForm,
+ partNo: this.insOrder.partNo,
+ lotBatchNo: this.insOrder.lotBatchNo,
+ }).then((res)=>{
+ if(res.code==200){
+ this.$message.success("淇濆瓨鎴愬姛");
+ this.ifsMaterialPropsVisible = false;
+ this.refreshView()
+ }
+ })
+ },
+ //鎵撳紑IFS鐗╂枡灞炴�у脊妗�
+ showMaterialPropsDialog(){
+ this.getPartProps(this.insOrder.ifsInventoryId)
+ this.getOuterColorDicts()
+ this.getInsulationColorDicts()
+ this.getLetteringInfoDicts()
+ this.$nextTick(()=>{
+ this.ifsMaterialPropsVisible = true;
+ })
+ },
// 鏂囦欢绠$悊--寮�濮�
getList() {
this.tableLoading = true;
@@ -945,6 +1132,10 @@
laboratory: this.sonLaboratory,
}).then(async (res) => {
this.insOrder = res.data.insOrder;
+ if(res.data.insOrder.ifsOrderType==='02wg'){
+ //鏌ヨ闆朵欢灞炴��
+ this.getPartProps(res.data.insOrder.ifsInventoryId)
+ }
this.supplierDensity = res.data.supplierDensity;
this.getList()
this.urgentList.forEach((m) => {
@@ -2579,12 +2770,16 @@
this.$message.error("璇锋寚瀹氬鏍镐汉鍛�");
return;
}
- if (!this.otherForm.humidity) {
+ if (!this.otherForm.humidity && this.insOrder.ifsOrderType!=='02wg') {
this.$message.error("璇疯緭鍏ユ箍搴�");
return;
}
- if (!this.otherForm.temperature) {
+ if (!this.otherForm.temperature && this.insOrder.ifsOrderType!=='02wg') {
this.$message.error("璇疯緭鍏ユ俯搴�");
+ return;
+ }
+ if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType==='02wg') {
+ this.$message.error("璇峰~鍐橧FS搴撳瓨鐗╂枡鎵规灞炴��");
return;
}
this.submitLoading = true;
@@ -2939,6 +3134,7 @@
background-color: #fff;
border-radius: 3px;
margin-bottom: 10px;
+ padding: 10px;
}
.search .form-inline {
diff --git a/src/views/business/materialOrder/customsInspectionOrder.vue b/src/views/business/materialOrder/customsInspectionOrder.vue
index 2fe4edd..c31a242 100644
--- a/src/views/business/materialOrder/customsInspectionOrder.vue
+++ b/src/views/business/materialOrder/customsInspectionOrder.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div>
+ <div v-show="!cableConfigShow&&!auxiliaryShow">
<div class="header">
<div>
<span>閲囪喘璁㈠崟淇℃伅</span>
@@ -24,6 +24,8 @@
<el-button v-show="active==1" size="small" @click="templateDia=true">
<span style="color: #3A7BFA;">淇濆瓨妯℃澘</span>
</el-button>
+ <el-button v-if="active==1&&addObj.sample!=undefined&&(addObj.sample.indexOf('鐢电紗')>-1 ||addObj.sample.indexOf('缁煎悎')>-1)" size="small" type="primary" @click="openCableConfig">鐢电紗閰嶇疆</el-button>
+ <el-button v-if="active==1&&addObj.sample!=undefined&&addObj.sample.indexOf('鐢电紗')>-1" size="small" type="primary" @click="openAuxiliaryCore">杈呭姪绾胯姱閰嶇疆</el-button>
<el-button v-show="active==1 && addObj.orderType === '杩涘巶妫�楠�'" :loading="noNeedCheckLoad" size="small" type="primary" @click="noNeedCheck">鍏嶆</el-button>
<el-button v-show="active==1" :loading="saveLoad" size="small" type="primary" @click="save">鎻愪氦</el-button>
<el-button size="small" @click="goBack">
@@ -32,7 +34,7 @@
</div>
</div>
</div>
- <div class="search">
+ <div class="search" v-show="!cableConfigShow&&!auxiliaryShow">
<el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px">
<el-row>
<el-col :span="6">
@@ -145,7 +147,7 @@
</el-row>
</el-form>
</div>
- <div>
+ <div v-show="!cableConfigShow&&!auxiliaryShow">
<div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px">
<div v-if="active==1">
<el-form :inline="true" :model="addObj1" label-width="90px">
@@ -433,6 +435,10 @@
<el-button :loading="noNeedCheckLoad" type="primary" @click="handleNoNeedCheck">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <!--鐢电紗閰嶇疆-->
+ <cableConfig v-if="cableConfigShow" ref="cableConfigShow" :active="active" :isSpecial="isSpecial" :sampleSelectionList="sampleSelectionList" @goBackAdd="goBackAdd"/>
+ <!--杈呭姪绾胯姱閰嶇疆-->
+ <auxiliary-wire-core v-if="auxiliaryShow" :active="active" :isSpecial="isSpecial" :sampleSelectionList="sampleSelectionList" @goBackAdd2="goBackAdd2"></auxiliary-wire-core>
</div>
</template>
@@ -451,15 +457,24 @@
selectStandardProductList,
selectStandardTreeListByPartNo
} from "@/api/business/rawMaterialOrder";
+import {dateFormat} from "@/utils/date";
+import {bigEval} from "@/utils/bigEval";
+import AuxiliaryWireCore from "../productOrder/components/auxiliaryWireCore.vue";
+import cableConfig from "../productOrder/components/cable-config.vue";
export default {
name: "CustomsInspectionOrder",
dicts: ['check_type', 'urgency_level'],
- components: {},
+ components: {cableConfig, AuxiliaryWireCore},
props: {
},
data() {
return {
+ cableConfigShow: false,
+ auxiliaryShow: false,
+ isSpecial: false,
+ sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁
+ isOutsourcing: 'f',//鏄惁澶栬喘鎴愬搧
customsInspection: {},
orderType: '',
active: 0,
@@ -614,6 +629,17 @@
// this.addObj.method = null
// this.productList = []
// },
+ isOutsourcing:{
+ deep: true,
+ handler(newVal){
+ if(newVal && newVal==='t'){
+ this.addObj.appointed = dateFormat(new Date(),'yyyy-MM-dd')
+ this.addObj.testQuantity = this.customsInspection.qtyArrived
+ this.addObj.orderType = '杩涘巶妫�楠�'
+ this.addObj.typeSource = 0
+ }
+ }
+ },
productList: {
deep: true,
handler(val) {
@@ -643,6 +669,7 @@
created() {
this.active = this.$route.query.active
this.orderType = this.$route.query.orderType
+ this.isOutsourcing = this.$route.query.isOutsourcing
this.currentId = this.$route.query.currentId
this.isReport = this.$route.query.isReport
this.customsInspection = this.$route.query.customsInspection
@@ -651,6 +678,7 @@
activated() {
this.active = this.$route.query.active
this.orderType = this.$route.query.orderType
+ this.isOutsourcing = this.$route.query.isOutsourcing
this.currentId = this.$route.query.currentId
this.isReport = this.$route.query.isReport
this.customsInspection = this.$route.query.customsInspection
@@ -660,6 +688,82 @@
// this.getInfo() // 鑾峰彇鏁版嵁
// },
methods: {
+ goBackAdd () {
+ this.cableConfigShow = false
+ },
+ goBackAdd2 () {
+ this.auxiliaryShow = false
+ },
+ // 缂栬緫瑕佹眰鍊艰〃鏍�
+ editSpecial () {
+ this.isSpecial = true
+ this.$nextTick(() => {
+ this.$refs.productTable.doLayout();
+ });
+ },
+ areObjectsValuesEqual (objects, property) {
+ if (!objects || objects.length === 0) return false;
+ const firstValue = objects[0][property];
+ return objects.every(obj => obj[property] === firstValue);
+ },
+ // 杈呭姪绾胯姱閰嶇疆
+ openAuxiliaryCore () {
+ if (this.active == 1) {
+ if (this.sampleIds.length === 0) {
+ this.$message.error("鏈�夋嫨鏍峰搧")
+ } else if (this.sampleIds.length === 1) {
+ if (!this.sampleSelectionList[0].standardMethodListId) {
+ this.$message.error("鏍峰搧鏈�夋嫨妫�楠屾爣鍑�")
+ return
+ }
+ this.auxiliaryShow = true
+ } else {
+ // 鍚屾椂閰嶇疆澶氫釜鏍峰搧鐨勭數缂嗛厤缃椂蹇呴』閫夋嫨鐩稿悓鐨勬楠屾爣鍑�
+ if (!this.sampleSelectionList.every(value => value.standardMethodListId)) {
+ this.$message.error("鏍峰搧鏈�夋嫨妫�楠屾爣鍑�")
+ } else {
+ if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) {
+ this.$message.error("璇烽�夋嫨鐩稿悓鐨勬楠屾爣鍑�")
+ return
+ }
+ this.auxiliaryShow = true
+ }
+ }
+ } else {
+ if (this.sampleId === null) {
+ this.$message.error('鏈�変腑鏍峰搧')
+ }
+ }
+ },
+ //鎵撳紑鐢电紗閰嶇疆寮规
+ openCableConfig() {
+ if (this.active == 1) {
+ if (this.sampleIds.length === 0) {
+ this.$message.error("鏈�夋嫨鏍峰搧")
+ } else if (this.sampleIds.length === 1) {
+ if (!this.sampleSelectionList[0].standardMethodListId) {
+ this.$message.error("鏍峰搧鏈�夋嫨妫�楠屾爣鍑�")
+ return
+ }
+ this.cableConfigShow = true
+ } else {
+ // 鍚屾椂閰嶇疆澶氫釜鏍峰搧鐨勭數缂嗛厤缃椂蹇呴』閫夋嫨鐩稿悓鐨勬楠屾爣鍑�
+ if (!this.sampleSelectionList.every(value => value.standardMethodListId)) {
+ this.$message.error("鏍峰搧鏈�夋嫨妫�楠屾爣鍑�")
+ } else {
+ if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) {
+ this.$message.error("璇烽�夋嫨鐩稿悓鐨勬楠屾爣鍑�")
+ return
+ }
+ this.cableConfigShow = true
+ }
+ }
+ } else {
+ if (this.sampleId === null) {
+ this.$message.error('鏈�変腑鏍峰搧')
+ }
+ }
+ },
save1 () {
if (this.bsm1DiaList.length > 0) {
this.bsm1DiaList.forEach(item => {
@@ -771,6 +875,9 @@
this.$set(this.addObj, 'receiverDate', this.customsInspection.receiverDate)
this.$set(this.addObj, 'orderNo', this.customsInspection.orderNo)
this.$set(this.addObj, 'declareUser', this.customsInspection.declareUser)
+ if(this.isOutsourcing==='f'){
+ this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity)
+ }
this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity)
this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas)
this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo)
@@ -1094,6 +1201,37 @@
this.saveLoad = false
})
},
+ /**
+ * 鑾峰彇灏忔暟鐨勬渶澶т綅鏁�
+ * @param number 鍨嬪彿鍙傛暟
+ * @param ask 瑕佹眰鍊�
+ * @param calcNum 璁$畻鍊�
+ */
+ getDecimalPlaces(number, ask, calcNum) {
+ console.log("璁$畻灏忔暟鐐�-->", number, ask, calcNum);
+ let count1 = 0;
+ let count2 = 0;
+ const reg = /(\d+\.)(\d+)/g;
+ let matches = [];
+ if (ask) {
+ matches = ask.match(reg);
+ }
+ if (
+ matches &&
+ matches.length > 0 &&
+ matches[0].toString().indexOf(".") > -1
+ ) {
+ count1 = matches[0].toString().split(".")[1].length;
+ }
+ if (number.toString().indexOf(".") > -1) {
+ count2 = number.toString().split(".")[1].length;
+ }
+ if (calcNum.toString().indexOf(".") > -1) {
+ const pointLength2 = calcNum.toString().split(".")[1].length;
+ count2 = count2 > pointLength2 ? count2 : pointLength2;
+ }
+ return count1 > count2 ? count1 : count2;
+ },
handleAsk(ask,symbolItem, value) {
try{
let code = [">", "<", "=", "锛�", "锛�", "鈮�", "鈮�", "卤", "*", "/"];
@@ -1106,7 +1244,13 @@
let index = code.findIndex(b => m.includes(b))
if (index > -1) {
let arr = m.split(code[index]).filter(b => !!b)
- let num = eval(this.replaceAll(arr[0], symbolItem, value))
+ let calcNum = this.$Big(
+ bigEval(this.replaceAll(arr[0], symbolItem, value))
+ );
+ let num = calcNum.toFixed(
+ this.getDecimalPlaces(value, ask, calcNum)
+ );
+ // let num = eval(this.replaceAll(arr[0], symbolItem, value))
m = code[index] + '' + num
arr1.push(m)
}
@@ -1135,7 +1279,13 @@
let index = code.findIndex(b => ask.includes(b))
if (index > -1) {
let arr = ask.split(code[index]).filter(b => !!b)
- let num = eval(this.replaceAll(arr[0], symbolItem, value))
+ let calcNum = this.$Big(
+ bigEval(this.replaceAll(arr[0], symbolItem, value))
+ );
+ let num = calcNum.toFixed(
+ this.getDecimalPlaces(value, ask, calcNum)
+ );
+ // let num = eval(this.replaceAll(arr[0], symbolItem, value))
return code[index] + '' + num
}
}
@@ -1442,6 +1592,9 @@
})
},
getProNum() {
+ this.sampleSelectionList.forEach((m, i) => {
+ this.$set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
+ })
this.$refs.sampleTable.doLayout()
},
methodFocus() {
@@ -1511,6 +1664,7 @@
val.forEach(a => {
this.sampleIds.push(a.id)
})
+ this.sampleSelectionList = val
},
// 閫変腑琛ㄦ牸琛岀殑鍥炶皟
rowClick(row, column, event) {
@@ -1524,7 +1678,11 @@
this.sampleId = row.id
if (this.active !== 1) {
this.sampleIds = []
- this.sampleIds.push(row.id)
+ this.sampleSelectionList.forEach(ele=>{
+ if(ele.id == row.id){
+ this.sampleIds.push(row.id)
+ }
+ })
}
// this.productList = row.insProduct
if (this.productList !== null) {
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 0b4d0cf..cf30a2a 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -201,7 +201,8 @@
repealEnterRawOrder,
repealQuarterRawOrder,
revokeInspectionReport,
- updateEntrustCode
+ updateEntrustCode,
+ getOrderCountByIfsId
} from "@/api/business/rawMaterialOrder";
import { getWarehouseSubmit } from "@/api/business/materialInspection";
import {mapGetters} from "vuex";
@@ -1190,11 +1191,21 @@
},
// 涓嬪崟
playOrder(row) {
- this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 0, customsInspection: row, active: 1 } });
+ //鏌ヨ褰撳墠鎵规鏄惁宸茬粡涓嬪崟
+ getOrderCountByIfsId(row.id).then(res=>{
+ if(res.code===200 && res.data>0){
+ this.$message.warning('璇ユ壒娆″凡涓嬪崟锛岃鍕块噸澶嶄笅鍗�')
+ this.refreshTable('page')
+ return
+ }
+ this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 0, customsInspection: row, active: 1 } });
+ }).catch(error=>{
+ console.error(error)
+ })
},
// 瀛e害妫�楠屼笅鍗�
playOrderSec(row) {
- this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 1, customsInspection: row, active: 1 } });
+ this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 1, customsInspection: row, active: 1 } });
},
// 鐐瑰嚮鏍峰搧鍚嶇О鏌ョ湅璇︽儏
selectAllByOne(row) {
@@ -1357,6 +1368,7 @@
} else {
params = {...this.entity}
}
+ params.orderType = "01raw";
rawAllExport(params).then(res => {
this.outLoading = false
const blob = new Blob([res], { type: 'application/octet-stream' });
diff --git a/src/views/business/outsourcingFinishProduct/components/printDialog.vue b/src/views/business/outsourcingFinishProduct/components/printDialog.vue
new file mode 100644
index 0000000..77a921f
--- /dev/null
+++ b/src/views/business/outsourcingFinishProduct/components/printDialog.vue
@@ -0,0 +1,347 @@
+<template>
+ <div>
+ <el-dialog :visible.sync="isShow" title="鏍囩鎵撳嵃" top="5vh" width="600px" @close="$emit('closePrintDialog')">
+ <div style="width:100%;height: 400px;overflow-y: auto;text-align: left">
+ <div class="dia_body">
+ <el-checkbox
+ v-model="checkAll"
+ :indeterminate="isIndeterminate"
+ style="margin: 10px 5px;"
+ @change="handleCheckAllChange">鍏ㄩ��</el-checkbox>
+ <el-checkbox-group v-model="checkIndexList" @change="changePrintCode()">
+ <el-card v-for="(item, i) in barcodeData" :key="i" class="box-card" style="margin-bottom: 15px; font-size: 16px !important;">
+ <el-checkbox :key="i" :label="i" style="position: relative;top:0;left:10px"><br></el-checkbox>
+ <div>
+ <div class="titleH1" style="text-align: center; margin-bottom: 2px;font-size: 16px">妫�娴嬩腑蹇冩牱鍝佹爣璇嗗崱</div>
+ <div style="text-align: center;">
+ <barcode :displayValue="false" :height="34" :value="item.barcode" :width="2"></barcode>
+ </div>
+ <div style="margin-left: 20px;text-align: left">
+ <div class="item">
+ <span class="full-title">鏍峰搧鍚嶇О</span>:
+ <span class="info">{{ item.sampleView }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title">鐢熶骇鍗曚綅</span>:
+ <span class="info">{{ item.production }}</span>
+ </div>
+ <div class="item2">
+ <span class="full-title">瑙勬牸鍨嬪彿</span>:
+ <span class="info">{{ item.sampleModel }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title">濮旀墭鏃ユ湡</span>:
+ <span class="info">{{ item.sendTime }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title">濮旀墭浜�</span>:
+ <span class="info2">{{ item.prepareUser }}</span>
+ <span class="full-title">妫�娴嬬紪鍙�</span>:
+ <span class="info">{{ item.entrustCode }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title">鏍峰搧鏁伴噺</span>:
+ <span class="info2">{{ item.testQuantity }}</span>
+ </div>
+ <div style="font-weight: bold;display: flex;align-items: center;">
+ <span class="full-title">鏍峰搧鐘舵��</span>:
+ <el-radio-group v-model="item.insState" v-removeAriaHidden style="margin-top: 7px;margin-left: 4px;">
+ <el-radio :label="0" style="font-weight: bold;margin-right: 7px;">寰呮</el-radio>
+ <el-radio :label="1" style="font-weight: bold;margin-right: 7px;">鍦ㄦ</el-radio>
+ <el-radio :label="2" style="font-weight: bold;margin-right: 7px;">宸叉</el-radio>
+ </el-radio-group>
+ <span>
+ <el-radio v-model="item.isLeave"
+ :label="true"
+ size="small" style="margin-left: 14px;margin-top: 3px;" @click.native.prevent="changeIsLeave(item)">鐣欐牱</el-radio>
+ </span>
+ </div>
+ </div>
+ </div>
+ </el-card>
+ </el-checkbox-group>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="$emit('closePrintDialog')">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitPrint">鎵� 鍗�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
+ <div class="el-dialog-body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 20px;right: 10px;z-index: 99999;">
+ <div id="printOrder" ref="printOrder" class="printOrder">
+ <el-card v-for="(item, i) in checkDataList" :key="i" class="box-card" style="font-size: 0.29cm !important;font-weight: 700;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
+ <div>
+ <div class="titleH1" style="text-align: center;margin-bottom: 1px">妫�娴嬩腑蹇冩牱鍝佹爣璇嗗崱</div>
+ <div style="text-align: center;">
+ <barcode :displayValue="false" :height="22" :value="item.barcode" :width="1.6"></barcode>
+ </div>
+ <div style="margin-left: 12px;text-align: left">
+ <div class="item">
+ <span class="full-title4">鏍峰搧鍚嶇О:</span>
+ <span class="info4">{{ item.sampleView }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title2">鐢熶骇鍗曚綅</span>:
+ <span class="info">{{ item.production }}</span>
+ </div>
+ <div class="item2">
+ <span class="full-title4">瑙勬牸鍨嬪彿:</span>
+ <span class="info4">{{ item.sampleModel }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title2">濮旀墭鏃ユ湡</span>:
+ <span class="info">{{ item.sendTime }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title2">濮旀墭浜�</span>:
+ <span class="info3">{{ item.prepareUser }}</span>
+ <span class="full-title2">妫�娴嬬紪鍙�</span>:
+ <span class="info">{{ item.entrustCode }}</span>
+ </div>
+ <div class="item">
+ <span class="full-title2">鏍峰搧鏁伴噺</span>:
+ <span class="info3">{{ item.testQuantity }}</span>
+ </div>
+ <div>
+ <span class="full-title2">鏍峰搧鐘舵��</span>:
+ <span style="white-space: nowrap;margin-left: 2px">
+ 寰呮<span v-if="item.insState!==0" class="scor"></span><span v-if="item.insState===0" class="checked">鈭�</span>
+ 鍦ㄦ<span v-if="item.insState!==1" class="scor"></span><span v-if="item.insState===1" class="checked">鈭�</span>
+ 宸叉<span v-if="item.insState!==2" class="scor"></span><span v-if="item.insState===2" class="checked">鈭�</span>
+ 鐣欐牱<span v-if="!item.isLeave" class="scor"></span><span v-if="item.isLeave" class="checked">鈭�</span>
+ </span>
+ </div>
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import PrintJS from "print-js";
+import {labelOrderPrinting} from "@/api/business/productOrder";
+
+export default {
+ name: "printDialog",
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: {},
+ props: {
+ printDialog: {
+ type: Boolean,
+ default: () => false
+ },
+ },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ isShow: this.printDialog,
+ loadPint: false,
+ isIndeterminate: false, // 澶氶�夋鏍峰紡
+ checkAll: false,
+ checkIndexList: [], // 閫夋嫨瑕佹墦鍗扮殑鏁版嵁
+ barcodeData: [],
+ printLoading: false,
+ checkDataList: []
+ }
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鑾峰彇瑕佹墦鍗扮殑鏁版嵁
+ getLabelPrinting(selection) {
+ try {
+ this.loadPint = true;
+ let ids = []
+ selection.map(m => {
+ ids.push(m.id)
+ })
+ labelOrderPrinting({
+ ids: ids
+ }).then(res => {
+ if (res.code === 200 && res.data.length > 0) {
+ res.data.forEach(item => {
+ item.sendTime = item.sendTime && item.sendTime.substring(0, 10)
+ item.sampleNumber = item.qtyArrived + item.buyUnitMeas
+ this.$set(item, 'barcode', item.entrustCode)
+ this.$set(item, 'isLeave', item.insState === '2')
+ })
+ this.barcodeData = res.data
+ }
+ })
+ } catch (e) {
+ console.log('鑾峰彇瑕佹墦鍗扮殑鏁版嵁---', e)
+ }
+
+ },
+ changeIsLeave(item) {
+ const index = this.barcodeData.findIndex(val => val.entrustCode === item.entrustCode)
+ if (index > -1) {
+ this.barcodeData[index].isLeave = !this.barcodeData[index].isLeave
+ }
+ },
+ // 鍏ㄩ�夊閫夋鍥炶皟
+ handleCheckAllChange(val) {
+ if (val) {
+ for (var i = 0; i < this.barcodeData.length; i++) {
+ this.checkIndexList.push(i)
+ }
+ this.checkDataList = this.barcodeData
+ } else {
+ this.checkIndexList = []
+ this.checkDataList = []
+ }
+ this.isIndeterminate = false;
+ },
+ changeType(type) {
+ type = type === '1' ? '0' : '1'
+ },
+ //閫夋嫨瑕佹墦鍗扮殑浜岀淮鐮�
+ changePrintCode() {
+ let indexList = this.checkIndexList
+ let arr = []
+ indexList.forEach(i => {
+ if (i !== undefined) {
+ arr.push(this.barcodeData[i])
+ }
+ })
+ console.log('arr---', arr)
+ this.checkDataList = arr
+ },
+ // 鎻愪氦鎵撳嵃
+ submitPrint() {
+ if (this.checkDataList.length < 1) {
+ this.$message.warning("璇烽�夋嫨瑕佹墦鍗扮殑鏉″舰鐮�")
+ return
+ }
+ this.printDialogVisible = false;
+ PrintJS({
+ targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕�
+ printable: 'printOrder',//椤甸潰
+ type: "html",//鏂囨。绫诲瀷
+ maxWidth: 360,
+ header: '',
+ style:
+ `@page {
+ margin: 0.4cm;
+ margin-right: 0.4cm;
+ margin-top: 0.4cm;
+ margin-bottom: 0.4cm;
+ padding-bottom: 0px;
+ size: 400px 75px collapse;
+ }
+ html{
+ zoom:100%;
+
+ }
+ @media print{
+ width: 400px;
+ height: 75px;
+ margin:0;
+ }`,
+ onPrintDialogClose: this.erexcel = false,
+ font_size: '0.29cm',
+ });
+ },
+ },
+ watch: {
+ printDialog(newVal) {
+ if (!newVal) {
+ this.barcodeData = []
+ this.checkIndexList = []
+ this.checkDataList = []
+ this.isIndeterminate = true;
+ }
+ }
+ },
+}
+</script>
+
+<style scoped>
+.item {
+ margin-bottom: 4px;
+}
+
+.item2 {
+ margin-bottom: 8px;
+ vertical-align: top;
+}
+
+.full-title {
+ display: inline-block;
+ width: 80px;
+ text-align-last: justify;
+}
+
+.full-title2 {
+ display: inline-block;
+ width: 50px;
+ text-align-last: justify;
+}
+
+.full-title4 {
+ display: inline-block;
+ width: 53px;
+ text-align-last: justify;
+ vertical-align: top;
+}
+
+.info {
+ margin-left: 2px;
+}
+
+.info2 {
+ margin-left: 2px;
+ margin-right: 30px;
+ width: 80px;
+ display: inline-block;
+}
+
+.info3 {
+ margin-left: 2px;
+ margin-right: 8px;
+ width: 44px;
+ display: inline-block;
+}
+
+.info4 {
+ display: inline-block;
+ margin-left: 2px;
+ white-space: normal;
+ width: 260px;
+}
+
+.checkboxInfo {
+ display: inline-block;
+ margin-left: 10px;
+}
+
+.scor {
+ width: 0.06cm;
+ height: 0.06cm;
+ border-radius: 1px;
+ border: 1px solid #000;
+ display: inline-block;
+ margin-right: 14px;
+ margin-left: 4px;
+}
+
+.checked {
+ margin-right: 14px;
+ margin-left: 4px;
+}
+
+>>> .el-checkbox {
+ margin-right: 10px;
+}
+
+>>> .el-card {
+ border: none;
+}
+
+>>> .el-card__body {
+ padding: 4px 2px 6px 14px;
+}
+</style>
diff --git a/src/views/business/outsourcingFinishProduct/index.vue b/src/views/business/outsourcingFinishProduct/index.vue
new file mode 100644
index 0000000..89be8bc
--- /dev/null
+++ b/src/views/business/outsourcingFinishProduct/index.vue
@@ -0,0 +1,1268 @@
+<template>
+ <div class="app-container">
+ <div>
+ <div class="search">
+ <el-form :model="entity" ref="entity" size="small" :inline="true">
+ <el-form-item label="鎵瑰彿" prop="updateBatchNo">
+ <el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="goSearch">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="濮旀墭缂栧彿" prop="entrustCode" v-if="tabIndex !== 0">
+ <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="goSearch">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="闆朵欢鍙�" prop="partNo">
+ <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="goSearch">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="闆朵欢鎻忚堪" prop="partDesc">
+ <el-input v-model="entity.partDesc" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="goSearch">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName" >
+ <el-input v-model="entity.supplierName" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="goSearch">
+ </el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 4"
+ :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text"
+ @click="more = !more">{{ !more ? '鏇村' : '鏀惰捣' }}</el-button>
+ <el-button size="mini" type="primary" @click="goSearch">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh()">閲嶇疆</el-button>
+ </el-form-item>
+
+ <el-form-item label="鏍峰搧鍨嬪彿" prop="sampleModel"
+ v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
+ <el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="goSearch">
+ </el-input>
+ </el-form-item>
+ <el-form-item label="妫�楠岀姸鎬�" prop="inspectStatus"
+ v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
+ <el-select v-model="entity.inspectStatus" clearable size="small" @change="goSearch">
+ <el-option v-for="(a, i) in inspectStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="涓嬪彂鏃堕棿" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
+ <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" @change="goSearch"
+ range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="daterange" value-format="yyyy-MM-dd">
+ </el-date-picker>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="table">
+ <div class="table-tab">
+ <div>
+ <ul class="tab">
+ <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:raw:await'])" @click="handleTab(0)">寰呬笅鍗�</li>
+ <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:raw:testing'])" @click="handleTab(1)">妫�楠屼腑</li>
+ <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:raw:check'])" @click="handleTab(2)">宸叉楠�</li>
+ <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:Ifs:ByAll'])" @click="handleTab(3)">鍏ㄩ儴</li>
+ </ul>
+ </div>
+ <div>
+ <el-button v-show="tabIndex === 3" :loading="outLoading" size="small" type="primary"
+ @click="handleOut">瀵煎嚭</el-button>
+ <el-button v-if="tabIndex !== 0" size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
+ </div>
+ </div>
+ <!--寰呬笅鍗�-->
+ <div class="table">
+ <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
+ ref="tableData" :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'"
+ key="tableData" :page="page" :tableLoading="tableLoading"></lims-table>
+ </div>
+ <!--妫�楠屼腑-->
+ <div class="table">
+ <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true"
+ :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination1"
+ :height="'calc(100vh - 290px)'" key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table>
+ </div>
+ <!--宸叉楠�-->
+ <div class="table">
+ <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true"
+ :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination2"
+ :height="'calc(100vh - 290px)'" key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table>
+ </div>
+ <!--鍏ㄩ儴-->
+ <div class="table">
+ <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true"
+ :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination3"
+ :height="'calc(100vh - 290px)'" key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table>
+ </div>
+ </div>
+ </div>
+ <!-- 纭鍏嶆寮规 -->
+ <el-dialog :visible.sync="exemptionVisible" title="纭鍏嶆" width="42%">
+ <div style="display: flex">
+ <span style="width: 90px; line-height: 32px">瑙勬牸鍨嬪彿锛�</span>
+ <el-input v-model="exemptionInfo.partDetail" clearable placeholder="璇疯緭鍏�" size="small"></el-input>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="exemptionVisible = false">鍙� 娑�</el-button>
+ <el-button :loading="exemptionLoading" type="primary" @click="submitExemption">纭� 瀹�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
+ <!-- 鎾ら攢鎶ユ -->
+ <el-dialog :visible.sync="declareDialogVisible" title="鎶ユ鎾ら攢" width="30%">
+ <p style="font-size:16px;color:#333333">鎵瑰彿<span style="color:#34BD66">{{ this.insOrderRow.updateBatchNo
+ }}</span>鐨勪俊鎭槸鍚�<span style="color: #FF4902">鎾ら攢鎶ユ</span>
+ </p>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="declareDialogVisible = false">鍙� 娑�</el-button>
+ <el-button :loading="upLoad" type="primary" @click="submitDeclare">纭� 瀹�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
+ <!-- 鎾ら攢涓嬪崟 -->
+ <el-dialog :visible.sync="quashDialogVisible" title="涓嬪崟鎾ら攢" width="30%">
+ <el-button size="small" type="primary" @click="cancelQuashOrder('enterOrderId')">鎾ら攢杩涘巶妫�楠屼笅鍗�</el-button>
+ <el-button size="small" type="primary" @click="cancelQuashOrder('quarterOrderId')">鎾ら攢瀛e害妫�楠屼笅鍗�</el-button>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="quashDialogVisible = false">鍙� 娑�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
+ <!-- 淇敼濮旀墭缂栧彿寮规 -->
+ <el-dialog :visible.sync="entrustCodeVisible" title="鎻愮ず" width="30%">
+ <el-input v-model="entrustCodeInfo.entrustCode"></el-input>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="entrustCodeVisible = false">鍙� 娑�</el-button>
+ <el-button :loading="submitCodeLoading" type="primary" @click="submitCode">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!--鏍囩鎵撳嵃寮规-->
+ <print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog"
+ @closePrintDialog="closePrintDialog"></print-dialog>
+ <!--鏁版嵁鏌ョ湅寮规-->
+ <data-look-visible v-if="dataDialogVisible" ref="dataDialogVisible" :dataDialogVisible="dataDialogVisible"
+ :dataLookInfo="dataLookInfo" @closeDataLook="closeDataLook"></data-look-visible>
+ <!--闄勪欢鏌ョ湅寮规-->
+ <files-look-visible v-if="filesDialogVisible" ref="filesDialogVisible" :filesDialogVisible="filesDialogVisible"
+ :filesLookInfo="filesLookInfo" @closeFilesLook="closeFilesLook"></files-look-visible>
+ <!--鎶ュ憡涓嬭浇寮规-->
+ <down-file-dialog v-if="downFileDialogVisible" ref="downFileDialogVisible"
+ :downFileDialogVisible="downFileDialogVisible" :downLoadInfo="downLoadInfo"
+ @closeDownFileDialog="closeDownFileDialog"></down-file-dialog>
+ <!--浜т笟閾句俊鎭煡鐪�-->
+ <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo>
+ <!--妫�楠屼换鍔′俊鎭煡鐪�-->
+ <el-dialog :visible.sync="InspectInfoDialog" title="鏁版嵁鏌ョ湅" width="400px" @closed="closeInsInfoDialog">
+ <div style="margin-bottom: 8px">
+ <span style="font-size: 16px;">杩涘巶妫�楠屽師濮嬫暟鎹�</span>
+ <el-link :disabled="!insInfo.enterOrderId" :underline="false" style="vertical-align: bottom;margin-left: 6px"
+ type="primary" @click="viewInsInfo0">鏌ョ湅</el-link>
+ </div>
+ <div>
+ <span style="font-size: 16px;">瀛e害妫�楠屽師濮嬫暟鎹�</span>
+ <el-link :disabled="!insInfo.quarterOrderId" :underline="false" style="vertical-align: bottom;margin-left: 6px"
+ type="primary" @click="viewInsInfo1">鏌ョ湅</el-link>
+ </div>
+ </el-dialog>
+ <!-- <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"-->
+ <!-- :sonLaboratory="'鍘熸潗鏂�'" :state="state"-->
+ <!-- :typeSource="typeSource"-->
+ <!-- @goback="goback" @refreshView="refreshView"/>-->
+ </div>
+</template>
+
+<script>
+import PrintDialog from "@/views/business/materialOrderComponents/materialOrder/printDialog.vue";
+import ShowInfo from "@/views/business/materialOrderComponents/materialOrder/showInfo.vue";
+import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue";
+import FilesLookVisible from "@/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue";
+import DownFileDialog from "@/views/business/materialOrderComponents/materialOrder/downFileDialog.vue";
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+ concessionRelease,
+ getIfsByQuarter,
+ rawAllExport,
+ rawOrderRelease,
+ repealEnterRawOrder,
+ repealQuarterRawOrder,
+ revokeInspectionReport,
+ updateEntrustCode
+} from "@/api/business/rawMaterialOrder";
+import {getWarehouseSubmit,getIfsByStateOne,getIfsByOver,getIfsByAll} from "@/api/business/outsourcingFinishProductInspection";
+import {mapGetters} from "vuex";
+
+export default {
+ name: "MaterialOrder",
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ tableData: [],
+ tableLoading: false,
+ column: [
+ { label: '鎵瑰彿', prop: 'updateBatchNo' },
+ { label: '闆朵欢鍙�', prop: 'partNo' },
+ { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+ {
+ 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: 'purQtyInStore',width: '130px' },
+ { label: '鍗曚綅', prop: 'buyUnitMeas' },
+ { label: '璁㈠崟鍙�', prop: 'orderNo' },
+ { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+ { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+ {
+ dataType: 'action',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '涓嬪崟',
+ type: 'text',
+ clickFun: (row) => {
+ this.playOrder(row);
+ }
+ },
+ {
+ name: '鍏嶆',
+ type: 'text',
+ clickFun: (row) => {
+ this.exemption(row);
+ },
+ },
+ {
+ name: '鎾ら攢鎶ユ',
+ type: 'text',
+ clickFun: (row) => {
+ this.cancelDeclare(row);
+ },
+ },
+ ]
+ }
+ ],
+ page: {
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ tableData1: [],
+ tableLoading1: false,
+ column1: [
+ { label: '鎵瑰彿', prop: 'updateBatchNo' },
+ {
+ label: '濮旀墭缂栧彿',
+ prop: 'entrustCode',
+ width: "160px",
+ dataType: "link",
+ linkMethod: "changeEntrustCode",
+ },
+ { label: '闆朵欢鍙�', prop: 'partNo' },
+ { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+ {
+ label: '鏍峰搧鍚嶇О',
+ prop: 'sampleName',
+ width: "160px",
+ dataType: "link",
+ linkMethod: "selectAllByOne",
+ },
+ { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+ { label: '妫�楠屼汉', prop: 'userName' },
+ { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
+ {
+ 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: 'purQtyInStore',width: '130px' },
+ { label: '鍗曚綅', prop: 'buyUnitMeas' },
+ { label: '璁㈠崟鍙�', prop: 'orderNo' },
+ { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+ { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+ {
+ dataType: 'action',
+ fixed: 'right',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '鏁版嵁鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDataLook(row);
+ },
+ },
+ {
+ name: '闄勪欢鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleFileLook(row);
+ },
+ },
+ {
+ name: '鎾ら攢涓嬪崟',
+ type: 'text',
+ clickFun: (row) => {
+ this.cancelOrder(row);
+ },
+ },
+ ]
+ }
+ ],
+ page1: {
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ tableData2: [],
+ tableLoading2: false,
+ column2: [
+ {
+ label: '濮旀墭缂栧彿',
+ prop: 'entrustCode',
+ width: "160px",
+ dataType: "link",
+ linkMethod: "changeEntrustCode",
+ },
+ {
+ 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' },
+ { label: '鎵瑰彿', prop: 'updateBatchNo' },
+ { label: '闆朵欢鍙�', prop: 'partNo' },
+ { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
+ { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' },
+ {
+ 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",
+ dataType: "link",
+ linkMethod: "selectAllByOne",
+ },
+ { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+ { label: '妫�楠屼汉', prop: 'userName' },
+ {
+ 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' },
+ {
+ dataType: 'action',
+ fixed: 'right',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '鏁版嵁鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDataLook(row);
+ }
+ },
+ {
+ name: '闄勪欢鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleFileLook(row);
+ }
+ },
+ {
+ name: '鎶ュ憡涓嬭浇',
+ type: 'text',
+ clickFun: (row) => {
+ this.download(row);
+ }
+ },
+ {
+ name: '鍘熷璁板綍',
+ type: 'text',
+ clickFun: (row) => {
+ this.viewInspectInfo(row);
+ },
+ disabled: (row) => {
+ return row.sampleName === null
+ },
+ },
+ {
+ name: '鏀捐',
+ type: 'text',
+ clickFun: (row) => {
+ this.goPass(row);
+ },
+ disabled: (row) => {
+ return row.inspectStatus != 2
+ },
+ showHide: (row) => {
+ return this.checkPermi([
+ "get:raw:check:operation",
+ ]);
+ },
+ },
+ {
+ name: '瀛e害鎾ら攢',
+ type: 'text',
+ clickFun: (row) => {
+ this.repealQuarter(row);
+ },
+ disabled: (row) => {
+ return row.quarterOrderId == null || row.quarterReportId != null
+ },
+ showHide: (row) => {
+ return this.checkPermi([
+ "get:raw:check:operation",
+ ]);
+ },
+ },
+ ]
+ }
+ ],
+ page2: {
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ tableData3: [],
+ tableLoading3: false,
+ column3: [
+ { 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' },
+ { label: '鎵瑰彿', prop: 'updateBatchNo' },
+ { label: '闆朵欢鍙�', prop: 'partNo' },
+ { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+ { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
+ { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' },
+ {
+ 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",
+ dataType: "link",
+ linkMethod: "selectAllByOne",
+ },
+ { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+ { label: '妫�楠屼汉', prop: 'userName' },
+ {
+ 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' },
+ {
+ dataType: 'action',
+ fixed: 'right',
+ label: '鎿嶄綔',
+ operation: [
+ {
+ name: '鏁版嵁鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleDataLook(row);
+ }
+ },
+ {
+ name: '闄勪欢鏌ョ湅',
+ type: 'text',
+ clickFun: (row) => {
+ this.handleFileLook(row);
+ },
+ }
+ ]
+ }
+ ],
+ page3: {
+ total: 0,
+ size: 20,
+ current: 1
+ },
+ entity: {
+ updateBatchNo: null,
+ entrustCode: null,
+ partDesc: null,
+ supplierName: null,
+ sampleModel: null,
+ partNo: null,
+ inspectStatus: null,
+ date: null,
+ beginDeclareDate: null,
+ endDeclareDate: null,
+ },
+ tabList: [
+ {
+ label: '寰呬笅鍗�',
+ value: 0
+ },
+ {
+ label: '妫�楠屼腑',
+ value: 1
+ },
+ {
+ label: '宸叉楠�',
+ value: 2
+ },
+ {
+ label: '瀛e害妫�楠�',
+ value: 4
+ },
+ {
+ label: '鍏ㄩ儴',
+ value: 3
+ }
+ ],
+ more: false,
+ tabIndex: '',
+ multipleSelection: [],
+ active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪�
+ orderType: 0, //0锛氬師鏉愭枡涓嬪崟锛�1锛氬搴︽楠屼笅鍗�
+ currentId: null,
+ btnLoading: false,
+ quashDialogVisible: false, // 鎾ら攢涓嬪崟鎻愰啋寮规
+ declareDialogVisible: false, // 鎾ら攢鎶ユ鎻愰啋寮规
+ insOrderRow: {},
+ upLoad: false,
+ filesDialogVisible: false, // 闄勪欢鏌ョ湅寮规
+ printDialog: false, // 鏍囩鎵撳嵃寮规
+ showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪�
+ dataDialogVisible: false, // 鏁版嵁鏌ョ湅寮规
+ dataLookInfo: {}, // 鏁版嵁鏌ョ湅寮规鏁版嵁
+ filesLookInfo: {}, // 闄勪欢鏌ョ湅寮规鏁版嵁
+ downFileDialogVisible: false, // 鎶ュ憡涓嬭浇寮规
+ downLoadInfo: {}, // 鎶ュ憡涓嬭浇寮规
+ entrustCodeVisible: false, // 淇敼濮旀墭缂栧彿寮规
+ entrustCodeInfo: {},
+ submitCodeLoading: false,
+ exemptionVisible: false, // 鍏嶆纭寮规
+ exemptionLoading: false,
+ exemptionInfo: {},
+ inspectStatusList: [
+ { label: '妫�楠屼腑', value: 0 },
+ { label: '鍚堟牸', value: 1 },
+ { label: '涓嶅悎鏍�', value: 2 },
+ { label: '鏈笅鍗�', value: 3 },
+ { label: '璁╂鏀捐', value: 4 },
+ ],
+ state: 0,
+ orderId: 0,
+ inspectorList: [],//妫�楠屼汉鍛樺垪琛�
+ InspectionKey: 1,
+ typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟, 2: 閾滃崟涓濅笅鍗�
+ InspectInfoDialog: false, // 鏁版嵁鏌ョ湅寮规
+ insInfo: {},
+ outLoading: false
+ }
+ },
+ computed: {
+ ...mapGetters(['nickName'])
+ },
+ mounted() {
+ if (this.checkPermi(['get:raw:await'])) {
+ this.tabIndex = 0
+ } else {
+ this.tabIndex = 2
+ }
+ this.refreshTable()
+ },
+ activated () {
+ this.refreshTable()
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ // 鐐瑰嚮鏌ヨ鍥炶皟
+ goSearch() {
+ this.page.current = 1
+ this.page1.current = 1
+ this.page2.current = 1
+ this.page3.current = 1
+ this.refreshTable()
+ },
+ // 鏌ヨ鍥炶皟
+ refreshTable() {
+ if (this.tabIndex === 0) {
+ // 寰呬笅鍗曟煡璇�
+ this.getPurchaseOrderList()
+ } else if (this.tabIndex === 1) {
+ // 妫�楠屼腑鏌ヨ
+ this.getIfsByStateOneList()
+ } else if (this.tabIndex === 2) {
+ // 宸叉楠屾煡璇�
+ this.getIfsByOverList()
+ } else if (this.tabIndex === 4) {
+ // 鏌ヨ瀛e害妫�楠�
+ this.getIfsByQuarterList()
+ } else {
+ // 鍏ㄩ儴鏌ヨ
+ this.getIfsByAllList()
+ }
+ },
+ // 寰呬笅鍗曟煡璇�
+ getPurchaseOrderList() {
+ this.tableLoading = true
+ const params = { ...this.entity, isInspect: 1, state: 0, ...this.page }
+ getWarehouseSubmit(params).then(res => {
+ this.tableLoading = false
+ if (res.code === 200) {
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }
+ }).catch(err => {
+ this.tableLoading = false
+ })
+ },
+ // 妫�楠屼腑鏌ヨ
+ getIfsByStateOneList() {
+ this.tableLoading1 = true
+ const params = { ...this.entity, orderState: 1, state: 1, ...this.page1 }
+ getIfsByStateOne(params).then(res => {
+ this.tableLoading1 = false
+ if (res.code === 200) {
+ this.tableData1 = res.data.records
+ this.page1.total = res.data.total
+ }
+ }).catch(err => {
+ this.tableLoading1 = false
+ })
+ },
+ // 宸叉楠屾煡璇�
+ getIfsByOverList() {
+ this.tableLoading2 = true
+ if(null != this.entity.date){
+ this.entity.beginDeclareDate = this.entity.date[0]
+ this.entity.endDeclareDate = this.entity.date[1]
+ } else {
+ this.entity.beginDeclareDate = ''
+ this.entity.endDeclareDate = ''
+ }
+ const params = { ...this.entity, orderState: 4, state: 2, ...this.page2 }
+ getIfsByOver(params).then(res => {
+ this.tableLoading2 = false
+ if (res.code === 200) {
+ this.tableData2 = res.data.records
+ this.page2.total = res.data.total
+ }
+ }).catch(err => {
+ this.tableLoading2 = false
+ })
+ },
+ // 鏌ヨ瀛e害妫�楠�
+ getIfsByQuarterList() {
+ this.tableLoading4 = true
+ if(null != this.entity.date){
+ this.entity.beginDeclareDate = this.entity.date[0]
+ this.entity.endDeclareDate = this.entity.date[1]
+ } else {
+ this.entity.beginDeclareDate = ''
+ this.entity.endDeclareDate = ''
+ }
+ const params = { ...this.entity, ...this.page4 }
+ getIfsByQuarter(params).then(res => {
+ this.tableLoading4 = false
+ if (res.code === 200) {
+ this.tableData4 = res.data.records
+ this.page4.total = res.data.total
+ }
+ }).catch(err => {
+ this.tableLoading4 = false
+ })
+ },
+ // 鍏ㄩ儴
+ getIfsByAllList() {
+ this.tableLoading3 = true
+ if(null != this.entity.date){
+ this.entity.beginDeclareDate = this.entity.date[0]
+ this.entity.endDeclareDate = this.entity.date[1]
+ } else {
+ this.entity.beginDeclareDate = ''
+ this.entity.endDeclareDate = ''
+ }
+ const params = { ...this.entity, isInspect: 1, ...this.page3 }
+ getIfsByAll(params).then(res => {
+ this.tableLoading3 = false
+ if (res.code === 200) {
+ this.tableData3 = res.data.records
+ this.page3.total = res.data.total
+ }
+ }).catch(err => {
+ this.tableLoading3 = false
+ })
+ },
+ // 閲� 缃�
+ refresh() {
+ this.resetForm('entity')
+ this.refreshTable()
+ },
+ pagination(page) {
+ this.page.size = page.limit
+ this.refreshTable()
+ },
+ pagination1(page) {
+ this.page1.size = page.limit
+ this.refreshTable()
+ },
+ pagination2(page) {
+ this.page2.size = page.limit
+ this.refreshTable()
+ },
+ pagination3(page) {
+ this.page3.size = page.limit
+ this.refreshTable()
+ },
+ pagination4(page) {
+ this.page4.size = page.limit
+ this.refreshTable()
+ },
+ // 鏌ョ湅妫�楠屾暟鎹�
+ viewInspectInfo(row) {
+ //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃
+ let inspectorList = []
+ if (row.userName) {
+ inspectorList = row.userName.split(',')
+ }
+ inspectorList.push(this.nickName)
+ this.inspectorList = inspectorList
+ this.insInfo = row
+ this.InspectInfoDialog = true
+ },
+ closeInsInfoDialog() {
+ this.InspectInfoDialog = false
+ },
+ // 鐩存帴鏀捐
+ goPass(row) {
+ this.$confirm('鏄惁鏀捐褰撳墠鏁版嵁?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ concessionRelease({ ifsInventoryId: row.id }).then(res => {
+ if (res.code === 200) {
+ this.$message({
+ type: 'success',
+ message: '鏀捐鎴愬姛!'
+ });
+ this.refresh()
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'error',
+ message: '鏀捐澶辫触'
+ });
+ });
+ },
+ // 瀛e害鎾ら攢
+ repealQuarter(row) {
+ this.$confirm('鏄惁鎾ら攢瀛e害涓嬪崟?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎾ら攢鎴愬姛')
+ this.refreshTable('page')
+ }
+ })
+ }).catch(() => { })
+ },
+ viewInsInfo0() {
+ let inspectorList = []
+ inspectorList.push(this.nickName)
+ this.InspectInfoDialog = false
+ if (this.checkPermi(['business:inspectionView'])) {
+ this.$router.push({
+ name: "InspectionView",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.enterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ } else {
+ this.$router.push({
+ path: "/inspectionTask/inspection",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.enterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ }
+ },
+ viewInsInfo1() {
+ let inspectorList = []
+ inspectorList.push(this.nickName)
+ this.InspectInfoDialog = false
+ if (this.checkPermi(['business:inspectionView'])) {
+ this.$router.push({
+ name: "InspectionView",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.quarterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ } else {
+ this.$router.push({
+ path: "/inspectionTask/inspection",
+ query: {
+ sonLaboratory: '鍘熸潗鏂�',
+ state: 3,
+ typeSource: this.insInfo.typeSource,
+ orderId: this.insInfo.quarterOrderId,
+ inspectorList: inspectorList,
+ },
+ })
+ }
+ },
+ goback() {
+ this.state = 0
+ this.refreshTable('page')
+ },
+ // 鍒锋柊椤甸潰
+ refreshView() {
+ this.InspectionKey++
+ },
+ // 閾滄潗鏂欎笅鍗�
+ copper() {
+ this.$router.push({ path: "/materialOrder/copperOrder", query: { active: 1 } });
+ },
+ // 鎵撳紑鏍囩鎵撳嵃寮规
+ openPrint() {
+ if (this.multipleSelection.length > 0) {
+ this.printDialog = true
+ this.$nextTick(() => {
+ let selection = this.multipleSelection
+ this.$refs.printDialog.getLabelPrinting(selection)
+ })
+ } else {
+ this.$message.error('璇烽�夋嫨闇�瑕佹墦鍗扮殑鏁版嵁')
+ }
+ },
+ // 鍏抽棴鏍囩鎵撳嵃寮规
+ closePrintDialog() {
+ this.printDialog = false
+ },
+ // 涓嬪崟
+ playOrder(row) {
+ this.$router.push({ path: "/outsourcingFinishProduct/customsInspectionOrder", query: {isOutsourcing:'t', orderType: 0, customsInspection: row, active: 1 } });
+ },
+ // 鐐瑰嚮鏍峰搧鍚嶇О鏌ョ湅璇︽儏
+ selectAllByOne(row) {
+ if (row.isCopper == 1) {
+ this.currentId = row.enterOrderId
+ this.$router.push({ path: "/materialOrder/CopperView", query: { customsInspection: row, active: 2, currentId: this.currentId } });
+ } else {
+ this.currentId = row.insOrderId
+ this.$router.push({ path: "/materialOrder/customsInspectionView", query: { customsInspection: row, active: 2, currentId: this.currentId } });
+ }
+ },
+ // 鎵撳紑鍏嶆寮规
+ exemption(row) {
+ this.exemptionVisible = true
+ this.exemptionInfo = row
+ this.$set(this.exemptionInfo, 'partDetail', row.partDesc)
+ },
+ // 鎻愪氦鍏嶆淇℃伅
+ submitExemption() {
+ this.exemptionLoading = true
+ rawOrderRelease({
+ ifsInventoryId: this.exemptionInfo.id,
+ partDetail: this.exemptionInfo.partDetail
+ }).then(res => {
+ if (res.code === 200) {
+ this.exemptionVisible = false
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.refresh()
+ }
+ this.exemptionLoading = false
+ }).catch(err => {
+ console.log(err)
+ this.exemptionLoading = false
+ })
+ },
+ // 鎵撳紑鎾ら攢鎶ユ寮规
+ cancelDeclare(row) {
+ this.declareDialogVisible = true
+ this.insOrderRow = row
+ },
+ // 鎻愪氦鎾ら攢鎶ユ鐢宠
+ submitDeclare() {
+ revokeInspectionReport({ id: this.insOrderRow.id }).then(res => {
+ if (res.code === 200) {
+ this.declareDialogVisible = false
+ this.refreshTable()
+ this.$message.success("鎾ら攢鎶ユ鎴愬姛")
+ }
+ }).catch(err => {
+ console.log(err)
+ })
+ },
+ // 鎵撳紑鎾ら攢涓嬪崟鐨勫脊妗�
+ cancelOrder(row) {
+ if (row.enterOrderId && row.quarterOrderId) {
+ this.quashDialogVisible = true
+ } else if (row.enterOrderId && !row.quarterOrderId) {
+ this.$confirm('鏄惁鎾ら攢杩涘巶涓嬪崟?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ repealEnterRawOrder({ enterOrderId: row.enterOrderId }).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎾ら攢鎴愬姛')
+ this.refreshTable('page')
+ }
+ })
+ }).catch(() => { })
+ } else if (!row.enterOrderId && row.quarterOrderId) {
+ this.$confirm('鏄惁鎾ら攢瀛e害涓嬪崟?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎾ら攢鎴愬姛')
+ this.refreshTable('page')
+ }
+ })
+ }).catch(() => { })
+ }
+ this.insOrderRow = row
+ },
+ cancelQuashOrder(type) {
+ if (type === 'enterOrderId') {
+ this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ repealEnterRawOrder({ enterOrderId: this.insOrderRow.enterOrderId }).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎾ら攢鎴愬姛')
+ this.refreshTable('page')
+ }
+ })
+ }).catch(() => { })
+ } else {
+ this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ repealQuarterRawOrder({ quarterOrderId: this.insOrderRow.quarterOrderId }).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎾ら攢鎴愬姛')
+ this.refreshTable()
+ }
+ })
+ }).catch(() => { })
+ }
+ },
+ // 鏁版嵁鏌ョ湅
+ handleDataLook(row) {
+ this.dataLookInfo = row
+ this.dataDialogVisible = true;
+ },
+ // 鍏抽棴鏁版嵁鏌ョ湅寮规
+ closeDataLook() {
+ this.dataDialogVisible = false
+ },
+ // 闄勪欢鏌ョ湅
+ handleFileLook(row) {
+ this.filesDialogVisible = true
+ this.filesLookInfo = row
+ },
+ // 鍏抽棴闄勪欢鏌ョ湅寮规
+ closeFilesLook() {
+ this.filesDialogVisible = false
+ },
+ // 鎶ュ憡涓嬭浇
+ download(row) {
+ this.downFileDialogVisible = true
+ this.downLoadInfo = row
+ },
+ // 鍏抽棴鎶ュ憡涓嬭浇寮规
+ closeDownFileDialog() {
+ this.downFileDialogVisible = false
+ },
+ // 鏌ョ湅浜т笟閾句俊鎭�
+ openInfoDialog(row) {
+ this.showInfoDialog = true
+ this.$nextTick(() => {
+ this.$refs.showInfoDialog.getInfo(row.id)
+ })
+ },
+ // 淇敼濮旀墭缂栧彿
+ changeEntrustCode(row) {
+ this.entrustCodeVisible = true
+ this.entrustCodeInfo = { ...row }
+ },
+ // 瀵煎嚭
+ handleOut() {
+ this.outLoading = true
+ let params = {}
+ if (this.multipleSelection.length > 0) {
+ params.ids = this.multipleSelection.map(item => item.id).join(',');
+ } else {
+ params = {...this.entity}
+ }
+ params.orderType = "02wg";
+ rawAllExport(params).then(res => {
+ this.outLoading = false
+ const blob = new Blob([res], { type: 'application/octet-stream' });
+ this.$download.saveAs(blob, '澶栬喘鎴愬搧妫�娴嬩俊鎭鍑�.xlsx');
+ })
+ },
+ // 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅
+ submitCode() {
+ this.submitCodeLoading = true
+ try {
+ updateEntrustCode({
+ id: this.entrustCodeInfo.id,
+ entrustCode: this.entrustCodeInfo.entrustCode,
+ }).then(res => {
+ if (res.code === 200) {
+ this.entrustCodeVisible = false
+ this.$message.success('淇敼鎴愬姛')
+ }
+ this.refreshTable()
+ this.submitCodeLoading = false
+ })
+ } catch (e) {
+ this.submitCodeLoading = false
+ }
+ },
+ // 鍒囨崲涓嬪崟tab琛ㄦ牸
+ handleTab(m) {
+ this.tabIndex = m;
+ this.multipleSelection = []
+ this.refreshTable()
+ },
+ // 琛ㄦ牸閫夋嫨鏂规硶
+ selectMethod(val) {
+ this.multipleSelection = val
+ },
+ changeRowClass({ row, rowIndex }) {
+ if (row.isFirst == 1) {
+ return 'highlight-danger-row-border'
+ }
+ return ''
+ },
+ },
+}
+</script>
+
+<style scoped>
+.table-tab {
+ display: flex;
+ justify-content: space-between;
+}
+
+.tab {
+ list-style-type: none;
+ display: flex;
+ margin-bottom: 12px;
+ margin-top: 0;
+ padding-left: 0;
+}
+
+.tab li {
+ line-height: 24px;
+ padding: 6px 14px;
+ font-size: 14px;
+ color: #333333;
+ border: 1px solid #EEEEEE;
+ cursor: pointer;
+}
+
+.tab li:nth-child(1) {
+ border-radius: 8px 0 0 8px;
+}
+
+.tab li:nth-child(4) {
+ border-radius: 0 8px 8px 0;
+}
+
+.tab li.active {
+ border-color: #3A7BFA;
+ color: #3A7BFA;
+}
+</style>
diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index 90eb98b..91eb5b9 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -602,6 +602,7 @@
import limsTable from "@/components/Table/lims-table.vue";
import {selectCustomPageList} from "@/api/system/customer";
import {mapGetters} from "vuex";
+import { bigEval } from "@/utils/bigEval";
import {addQuarter, updateQuarterOnOrder} from "@/api/business/finishedProductSampling";
export default {
@@ -860,6 +861,37 @@
this.getInfo();
},
methods: {
+ /**
+ * 鑾峰彇灏忔暟鐨勬渶澶т綅鏁�
+ * @param number 鍨嬪彿鍙傛暟
+ * @param ask 瑕佹眰鍊�
+ * @param calcNum 璁$畻鍊�
+ */
+ getDecimalPlaces(number, ask, calcNum) {
+ console.log("璁$畻灏忔暟鐐�-->", number, ask, calcNum);
+ let count1 = 0;
+ let count2 = 0;
+ const reg = /(\d+\.)(\d+)/g;
+ let matches = [];
+ if (ask) {
+ matches = ask.match(reg);
+ }
+ if (
+ matches &&
+ matches.length > 0 &&
+ matches[0].toString().indexOf(".") > -1
+ ) {
+ count1 = matches[0].toString().split(".")[1].length;
+ }
+ if (number.toString().indexOf(".") > -1) {
+ count2 = number.toString().split(".")[1].length;
+ }
+ if (calcNum.toString().indexOf(".") > -1) {
+ const pointLength2 = calcNum.toString().split(".")[1].length;
+ count2 = count2 > pointLength2 ? count2 : pointLength2;
+ }
+ return count1 > count2 ? count1 : count2;
+ },
getInfo() {
this.selectStandardTreeList()
this.getAuthorizedPerson();
@@ -1045,7 +1077,13 @@
let index = code.findIndex(b => m.includes(b))
if (index > -1) {
let arr = m.split(code[index]).filter(b => !!b)
- let num = eval(this.replaceAll(arr[0], symbolItem, value))
+ let calcNum = this.$Big(
+ bigEval(this.replaceAll(arr[0], symbolItem, value))
+ );
+ let num = calcNum.toFixed(
+ this.getDecimalPlaces(value, ask, calcNum)
+ );
+ // let num = eval(this.replaceAll(arr[0], symbolItem, value))
m = code[index] + '' + num
arr1.push(m)
}
@@ -1074,7 +1112,13 @@
let index = code.findIndex(b => ask.includes(b))
if (index > -1) {
let arr = ask.split(code[index]).filter(b => !!b)
- let num = eval(this.replaceAll(arr[0], symbolItem, value))
+ let calcNum = this.$Big(
+ bigEval(this.replaceAll(arr[0], symbolItem, value))
+ );
+ let num = calcNum.toFixed(
+ this.getDecimalPlaces(value, ask, calcNum)
+ );
+ // let num = eval(this.replaceAll(arr[0], symbolItem, value))
return code[index] + '' + num
}
}
@@ -1306,7 +1350,7 @@
})
}else{
// 甯歌鎻愪氦
- addInsOrder({insOrder: this.addObj, sampleList: sampleList}).then(res => {
+ addInsOrder({insOrder: {...this.addObj,typeSource:-1}, sampleList: sampleList}).then(res => {
this.saveLoad = false
this.$message.success('宸叉彁浜�')
this.bsm3Dia = false;
diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index 934c918..b7dc406 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -47,6 +47,12 @@
@keyup.enter.native="refreshTable">
</el-input>
</el-form-item>
+ <el-form-item label="閿�鍞鍗曞垎绫�" prop="orderType" v-if="(tabIndex === 3 || tabIndex === 4) && more">
+ <el-select v-model="componentData.orderType" clearable size="small"
+ @keyup.enter.native="refreshTable">
+ <el-option v-for="(item,index) in orderTypeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
</el-row>
</el-form>
</div>
@@ -65,7 +71,7 @@
@click="handleDown">瀵煎嚭</el-button>
<el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary"
@click="openIFS">鑾峰彇IFS璁㈠崟</el-button>
- <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">鎶ユ</el-button>
+ <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">鎵归噺鎶ユ</el-button>
<el-button v-if="tabIndex === 0" size="small" type="primary" @click="addDeclare">鏂板鎶ユ淇℃伅</el-button>
</div>
</div>
@@ -83,17 +89,24 @@
</div>
</div>
<!-- 鎵归噺鎶ユ -->
- <el-dialog :visible.sync="declareDialogSVisible" title="纭鎶ユ" width="30%">
- <p style="font-size:16px;color:#333333">鏄惁纭鎶ユ閫夋嫨鐨勬暟鎹紵</p>
+ <el-dialog :visible.sync="declareDialogSVisible" title="鎵归噺鎶ユ" width="30%" :before-close="resetBatchFormData">
+ <el-form ref="declareBatchObj" :inline="true" :model="declareBatchObj" :rules="declareObjBatchRules" label-width="130px"
+ label-position="right">
+ <el-form-item class="declareObj-form-item" label="閿�鍞鍗曞垎绫伙細" prop="orderType">
+ <el-select v-model="declareBatchObj.orderType" prop="orderType" clearable size="small">
+ <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
<span slot="footer" class="dialog-footer">
<el-row>
- <el-button @click="declareDialogSVisible = false">鍙� 娑�</el-button>
+ <el-button @click="resetBatchFormData()">鍙� 娑�</el-button>
<el-button :loading="submitDeclareLoading" type="primary" @click="submitDeclareS">纭� 瀹�</el-button>
</el-row>
</span>
</el-dialog>
<!-- 纭鎶ユ -->
- <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '鏂板鎶ユ淇℃伅' : '鍘熸潗鏂欐姤妫�'"
+ <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '鏂板鎶ユ淇℃伅' : '閿�鍞鍗曟姤妫�'"
:visible.sync="declareDialogVisible" width="800px" @close="resetFormData">
<el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" label-width="130px"
label-position="right">
@@ -139,6 +152,11 @@
<el-select v-model="declareObj.isExpire" prop="isExpire" :disabled="declareType !== 'add'" clearable
size="small">
<el-option :value="1" label="杩囨湡鐗╂枡"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item class="declareObj-form-item" label="閿�鍞鍗曞垎绫伙細" prop="orderType">
+ <el-select v-model="declareObj.orderType" clearable size="small">
+ <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
</el-select>
</el-form-item>
</el-form>
@@ -259,12 +277,15 @@
addIfsInventoryQuantity,
advancedGodown,
concessionRelease, delIfsInventory,
- getIfsByAll,
- getIfsByFinish,
getIfsOrder,
getWarehouseSubmit, inspectionReport, inspectionReportOne, rawAllExport,
revokeInspectionReport,downloadTemplate,confirmSplitOrder
} from '@/api/business/materialInspection'
+import {
+ getIfsByAll,
+ getIfsByFinish,
+} from '@/api/business/ifsOrderInspection'
+import { getDicts } from "@/api/system/dict/data";
import limsTable from "@/components/Table/lims-table.vue";
import {transformExcel} from '@/utils/file'
@@ -280,6 +301,14 @@
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
+ declareBatchObj:{
+ orderType:''
+ },
+ declareObjBatchRules:{
+ orderType: [
+ { required: true, message: '璇烽�夋嫨閿�鍞鍗曞垎绫�', trigger: 'change' }
+ ],
+ },
confirmSplitOrderLoading: false,
detailDataLoading: false,
pushToMes:false,//鏄惁鍚屾鍒癿es
@@ -434,6 +463,7 @@
}
},
{ label: '璁㈠崟鍙�', prop: 'orderNo' },
+ { label: '璁㈠崟鍒嗙被', prop: 'orderTypeName' },
{ label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore' },
{ label: '鎶ユ鏃堕棿', prop: 'declareDate' },
{ label: '鎵瑰彿', prop: 'updateBatchNo' },
@@ -549,6 +579,7 @@
receiverDate: '', // 鎺ユ敹鏃堕棿
buyUnitMeas: '', // 鍗曚綅
isExpire: '', // 鍗曚綅
+ orderType: null, // 閿�鍞鍗曞垎绫�
},
componentData: { // 琛ㄦ牸鏁版嵁
updateBatchNo: null,
@@ -558,6 +589,7 @@
date: null,
entrustCode: '',
inspectStatus: '',
+ orderType: null, // 閿�鍞鍗曞垎绫�
},
declareDialogVisible1: false,
upLoad: false,
@@ -594,6 +626,9 @@
buyUnitMeas: [
{ required: false, message: '璇峰~鍐欏崟浣�', trigger: 'blur' }
],
+ orderType: [
+ { required: true, message: '璇烽�夋嫨閿�鍞鍗曞垎绫�', trigger: 'change' }
+ ],
},
tabList: [
{
@@ -628,13 +663,24 @@
],
outLoading: false,
upLoading: false,
+ orderTypeList: [],
}
},
mounted() {
this.refreshTable()
+ this.getOrderTypeList()
},
// 鏂规硶闆嗗悎
methods: {
+ getOrderTypeList(){
+ getDicts('inspection_type').then(res=>{
+ if(res.code === 200){
+ this.orderTypeList = res.data
+ }
+ }).catch(error=>{
+ console.error(error)
+ })
+ },
resetOrderSplitData(){
this.orderSplitBasicData = []
this.orderSplitDetailData = []
@@ -717,6 +763,9 @@
// 鍒囨崲tab琛ㄦ牸
handleTab(m) {
this.tabIndex = m;
+ if([0,1].includes(this.tabIndex)){
+ this.componentData.orderType = null
+ }
this.refreshTable()
},
// 鏌ヨ鍥炶皟
@@ -887,21 +936,28 @@
},
// 鎻愪氦鎵归噺鎶ユ
submitDeclareS() {
- let ids = []
- this.multipleSelection.forEach(item => {
- ids.push(item.id)
- })
- this.declareDialogSVisible = true
- inspectionReport({ ids: ids }).then(res => {
- if (res.code === 200) {
- this.declareDialogSVisible = false
- this.$message.success('鎶ユ鎴愬姛')
- this.refreshTable()
+ this.$refs.declareBatchObj.validate(valid=>{
+ if(valid){
+ let ids = []
+ this.multipleSelection.forEach(item => {
+ ids.push(item.id)
+ })
+ this.declareDialogSVisible = true
+ inspectionReport({
+ ids: ids,
+ orderType: this.declareBatchObj.orderType
+ }).then(res => {
+ if (res.code === 200) {
+ this.declareDialogSVisible = false
+ this.$message.success('鎶ユ鎴愬姛')
+ this.refreshTable()
+ }
+ this.submitDeclareLoading = false
+ }).catch(err => {
+ this.submitDeclareLoading = false
+ console.log(err)
+ })
}
- this.submitDeclareLoading = false
- }).catch(err => {
- this.submitDeclareLoading = false
- console.log(err)
})
},
// 鎵撳紑鎶ユ纭寮规
@@ -947,7 +1003,8 @@
if (valid) {
inspectionReportOne({
id: this.declareObj.id,
- updateBatchNo: this.declareObj.updateBatchNo
+ updateBatchNo: this.declareObj.updateBatchNo,
+ orderType: this.declareObj.orderType
}).then(res => {
if (res.code === 200) {
this.declareDialogVisible = false
@@ -965,8 +1022,12 @@
}
},
resetFormData() {
- this.$refs['declareObj'].resetFields();
+ this.$refs.declareObj.resetFields();
this.declareDialogVisible = false
+ },
+ resetBatchFormData() {
+ this.$refs.declareBatchObj.resetFields();
+ this.declareDialogSVisible = false
},
// 鎵撳紑鍒犻櫎寮规
deleteMaterial(row) {
@@ -1027,6 +1088,7 @@
receiverDate: '', // 鎺ユ敹鏃堕棿
buyUnitMeas: '', // 鍗曚綅
isExpire: '', // 鍗曚綅
+ orderType: null, // 閿�鍞鍗曞垎绫�
}
}
},
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index 785e9f1..43fd45e 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -254,7 +254,8 @@
verifyUser: null, // 瀹℃牳浜哄憳
loadingVerify: false, // 瀹℃牳浜哄憳
typeSourceList: [
- { label: '鎴愬搧涓嬪崟', value: 0 },
+ { label: '濮旀墭涓嬪崟', value: -1 },
+ { label: '澶栬喘涓嬪崟', value: 0 },
{ label: '鍘熸潗鏂欎笅鍗�', value: 1 },
],
orderTypeList: [
@@ -353,9 +354,11 @@
dataType: "tag",
formatData: (params) => {
if (params == 0) {
- return "鎴愬搧涓嬪崟";
- } else {
+ return "澶栬喘涓嬪崟";
+ } else if(params==1) {
return "鍘熸潗鏂欎笅鍗�";
+ }else{
+ return "濮旀墭涓嬪崟";
}
},
},
--
Gitblit v1.9.3