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 +++++++++++++++++++++++------- jcdm-ui/src/views/main/bs/technologyRoute/index.vue | 46 +++----------- jcdm-ui/src/views/main/bs/processes/index.vue | 9 +- 3 files changed, 86 insertions(+), 60 deletions(-) diff --git a/jcdm-ui/src/views/main/bs/processes/index.vue b/jcdm-ui/src/views/main/bs/processes/index.vue index cdf0590..5931da0 100644 --- a/jcdm-ui/src/views/main/bs/processes/index.vue +++ b/jcdm-ui/src/views/main/bs/processes/index.vue @@ -86,16 +86,17 @@ <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> </template> </el-table-column> - <el-table-column label="鍒涘缓浜�" align="center" prop="createUser" width="80"> + <el-table-column label="澶囨敞" align="center" prop="remarks"> + </el-table-column> + <el-table-column label="鍒涘缓浜�" align="center" prop="createUser" width="160"> </el-table-column> <el-table-column label="鍒涘缓鏃堕棿" width="160" align="center" prop="createTime"> </el-table-column> - <el-table-column label="鏇存柊浜�" align="center" prop="updateUser" width="80"> + <el-table-column label="鏇存柊浜�" align="center" prop="updateUser" width="160"> </el-table-column> <el-table-column label="鏇存敼鏃堕棿" width="160" align="center" prop="updateTime"> </el-table-column> - <el-table-column label="澶囨敞" align="center" prop="remarks"> - </el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" width="200" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button diff --git a/jcdm-ui/src/views/main/bs/technologyRoute/index.vue b/jcdm-ui/src/views/main/bs/technologyRoute/index.vue index c28bbfd..c64bb01 100644 --- a/jcdm-ui/src/views/main/bs/technologyRoute/index.vue +++ b/jcdm-ui/src/views/main/bs/technologyRoute/index.vue @@ -10,14 +10,6 @@ @keyup.enter.native="handleQuery" /> </el-form-item> - <el-form-item label-width="120" label="宸ヨ壓娴佺▼鍚嶇О" prop="routeName"> - <el-input - v-model="queryParams.routeName" - placeholder="璇疯緭鍏ュ伐鑹烘祦绋嬪悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> <el-form-item label="浜у搧缂栫爜" prop="productCode"> <el-input v-model="queryParams.productCode" @@ -26,36 +18,20 @@ @keyup.enter.native="handleQuery" /> </el-form-item> - <el-form-item label="浜у搧鍚嶇О" prop="productName"> - <el-input - v-model="queryParams.productName" - placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" - clearable - @keyup.enter.native="handleQuery" - /> + <el-form-item label="鐘舵��" prop="status"> + <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨鐘舵��" clearable> + <el-option + v-for="dict in dict.type.sys_normal_disable" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> </el-form-item> - <!-- <el-form-item label="鐘舵��(瀛楀吀)" prop="status">--> - <!-- <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨鐘舵��(瀛楀吀)" clearable>--> - <!-- <el-option--> - <!-- v-for="dict in dict.type.${dictType}"--> - <!-- :key="dict.value"--> - <!-- :label="dict.label"--> - <!-- :value="dict.value"--> - <!-- />--> - <!-- </el-select>--> - <!-- </el-form-item>--> <el-form-item style="float: right"> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> </el-form-item> -<!-- <el-form-item label="鏁版嵁鏉ユ簮" prop="dataSource">--> -<!-- <el-input--> -<!-- v-model="queryParams.dataSource"--> -<!-- placeholder="璇疯緭鍏ユ暟鎹潵婧�"--> -<!-- clearable--> -<!-- @keyup.enter.native="handleQuery"--> -<!-- />--> -<!-- </el-form-item>--> </el-form> </el-card> @@ -132,11 +108,11 @@ </el-table-column> <el-table-column label="澶囨敞" align="center" prop="remark"> </el-table-column> - <el-table-column label="鍒涘缓鐢ㄦ埛" align="center" prop="createUser"> + <el-table-column label="鍒涘缓鐢ㄦ埛" width="160" align="center" prop="createUser"> </el-table-column> <el-table-column label="鍒涘缓鏃堕棿" width="160" align="center" prop="createTime"> </el-table-column> - <el-table-column label="鏇存敼鐢ㄦ埛" align="center" prop="updateUser"> + <el-table-column label="鏇存敼鐢ㄦ埛" width="160" align="center" prop="updateUser"> </el-table-column> <el-table-column label="鏇存敼鏃堕棿" width="160" align="center" prop="updateTime"> </el-table-column> 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