From 25bfdf783be9c8e34afcec8106c39e17aa66a1e2 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 29 四月 2024 15:56:43 +0800
Subject: [PATCH] 纤度检验表的 车间显示问题处理
---
src/views/employeeSalary/salaryPlan/index.vue | 75 ++++++++++++++++++++++---------------
1 files changed, 44 insertions(+), 31 deletions(-)
diff --git a/src/views/employeeSalary/salaryPlan/index.vue b/src/views/employeeSalary/salaryPlan/index.vue
index df91ded..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>
@@ -50,14 +49,13 @@
tableList: {},
showCol: ["鏂规鍚嶇О", "宸ョ", "钖祫绫诲瀷", "璁¤垂鍛ㄦ湡", "璁¤垂鍏紡瀹氫箟", "娣诲姞鏃堕棿", "娣诲姞浜�"],
tableColumn: [
- // { label: "杞﹂棿", prop: "workshopNumber",iconRight:"el-icon-setting"},
- { label: "鏂规鍚嶇О", prop: "workshopNumber",min:110},
- { label: "宸ョ", prop: "groupNumber",min:100 },
- { label: "钖祫绫诲瀷", prop: "startCarNumber",min:110 },
- { label: "璁¤垂鍛ㄦ湡", prop: "endCarNumber",min:110 },
- { label: "璁¤垂鍏紡瀹氫箟", prop: "carFlag",min:140 },
- { label: "娣诲姞鏃堕棿", prop: "notes",min:130 },
- { label: "娣诲姞浜�", prop: "notes",min:110 },
+ { label: "鏂规鍚嶇О", prop: "name",min:110},
+ { label: "宸ョ", prop: "workTypeNames",min:100 },
+ { label: "钖祫绫诲瀷", prop: "salaryTypeName",min:110 },
+ { label: "璁¤垂鍛ㄦ湡", prop: "cycle",min:110 },
+ { label: "璁¤垂鍏紡瀹氫箟", prop: "salaryFormulaValue",min:140 },
+ { label: "娣诲姞鏃堕棿", prop: "createTime",min:130 },
+ { label: "娣诲姞浜�", prop: "addPeople",min:110 },
],
keyword: '',
editRow:{},
@@ -111,7 +109,22 @@
.then((res) => {
if (res.code === 200) {
if (res.data) {
- const list = res.data
+ const list = res.data.map(item=>{
+ let workTypeNames=''
+ if(item.workTypes){
+ for(let i in item.workTypes){
+ workTypeNames=item.workTypes[i].workName+','+workTypeNames
+ }
+ }
+ let salaryFormulaValue=''
+ salaryFormulaValue=item.salaryFormula?item.salaryFormula.split(",").join(''):[]
+ return {
+ ...item,
+ workTypeNames:workTypeNames,
+ salaryFormulaValue:salaryFormulaValue,
+ salaryTypeName:item.salaryType?item.salaryType.name:''
+ }
+ })
this.tableList.tableInfomation = list || []
this.pagerOptions.totalCount = res.total
} else {
@@ -130,9 +143,8 @@
},
// 鏂板
addBtnClick() {
- this.editConfig.infomitton={}
- this.editConfig.dialogTitle="鏂板"
- this.editConfig.visible=true
+ this.editRow = { title:'鏂板缓',type: 'add' }
+ this.$refs.add.islook = true;
},
// 鎼滅储
onFilterSearch(searchText) {
@@ -143,24 +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',
- shopNameObj:{
- value:config.shopId,
- label:config.shopName,
- },
- workTypeObj:{
- value:config.workTypeId,
- label:config.workType,
- }
+ id:config.ID,
+ workTypes:workTypes
}
this.$refs.add.islook = true;
},
@@ -172,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