From 1aa5952ed531348d22ac907aefdfb035bd160206 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 20 二月 2025 16:33:37 +0800 Subject: [PATCH] 检验任务完成80% --- src/api/performance/manHour.js | 2 vue.config.js | 2 src/views/business/unpass/components/addUnPass.vue | 124 ++++ src/views/business/unpass/components/unPassDialog.vue | 275 +++++++++ src/views/business/inspectionTask/inspection.vue | 205 +++---- src/views/business/inspectionTask/index.vue | 88 +- src/views/business/materialOrder/index.vue | 495 ++++++++--------- src/api/standard/standardLibrary.js | 2 src/api/cnas/process/method/standardMethod.js | 1 src/api/business/inspectionTask.js | 1 src/api/business/unpass.js | 75 ++ src/api/standard/model.js | 2 src/api/performance/class.js | 2 src/views/business/unpass/components/PurchaseVerification.vue | 376 +++++++++++++ 14 files changed, 1,240 insertions(+), 410 deletions(-) diff --git a/src/api/business/inspectionTask.js b/src/api/business/inspectionTask.js index c3dab1e..b26a992 100644 --- a/src/api/business/inspectionTask.js +++ b/src/api/business/inspectionTask.js @@ -1,3 +1,4 @@ +// 妫�楠屼换鍔$浉鍏虫帴鍙� import request from "@/utils/request"; // 閫氳繃妫�楠屽崟鏌ヨ妫�楠屾暟鎹紙鏁版嵁鏌ョ湅锛� diff --git a/src/api/business/unpass.js b/src/api/business/unpass.js new file mode 100644 index 0000000..7803d75 --- /dev/null +++ b/src/api/business/unpass.js @@ -0,0 +1,75 @@ +// 涓嶅悎鏍肩鐞嗙浉鍏虫帴鍙� + +import request from "@/utils/request"; + +//鏌ヨ杩涜揣楠岃瘉淇℃伅 +export function getFactoryVerify(query) { + return request({ + url: "/insOrderPlan/getFactoryVerify", + method: "get", + params: query, + }); +} + +// 淇濆瓨杩涜揣鍘熷璁板綍 +export function addFactoryVerify(data) { + return request({ + url: "/insOrderPlan/addFactoryVerify", + method: "post", + data: data, + }); +} + +//鏌ヨ涓嶅悎鏍肩殑妫�楠岄」 +export function getInsProductUnqualified(query) { + return request({ + url: "/insOrderPlan/getInsProductUnqualified", + method: "get", + params: query, + }); +} + +// 鎻愪氦闇�瑕佸娴嬬殑妫�楠岄」 +export function addUnqualifiedRetest(data) { + return request({ + url: "/insOrderPlan/addUnqualifiedRetest", + method: "post", + data: data, + }); +} + +// 鏌ヨ妫�楠屼笅鍗曞唴瀹硅鎯� +export function getInsOrder(query) { + return request({ + url: "/insOrder/getInsOrder", + method: "get", + params: query, + }); +} + +// 鏌ョ湅OA璇︽儏 +export function getUnqualifiedHandler(query) { + return request({ + url: "/unqualifiedHandler/getUnqualifiedHandler", + method: "get", + params: query, + }); +} + +// 涓嬭浇OA闄勪欢 +export function downFile(query) { + return request({ + url: "/unqualifiedHandler/downFile", + method: "get", + params: query, + }); +} + +// 鎻愪氦涓嶅悎鏍煎鐞� +export function addUnqualifiedHandler(data) { + return request({ + url: "/unqualifiedHandler/addUnqualifiedHandler", + method: "post", + data: data, + }); +} diff --git a/src/api/cnas/process/method/standardMethod.js b/src/api/cnas/process/method/standardMethod.js index 737e740..0d64b8b 100644 --- a/src/api/cnas/process/method/standardMethod.js +++ b/src/api/cnas/process/method/standardMethod.js @@ -1,3 +1,4 @@ +// 瀹為獙瀹ょ殑妫�娴嬭兘鍔涙。妗堢浉鍏虫帴鍙� import request from "@/utils/request"; //鑾峰彇鏍囧噯鏂规硶鍒楄〃 diff --git a/src/api/performance/class.js b/src/api/performance/class.js index b61e395..8555eb1 100644 --- a/src/api/performance/class.js +++ b/src/api/performance/class.js @@ -1,3 +1,5 @@ +// 鐝鐩稿叧鎺ュ彛 + import request from "@/utils/request"; // 缁╂晥绠$悊-鐝-鍒嗛〉鏌ヨ diff --git a/src/api/performance/manHour.js b/src/api/performance/manHour.js index 4ba20ae..2c9d05c 100644 --- a/src/api/performance/manHour.js +++ b/src/api/performance/manHour.js @@ -1,3 +1,5 @@ +// 宸ユ椂绠$悊鐩稿叧鎺ュ彛 + import request from "@/utils/request"; // 鏌ヨ宸ユ椂姹囨�� diff --git a/src/api/standard/model.js b/src/api/standard/model.js index 5bbe405..cf85e09 100644 --- a/src/api/standard/model.js +++ b/src/api/standard/model.js @@ -1,3 +1,5 @@ +// 鍘熷璁板綍妯℃澘鐩稿叧鎺ュ彛 + import request from "@/utils/request"; // 鏌ヨ瀹㈡埛鍒楄〃 diff --git a/src/api/standard/standardLibrary.js b/src/api/standard/standardLibrary.js index 184ee68..ad374ed 100644 --- a/src/api/standard/standardLibrary.js +++ b/src/api/standard/standardLibrary.js @@ -1,3 +1,5 @@ +// 鏍囧噯搴撶浉鍏虫帴鍙� + import request from "@/utils/request"; // 鏍囧噯搴撴爲鎺掑簭 diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue index 6dccaa2..c9639da 100644 --- a/src/views/business/inspectionTask/index.vue +++ b/src/views/business/inspectionTask/index.vue @@ -89,7 +89,7 @@ </style> <template> <div class="ins-order-plan-main"> - <div v-show="activeFace == 0" style="height: 100%"> + <div style="height: 100%"> <div class="search"> <div class="search_thing"> <div class="search_label">濮旀墭缂栧彿锛�</div> @@ -178,31 +178,6 @@ <el-button :loading="loading" type="primary" @click="confirmConnect">纭� 瀹�</el-button> </span> </el-dialog> - <div v-if="activeFace > 0 && isCopper == null" style="width: 100%; height: 100%"> - <!-- <Add :active="activeFace" :currentId="currentId" :examine="examine" /> --> - </div> - <div v-if="activeFace > 0 && isCopper == 0" style="width: 100%; height: 100%"> - <!-- <CustomsInspection - :active="activeFace" - :currentId="currentId" - :customsInspection="customsInspection" - :isReport="isReport" - /> --> - </div> - <div v-if="activeFace > 0 && isCopper == 1" style="width: 100%; height: 100%"> - <!-- <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder> --> - </div> - <!--<Inspection - v-if="state > 0" - :key="InspectionKey" - :inspectorList="inspectorList" - :orderId="orderId" - :sonLaboratory="sonLaboratory" - :state="state" - :typeSource="typeSource" - @goback="goback" - @refreshView="refreshView" - />--> <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%"> <div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto"> <lims-table :tableData="lookTableData" :column="lookColumn" :page="lookPage" :tableLoading="lookTableLoading" @@ -261,13 +236,7 @@ </template> <script> -import ValueTable from "@/components/Table/value-table.vue"; -// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue"; -// import CustomsInspection from "../do/b1-material-ins-order/customs-inspection.vue"; import { getYearAndMonthAndDays } from "@/utils/date"; -// import Add from "../do/b1-ins-order/add.vue"; -// import ShowInfo from "../do/b1-material-ins-order/showInfo.vue"; -// import CopperOrder from "../do/b1-material-ins-order/copper-order.vue"; import EditInspectionItem from "./components/EditInspectionItem.vue"; import limsTable from "@/components/Table/lims-table.vue"; import { @@ -286,13 +255,7 @@ export default { components: { EditInspectionItem, - // CopperOrder, - // ShowInfo, - ValueTable, limsTable, - // Inspection, - // Add, - // CustomsInspection, }, dicts: ["urgency_level", "inspection_task_state"], computed: { @@ -384,14 +347,15 @@ { label: "濮旀墭缂栧彿", prop: "entrustCode", - width: "140px", + width: "160px", dataType: "link", linkMethod: "selectAllByOne", }, - { label: "鏍峰搧鍚嶇О", prop: "sample", width: "140px" }, + { label: "鏍峰搧鍚嶇О", prop: "sample", width: "160px" }, { label: "涓嬪崟绫诲埆", prop: "typeSource", + width: "100px", dataType: "tag", formatData: (params) => { if (params == 0) { @@ -413,6 +377,7 @@ { label: "妫�楠岀被鍨�", prop: "orderType", + width: "100px", dataType: "tag", formatData: (params) => { return this.orderTypeList.find((m) => m.value == params).label; @@ -794,6 +759,39 @@ this.examine = 1; this.isReport = 0; this.currentId = parseInt(row.id); + switch (row.isCopper) { + case 0: + // 鍘熸潗鏂� + this.$router.push({ + path: "/materialOrder/customsInspection", query: { + customsInspection: row, + active: this.activeFace, + currentId: this.currentId, + isReport: this.isReport + } + }); + break; + case null: + // 鎴愬搧 + this.$router.push({ + path: "/productOrder/add", query: { + examine: this.examine, + active: this.activeFace, + currentId: this.currentId + } + }); + break; + case 1: + // 閾滄潗 + this.$router.push({ + path: "/materialOrder/copperOrder", query: { + active: this.activeFace, + currentId: this.currentId + } + }); + break; + } + }, playOrder(num) { this.activeFace = num; @@ -843,6 +841,16 @@ this.state = 3; this.typeSource = row.typeSource; this.orderId = row.id; + this.$router.push({ + path: "/inspectionTask/inspection", + query: { + inspectorList: this.inspectorList, + sonLaboratory: this.sonLaboratory, + state: this.state, + typeSource: this.typeSource, + orderId: this.orderId, + }, + }); }, handleConnect(row) { this.orderId = row.id; diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue index 6ae2972..0ed826a 100644 --- a/src/views/business/inspectionTask/inspection.vue +++ b/src/views/business/inspectionTask/inspection.vue @@ -1,5 +1,5 @@ <template> - <div v-loading="loading" class="inspection"> + <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-form :inline="true" :model="otherForm" class="form-inline" label-width="50px" @@ -17,7 +17,7 @@ </el-form> </el-col> <el-col :span="16" style="text-align: right"> - <!-- <el-button size="small" type="primary" @click="refreshView">鍒锋柊</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" @click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button> @@ -31,7 +31,7 @@ <el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">閫氳繃</el-button> <el-button v-if="state == 2" size="medium" @click="upInsReview(0)">涓嶉�氳繃</el-button> <el-button type="primary" size="small" @click="exportTable('myTable')">涓嬭浇鍘熷璁板綍</el-button> - <el-button size="small" @click="$emit('goback')">杩斿洖</el-button> + <el-button size="small" @click="goback">杩斿洖</el-button> </el-col> </el-row> <div class="search"> @@ -78,7 +78,6 @@ <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> --> </el-form-item> </el-form> - <el-divider></el-divider> </div> <div class="center"> <div class="search" style=" @@ -292,7 +291,7 @@ state == 1 "><span :style="`font-family:${n.v.ff} !important;`">{{ toFixed(n.v.v, n.v.ct) - }}</span></template> + }}</span></template> <template v-else-if=" n.v.ps != undefined && n.v.ps.value === '鏈�缁堝��' && @@ -505,44 +504,25 @@ <el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">纭� 瀹�</el-button> </span> </el-dialog> - <!-- <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog" - @resetAddUnPass="resetAddUnPass"></add-un-pass> --> - <!-- <UnPassDialog - v-if="unPassDialog" - ref="unPassDialog" - :orderId="orderId" - :unPassDialog="unPassDialog" - @resetForm="resetForm" - ></UnPassDialog> --> - <!-- <InspectionWord - v-if="unPassCheck" - :inspectorList="inspectorList" - :orderId="orderId" - :rawMaterialTag="rawMaterialTag" - :sonLaboratory="sonLaboratory" - :state="state" - :typeSource="typeSource" - :unPassCheck="unPassCheck" - @closeUnPassCheckDialog="closeUnPassCheckDialog" - @refreshView="refreshView" - /> --> - <!-- <purchase-verification - v-if="purchaseDialog" - ref="purchaseDialog" - :orderId="orderId" - :purchaseDialog="purchaseDialog" - @resetPurchaseDialog="resetPurchaseDialog" - ></purchase-verification> --> + <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog" + @resetAddUnPass="resetAddUnPass"></add-un-pass> + <UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog" + @resetForm="resetForm"></UnPassDialog> + <!-- <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId" + :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource" + :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" /> --> + <purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId" + :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification> </div> </template> <script> import excelFunction from "@/utils/excelFountion"; import limsTable from "@/components/Table/lims-table.vue"; -// import UnPassDialog from "../b1-unpass-manage/unPassDialog.vue"; -// import AddUnPass from "../b1-unpass-manage/addUnPass.vue"; -// import InspectionWord from "./InspectionWord.vue"; -// import PurchaseVerification from "../b1-unpass-manage/PurchaseVerification.vue"; +import UnPassDialog from "../unpass/components/addUnPass.vue"; +import AddUnPass from "../unpass/components/addUnPass.vue"; +// import InspectionWord from "./components/InspectionWord.vue"; +import PurchaseVerification from "../unpass/components/PurchaseVerification.vue"; import { doInsOrder, getCableTag, @@ -567,12 +547,11 @@ import html2canvas from "html2canvas"; import { mapGetters } from "vuex"; export default { - // props: ["sonLaboratory", "orderId", "state", "inspectorList", "typeSource"], components: { - // PurchaseVerification, - // AddUnPass, + PurchaseVerification, + AddUnPass, limsTable, - // UnPassDialog, + UnPassDialog, // InspectionWord, }, data() { @@ -821,65 +800,7 @@ watch: { // 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭� id(val) { - this.loading = true; - doInsOrder({ - id: val, - laboratory: this.sonLaboratory, - }).then(async (res) => { - this.insOrder = res.data.insOrder; - this.supplierDensity = res.data.supplierDensity; - this.getList() - this.urgentList.forEach((m) => { - if (m.value == this.insOrder.type) { - this.insOrder.typeName = m.label; - } - }); - this.loading = false; - if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) { - this.$emit("goback"); - return this.$message.error("璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�"); - } - // 璧嬪�煎綋鍓嶆牱鍝佸垪琛� - this.sampleProduct = res.data.sampleProduct; - this.currentSample = this.HaveJson(this.sampleProduct[0]); - let insProduct = this.HaveJson(this.currentSample.insProduct); - // 娓╁害銆佹箍搴﹁祴鍊� - this.otherForm = { - temperature: this.insOrder.temperature - ? this.insOrder.temperature - : null, - humidity: this.insOrder.humidity ? this.insOrder.humidity : null, - }; - if (this.typeSource == "1") { - this.getRawMaterialTag(this.currentSample.id); // 鍘熸潗鏂欑殑妫�楠屼换鍔℃煡璇㈡壒鏁� - this.rawMaterialTag = "1"; - } - this.getEquipOptions(1); - // 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」 - let list = await this.getCurrentProduct(this.currentSample.id, 0); - this.currentSample.insProduct = this.HaveJson(list); - // 鍒濆鍖栦紶閫掑埌鍚庣鐨勫弬鏁� - this.param = {}; - this.changeType = 0; - this.currentSample.insProduct.forEach((a) => { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null, - }; - }); - if (this.currentSample.index == undefined) - this.currentSample["index"] = 1; - let bushing = this.currentSample.bushing; - this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅 - - this.currentKey = 1; - this.getCableTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎澶氭妫�楠岀殑鐢电紗閰嶇疆 - this.getRepetitionTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎閲嶅妫�楠岄」 - }); + this.refreshView() }, // 鐩戝惉褰撳墠妯℃澘鍙樺寲 currentTable(val1, val0) { @@ -1009,9 +930,67 @@ this.checkUser = ""; }, // 鍒锋柊椤甸潰 - // refreshView() { - // this.$emit("refreshView"); - // }, + refreshView() { + this.loading = true; + doInsOrder({ + id: this.id, + laboratory: this.sonLaboratory, + }).then(async (res) => { + this.insOrder = res.data.insOrder; + this.supplierDensity = res.data.supplierDensity; + this.getList() + this.urgentList.forEach((m) => { + if (m.value == this.insOrder.type) { + this.insOrder.typeName = m.label; + } + }); + this.loading = false; + if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) { + this.goback(); + return this.$message.error("璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�"); + } + // 璧嬪�煎綋鍓嶆牱鍝佸垪琛� + this.sampleProduct = res.data.sampleProduct; + this.currentSample = this.HaveJson(this.sampleProduct[0]); + let insProduct = this.HaveJson(this.currentSample.insProduct); + // 娓╁害銆佹箍搴﹁祴鍊� + this.otherForm = { + temperature: this.insOrder.temperature + ? this.insOrder.temperature + : null, + humidity: this.insOrder.humidity ? this.insOrder.humidity : null, + }; + if (this.typeSource == "1") { + this.getRawMaterialTag(this.currentSample.id); // 鍘熸潗鏂欑殑妫�楠屼换鍔℃煡璇㈡壒鏁� + this.rawMaterialTag = "1"; + } + this.getEquipOptions(1); + // 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」 + let list = await this.getCurrentProduct(this.currentSample.id, 0); + this.currentSample.insProduct = this.HaveJson(list); + // 鍒濆鍖栦紶閫掑埌鍚庣鐨勫弬鏁� + this.param = {}; + this.changeType = 0; + this.currentSample.insProduct.forEach((a) => { + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null, + }; + }); + if (this.currentSample.index == undefined) + this.currentSample["index"] = 1; + let bushing = this.currentSample.bushing; + this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅 + + this.currentKey = 1; + this.getCableTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎澶氭妫�楠岀殑鐢电紗閰嶇疆 + this.getRepetitionTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎閲嶅妫�楠岄」 + }); + }, closeUnPassCheckDialog() { this.unPassCheck = false; }, @@ -2565,7 +2544,7 @@ }).then((res) => { if (res.code === 200) { this.$message.success("鎿嶄綔鎴愬姛"); - this.$emit("goback"); + this.goback(); this.addCheck = false; } this.reviewLoading = false; @@ -2590,7 +2569,7 @@ }).then((res) => { if (res.code === 200) { this.$message.success("鎿嶄綔鎴愬姛"); - this.$emit("goback"); + this.goback(); } this.reviewLoading = false; }) @@ -2631,7 +2610,7 @@ }).then((res) => { if (res.code === 200) { this.$message.success("鎿嶄綔鎴愬姛"); - this.$emit("goback"); + this.goback(); this.submitLoading = false; this.addVerifyDia = false; } @@ -2683,7 +2662,7 @@ if (res.code === 200) { this.$message.success("鎿嶄綔鎴愬姛"); this.addVerifyDia = false; - this.$emit("goback"); + this.goback(); } this.submitLoading = false; }) @@ -2926,14 +2905,13 @@ return v; } }, + goback() { + this.$tab.closeOpenPage({ path: "/business/inspectionTask" }); + } }, }; </script> <style scoped> ->>>.el-divider { - margin: 0 !important; -} - .custom-table .el-table__header-wrapper th { background-color: #87ceeb; /* 鍙甯︽湁my-custom-table绫荤殑琛ㄦ牸鐢熸晥 */ @@ -2969,6 +2947,7 @@ width: 100%; background-color: #fff; border-radius: 3px; + margin-bottom: 10px; } .search .form-inline { @@ -3136,9 +3115,9 @@ } </style> <style> -.inspection .el-form-item__label { +/* .inspection .el-form-item__label { color: #000; -} +} */ .inspection .el-drawer__header::before { content: ""; diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue index e0b3b07..45c4936 100644 --- a/src/views/business/materialOrder/index.vue +++ b/src/views/business/materialOrder/index.vue @@ -3,60 +3,50 @@ <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="refreshTable"> - </el-input> - </el-form-item><el-form-item label="濮旀墭缂栧彿" prop="entrustCode"> - <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> - </el-input> - </el-form-item><el-form-item label="闆朵欢鍙�" prop="partNo"> - <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> - </el-input> - </el-form-item><el-form-item label="闆朵欢鎻忚堪" prop="partDesc"> - <el-input v-model="entity.partDesc" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> - </el-input> - </el-form-item> + <el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> + </el-input> + </el-form-item><el-form-item label="濮旀墭缂栧彿" prop="entrustCode"> + <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> + </el-input> + </el-form-item><el-form-item label="闆朵欢鍙�" prop="partNo"> + <el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> + </el-input> + </el-form-item><el-form-item label="闆朵欢鎻忚堪" prop="partDesc"> + <el-input v-model="entity.partDesc" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> + </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 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="refreshTable()">鏌ヨ</el-button> <el-button size="mini" @click="refresh()">閲嶇疆</el-button> </el-form-item> - <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more"> - <el-input v-model="entity.supplierName" clearable placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable"> + <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName" + v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more"> + <el-input v-model="entity.supplierName" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"> </el-input> </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="refreshTable"> + <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="refreshTable"> </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="refreshTable()"> + <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="refreshTable()"> <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="閫夋嫨鏃ユ湡" - range-separator="鑷�" - size="small" - start-placeholder="寮�濮嬫棩鏈�" - type="daterange" - value-format="yyyy-MM-dd"> + <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="daterange" value-format="yyyy-MM-dd"> </el-date-picker> </el-form-item> </el-form> @@ -65,48 +55,45 @@ <div class="table-tab"> <div> <ul class="tab"> - <li v-for="(m,i) in tabList" :key="m.value" :class="{active:m.value===tabIndex}" @click="handleTab(m)">{{m.label}}</li> + <li v-for="(m, i) in tabList" :key="m.value" :class="{ active: m.value === tabIndex }" @click="handleTab(m)"> + {{ m.label }}</li> </ul> </div> <div> - <el-button v-show="tabIndex === 3 || tabIndex === 2" :loading="outLoading" size="small" type="primary" @click="handleOut">瀵煎嚭</el-button> + <el-button v-show="tabIndex === 3 || tabIndex === 2" :loading="outLoading" size="small" type="primary" + @click="handleOut">瀵煎嚭</el-button> <el-button v-if="tabIndex === 0" size="small" type="primary" @click="copper">閾滄潗鏂欎笅鍗�</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" :height="'calc(100vh - 290px)'" key="tableData" - :page="page" :tableLoading="tableLoading"></lims-table> + <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination" + :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" :handleSelectionChange="selectMethod" - @pagination="pagination1" :height="'calc(100vh - 290px)'" key="tableData1" - :page="page1" :tableLoading="tableLoading1"></lims-table> + <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true" + :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" :handleSelectionChange="selectMethod" - @pagination="pagination2" :height="'calc(100vh - 290px)'" key="tableData2" - :page="page2" :tableLoading="tableLoading2"></lims-table> + <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true" + :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" :handleSelectionChange="selectMethod" - @pagination="pagination3" :height="'calc(100vh - 290px)'" key="tableData3" - :page="page3" :tableLoading="tableLoading3"></lims-table> + <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true" + :handleSelectionChange="selectMethod" @pagination="pagination3" :height="'calc(100vh - 290px)'" + key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table> </div> <!--瀛e害妫�楠�--> <div class="table"> - <lims-table :tableData="tableData4" :column="column4" v-if="tabIndex === 4" - :isSelection="true" :handleSelectionChange="selectMethod" - @pagination="pagination4" :height="'calc(100vh - 290px)'" key="tableData4" - :page="page4" :tableLoading="tableLoading4"></lims-table> + <lims-table :tableData="tableData4" :column="column4" v-if="tabIndex === 4" :isSelection="true" + :handleSelectionChange="selectMethod" @pagination="pagination4" :height="'calc(100vh - 290px)'" + key="tableData4" :page="page4" :tableLoading="tableLoading4"></lims-table> </div> </div> </div> @@ -114,9 +101,8 @@ <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" - @keyup.enter.native="refreshTable"></el-input> + <el-input v-model="exemptionInfo.partDetail" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable"></el-input> </div> <span slot="footer" class="dialog-footer"> <el-row> @@ -128,13 +114,14 @@ <!-- 鎾ら攢鎶ユ --> <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> + 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-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%"> @@ -155,42 +142,37 @@ </span> </el-dialog> <!--鏍囩鎵撳嵃寮规--> - <print-dialog v-if="printDialog" ref="printDialog" - :printDialog="printDialog" - @closePrintDialog="closePrintDialog"></print-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> + <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> + <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> + :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> + <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> + <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"/>--> + <!-- <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"--> + <!-- :sonLaboratory="'鍘熸潗鏂�'" :state="state"--> + <!-- :typeSource="typeSource"--> + <!-- @goback="goback" @refreshView="refreshView"/>--> </div> </template> @@ -213,22 +195,22 @@ revokeInspectionReport, updateEntrustCode } from "@/api/business/rawMaterialOrder"; -import {getWarehouseSubmit} from "@/api/business/materialInspection"; +import { getWarehouseSubmit } from "@/api/business/materialInspection"; // import Inspection from "../do/b1-inspect-order-plan/Inspection.vue"; export default { name: "b1-material-inspection-order", // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� - components: {limsTable,DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog}, + components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog }, data() { // 杩欓噷瀛樻斁鏁版嵁 return { tableData: [], tableLoading: false, column: [ - {label: '鎵瑰彿', prop: 'updateBatchNo'}, - {label: '闆朵欢鍙�', prop: 'partNo'}, - {label: '闆朵欢鎻忚堪', prop: 'partDesc'}, + { label: '鎵瑰彿', prop: 'updateBatchNo' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, { dataType: 'tag', label: '鐗╂枡绫诲瀷', @@ -248,11 +230,11 @@ } } }, - {label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived'}, - {label: '鍗曚綅', prop: 'buyUnitMeas'}, - {label: '璁㈠崟鍙�', prop: 'orderNo'}, - {label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'}, - {label: '鎶ユ鏃堕棿', prop: 'declareDate'}, + { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, + { label: '鍗曚綅', prop: 'buyUnitMeas' }, + { label: '璁㈠崟鍙�', prop: 'orderNo' }, + { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' }, + { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', fixed: 'right', @@ -283,21 +265,21 @@ } ], page: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, tableData1: [], tableLoading1: false, column1: [ - {label: '鎵瑰彿', prop: 'updateBatchNo'}, - {label: '濮旀墭缂栧彿', prop: 'entrustCode'}, - {label: '闆朵欢鍙�', prop: 'partNo'}, - {label: '闆朵欢鎻忚堪', prop: 'partDesc'}, - {label: '鏍峰搧鍚嶇О', prop: 'sampleName'}, - {label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'}, - {label: '妫�楠屼汉', prop: 'userName'}, - {label: '涓嬪彂鏃堕棿', prop: 'sendTime'}, + { label: '鎵瑰彿', prop: 'updateBatchNo' }, + { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, + { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { label: '妫�楠屼汉', prop: 'userName' }, + { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, { dataType: 'tag', label: '鐗╂枡绫诲瀷', @@ -317,11 +299,11 @@ } } }, - {label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived'}, - {label: '鍗曚綅', prop: 'buyUnitMeas'}, - {label: '璁㈠崟鍙�', prop: 'orderNo'}, - {label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'}, - {label: '鎶ユ鏃堕棿', prop: 'declareDate'}, + { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, + { label: '鍗曚綅', prop: 'buyUnitMeas' }, + { label: '璁㈠崟鍙�', prop: 'orderNo' }, + { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' }, + { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', fixed: 'right', @@ -352,27 +334,27 @@ } ], page1: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, tableData2: [], tableLoading2: false, column2: [ - {label: '濮旀墭缂栧彿', prop: 'entrustCode'}, - {label: '妫�楠岀姸鎬�', prop: 'inspectStatus'}, - {label: '璁㈠崟鍙�', prop: 'orderNo'}, - {label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived'}, - {label: '涓嬪彂鏃堕棿', prop: 'sendTime'}, - {label: '鎵瑰彿', prop: 'updateBatchNo'}, - {label: '闆朵欢鍙�', prop: 'partNo'}, - {label: '闆朵欢鎻忚堪', prop: 'partDesc'}, - {label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'}, - {label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc'}, - {label: '鍏嶆', prop: 'isExemption'}, - {label: '鏍峰搧鍚嶇О', prop: 'sampleName'}, - {label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'}, - {label: '妫�楠屼汉', prop: 'userName'}, + { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, + { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '璁㈠崟鍙�', prop: 'orderNo' }, + { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, + { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, + { label: '鎵瑰彿', prop: 'updateBatchNo' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, + { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, + { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, + { label: '鍏嶆', prop: 'isExemption' }, + { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { label: '妫�楠屼汉', prop: 'userName' }, { dataType: 'tag', label: '鐗╂枡绫诲瀷', @@ -392,9 +374,9 @@ } } }, - {label: '鍗曚綅', prop: 'buyUnitMeas'}, - {label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'}, - {label: '鎶ユ鏃堕棿', prop: 'declareDate'}, + { label: '鍗曚綅', prop: 'buyUnitMeas' }, + { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' }, + { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', fixed: 'right', @@ -465,27 +447,27 @@ } ], page2: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, tableData3: [], tableLoading3: false, column3: [ - {label: '濮旀墭缂栧彿', prop: 'entrustCode'}, - {label: '妫�楠岀姸鎬�', prop: 'inspectStatus'}, - {label: '璁㈠崟鍙�', prop: 'orderNo'}, - {label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived'}, - {label: '涓嬪彂鏃堕棿', prop: 'sendTime'}, - {label: '鎵瑰彿', prop: 'updateBatchNo'}, - {label: '闆朵欢鍙�', prop: 'partNo'}, - {label: '闆朵欢鎻忚堪', prop: 'partDesc'}, - {label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'}, - {label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc'}, - {label: '鍏嶆', prop: 'isExemption'}, - {label: '鏍峰搧鍚嶇О', prop: 'sampleName'}, - {label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'}, - {label: '妫�楠屼汉', prop: 'userName'}, + { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, + { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '璁㈠崟鍙�', prop: 'orderNo' }, + { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, + { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, + { label: '鎵瑰彿', prop: 'updateBatchNo' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, + { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, + { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, + { label: '鍏嶆', prop: 'isExemption' }, + { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { label: '妫�楠屼汉', prop: 'userName' }, { dataType: 'tag', label: '鐗╂枡绫诲瀷', @@ -505,9 +487,9 @@ } } }, - {label: '鍗曚綅', prop: 'buyUnitMeas'}, - {label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'}, - {label: '鎶ユ鏃堕棿', prop: 'declareDate'}, + { label: '鍗曚綅', prop: 'buyUnitMeas' }, + { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' }, + { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', fixed: 'right', @@ -531,27 +513,27 @@ } ], page3: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, tableData4: [], tableLoading4: false, column4: [ - {label: '濮旀墭缂栧彿', prop: 'entrustCode'}, - {label: '妫�楠岀姸鎬�', prop: 'inspectStatus'}, - {label: '璁㈠崟鍙�', prop: 'orderNo'}, - {label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived'}, - {label: '涓嬪彂鏃堕棿', prop: 'sendTime'}, - {label: '鎵瑰彿', prop: 'updateBatchNo'}, - {label: '闆朵欢鍙�', prop: 'partNo'}, - {label: '闆朵欢鎻忚堪', prop: 'partDesc'}, - {label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName'}, - {label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc'}, - {label: '鍏嶆', prop: 'isExemption'}, - {label: '鏍峰搧鍚嶇О', prop: 'sampleName'}, - {label: '鏍峰搧鍨嬪彿', prop: 'sampleModel'}, - {label: '妫�楠屼汉', prop: 'userName'}, + { label: '濮旀墭缂栧彿', prop: 'entrustCode' }, + { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' }, + { label: '璁㈠崟鍙�', prop: 'orderNo' }, + { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' }, + { label: '涓嬪彂鏃堕棿', prop: 'sendTime' }, + { label: '鎵瑰彿', prop: 'updateBatchNo' }, + { label: '闆朵欢鍙�', prop: 'partNo' }, + { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, + { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, + { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, + { label: '鍏嶆', prop: 'isExemption' }, + { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, + { label: '妫�楠屼汉', prop: 'userName' }, { dataType: 'tag', label: '鐗╂枡绫诲瀷', @@ -571,9 +553,9 @@ } } }, - {label: '鍗曚綅', prop: 'buyUnitMeas'}, - {label: '鎺ユ敹鏃堕棿', prop: 'receiverDate'}, - {label: '鎶ユ鏃堕棿', prop: 'declareDate'}, + { label: '鍗曚綅', prop: 'buyUnitMeas' }, + { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' }, + { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', fixed: 'right', @@ -614,9 +596,9 @@ } ], page4: { - total:0, - size:10, - current:1 + total: 0, + size: 10, + current: 1 }, entity: { updateBatchNo: null, @@ -652,16 +634,16 @@ value: 3 } ], - more:false, + more: false, tabIndex: 0, - multipleSelection:[], + multipleSelection: [], active: 0, //1锛氫笅鍗曪紝2锛氭煡鐪� orderType: 0, //0锛氬師鏉愭枡涓嬪崟锛�1锛氬搴︽楠屼笅鍗� currentId: null, btnLoading: false, quashDialogVisible: false, // 鎾ら攢涓嬪崟鎻愰啋寮规 declareDialogVisible: false, // 鎾ら攢鎶ユ鎻愰啋寮规 - insOrderRow:{}, + insOrderRow: {}, upLoad: false, filesDialogVisible: false, // 闄勪欢鏌ョ湅寮规 printDialog: false, // 鏍囩鎵撳嵃寮规 @@ -678,11 +660,11 @@ exemptionLoading: false, exemptionInfo: {}, inspectStatusList: [ - {label: '妫�楠屼腑', value: 0}, - {label: '鍚堟牸', value: 1}, - {label: '涓嶅悎鏍�', value: 2}, - {label: '鏈笅鍗�', value: 3}, - {label: '璁╂鏀捐', value: 4}, + { label: '妫�楠屼腑', value: 0 }, + { label: '鍚堟牸', value: 1 }, + { label: '涓嶅悎鏍�', value: 2 }, + { label: '鏈笅鍗�', value: 3 }, + { label: '璁╂鏀捐', value: 4 }, ], state: 0, orderId: 0, @@ -691,10 +673,10 @@ typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟, 2: 閾滃崟涓濅笅鍗� InspectInfoDialog: false, // 鏁版嵁鏌ョ湅寮规 insInfo: {}, - outLoading:false + outLoading: false } }, - mounted () { + mounted() { this.refreshTable() }, // 鏂规硶闆嗗悎 @@ -719,9 +701,9 @@ } }, // 寰呬笅鍗曟煡璇� - getPurchaseOrderList () { + getPurchaseOrderList() { this.tableLoading = true - const params = {...this.entity, isInspect: 1, state: 0} + const params = { ...this.entity, isInspect: 1, state: 0 } getWarehouseSubmit(params).then(res => { this.tableLoading = false if (res.code === 200) { @@ -733,9 +715,9 @@ }) }, // 妫�楠屼腑鏌ヨ - getIfsByStateOneList () { + getIfsByStateOneList() { this.tableLoading1 = true - const params = {...this.entity, orderState: 1, state: 1} + const params = { ...this.entity, orderState: 1, state: 1 } getIfsByStateOne(params).then(res => { this.tableLoading1 = false if (res.code === 200) { @@ -747,9 +729,9 @@ }) }, // 宸叉楠屾煡璇� - getIfsByOverList () { + getIfsByOverList() { this.tableLoading2 = true - const params = {...this.entity, orderState: 4, state: 2} + const params = { ...this.entity, orderState: 4, state: 2 } getIfsByOver(params).then(res => { this.tableLoading2 = false if (res.code === 200) { @@ -761,9 +743,9 @@ }) }, // 鏌ヨ瀛e害妫�楠� - getIfsByQuarterList () { + getIfsByQuarterList() { this.tableLoading4 = true - const params = {...this.entity} + const params = { ...this.entity } getIfsByOver(params).then(res => { this.tableLoading4 = false if (res.code === 200) { @@ -775,9 +757,9 @@ }) }, // 鍏ㄩ儴 - getIfsByAllList () { + getIfsByAllList() { this.tableLoading3 = true - const params = {...this.entity, isInspect: 1} + const params = { ...this.entity, isInspect: 1 } getIfsByAll(params).then(res => { this.tableLoading3 = false if (res.code === 200) { @@ -793,52 +775,52 @@ this.resetForm('entity') this.refreshTable() }, - pagination (page) { + pagination(page) { this.page.size = page.limit this.refreshTable() }, - pagination1 (page) { + pagination1(page) { this.page1.size = page.limit this.refreshTable() }, - pagination2 (page) { + pagination2(page) { this.page2.size = page.limit this.refreshTable() }, - pagination3 (page) { + pagination3(page) { this.page3.size = page.limit this.refreshTable() }, - pagination4 (page) { + pagination4(page) { this.page4.size = page.limit this.refreshTable() }, // 鏌ョ湅妫�楠屾暟鎹� - viewInspectInfo (row) { + viewInspectInfo(row) { //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃 let inspectorList = [] - if(row.userName){ + if (row.userName) { inspectorList = row.userName.split(',') } let user = JSON.parse(localStorage.getItem('user')) - if(user){ + if (user) { inspectorList.push(user.name) } this.inspectorList = inspectorList this.insInfo = row this.InspectInfoDialog = true }, - closeInsInfoDialog () { + closeInsInfoDialog() { this.InspectInfoDialog = false }, // 鐩存帴鏀捐 - goPass (row) { + goPass(row) { this.$confirm('鏄惁鏀捐褰撳墠鏁版嵁?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - concessionRelease({ifsInventoryId: row.id}).then(res => { + concessionRelease({ ifsInventoryId: row.id }).then(res => { if (res.code === 200) { this.$message({ type: 'success', @@ -861,21 +843,21 @@ cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => { + repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => { if (res.code === 200) { this.$message.success('鎾ら攢鎴愬姛') this.refreshTable('page') } }) - }).catch(() => {}) + }).catch(() => { }) }, - viewInsInfo0 () { + viewInsInfo0() { this.state = 3; this.typeSource = this.insInfo.typeSource this.orderId = this.insInfo.enterOrderId this.InspectInfoDialog = false }, - viewInsInfo1 () { + viewInsInfo1() { this.state = 3; this.typeSource = this.insInfo.typeSource this.orderId = this.insInfo.quarterOrderId @@ -886,16 +868,16 @@ this.refreshTable('page') }, // 鍒锋柊椤甸潰 - refreshView () { + refreshView() { this.InspectionKey++ }, // 閾滄潗鏂欎笅鍗� - copper () { + copper() { this.$router.push("/materialOrder/copperOrder"); - this.$router.push({ path: "/materialOrder/copperOrder", query: {active: 1} }); + this.$router.push({ path: "/materialOrder/copperOrder", query: { active: 1 } }); }, // 鎵撳紑鏍囩鎵撳嵃寮规 - openPrint () { + openPrint() { if (this.multipleSelection.length > 0) { this.printDialog = true this.$nextTick(() => { @@ -907,29 +889,29 @@ } }, // 鍏抽棴鏍囩鎵撳嵃寮规 - closePrintDialog () { + closePrintDialog() { this.printDialog = false }, // 涓嬪崟 playOrder(row) { - this.$router.push({ path: "/materialOrder/customsInspection", query: {orderType: 0, customsInspection: row, active: 1} }); + this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 0, customsInspection: row, active: 1 } }); }, // 瀛e害妫�楠屼笅鍗� - playOrderSec (row) { + playOrderSec(row) { if (typeof row !== "object") { - this.$router.push({ path: "/materialOrder/customsInspection", query: {active: row} }); + this.$router.push({ path: "/materialOrder/customsInspection", query: { active: row } }); } else { - this.$router.push({ path: "/materialOrder/customsInspection", query: {orderType: 1, customsInspection: row, active: 1} }); + this.$router.push({ path: "/materialOrder/customsInspection", query: { orderType: 1, customsInspection: row, active: 1 } }); } }, // 鎵撳紑鍏嶆寮规 - exemption (row) { + exemption(row) { this.exemptionVisible = true this.exemptionInfo = row this.$set(this.exemptionInfo, 'partDetail', row.partDesc) }, // 鎻愪氦鍏嶆淇℃伅 - submitExemption () { + submitExemption() { this.exemptionLoading = true rawOrderRelease({ ifsInventoryId: this.exemptionInfo.id, @@ -947,13 +929,13 @@ }) }, // 鎵撳紑鎾ら攢鎶ユ寮规 - cancelDeclare (row) { + cancelDeclare(row) { this.declareDialogVisible = true this.insOrderRow = row }, // 鎻愪氦鎾ら攢鎶ユ鐢宠 - submitDeclare () { - revokeInspectionReport({id: this.insOrderRow.id}).then(res => { + submitDeclare() { + revokeInspectionReport({ id: this.insOrderRow.id }).then(res => { if (res.code === 200) { this.declareDialogVisible = false this.refreshTable() @@ -964,7 +946,7 @@ }) }, // 鎵撳紑鎾ら攢涓嬪崟鐨勫脊妗� - cancelOrder (row) { + cancelOrder(row) { if (row.enterOrderId && row.quarterOrderId) { this.quashDialogVisible = true } else if (row.enterOrderId && !row.quarterOrderId) { @@ -973,56 +955,56 @@ cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - repealEnterRawOrder({enterOrderId: row.enterOrderId}).then(res => { + repealEnterRawOrder({ enterOrderId: row.enterOrderId }).then(res => { if (res.code === 200) { this.$message.success('鎾ら攢鎴愬姛') this.refreshTable('page') } }) - }).catch(() => {}) + }).catch(() => { }) } else if (!row.enterOrderId && row.quarterOrderId) { this.$confirm('鏄惁鎾ら攢瀛e害涓嬪崟?', "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => { + repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => { if (res.code === 200) { this.$message.success('鎾ら攢鎴愬姛') this.refreshTable('page') } }) - }).catch(() => {}) + }).catch(() => { }) } this.insOrderRow = row }, - cancelQuashOrder (type) { + cancelQuashOrder(type) { if (type === 'enterOrderId') { this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - repealEnterRawOrder({enterOrderId: this.insOrderRow.enterOrderId}).then(res => { + repealEnterRawOrder({ enterOrderId: this.insOrderRow.enterOrderId }).then(res => { if (res.code === 200) { this.$message.success('鎾ら攢鎴愬姛') this.refreshTable('page') } }) - }).catch(() => {}) + }).catch(() => { }) } else { this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - repealQuarterRawOrder({quarterOrderId: this.insOrderRow.quarterOrderId}).then(res => { + repealQuarterRawOrder({ quarterOrderId: this.insOrderRow.quarterOrderId }).then(res => { if (res.code === 200) { this.$message.success('鎾ら攢鎴愬姛') this.refreshTable('page') } }) - }).catch(() => {}) + }).catch(() => { }) } }, // 鐐瑰嚮鏍峰搧鍚嶇О鏌ョ湅璇︽儏 @@ -1040,16 +1022,16 @@ this.dataDialogVisible = true; }, // 鍏抽棴鏁版嵁鏌ョ湅寮规 - closeDataLook () { + closeDataLook() { this.dataDialogVisible = false }, // 闄勪欢鏌ョ湅 - handleFileLook (row) { + handleFileLook(row) { this.filesDialogVisible = true this.filesLookInfo = row }, // 鍏抽棴闄勪欢鏌ョ湅寮规 - closeFilesLook () { + closeFilesLook() { this.filesDialogVisible = false }, // 鎶ュ憡涓嬭浇 @@ -1058,32 +1040,32 @@ this.downLoadInfo = row }, // 鍏抽棴鎶ュ憡涓嬭浇寮规 - closeDownFileDialog () { + closeDownFileDialog() { this.downFileDialogVisible = false }, // 鏌ョ湅浜т笟閾句俊鎭� - openInfoDialog (row) { + openInfoDialog(row) { this.showInfoDialog = true this.$nextTick(() => { this.$refs.showInfoDialog.getInfo(row.id) }) }, // 淇敼濮旀墭缂栧彿 - changeEntrustCode (row) { + changeEntrustCode(row) { this.entrustCodeVisible = true - this.entrustCodeInfo = {...row} + this.entrustCodeInfo = { ...row } }, // 瀵煎嚭 - handleOut(){ - let entity = this.tabIndex === 3 ? {...this.entity, isInspect: 2} : {...this.entity,state: 2, orderState: 4,} + handleOut() { + let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, } delete entity.orderBy this.outLoading = true rawAllExport({ - entity:entity - },{responseType: "blob"}).then(res => { + entity: entity + }, { responseType: "blob" }).then(res => { this.outLoading = false this.$message.success('瀵煎嚭鎴愬姛') - const blob = new Blob([res],{ type: 'application/octet-stream' }); + const blob = new Blob([res], { type: 'application/octet-stream' }); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; @@ -1092,7 +1074,7 @@ }) }, // 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅 - submitCode () { + submitCode() { this.submitCodeLoading = true try { updateEntrustCode({ @@ -1115,7 +1097,7 @@ this.refreshTable() }, // 琛ㄦ牸閫夋嫨鏂规硶 - selectMethod(val){ + selectMethod(val) { this.multipleSelection = val }, }, @@ -1127,6 +1109,7 @@ display: flex; justify-content: space-between; } + .tab { list-style-type: none; display: flex; diff --git a/src/views/business/unpass/components/PurchaseVerification.vue b/src/views/business/unpass/components/PurchaseVerification.vue new file mode 100644 index 0000000..2e66c74 --- /dev/null +++ b/src/views/business/unpass/components/PurchaseVerification.vue @@ -0,0 +1,376 @@ +<template> + <div> + <el-dialog title="杩涜揣楠岃瘉鍘熷璁板綍" :visible.sync="isShow" width="1000px" :show-close="false" :close-on-click-modal="false" + style="max-height: 96vh; margin-top: 2vh" :modal-append-to-body="false" :close-on-press-escape="false"> + <div class="search"> + <el-form :inline="true" :model="purchaseForm" label-position="right" :rules="purchaseFormRules" + ref="purchaseForm" class="form-inline" label-width="130px"> + <el-row> + <el-col :span="8"> + <el-form-item label="妫�楠岀紪鍙�:"> + <el-input clearable v-model="purchaseForm.entrustCode" disabled size="small" + placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏉愭枡鍘傚:"> + <el-input clearable v-model="purchaseForm.supplierName" disabled size="small" + placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鍒拌揣鏃ユ湡:"> + <el-input clearable v-model="purchaseForm.declareDate" disabled size="small" + placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏉愭枡鍚嶇О:"> + <el-input clearable v-model="purchaseForm.sample" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="瑙勬牸鍨嬪彿:"> + <el-input clearable v-model="purchaseForm.model" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏉愭枡鎵瑰彿:"> + <el-input clearable v-model="purchaseForm.updateBatchNo" disabled size="small" + placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-col> + </el-row> + <div> + <el-form-item class="headLine" label="楠岃瘉渚濇嵁鏂囦欢缂栧彿:" label-width="160px" style="width: 100%" + prop="verifyFileCode"> + <el-input clearable v-model="purchaseForm.verifyFileCode" size="small" + :disabled="operationType === 'view'" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </div> + <h4> + <span style="display: flex;align-items: center;"> + <span class="line"></span><span>楠岃瘉鍐呭</span> + </span> + </h4> + <div class="title">涓�銆佷緵鏂逛骇鍝佹娴嬫姤鍛婄殑鍩烘湰淇℃伅纭</div> + <el-form-item label="鏉愭枡鍚嶇О:" prop="basicName"> + <el-radio-group v-model="purchaseForm.basicName" :disabled="operationType === 'view'" v-removeAriaHidden> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="瑙勬牸鍨嬪彿:" prop="basicModel"> + <el-radio-group v-model="purchaseForm.basicModel" :disabled="operationType === 'view'" v-removeAriaHidden> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="鏉愭枡鎵瑰彿:" prop="basicBatchNo"> + <el-radio-group v-model="purchaseForm.basicBatchNo" :disabled="operationType === 'view'" v-removeAriaHidden> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="鎵ц鏍囧噯:" prop="basicStandard"> + <el-radio-group v-model="purchaseForm.basicStandard" :disabled="operationType === 'view'" + v-removeAriaHidden> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="鐢熶骇鏃ユ湡:" prop="basicDate"> + <el-radio-group v-model="purchaseForm.basicDate" :disabled="operationType === 'view'" v-removeAriaHidden> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="渚涜揣鏁伴噺:" prop="basicNumber"> + <el-radio-group v-model="purchaseForm.basicNumber" :disabled="operationType === 'view'" v-removeAriaHidden> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="鏉愭枡棰滆壊:" prop="basicColor"> + <el-radio-group v-model="purchaseForm.basicColor" :disabled="operationType === 'view'" v-removeAriaHidden> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + <div> + <el-form-item label="鍏朵粬:"> + <el-input clearable v-model="purchaseForm.basicOtherValue" size="small" + :disabled="operationType === 'view'" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + <el-form-item> + <el-radio-group v-model="purchaseForm.basicOther" :disabled="operationType === 'view'"> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + </el-radio-group> + </el-form-item> + <div class="titleSec"> + <span>浜屻�佷緵鏂逛骇鍝佹娴嬫姤鍛婁腑鍚勯」鎬ц兘鎸囨爣鐨勯獙璇�</span> + <span> + <el-button type="primary" size="small" @click="addItem" + v-if="operationType === 'add'">鎵嬪姩娣诲姞妫�楠岄」鐩�</el-button> + <el-button type="primary" @click="addFactoryVerifyItem" v-if="operationType === 'add'" + size="small">娣诲姞楠岃瘉椤圭洰</el-button> + </span> + </div> + <div> + <el-table :data="factoryVerifyItemList" style="width: 98%" v-loading="tableLoading"> + <el-table-column type="index" label="搴忓彿" width="180" align="center"></el-table-column> + <el-table-column prop="inspectionItem" label="楠岃瘉椤圭洰" width="300"></el-table-column> + <el-table-column prop="result" label="楠岃瘉缁撴灉"> + <template slot-scope="scope"> + <el-radio-group v-model="scope.row.result" v-removeAriaHidden :disabled="operationType === 'view'"> + <el-radio label="1">绗﹀悎</el-radio> + <el-radio label="2">涓嶇鍚�</el-radio> + <el-radio label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" width="120" v-if="operationType === 'add'"> + <template slot-scope="scope"> + <el-button @click.native.prevent="deleteRow(scope.$index)" type="text" size="small">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + </div> + </div> + </el-form> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="$emit('resetPurchaseDialog')">鍙� 娑�</el-button> + <el-button type="primary" @click="handlePurchase" :loading="handlePurchaseLoading" + v-if="operationType === 'add'">纭� + 瀹�</el-button> + </span> + </el-dialog> + <el-dialog title="寰呴獙璇侀」鐩�" :visible.sync="factoryVerifyItemDia" width="1000px" + style="max-height: 96vh; margin-top: 2vh" :show-close="false" :close-on-click-modal="false" + :close-on-press-escape="false"> + <el-table :data="tableList" style="width: 100%" v-loading="tableLoading" + @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55"></el-table-column> + <el-table-column type="index" label="搴忓彿" width="60" align="center"></el-table-column> + <el-table-column prop="inspectionItem" label="楠岃瘉椤圭洰"></el-table-column> + </el-table> + <span slot="footer" class="dialog-footer"> + <el-button @click="factoryVerifyItemDia = false">鍙� 娑�</el-button> + <el-button type="primary" @click="handleFactoryVerifyItem" :loading="handleFactoryVerifyLoading">娣� 鍔�</el-button> + </span> + </el-dialog> + <el-dialog title="鎵嬪姩娣诲姞楠岃瘉椤圭洰" :visible.sync="inspectionItemDia" width="500px" @close="resetInput" :show-close="false" + :close-on-click-modal="false" :close-on-press-escape="false"> + <el-input v-model="inspectionItem"></el-input> + <span slot="footer" class="dialog-footer"> + <el-button @click="inspectionItemDia = false">鍙� 娑�</el-button> + <el-button type="primary" @click="handleAdd">娣� 鍔�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { getFactoryVerify, addFactoryVerify } from '@/api/business/unpass.js' +import { + getInsProduct, +} from "@/api/business/inspectionTask.js"; +export default { + name: "PurchaseVerification", + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + props: { + purchaseDialog: { + type: Boolean, + default: () => false + }, + orderId: { + type: String, + default: () => null + }, + }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + type: '', + info: {}, + isShow: this.purchaseDialog, + purchaseForm: { + entrustCode: '', // 妫�楠岀紪鍙� + supplierName: '', // 鏉愭枡鍘傚 + declareDate: '', // 鍒拌揣鏃ユ湡 + sample: '', // 鏉愭枡鍚嶇О + model: '', // 瑙勬牸鍨嬪彿 + updateBatchNo: '', // 鏉愭枡鎵瑰彿 + verifyFileCode: '', // 楠岃瘉渚濇嵁鏂囦欢缂栧彿 + // 纭淇℃伅 + basicName: '', // 鏉愭枡鍚嶇О + basicModel: '', // 瑙勬牸鍨嬪彿 + basicBatchNo: '', // 鏉愭枡鎵瑰彿 + basicStandard: '', // 鎵ц鏍囧噯 + basicDate: '', // 鐢熶骇鏃ユ湡 + basicNumber: '', // 渚涜揣鏁伴噺 + basicColor: '', // 鏉愭枡棰滆壊 + basicOtherValue: '', // 鍏朵粬鍚嶇О + basicOther: '', // 鍏朵粬 + }, + purchaseFormRules: { + verifyFileCode: [{ required: true, message: '璇峰~鍐欓獙璇佷緷鎹枃浠剁紪鍙�', trigger: 'blur' }], + basicName: [{ required: false, message: '璇烽�夋嫨鏉愭枡鍚嶇О楠岃瘉淇℃伅', trigger: 'change' }], + basicModel: [{ required: false, message: '璇烽�夋嫨瑙勬牸鍨嬪彿楠岃瘉淇℃伅', trigger: 'change' }], + basicStandard: [{ required: false, message: '璇烽�夋嫨鎵ц鏍囧噯楠岃瘉淇℃伅', trigger: 'change' }], + basicDate: [{ required: false, message: '璇烽�夋嫨鐢熶骇鏃ユ湡楠岃瘉淇℃伅', trigger: 'change' }], + basicNumber: [{ required: false, message: '璇烽�夋嫨渚涜揣鏁伴噺楠岃瘉淇℃伅', trigger: 'change' }], + basicColor: [{ required: false, message: '璇烽�夋嫨鏉愭枡棰滆壊楠岃瘉淇℃伅', trigger: 'change' }], + }, + factoryVerifyItemList: [], // 渚涙柟浜у搧妫�娴嬫姤鍛婁腑鍚勯」鎬ц兘鎸囨爣鐨勯獙璇� + tableList: [], // + multipleSelection: [], // + operationType: '', + handlePurchaseLoading: false, + tableLoading: false, + factoryVerifyItemDia: false, // 娣诲姞楠岃瘉椤圭洰寮规 + handleFactoryVerifyLoading: false, + inspectionItemDia: false, + inspectionItem: '' + } + }, + // 鏂规硶闆嗗悎 + methods: { + async getInsOrder(operationType, item) { + this.operationType = operationType + this.info = item + // 鏌ヨ宸叉彁浜ょ殑鏁版嵁 + let factoryVerify = await getFactoryVerify({ insOrderId: this.orderId }) + this.purchaseForm = factoryVerify.data + this.factoryVerifyItemList = factoryVerify.data.factoryVerifyItemList || [] + }, + // 鎵撳紑娣诲姞楠岃瘉椤圭洰寮规 + async addFactoryVerifyItem() { + this.factoryVerifyItemDia = true + this.tableList = [] + if (this.info.cableTag === undefined) { + this.info.cableTag = '' + } + this.tableLoading = true; + const type1 = 5 + // 鏌ヨ妫�楠岄」鐩� + let res = await getInsProduct({ id: this.info.id, type: type1, laboratory: this.info.sonLaboratory, cableTag: this.info.cableTag, rawMaterialTag: this.info.rawMaterialTag }) + if (res.data.length > 0) { + res.data.map((item) => { + if (item.inspectionItemSubclass) { + item.inspectionItem = item.inspectionItem + '-' + item.inspectionItemSubclass + } + const obj = Object.assign({ + inspectionItem: item.inspectionItem, + result: item.result, + }) + this.tableList.push(obj) + }) + this.tableLoading = false; + } + }, + handleSelectionChange(val) { + console.log('val---', val) + this.multipleSelection = val; + }, + addItem() { + this.inspectionItemDia = true + }, + deleteRow(index) { + this.factoryVerifyItemList.splice(index, 1); + }, + handleAdd() { + if (!this.inspectionItem) { + this.$message.warning('璇峰~鍐欏唴瀹�') + return + } + this.factoryVerifyItemList.push({ + inspectionItem: this.inspectionItem, + result: null, + }) + this.inspectionItemDia = false + }, + resetInput() { + this.inspectionItem = '' + this.inspectionItemDia = false + }, + // 鎻愪氦娣诲姞瑕侀獙璇佺殑妫�楠岄」 + handleFactoryVerifyItem() { + if (this.multipleSelection.length === 0) { + this.$message.warning('璇烽�夋嫨鏁版嵁') + } else { + this.factoryVerifyItemList = JSON.parse(JSON.stringify(this.multipleSelection)) + this.factoryVerifyItemDia = false + } + }, + handlePurchase() { + this.$refs['purchaseForm'].validate((valid) => { + if (valid) { + if (this.factoryVerifyItemList.some(item => item.result === undefined || item.result === null || item.result === '')) { + this.$message.warning('璇烽�夋嫨渚涙柟浜у搧楠岃瘉缁撴灉') + return + } + this.factoryVerifyItemList.forEach((item, index) => { + item.sort = index + }) + this.purchaseForm.factoryVerifyItemList = JSON.parse(JSON.stringify(this.factoryVerifyItemList)) + this.handlePurchaseLoading = true + addFactoryVerify(this.purchaseForm).then(res => { + if (res.code === 200) { + this.$message.success('鎻愪氦鎴愬姛') + this.$emit('resetPurchaseDialog') + } + this.handlePurchaseLoading = false + }) + } else { + console.log('error submit!!'); + return false; + } + }); + }, + }, +} +</script> + +<style scoped> +.headLine>>>.el-form-item__content { + width: 68%; +} + +>>>.el-form-item__content { + display: inline-block; +} + +h4 .line { + display: inline-block; + width: 3px; + height: 16px; + background: #3A7BFA; + margin-right: 4px; +} + +.title { + margin: 10px 0; +} + +.titleSec { + margin: 10px 0; + display: flex; + justify-content: space-between; +} + +>>>.el-dialog__body { + max-height: 700px; + overflow-y: auto; +} +</style> diff --git a/src/views/business/unpass/components/addUnPass.vue b/src/views/business/unpass/components/addUnPass.vue new file mode 100644 index 0000000..c1777e9 --- /dev/null +++ b/src/views/business/unpass/components/addUnPass.vue @@ -0,0 +1,124 @@ +<template> + <div> + <el-dialog title="鏂板涓嶅悎鏍煎娴�" :visible.sync="isShow" width="70%" :show-close="false" :close-on-click-modal="false" + :close-on-press-escape="false"> + <div class="table"> + <el-table class="el-table" ref="productTable" :data="productList" max-height="800px" tooltip-effect="dark" + border v-loading="tableLoading" @selection-change="selectProduct" style="margin-bottom: 10px;" + @select-all="handleAll"> + <el-table-column type="selection" width="65"></el-table-column> + <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" min-width="140" + show-overflow-tooltip></el-table-column> + <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column> + <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140" + show-overflow-tooltip></el-table-column> + <el-table-column prop="tell" label="瑕佹眰鎻忚堪" min-width="220px"></el-table-column> + <el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px"></el-table-column> + <el-table-column prop="lastValue" label="妫�楠岀粨鏋�" min-width="140" show-overflow-tooltip></el-table-column> + <el-table-column prop="insResult" label="缁撴灉鍒ゅ畾" min-width="140" show-overflow-tooltip> + <template> + <el-tag type="danger">涓嶅悎鏍�</el-tag> + </template> + </el-table-column> + </el-table> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="$emit('resetAddUnPass')">鍙� 娑�</el-button> + <el-button type="primary" @click="submitHandle" :loading="handlePassLoading">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { getInsProductUnqualified } from '@/api/business/unpass.js' +export default { + name: "addUnPass", + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + props: { + addUnPassDialog: { + type: Boolean, + default: () => false + }, + }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + type: '', + isShow: this.addUnPassDialog, + handlePassLoading: false, + productList: [], + productListSelected: [], + productIds: [], + tableLoading: false + } + }, + mounted() { + }, + // 鏂规硶闆嗗悎 + methods: { + getInsOrder(info) { + this.tableLoading = true + try { + getInsProductUnqualified({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag }).then(res => { + if (res.code === 200) { + this.productList = res.data + } + this.tableLoading = false + }) + } catch (err) { + this.tableLoading = false + } + }, + // 鎻愪氦涓嶅悎鏍煎鐞� + submitHandle() { + if (this.productListSelected.length === 0) { + this.$message.warning('璇烽�夋嫨闇�瑕佸娴嬬殑妫�楠岄」') + return + } + this.$confirm('纭鎻愪氦涓嶅悎鏍煎娴�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.handlePass() + }).catch(() => { + + }); + }, + handlePass() { + this.handlePassLoading = true + try { + addUnqualifiedRetest({ + ids: this.productIds + }).then(res => { + if (res.code === 200) { + this.$message.success('鎻愪氦鎴愬姛') + this.$emit('resetAddUnPass') + } + this.handlePassLoading = false + }) + } catch (e) { + this.handlePassLoading = false + } + }, + selectProduct(val) { + this.productListSelected = val + this.productIds = [] + val.forEach(a => { + this.productIds.push(a.id) + }) + }, + handleAll(val) { + this.productListSelected = val + this.productIds = [] + val.forEach(a => { + this.productIds.push(a.id) + }) + }, + }, +} +</script> + +<style scoped></style> diff --git a/src/views/business/unpass/components/unPassDialog.vue b/src/views/business/unpass/components/unPassDialog.vue new file mode 100644 index 0000000..39a57b1 --- /dev/null +++ b/src/views/business/unpass/components/unPassDialog.vue @@ -0,0 +1,275 @@ +<template> + <div> + <el-dialog title="鏂板涓嶅悎鏍煎鐞�" :visible.sync="isShow" width="740px" :show-close="false" :close-on-click-modal="false" + :close-on-press-escape="false"> + <div class="search"> + <el-form :inline="true" :model="unPassForm" :rules="unPassFormRules" ref="unPassForm" class="form-inline" + label-width="120px"> + <div> + <el-form-item class="headLine" label="鏍囬:" style="width: 100%" prop="headline"> + <el-input clearable v-model="unPassForm.headline" size="small" :disabled="type === 'view'" type="textarea" + placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </div> + <el-form-item label="渚涘簲鍟嗗悕绉�:"> + <el-input clearable v-model="unPassForm.supplierName" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + <el-form-item label="鐗╂枡鍚嶇О:"> + <el-tooltip class="item" effect="dark" placement="top" :content="unPassForm.materialName"> + <el-input clearable v-model="unPassForm.materialName" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-tooltip> + </el-form-item> + <el-form-item label="鐢熶骇鎵规:"> + <el-input clearable v-model="unPassForm.productionBatch" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + <el-form-item label="鍒拌揣鏁伴噺:"> + <el-input clearable v-model="unPassForm.cargoQuantity" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + <el-form-item label="瑙勬牸鍨嬪彿:"> + <el-input clearable v-model="unPassForm.specsModels" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + <el-form-item label="鎶ユ鏃堕棿:"> + <el-date-picker v-model="unPassForm.inspectTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" + disabled style="width: 175px" type="date" placeholder="閫夋嫨鏃ユ湡"> + </el-date-picker> + </el-form-item> + <el-form-item label="鍙嶉浜�:"> + <el-input clearable v-model="unPassForm.feedbackUser" disabled size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + <el-form-item label="鍙嶉鏃堕棿:" prop="feedbackTime"> + <el-date-picker v-model="unPassForm.feedbackTime" :disabled="type === 'view'" format="yyyy-MM-dd" + value-format="yyyy-MM-dd HH:mm:ss" size="small" style="width: 175px" type="date" placeholder="閫夋嫨鏃ユ湡"> + </el-date-picker> + </el-form-item> + <el-form-item label="鍒嗙被:" prop="classification"> + <el-select v-model="unPassForm.classification" :disabled="type === 'view'" size="small" placeholder="璇烽�夋嫨"> + <el-option v-for="item in classificationOptions" :key="item.value" :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="涓嶅悎鏍煎綊灞�:" prop="offGradeAscription"> + <el-select v-model="unPassForm.offGradeAscription" :disabled="type === 'view'" size="small" + placeholder="璇烽�夋嫨"> + <el-option v-for="item in offGradeAscriptionOptions" :key="item.value" :label="item.label" + :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="涓嶅悎鏍兼儏鍐垫弿杩�:" prop="unqualifiedDesc"> + <el-input clearable type="textarea" v-model="unPassForm.unqualifiedDesc" :disabled="type === 'view'" + style="width: 484px" size="small" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-form> + <el-upload v-if="type === 'add'" ref="upload" :action="action2" :on-change="beforeUpload" :on-error="onError" + :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="headers" :file-list="unPassFilesList"> + <el-button size="small" type="primary" style="text-align: left">闄勪欢涓婁紶</el-button> + </el-upload> + <div v-if="type !== 'add'"> + <div style="padding-left: 40px;margin-bottom: 4px">闄勪欢锛�</div> + <div style="padding-left: 40px;margin-bottom: 4px" v-for="item in unqualifiedHandlerFiles"> + <span>{{ item.fileName }}</span><el-link type="primary" style="margin-left: 20px;vertical-align: top" + :underline="false" @click="handleDown(item)">涓嬭浇</el-link> + </div> + </div> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="$emit('resetForm')">鍙� 娑�</el-button> + <el-button type="primary" @click="handlunPass" :loading="handlunPassLoading" v-if="type === 'add'">纭� + 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler } from '@/api/business/unpass.js' +export default { + name: "unPassDialog", + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + props: { + unPassDialog: { + type: Boolean, + default: () => false + }, + orderId: { + type: String, + default: () => null + }, + }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + type: '', + isShow: this.unPassDialog, + unPassForm: { // 涓嶅悎鏍煎鐞嗘暟鎹� + headline: '', // 鏍囬 + inventoryQuantityId: '', // 鍘熸潗鏂檌d,涓嶅仛灞曠ず锛屽彧浼犲�� + supplierName: '', // 渚涘簲鍟嗗悕绉� + materialName: '', // 鐗╂枡鍚嶇О + productionBatch: '', // 鐢熶骇鎵规 + cargoQuantity: '', // 鍒拌揣鏁伴噺 + specsModels: '', // 瑙勬牸鍨嬪彿 + inspectTime: '', // 鎶ユ鏃堕棿 + feedbackUser: '', // 鍙嶉浜� + feedbackTime: '', // 鍙嶉鏃堕棿 + classification: '', // 鍒嗙被 + offGradeAscription: '', // 涓嶅悎鏍煎綊灞� + unqualifiedDesc: '', // 涓嶅悎鏍兼儏鍐垫弿杩� + unqualifiedHandlerFiles: [], // 涓嶅悎鏍奸檮浠禪RL + }, + unPassFormRules: { + offGradeAscription: [ + { required: true, message: '璇烽�夋嫨涓嶅悎鏍煎綊灞�', trigger: 'change' } + ], + headline: [ + { required: true, message: '璇峰~鍐欐爣棰�', trigger: 'blur' } + ] + }, + unPassFilesList: [], // 涓嶅悎鏍煎鐞嗛檮浠舵暟鎹� + classificationOptions: [], // 涓嶅悎鏍煎垎绫讳笅鎷夋 + offGradeAscriptionOptions: [], // 涓嶅悎鏍煎綊灞炰笅鎷夋 + handlunPassLoading: false, + unqualifiedHandlerFiles: [] + } + }, + mounted() { + this.getClassificationOptions() // 鑾峰彇涓嶅悎鏍煎垎绫讳笅鎷夋閫夐」 + this.getOffGradeAscriptionOptions() // 鑾峰彇涓嶅悎鏍煎綊灞炰笅鎷夋閫夐」 + }, + // 鏂规硶闆嗗悎 + methods: { + getInsOrder(type, row) { + this.type = type + if (type === 'add') { + // 璧嬪�奸粯璁ゆ暟鎹� + getInsOrder({ + orderId: this.orderId + }).then(res => { + if (res.code === 200) { + this.unPassForm.headline = `No.0005-涓ぉ瑁呭鐢电嚎-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${JSON.parse(localStorage.getItem("user")).name}-${new Date().toISOString().substring(0, 10)}` // 鏍囬 + this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 鍘熸潗鏂檌d + this.unPassForm.insOrderId = res.data.insOrder.id // 璁㈠崟id + this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 渚涘簲鍟嗗悕绉� + this.unPassForm.materialName = res.data.insOrder.sampleType // 鐗╂枡鍚嶇О + this.unPassForm.productionBatch = res.data.insOrderTemplate.updateBatchNo // 鐢熶骇鎵规 + this.unPassForm.cargoQuantity = res.data.insOrderTemplate.qtyArrived + res.data.insOrderTemplate.buyUnitMeas // 鍒拌揣鏁伴噺 + this.unPassForm.specsModels = res.data.insOrder.partDetail // 瑙勬牸鍨嬪彿 + this.unPassForm.inspectTime = res.data.insOrderTemplate.sendTime.substring(0, 10) // 鎶ユ鏃堕棿 + this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 鎶ユ鏃堕棿 + this.unPassForm.feedbackUser = JSON.parse(localStorage.getItem("user")).name // 鍙嶉浜� + } + }) + } else { + this.getInfo(row.handlerId) + this.unPassForm = { ...row } + } + }, + getInfo(handlerId) { + getUnqualifiedHandler({ + id: handlerId + }).then(res => { + if (res.code === 200) { + this.unqualifiedHandlerFiles = this.HaveJson(res.data.unqualifiedHandlerFiles) + } + }) + }, + handleDown(row) { + downFile({ + id: row.id, + }).then(res => { + if (res.code === 200) { + let url = ''; + if (res.data.type == 1) { + url = this.javaApi + '/img/' + res.data.fileUrl + this.$download.saveAs(url, row.fileName); + } else { + url = this.javaApi + '/word/' + res.data.fileUrl + this.$download.saveAs(url, row.fileName); + } + } + }).catch(error => { + + }) + }, + // 鎻愪氦涓嶅悎鏍煎鐞� + handlunPass() { + this.$refs['unPassForm'].validate((valid) => { + if (valid) { + this.unPassForm.unqualifiedHandlerFiles.forEach(item => { + delete item.orderBy + }) + this.handlunPassLoading = true + addUnqualifiedHandler(this.unPassForm).then(res => { + if (res.code === 200) { + this.$message.success('鎻愪氦鎴愬姛') + this.$emit('resetForm') + } + this.handlunPassLoading = false + }) + } else { + console.log('error submit!!'); + return false; + } + }); + }, + getUnpassUrl(response, file, fileList) { + // 闄勪欢涓婁紶鎴愬姛鍚庯紝灏唘rl鍦ㄦ彁浜や笉鍚堟牸澶勭悊鏃朵紶缁欏悗鍙� + if (response.code == 200) { + this.$message.success('涓婁紶鎴愬姛') + this.unPassForm.unqualifiedHandlerFiles.push(response.data) + } + }, + // 绉婚櫎闄勪欢 + handleRemoveFile(file) { + const index = this.unPassForm.unqualifiedHandlerFiles.findIndex(val => val === file.response.data) + if (index > -1) { + this.unPassForm.unqualifiedHandlerFiles.splice(index, 1) + } + }, + beforeUpload(file) { + if (file.size > 1024 * 1024 * 10) { + this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); + this.$refs.upload.clearFiles() + return false; + } else { + this.upLoading = true; + return true; + } + }, + onError(err, file, fileList) { + this.$message.error('涓婁紶澶辫触') + this.$refs.upload.clearFiles() + }, + getClassificationOptions() { + // 涓嶅悎鏍煎垎绫� + this.getDicts("categories_no_conformities").then((response) => { + this.classificationOptions = this.dictToValue(response.data); + }); + }, + getOffGradeAscriptionOptions() { + // 涓嶅悎鏍煎綊灞� + this.getDicts("attribution_no_conformities").then((response) => { + this.offGradeAscriptionOptions = this.dictToValue(response.data); + }); + }, + }, + computed: { + headers() { + return { + 'token': sessionStorage.getItem('token') + } + }, + action2() { + return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified' + } + }, +} +</script> + +<style scoped> +.headLine>>>.el-form-item__content { + width: 68%; +} +</style> diff --git a/vue.config.js b/vue.config.js index dbf0bfc..018c3bb 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,7 +36,7 @@ proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://192.168.0.104:8002`, + target: `http://192.168.0.170:8002`, changeOrigin: true, pathRewrite: { ["^" + process.env.VUE_APP_BASE_API]: "", -- Gitblit v1.9.3