From 0994009a6d6184839359505d99fdf7be68ee1b19 Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期五, 14 三月 2025 12:51:12 +0800 Subject: [PATCH] 工单界面新增按钮 --- billion-ui/src/views/main/om/info/index.vue | 153 +++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 119 insertions(+), 34 deletions(-) diff --git a/billion-ui/src/views/main/om/info/index.vue b/billion-ui/src/views/main/om/info/index.vue index 3012182..d4b3e36 100644 --- a/billion-ui/src/views/main/om/info/index.vue +++ b/billion-ui/src/views/main/om/info/index.vue @@ -26,16 +26,6 @@ @keyup.enter.native="handleQuery" /> </el-form-item> - <el-form-item label="宸ュ崟鐘舵��" prop="orderStatus"> - <el-select v-model="queryParams.orderStatus" placeholder="璇烽�夋嫨宸ュ崟鐘舵��" clearable> - <el-option - v-for="dict in dict.type.order_status" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> <el-form-item style="float: right; margin-right: 90px"> <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> @@ -74,9 +64,31 @@ icon="el-icon-edit" size="mini" :disabled="single" - @click="" + @click="bodyStatus" v-hasPermi="['main:info:edit']" >缂镐綋鏆傚仠\鍚姩</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="primary" + plain + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="headStatus" + v-hasPermi="['main:info:edit']" + >缂哥洊鏆傚仠\鍚姩</el-button> + </el-col> + <el-col :span="1.5"> + <el-button + type="info" + plain + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="preStatus" + v-hasPermi="['main:info:edit']" + >棰勮鏆傚仠\鍚姩</el-button> </el-col> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> </el-row> @@ -103,14 +115,14 @@ <span>{{ parseTime(scope.row.planEndTime, '{y}-{m}-{d} {h}:{i}') }}</span> </template> </el-table-column> - <el-table-column label="鏇存柊鏃堕棿" align="center" prop="updateTime" > - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}') }}</span> - </template> - </el-table-column> +<!-- <el-table-column label="鏇存柊鏃堕棿" align="center" prop="updateTime" >--> +<!-- <template slot-scope="scope">--> +<!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}') }}</span>--> +<!-- </template>--> +<!-- </el-table-column>--> <el-table-column label="缂镐綋涓婄嚎鏁伴噺" align="center" prop="bodyQty" /> - <el-table-column label="缂哥洊涓婄嚎鏁伴噺" align="center" prop="head_qty" /> - <el-table-column label="棰勮涓婄嚎鏁伴噺" align="center" prop="pre_qty" /> + <el-table-column label="缂哥洊涓婄嚎鏁伴噺" align="center" prop="headQty" /> + <el-table-column label="棰勮涓婄嚎鏁伴噺" align="center" prop="preQty" /> <el-table-column label="缂镐綋宸ュ崟鐘舵��" align="center" prop="bodyStatus" > <template slot-scope="scope"> <dict-tag :options="dict.type.status" :value="scope.row.bodyStatus"/> @@ -150,7 +162,7 @@ <el-input disabled v-model="form.productCode" placeholder="璇疯緭鍏ヤ骇鍝佺紪鍙�" /> </el-form-item> <el-form-item label="璁″垝鏁伴噺" prop="planQty"> - <el-input disabled v-model="form.planQty" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> + <el-input v-model="form.planQty" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> </el-form-item> <el-form-item label="璁″垝寮�濮嬫椂闂�" prop="planStartTime"> <el-date-picker clearable @@ -169,25 +181,22 @@ </el-date-picker> </el-form-item> <el-form-item label="缂镐綋鏁伴噺" prop="bodyQty"> - <el-input disabled v-model="form.bodyQty" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> + <el-input v-model="form.bodyQty" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> </el-form-item> - <el-form-item label="缂镐綋宸ュ崟鐘舵��" prop="bodyStatus" v-if = updateFlag> - <el-radio-group v-model="form.bodyStatus"> - <el-radio - v-for="dict in dict.type.status" - :key="dict.value" - :label="dict.value" - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> - - - +<!-- <el-form-item label="缂镐綋宸ュ崟鐘舵��" prop="bodyStatus" v-if = updateFlag>--> +<!-- <el-radio-group v-model="form.bodyStatus">--> +<!-- <el-radio--> +<!-- v-for="dict in dict.type.status"--> +<!-- :key="dict.value"--> +<!-- :label="dict.value"--> +<!-- >{{dict.label}}</el-radio>--> +<!-- </el-radio-group>--> +<!-- </el-form-item>--> <el-form-item label="缂稿鏁伴噺" prop="headStatus"> - <el-input disabled v-model="form.headStatus" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> + <el-input v-model="form.headStatus" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> </el-form-item> <el-form-item label="棰勮鏁伴噺" prop="preStatus"> - <el-input disabled v-model="form.preStatus" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> + <el-input v-model="form.preStatus" placeholder="璇疯緭鍏ヨ鍒掓暟閲�" /> </el-form-item> <el-form-item label="澶囨敞" prop="remarks"> <el-input @@ -393,6 +402,12 @@ updateBy: null, remarks: null, delFlag: null, + bodyQty: null, + headQty: null, + preQty: null, + bodyStatus :null, + headStatus :null, + preStatus :null, }; this.resetForm("form"); this.addFlag = false @@ -433,6 +448,76 @@ this.title = "淇敼鐢熶骇宸ュ崟"; }); }, + + /** 淇敼缂镐綋鐘舵�佹寜閽搷浣� */ + bodyStatus(row) { + this.reset(); + const id = row.id || this.ids + getInfo(id).then(response => { + this.form = response.data; + if(this.form.bodyStatus === "1"){ + this.form.bodyStatus = "3"; + updateInfo(this.form).then(response => { + this.$modal.msgSuccess("鏆傚仠鎴愬姛"); + this.getList();}); + }else if(this.form.bodyStatus === "2"){ + this.$message('璁㈠崟宸插畬鎴愮姝慨鏀�'); + }else if(this.form.bodyStatus === "3"){ + this.form.bodyStatus = "1"; + updateInfo(this.form).then(response => { + this.$modal.msgSuccess("閲嶅惎鎴愬姛"); + this.getList();}); + }else if(this.form.bodyStatus === "0"){ + this.$message('璁㈠崟鏈紑濮�'); + } + }); + }, + /** 淇敼缂哥洊鐘舵�佹寜閽搷浣� */ + headStatus(row) { + this.reset(); + const id = row.id || this.ids + getInfo(id).then(response => { + this.form = response.data; + if(this.form.headStatus === "1"){ + this.form.headStatus = "3"; + updateInfo(this.form).then(response => { + this.$modal.msgSuccess("鏆傚仠鎴愬姛"); + this.getList();}); + }else if(this.form.headStatus === "2"){ + this.$message('璁㈠崟宸插畬鎴愮姝慨鏀�'); + }else if(this.form.headStatus === "3"){ + this.form.headStatus = "1"; + updateInfo(this.form).then(response => { + this.$modal.msgSuccess("閲嶅惎鎴愬姛"); + this.getList();}); + }else if(this.form.headStatus === "0"){ + this.$message('璁㈠崟鏈紑濮�'); + } + }); + }, + /** 淇敼棰勮鐘舵�佹寜閽搷浣� */ + preStatus(row) { + this.reset(); + const id = row.id || this.ids + getInfo(id).then(response => { + this.form = response.data; + if(this.form.preStatus === "1"){ + this.form.preStatus = "3"; + updateInfo(this.form).then(response => { + this.$modal.msgSuccess("鏆傚仠鎴愬姛"); + this.getList();}); + }else if(this.form.preStatus === "2"){ + this.$message('璁㈠崟宸插畬鎴愮姝慨鏀�'); + }else if(this.form.preStatus === "3"){ + this.form.preStatus = "1"; + updateInfo(this.form).then(response => { + this.$modal.msgSuccess("閲嶅惎鎴愬姛"); + this.getList();}); + }else if(this.form.preStatus === "0"){ + this.$message('璁㈠崟鏈紑濮�'); + } + }); + }, /** 鎻愪氦鎸夐挳 */ submitForm() { this.$refs["form"].validate(valid => { -- Gitblit v1.9.3