From 49944c684bf75e1a90e85caf2c5d8523981916d6 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 01 四月 2025 11:22:17 +0800
Subject: [PATCH] 修改原辅料改成原辅材

---
 src/views/business/reliabilityPlan/index.vue |  118 +++++++++++++++++++++++++++++++----------------------------
 1 files changed, 62 insertions(+), 56 deletions(-)

diff --git a/src/views/business/reliabilityPlan/index.vue b/src/views/business/reliabilityPlan/index.vue
index 4e3246f..a9c2486 100644
--- a/src/views/business/reliabilityPlan/index.vue
+++ b/src/views/business/reliabilityPlan/index.vue
@@ -4,12 +4,12 @@
       <el-form :model="entity" ref="entity" size="small" :inline="true">
         <el-form-item label="浜у搧鍨嬪彿" prop="productType" v-if="tabIndex === 0">
           <el-input v-model="entity.productType" clearable placeholder="璇疯緭鍏�" size="small"
-                    @keyup.enter.native="goSearch($event)">
+            @keyup.enter.native="goSearch($event)">
           </el-input>
         </el-form-item>
-        <el-form-item label="鍘熻緟鏂欏悕绉�" prop="entrustCode" v-if="tabIndex === 1">
+        <el-form-item label="鍘熻緟鏉愬悕绉�" prop="entrustCode" v-if="tabIndex === 1">
           <el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
-                    @keyup.enter.native="goSearch($event)">
+            @keyup.enter.native="goSearch($event)">
           </el-input>
         </el-form-item>
         <el-form-item>
@@ -23,7 +23,7 @@
         <div>
           <ul class="tab">
             <li :class="{ active: tabIndex === 0 }" @click="handleTab(0)">鎴愬搧</li>
-            <li :class="{ active: tabIndex === 1 }" @click="handleTab(1)">鍘熻緟鏂�</li>
+            <li :class="{ active: tabIndex === 1 }" @click="handleTab(1)">鍘熻緟鏉�</li>
           </ul>
         </div>
         <div>
@@ -32,36 +32,33 @@
       </div>
       <!--鎴愬搧-->
       <div class="table">
-        <lims-table :tableData="tableData" :column="column"
-                    v-if="tabIndex === 0"
-                    @pagination="pagination"
-                    ref="tableData"
-                    :height="'calc(100vh - 290px)'"
-                    key="tableData" :page="page"
-                    :tableLoading="tableLoading"></lims-table>
+        <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
+          ref="tableData" :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"
-                    @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"
+          @pagination="pagination1" :height="'calc(100vh - 290px)'" key="tableData1" :page="page1"
+          :tableLoading="tableLoading1"></lims-table>
       </div>
     </div>
     <el-dialog :visible.sync="proPlanDia" title="鎴愬搧璁″垝">
       <el-form :model="proPlanForm" ref="proPlanForm" :rules="proPlanRules" label-width="80px" size="small">
         <el-form-item label="浜у搧鍨嬪彿" prop="productType">
-          <el-input v-model="proPlanForm.productType" placeholder="璇峰~鍐欎骇鍝佸瀷鍙�" :disabled="operationType === 'review'"></el-input>
+          <el-input v-model="proPlanForm.productType" placeholder="璇峰~鍐欎骇鍝佸瀷鍙�"
+            :disabled="operationType === 'review'"></el-input>
         </el-form-item>
         <el-form-item label="浜у搧鍚嶇О" prop="productName">
-          <el-input v-model="proPlanForm.productName" placeholder="璇峰~鍐欎骇鍝佸悕绉�" :disabled="operationType === 'review'"></el-input>
+          <el-input v-model="proPlanForm.productName" placeholder="璇峰~鍐欎骇鍝佸悕绉�"
+            :disabled="operationType === 'review'"></el-input>
         </el-form-item>
         <el-form-item label="闆朵欢鍙�" prop="partNo">
           <el-input v-model="proPlanForm.partNo" placeholder="璇峰~鍐欓浂浠跺彿" :disabled="operationType === 'review'"></el-input>
         </el-form-item>
         <el-form-item label="瀹℃牳浜�" prop="reviewerId">
-          <el-select v-model="proPlanForm.reviewerId" clearable filterable size="small" style="width: 50%;" :disabled="operationType === 'review'">
+          <el-select v-model="proPlanForm.reviewerId" clearable filterable size="small" style="width: 50%;"
+            :disabled="operationType === 'review'">
             <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select>
@@ -69,21 +66,27 @@
       </el-form>
       <div slot="footer" class="foot">
         <el-button v-if="operationType !== 'review'" @click="closeProDia">鍙� 娑�</el-button>
