From 57ec2038f86f47a87db6b73c0c6eb27c1c25b08e Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期三, 06 八月 2025 14:16:00 +0800 Subject: [PATCH] 我的已办、仓库管理相关调整 --- src/views/eam/dispose/EamEquipmentLeanOutList.vue | 153 ++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 126 insertions(+), 27 deletions(-) diff --git a/src/views/eam/dispose/EamEquipmentLeanOutList.vue b/src/views/eam/dispose/EamEquipmentLeanOutList.vue index afab556..d26da1c 100644 --- a/src/views/eam/dispose/EamEquipmentLeanOutList.vue +++ b/src/views/eam/dispose/EamEquipmentLeanOutList.vue @@ -3,23 +3,58 @@ <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <a-form-item label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" - v-model="queryParam.equipmentId"></lx-search-equipment-select> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="璁惧缂栧彿1"> + <lx-search-equipment-select + placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" + v-model="queryParam.equipmentId" + ></lx-search-equipment-select> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col + :xl="4" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="鍗曟嵁鍙�"> - <a-input placeholder="璇疯緭鍏ュ崟鎹彿" v-model="queryParam.code"></a-input> + <a-input + placeholder="璇疯緭鍏ュ崟鎹彿" + v-model="queryParam.code" + ></a-input> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> - <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <span + style="float: left;overflow: hidden;" + class="table-page-search-submitButtons" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + type="info" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> </span> </a-col> </a-row> @@ -28,10 +63,17 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <a-button + @click="handleAdd" + type="primary" + icon="plus" + >鏂板</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> + <a-menu-item + key="1" + @click="batchDel" + > <a-icon type="delete" /> 鍒犻櫎 </a-menu-item> @@ -44,10 +86,15 @@ <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a - style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + > + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a + style="margin-left: 24px" + @click="onClearSelected" + >娓呯┖</a> </div> <a-table @@ -61,32 +108,55 @@ :loading="loading" :scroll="{ x: 'max-content' }" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + @change="handleTableChange" + > - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <template v-if="record.leanStatus === 'WAIT_SUBMIT'"> <a @click="handleEdit(record)">缂栬緫</a> <a-divider type="vertical" /> - <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> + <a-popconfirm + title="纭畾鎻愪氦鍚�?" + @confirm="() => handleSubmit(record.id)" + > <a>鎻愪氦</a> </a-popconfirm> <a-divider type="vertical" /> <a-dropdown> <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> <a-menu slot="overlay"> - <a-menu-item> - <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a> + <a-menu-item> + <a + href="javascript:;" + @click="handleDetail(record)" + >璇︽儏</a> </a-menu-item> <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > <a>鍒犻櫎</a> </a-popconfirm> </a-menu-item> </a-menu> </a-dropdown> </template> - <template v-else> - <a @click="handleDetail(record)">璇︽儏</a> + <template v-if="record.leanStatus === 'WAIT_RETURN'"> + <a-popconfirm title='纭畾褰掕繕鍚�?' @confirm='() => equipmentReturn(record.id)'> + <a>褰掕繕</a> + </a-popconfirm> + <a-divider type='vertical' /> + <a @click='handleDetail(record)'>璇︽儏</a> + </template> + <template v-if="record.leanStatus !== 'WAIT_RETURN' && record.leanStatus !== 'WAIT_SUBMIT'"> + <a + href="javascript:;" + @click="handleDetail(record)" + >璇︽儏</a> </template> </span> @@ -95,7 +165,10 @@ <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamEquipmentLeanOut-modal ref="modalForm" @ok="modalFormOk"></eamEquipmentLeanOut-modal> + <eamEquipmentLeanOut-modal + ref="modalForm" + @ok="modalFormOk" + ></eamEquipmentLeanOut-modal> </a-card> </template> @@ -125,7 +198,7 @@ width: 60, fixed: 'left', align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -225,11 +298,37 @@ delete: '/eam/eamEquipmentLeanOut/delete', deleteBatch: '/eam/eamEquipmentLeanOut/deleteBatch', submit: '/eam/eamEquipmentLeanOut/submit', + equipmentReturn: '/eam/eamEquipmentLeanOut/equipmentReturn', } } }, computed: {}, methods: { + equipmentReturn(id) { + if (!this.url.equipmentReturn) { + this.$message.error('璇疯缃畊rl.submit灞炴��!') + return + } + let that = this + getAction(that.url.equipmentReturn, { id: id }).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(1) + // that.$message.success(res.message); + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, handleSubmit(id) { if (!this.url.submit) { this.$message.error('璇疯缃畊rl.submit灞炴��!') -- Gitblit v1.9.3