From 53b67e2759587c1a0b490d3fa8528393c0fffb95 Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期六, 23 十二月 2023 13:21:13 +0800 Subject: [PATCH] 优化 --- jcdm-ui/src/views/main/om/productionOrde/index.vue | 91 +++++++++++++++++++++++++++++++++++---------- 1 files changed, 70 insertions(+), 21 deletions(-) diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue index 17420ed..dd24f7e 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/index.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue @@ -139,6 +139,26 @@ v-hasPermi="['om:productionOrde:export']" >瀵煎嚭</el-button> </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + :disabled="move" + size="mini" + @click="moveUp" + >涓婄Щ</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="mini" + :disabled="move" + @click="down" + >涓嬬Щ</el-button> + </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> @@ -202,7 +222,7 @@ </el-table-column> <el-table-column label="瀹㈡埛" width="80" align="center" prop="custom"> </el-table-column> - <el-table-column fixed="right" width="500" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <el-table-column fixed="right" width="350" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <!-- 宸ュ崟鐘舵�侊紙1鍒涘缓銆�2宸插彂甯冦��3鐢熶骇涓��4宸插喕缁撱��5宸插畬宸ャ��6宸插叧闂級 --> <el-button type="success" :disabled="scope.row.orderStatus !== '1'" style="width: 72px" plain @click="handleCommand('3',scope.row.id)" size="mini">寮�濮�</el-button> @@ -210,27 +230,26 @@ <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '4'" v-if="scope.row.orderStatus === '4'" plain @click="handleCommand('3',scope.row.id)" type="warning" size="mini">瑙e喕</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '1'" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'||scope.row.orderStatus === '3'||scope.row.orderStatus === '4'||scope.row.orderStatus === '5'" type="danger" size="mini">鍏抽棴</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">鍚敤</el-button> - - <el-button - :disabled="scope.row.orderStatus !== '1'" - size="mini" - type="success" - style="width: 72px" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['om:productionOrde:edit']" - >淇敼</el-button> - <el-button - :disabled="scope.row.orderStatus !== '1'" - size="mini" - type="warning" - style="width: 72px" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['om:productionOrde:remove']" - >鍒犻櫎</el-button> +<!-- <el-button--> +<!-- :disabled="scope.row.orderStatus !== '1'"--> +<!-- size="mini"--> +<!-- type="success"--> +<!-- style="width: 72px"--> +<!-- icon="el-icon-edit"--> +<!-- @click="handleUpdate(scope.row)"--> +<!-- v-hasPermi="['om:productionOrde:edit']"--> +<!-- >淇敼</el-button>--> +<!-- <el-button--> +<!-- :disabled="scope.row.orderStatus !== '1'"--> +<!-- size="mini"--> +<!-- type="warning"--> +<!-- style="width: 72px"--> +<!-- icon="el-icon-delete"--> +<!-- @click="handleDelete(scope.row)"--> +<!-- v-hasPermi="['om:productionOrde:remove']"--> +<!-- >鍒犻櫎</el-button>--> <el-button style="width: 72px" :disabled="scope.row.orderStatus === '4'||scope.row.orderStatus === '6'" v-if="scope.row.orderStatus !== '5'" @click="handleCommand('5',scope.row.id)" type="success" size="mini">瀹屾垚</el-button> - <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">宸插畬宸�</el-button> + <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">宸插畬宸�</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">鍚敤</el-button> </template> </el-table-column> </el-table> @@ -385,6 +404,8 @@ single: true, // 闈炲涓鐢� multiple: true, + move: true, + selectedRowIndex: -1, // 瀛樺偍閫変腑琛岀殑绱㈠紩 // 鏄剧ず鎼滅储鏉′欢 showSearch: true, // 鎬绘潯鏁� @@ -433,6 +454,12 @@ this.initWorkshop(); }, methods: { + moveUp(){ + this.$modal.msgSuccess("涓婄Щ"); + }, + down(selection){ + this.$modal.msgSuccess("涓嬬Щ"); + }, initWorkshop(){ listWorkshop(this.queryParams).then(response => { this.options = response.rows; @@ -547,8 +574,30 @@ // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) + const statusSize = selection.map(item => item.orderStatus) + const intArr = statusSize.map(str => parseInt(str)); + const sum = intArr.reduce((a, b) => a + b, 0); this.single = selection.length!==1 this.multiple = !selection.length + if(selection[0].orderStatus!== '1'||sum!==selection.length){ + this.single = true + this.multiple = true + } + if(selection.length > 1){ + this.move = true + }else { + this.move = false + } + // if (selection.length === 1) { + // this.move = false; + // } + + if (selection.length > 0) { + this.selectedRowIndex = this.productionOrdeList.indexOf(rows[0]); // 鑾峰彇閫変腑琛岀殑绱㈠紩 + } else { + this.selectedRowIndex = -1; // 濡傛灉娌℃湁閫変腑琛岋紝鍒欏皢绱㈠紩璁句负-1 + } + }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { -- Gitblit v1.9.3