From c77637aa6781f3275839674cb4fa2d4b72b8827c Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期一, 15 七月 2024 19:34:55 +0800
Subject: [PATCH] fix:修复纤度登记表,检验表,产量等级表部分的bug修复

---
 src/views/employeeSalary/salaryPlan/index.vue |   48 ++++++++++++++++++++++++++++--------------------
 1 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/src/views/employeeSalary/salaryPlan/index.vue b/src/views/employeeSalary/salaryPlan/index.vue
index 21c5787..733a436 100644
--- a/src/views/employeeSalary/salaryPlan/index.vue
+++ b/src/views/employeeSalary/salaryPlan/index.vue
@@ -12,10 +12,9 @@
         <TableCommonView
           :table-list="tableList"
           @selTableCol="selTableCol"
-          @tableRowClick="tableRowClick"
         >
           <template slot="tableButton">
-            <el-table-column label="鎿嶄綔" width="180">
+            <el-table-column label="鎿嶄綔" width="110">
               <template slot-scope="scope">
                 <el-button @click.stop="handleClick(scope.row)" type="text" size="small">淇敼</el-button>
                 <el-button @click.stop="delClick(scope.row)" type="text" size="small">鍒犻櫎</el-button>
@@ -25,12 +24,12 @@
           </template>
         </TableCommonView>
       </div>
-      <AddDialog 
-      ref="add" :editRow="editRow"  @refresh="refresh" 
-      />
       <div class="btn-pager">
         <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
       </div>
+      <AddDialog 
+      ref="add" :editRow="editRow"  @refresh="refresh" 
+      />
     </div>
   </div>
 </template>
@@ -52,9 +51,9 @@
       tableColumn: [
         { label: "鏂规鍚嶇О", prop: "name",min:110},
         { label: "宸ョ", prop: "workTypeNames",min:100 },
-        { label: "钖祫绫诲瀷", prop: "salaryType",min:110 },
+        { label: "钖祫绫诲瀷", prop: "salaryTypeName",min:110 },
         { label: "璁¤垂鍛ㄦ湡", prop: "cycle",min:110 },
-        { label: "璁¤垂鍏紡瀹氫箟", prop: "salaryFormula",min:140  },
+        { label: "璁¤垂鍏紡瀹氫箟", prop: "salaryFormulaValue",min:140  },
         { label: "娣诲姞鏃堕棿", prop: "createTime",min:130 },
         { label: "娣诲姞浜�", prop: "addPeople",min:110 },
       ],
@@ -114,12 +113,16 @@
                 let workTypeNames=''
                 if(item.workTypes){
                   for(let i in item.workTypes){
-                    workTypeNames=workTypeNames+','+item.workTypeNames[i].name
+                    workTypeNames=item.workTypes[i].workName+','+workTypeNames
                   }
                 }
+                let salaryFormulaValue=''
+                salaryFormulaValue=item.salaryFormula?item.salaryFormula.split(",").join(''):[]
                 return {
                   ...item,
-                  workTypeNames:workTypeNames
+                  workTypeNames:workTypeNames,
+                  salaryFormulaValue:salaryFormulaValue,
+                  salaryTypeName:item.salaryType?item.salaryType.name:''
                 }
               })
               this.tableList.tableInfomation = list || []
@@ -140,7 +143,7 @@
     },
     // 鏂板
     addBtnClick() {
-      this.editRow = { title:'鏂板缓',type:'add' }
+      this.editRow = { title:'鏂板缓',type: 'add' }
       this.$refs.add.islook = true;
     },
     // 鎼滅储
@@ -152,20 +155,25 @@
     refresh(){
       this.getData()
     },
-    // 琛ㄦ牸琛岀偣鍑�
-    tableRowClick(row) {
-      console.log(row, "row")
-    },
     // 缂栬緫
     handleClick(row) {
       let config=JSON.parse(JSON.stringify(row));
-      this.editRow = { ...config, 
+      let arr=config.workTypes?config.workTypes:[]
+      let workTypes=[]
+      if(arr&&arr.length>0){
+        for(let i in arr){
+          workTypes.push({
+            value:arr[i].ID,
+            label: arr[i].workName
+          })
+        }
+      }
+      this.editRow = { 
+        ...config, 
         title:'缂栬緫',
         type:'edit',
-        workTypeObj:{
-          value:config.workTypeId,
-          label:config.workType,
-        } 
+        id:config.ID,
+        workTypes:workTypes
       }
       this.$refs.add.islook = true;
     },
@@ -177,7 +185,7 @@
         type: "warning"
       })
         .then(() => {
-          deleteSalaryPlanInfo({ id: row.id }).then((response) => {
+          deleteSalaryPlanInfo({ id: row.ID }).then((response) => {
             if (response.code === 200) {
               this.$message.success("鍒犻櫎鎴愬姛")
               this.getData()

--
Gitblit v1.8.0