From 38ab644750d75a495c207dbb965c2e1fe842e730 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 21 三月 2025 14:07:46 +0800
Subject: [PATCH] 报检类型,供应商批号和查询添加

---
 src/views/business/rawMaterialInspection/index.vue |   65 +++++++++++++++++++++++++-------
 1 files changed, 51 insertions(+), 14 deletions(-)

diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index 7b6f9e8..7485483 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -17,6 +17,13 @@
               @keyup.enter.native="refreshTable">
             </el-input>
           </el-form-item>
+          <el-form-item label="鎶ユ绫诲瀷" prop="inspectionType">
+            <el-select v-model="componentData.inspectionType" clearable placeholder="璇烽�夋嫨" size="small" 
+              @change="refreshTable" style="width: 100%">
+              <el-option label="鍘熻緟鏂�" value="鍘熻緟鏂�"></el-option>
+              <el-option label="鍖呴噰" value="鍖呴噰"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="渚涘簲鍟�" prop="supplierName" v-if="(tabIndex === 3 || tabIndex === 4)">
             <el-input v-model="componentData.supplierName" clearable placeholder="璇疯緭鍏�" size="small"
               @keyup.enter.native="refreshTable">
@@ -25,8 +32,8 @@
           <el-form-item>
             <el-button v-if="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" icon="el-icon-search" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-            <el-button size="mini" @click="refresh()" icon="el-icon-refresh">閲� 缃�</el-button>
+            <el-button size="mini" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+            <el-button size="mini" @click="refresh()">閲� 缃�</el-button>
           </el-form-item>
         </el-row>
         <el-row>
@@ -93,7 +100,7 @@
       </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">
@@ -141,10 +148,16 @@
             <el-option :value="1" label="杩囨湡鐗╂枡"></el-option>
           </el-select>
         </el-form-item>
-        <!-- TODO:蹇呭~ -->
-        <el-form-item class="declareObj-form-item" label="渚涘簲鍟嗘壒鍙�:" prop="buyUnitMeas">
-          <el-input v-model="declareObj.buyUnitMeas" :disabled="declareType !== 'add'" clearable class="addObj-info"
+        <el-form-item class="declareObj-form-item" label="渚涘簲鍟嗘壒鍙�:" prop="supplierNumber">
+          <el-input v-model="declareObj.supplierNumber" :disabled="declareType !== 'add'" clearable class="addObj-info"
             size="small"></el-input>
+        </el-form-item>
+        <el-form-item class="declareObj-form-item" label="鎶ユ绫诲瀷:" prop="inspectionType">
+          <el-select v-model="declareObj.inspectionType" :disabled="declareType !== 'add'" clearable class="addObj-info" 
+            size="small" placeholder="璇烽�夋嫨鎶ユ绫诲瀷">
+            <el-option label="鍘熻緟鏂�" value="鍘熻緟鏂�"></el-option>
+            <el-option label="鍖呴噰" value="鍖呴噰"></el-option>
+          </el-select>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -240,6 +253,7 @@
             }
           }
         },
+        { label: '鎶ユ绫诲瀷', prop: 'inspectionType' },
         { label: '璁㈠崟鍙�', prop: 'orderNo' },
         { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived', width: '140px', },
         { label: '鎵瑰彿', prop: 'updateBatchNo' },
@@ -307,13 +321,12 @@
       ],
       page: {
         total: 0,
-        size: 10,
+        size: 20,
         current: 1
       },
       tableData1: [],
       tableLoading1: false,
       column1: [
-        { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: '160px' },
         {
           dataType: 'tag',
           label: '妫�楠岀姸鎬�',
@@ -351,13 +364,32 @@
         },
         { label: '璁㈠崟鍙�', prop: 'orderNo' },
         { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' },
-        { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
+        { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
         { label: '鎵瑰彿', prop: 'updateBatchNo' },
         { label: '闆朵欢鍙�', prop: 'partNo' },
         { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
         { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
         { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' },
-        { label: '鍏嶆', prop: 'isExemption' },
+        {
+          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: 'entrustCode', width: '160px' },
         { label: '鏍峰搧鍚嶇О', prop: 'sampleName' },
         { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
         { label: '妫�楠屼汉', prop: 'userName' },
@@ -382,7 +414,7 @@
         },
         { label: '鍗曚綅', prop: 'buyUnitMeas' },
         { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
-        { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+        { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
         {
           dataType: 'action',
           fixed: 'right',
@@ -429,7 +461,7 @@
       ],
       page1: {
         total: 0,
-        size: 10,
+        size: 20,
         current: 1
       },
       more: false,
@@ -446,6 +478,8 @@
         receiverDate: '', // 鎺ユ敹鏃堕棿
         buyUnitMeas: '', // 鍗曚綅
         isExpire: '', // 鍗曚綅
+        supplierNumber: '', // 渚涘簲鍟嗘壒鍙�
+        inspectionType: '', // 鎶ユ绫诲瀷
       },
       componentData: { // 琛ㄦ牸鏁版嵁
         updateBatchNo: null,
@@ -663,7 +697,7 @@
     },
     // 鎻愬墠鍏ュ簱
     advancedGodown(row) {
-      this.$confirm('褰撳墠鍘熸潗鏂欐槸鍚︽彁鍓嶅叆搴�?', '鎻愮ず', {
+      this.$confirm('褰撳墠鍘熻緟鏂欐槸鍚︽彁鍓嶅叆搴�?', '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning'
@@ -798,6 +832,7 @@
     openIFS() {
       this.btnLoading = true
       getIfsOrder().then(res => {
+        this.resetForm('componentData')
         this.refreshTable()
         this.btnLoading = false
       }).catch(err => {
@@ -815,7 +850,7 @@
       }).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        this.$download.saveAs(blob, "鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx");
+        this.$download.saveAs(blob, "鍘熻緟鏂欐娴嬩俊鎭鍑�.xlsx");
       })
     },
     clear() {
@@ -832,6 +867,8 @@
         receiverDate: '', // 鎺ユ敹鏃堕棿
         buyUnitMeas: '', // 鍗曚綅
         isExpire: '', // 鍗曚綅
+        supplierNumber: '', // 渚涘簲鍟嗘壒鍙�
+        inspectionType: '', // 鎶ユ绫诲瀷
       }
     }
   },

--
Gitblit v1.9.3