-        <el-button v-if="operationType !== 'review'" type="primary" :loading="submitProLoading" @click="submitProForm">淇� 瀛�</el-button>
-        <el-button v-if="operationType === 'review'" :loading="submitProLoading" @click="submitProForm(0)">涓嶉�氳繃</el-button>
-        <el-button v-if="operationType === 'review'" type="primary" :loading="submitProLoading" @click="submitProForm(1)">閫氳繃</el-button>
+        <el-button v-if="operationType !== 'review'" type="primary" :loading="submitProLoading" @click="submitProForm">淇�
+          瀛�</el-button>
+        <el-button v-if="operationType === 'review'" :loading="submitProLoading"
+          @click="submitProForm(0)">涓嶉�氳繃</el-button>
+        <el-button v-if="operationType === 'review'" type="primary" :loading="submitProLoading"
+          @click="submitProForm(1)">閫氳繃</el-button>
       </div>
     </el-dialog>
-    <el-dialog :visible.sync="materialDia" title="鍘熻緟鏂欒鍒�">
+    <el-dialog :visible.sync="materialDia" title="鍘熻緟鏉愯鍒�">
       <el-form :model="materialForm" ref="materialForm" :rules="materialRules" label-width="90px" size="small">
-        <el-form-item label="鍘熻緟鏂欏悕绉�" prop="materialName">
-          <el-input v-model="materialForm.materialName" placeholder="璇峰~鍐欎骇鍝佸悕绉�" :disabled="operationType === 'review'"></el-input>
+        <el-form-item label="鍘熻緟鏉愬悕绉�" prop="materialName">
+          <el-input v-model="materialForm.materialName" placeholder="璇峰~鍐欎骇鍝佸悕绉�"
+            :disabled="operationType === 'review'"></el-input>
         </el-form-item>
         <el-form-item label="闆朵欢鍙�" prop="partNo">
-          <el-input v-model="materialForm.partNo" placeholder="璇峰~鍐欓浂浠跺彿" :disabled="operationType === 'review'"></el-input>
+          <el-input v-model="materialForm.partNo" placeholder="璇峰~鍐欓浂浠跺彿"
+            :disabled="operationType === 'review'"></el-input>
         </el-form-item>
         <el-form-item label="瀹℃牳浜�" prop="reviewerId">
-          <el-select v-model="proPlanForm.reviewerId" clearable filterable size="small" style="width: 50%;" :disabled="operationType === 'review'">
+          <el-select v-model="proPlanForm.reviewerId" clearable filterable size="small" style="width: 50%;"
+            :disabled="operationType === 'review'">
             <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select>
@@ -91,9 +94,12 @@
       </el-form>
       <div slot="footer" class="foot">
         <el-button v-if="operationType !== 'review'" @click="closeMaterialRulesDia">鍙� 娑�</el-button>
-        <el-button v-if="operationType !== 'review'" type="primary" :loading="submitMatLoading" @click="submitMaterialRulesForm">淇� 瀛�</el-button>
-        <el-button v-if="operationType === 'review'" :loading="submitMatLoading" @click="submitMaterialRulesForm(0)">涓嶉�氳繃</el-button>
-        <el-button v-if="operationType === 'review'" type="primary" :loading="submitMatLoading" @click="submitMaterialRulesForm(1)">閫氳繃</el-button>
+        <el-button v-if="operationType !== 'review'" type="primary" :loading="submitMatLoading"
+          @click="submitMaterialRulesForm">淇� 瀛�</el-button>
+        <el-button v-if="operationType === 'review'" :loading="submitMatLoading"
+          @click="submitMaterialRulesForm(0)">涓嶉�氳繃</el-button>
+        <el-button v-if="operationType === 'review'" type="primary" :loading="submitMatLoading"
+          @click="submitMaterialRulesForm(1)">閫氳繃</el-button>
       </div>
     </el-dialog>
   </div>
@@ -108,13 +114,13 @@
   selectMaterial,
   selectProduct
 } from "@/api/business/reliabilityPlan";
-import {selectUserCondition} from "@/api/system/user";
-import {deleteAuxiliaryWorkingHours} from "@/api/performance/manHour";
+import { selectUserCondition } from "@/api/system/user";
+import { deleteAuxiliaryWorkingHours } from "@/api/performance/manHour";
 
 export default {
   name: '',
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
-  components: {limsTable},
+  components: { limsTable },
   data() {
     // 杩欓噷瀛樻斁鏁版嵁
     return {
@@ -162,14 +168,14 @@
               name: '缂栬緫',
               type: 'text',
               clickFun: (row) => {
-                this.openAddDia('edit',row);
+                this.openAddDia('edit', row);
               }
             },
             {
               name: '瀹℃牳',
               type: 'text',
               clickFun: (row) => {
-                this.openAddDia('review',row);
+                this.openAddDia('review', row);
               },
             },
             {
@@ -191,11 +197,11 @@
         current: 1
       },
       //
-      // 鍘熻緟鏂檛able鏁版嵁
+      // 鍘熻緟鏉恡able鏁版嵁
       tableData1: [],
       tableLoading1: false,
       column1: [
-        { label: '鍘熻緟鏂欏悕绉�', prop: 'materialName' },
+        { label: '鍘熻緟鏉愬悕绉�', prop: 'materialName' },
         { label: '闆朵欢鍙�', prop: 'partNo' },
         {
           dataType: 'tag',
@@ -229,14 +235,14 @@
               name: '缂栬緫',
               type: 'text',
               clickFun: (row) => {
-                this.openAddDia('edit',row);
+                this.openAddDia('edit', row);
               }
             },
             {
               name: '瀹℃牳',
               type: 'text',
               clickFun: (row) => {
-                this.openAddDia('review',row);
+                this.openAddDia('review', row);
               },
             },
             {
@@ -314,22 +320,22 @@
         // 鎴愬搧鏌ヨ
         this.getProductOrderList()
       } else if (this.tabIndex === 1) {
-        // 鍘熻緟鏂欐煡璇�
+        // 鍘熻緟鏉愭煡璇�
         this.getMaterialOrderList()
       }
     },
-    getProductOrderList () {
+    getProductOrderList() {
       this.tableLoading = true
-      selectProduct({...this.entity, ...this.page}).then(response => {
+      selectProduct({ ...this.entity, ...this.page }).then(response => {
         this.tableLoading = false
         this.tableData = response.data.records
       }).catch(error => {
         this.tableLoading = false
       })
     },
-    getMaterialOrderList () {
+    getMaterialOrderList() {
       this.tableLoading1 = true
-      selectMaterial({...this.entity, ...this.page}).then(response => {
+      selectMaterial({ ...this.entity, ...this.page }).then(response => {
         this.tableLoading1 = false
         this.tableData1 = response.data.records
       }).catch(err => {
@@ -348,17 +354,17 @@
       if (this.tabIndex === 0) {
         this.proPlanDia = true
         if (this.operationType !== 'add') {
-          this.proPlanForm = {...row}
+          this.proPlanForm = { ...row }
         }
       } else {
         this.materialDia = true
         if (this.operationType !== 'add') {
-          this.materialForm = {...row}
+          this.materialForm = { ...row }
         }
       }
     },
     // 鎴愬搧淇℃伅鎻愪氦
-    submitProForm (state) {
+    submitProForm(state) {
       this.submitProLoading = true
       if (this.operationType === 'add') {
         this.proPlanForm.state = ''
@@ -378,12 +384,12 @@
       })
     },
     // 鍏抽棴鎴愬搧淇℃伅寮规
-    closeProDia () {
+    closeProDia() {
       this.resetForm('proPlanDia')
       this.proPlanDia = false
     },
-    // 鍘熻緟鏂欎俊鎭彁浜�
-    submitMaterialRulesForm (state) {
+    // 鍘熻緟鏉愪俊鎭彁浜�
+    submitMaterialRulesForm(state) {
       this.submitMatLoading = true
       if (this.operationType === 'add') {
         this.materialForm.state = ''
@@ -402,19 +408,19 @@
         this.submitMatLoading = false
       })
     },
-    // 鍏抽棴鍘熻緟鏂欎俊鎭脊妗�
+    // 鍏抽棴鍘熻緟鏉愪俊鎭脊妗�
     closeMaterialRulesDia() {
       this.resetForm('materialForm')
       this.materialDia = false
     },
-    handleDelete (row) {
+    handleDelete(row) {
       this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
         confirmButtonText: "纭畾",
         cancelButtonText: "鍙栨秷",
         type: "warning",
       }).then(() => {
         delProduct({ id: row.id }).then((res) => {
-          if (res.code == 200){
+          if (res.code == 200) {
             this.$message.success("鍒犻櫎鎴愬姛");
             this.goSearch();
           }
@@ -423,14 +429,14 @@
 
       });
     },
-    handleDeleteM (row) {
+    handleDeleteM(row) {
       this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
         confirmButtonText: "纭畾",
         cancelButtonText: "鍙栨秷",
         type: "warning",
       }).then(() => {
         delMaterial({ id: row.id }).then((res) => {
-          if (res.code == 200){
+          if (res.code == 200) {
             this.$message.success("鍒犻櫎鎴愬姛");
             this.goSearch();
           }

--
Gitblit v1.9.3