From 9e1c79907d54bad69ee70e06a5ee6379c838094e Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期六, 06 九月 2025 17:48:18 +0800 Subject: [PATCH] art: 热处理外协入库、小内圈外协入库、物料调拨 --- src/views/lsw/LswMaterialInventoryList.vue | 5 + src/views/lsw/LswMaterialInboundList.vue | 47 ++++++--------- src/views/lsw/modules/LswMaterialInboundForm.vue | 96 +++++++++++++++++++++---------- 3 files changed, 89 insertions(+), 59 deletions(-) diff --git a/src/views/lsw/LswMaterialInboundList.vue b/src/views/lsw/LswMaterialInboundList.vue index c676f89..c682bdb 100644 --- a/src/views/lsw/LswMaterialInboundList.vue +++ b/src/views/lsw/LswMaterialInboundList.vue @@ -20,20 +20,26 @@ <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" v-model="queryParam.materialNumber"></j-input> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鐗╂枡鍚嶇О"> - <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鎵规鍙�"> - <j-input placeholder="璇疯緭鍏ユ壒娆″彿" v-model="queryParam.batchNumber"></j-input> - </a-form-item> - </a-col> + <template v-if="toggleSearchStatus"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鐗╂枡鍚嶇О"> + <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鎵规鍙�"> + <j-input placeholder="璇疯緭鍏ユ壒娆″彿" v-model="queryParam.batchNumber"></j-input> + </a-form-item> + </a-col> + </template> <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 @click="handleToggleSearch" style="margin-left: 8px"> + {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> + </a> </span> </a-col> </a-row> @@ -43,9 +49,9 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <a-button @click="handleAdd('HEAT_TREATMENT_INBOUND')" type="primary" icon="plus">鐑鐞嗗叆搴�</a-button> - <a-button @click="handleAdd('SMALL_INNER_RING')" type="primary" icon="plus">灏忓唴鍦堝叆搴�</a-button> - <a-button @click="handleAdd('MATERIAL_INNER_TRANSFER')" type="primary" icon="plus">閽㈢悆璋冩嫧</a-button> + <a-button @click="handleAdd('HEAT_TREATMENT_INBOUND')" type="primary" icon="plus">鐑鐞嗗鍗忓叆搴�</a-button> + <a-button @click="handleAdd('SMALL_INNER_RING')" type="primary" icon="plus">灏忓唴鍦堝鍗忓叆搴�</a-button> + <a-button @click="handleAdd('MATERIAL_INNER_TRANSFER')" type="primary" icon="plus">鍐呴儴璋冩嫧</a-button> </div> <!-- table鍖哄煙-begin --> <div> @@ -66,11 +72,6 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" class="j-table-force-nowrap" @change="handleTableChange"> - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" /> - <a @click="handleDetail(record)">璇︽儏</a> - </span> </a-table> </div> @@ -149,21 +150,13 @@ { title:'鍏ュ簱浜�', align:"center", - dataIndex: 'receiver' + dataIndex: 'receiver_dictText' }, { title:'鍏ュ簱鏃堕棿', align:"center", dataIndex: 'receiveTime' }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align:"center", - fixed:"right", - width:147, - scopedSlots: { customRender: 'action' } - } ], url: { list: "/lsw/materialInbound/list", diff --git a/src/views/lsw/LswMaterialInventoryList.vue b/src/views/lsw/LswMaterialInventoryList.vue index 7b3252b..ceac6ed 100644 --- a/src/views/lsw/LswMaterialInventoryList.vue +++ b/src/views/lsw/LswMaterialInventoryList.vue @@ -77,6 +77,11 @@ align: 'center', dataIndex: 'inventoryStatus_dictText' }, + { + title: '鐑鐞嗘爣璁�', + align: 'center', + dataIndex: 'warehouseId_dictText' + }, ], url: { list: '/lsw/materialInventory/list', diff --git a/src/views/lsw/modules/LswMaterialInboundForm.vue b/src/views/lsw/modules/LswMaterialInboundForm.vue index 15c5f74..a20e449 100644 --- a/src/views/lsw/modules/LswMaterialInboundForm.vue +++ b/src/views/lsw/modules/LswMaterialInboundForm.vue @@ -4,8 +4,15 @@ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-row> <a-col :span="12"> - <a-form-model-item label="鏉ユ簮缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="originalCode"> + <a-form-model-item label="鏉ユ簮缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="originalCode" + v-if="model.inboundCategory !== 'MATERIAL_INNER_TRANSFER'"> <a-input v-model="model.originalCode" placeholder="璇疯緭鍏ユ潵婧愮紪鐮�"></a-input> + </a-form-model-item> + <a-form-model-item label="鏉ユ簮绾胯竟搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="originalCode" + v-else> + <j-search-select-tag v-model="model.originalCode" placeholder="璇烽�夋嫨绾胯竟搴�" + :dict-options="originalCodeDictOptions" + @change="originalCodeSelectChange"></j-search-select-tag> </a-form-model-item> </a-col> <a-col :span="12"> @@ -16,12 +23,14 @@ <a-col :span="12"> <a-form-model-item label="绾胯竟搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouseId"> <j-search-select-tag v-model="model.warehouseId" placeholder="璇烽�夋嫨绾胯竟搴�" - :dict-options="warehouseDictOptions" @change="warehouseSelectChange"></j-search-select-tag> + :dict-options="warehouseDictOptions" + @change="warehouseSelectChange"></j-search-select-tag> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item label="鐗╂枡缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber"> - <j-search-select-tag :dict-options="materialDictOptions" v-model="model.materialNumber" placeholder="璇烽�夋嫨鐗╂枡缂栫爜" @change="materialSelectChange"></j-search-select-tag> + <j-search-select-tag :dict-options="materialDictOptions" v-model="model.materialNumber" + placeholder="璇烽�夋嫨鐗╂枡缂栫爜" @change="materialSelectChange"></j-search-select-tag> </a-form-model-item> </a-col> <a-col :span="12"> @@ -47,7 +56,8 @@ </a-col> <a-col :span="12"> <a-form-model-item label="鍏ュ簱绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inboundCategory"> - <j-search-select-tag v-model="model.inboundCategory" dict="material_inbound_category"></j-search-select-tag> + <j-search-select-tag v-model="model.inboundCategory" + dict="material_inbound_category"></j-search-select-tag> </a-form-model-item> </a-col> </a-row> @@ -62,8 +72,7 @@ export default { name: 'LswMaterialInboundForm', - components: { - }, + components: {}, props: { //琛ㄥ崟绂佺敤 disabled: { @@ -107,20 +116,27 @@ ], quantity: [ { required: true, message: '鍏ュ簱鏁伴噺鏄繀閫夐」', trigger: 'change' } - ], + ] }, url: { add: '/lsw/materialInbound/add', edit: '/lsw/materialInbound/edit', queryById: '/lsw/materialInbound/queryById', queryByProductionType: '/base/lineSideWarehouse/queryByProductionType', - queryByMaterialCategory: '/lsw/lswMaterial/queryByMaterialCategory', + queryByMaterialCategory: '/lsw/lswMaterial/queryByMaterialCategory' } } }, computed: { formDisabled() { return this.disabled + }, + originalCodeDictOptions() { + return this.warehouseDictOptions.map(warehouse => ({ + ...warehouse, + value: warehouse.warehouseCode, + text: warehouse.warehouseName + '(' + warehouse.warehouseCode + ')' + })) } }, created() { @@ -129,19 +145,19 @@ }, methods: { add(inboundCategory) { - this.warehouseDictOptions = []; - this.materialDictOptions = []; - if(inboundCategory === 'HEAT_TREATMENT_INBOUND') { - this.loadWarehouseDictOptions('OUTERFLANGE,INNERFLANGE'); - this.loadMaterialDictOptions('BLANK'); - }else if(inboundCategory === 'SMALL_INNER_RING') { - this.loadWarehouseDictOptions('ASSEMBLE'); - this.loadMaterialDictOptions('SMALL_INNER_RING'); - } else if(inboundCategory === 'MATERIAL_INNER_TRANSFER') { - this.loadWarehouseDictOptions('ASSEMBLE'); - this.loadMaterialDictOptions('STEEL_BALL'); + this.warehouseDictOptions = [] + this.materialDictOptions = [] + if (inboundCategory === 'HEAT_TREATMENT_INBOUND') { + this.loadWarehouseDictOptions('OUTERFLANGE,INNERFLANGE') + this.loadMaterialDictOptions('BLANK') + } else if (inboundCategory === 'SMALL_INNER_RING') { + this.loadWarehouseDictOptions('ASSEMBLE') + this.loadMaterialDictOptions('SMALL_INNER_RING') + } else if (inboundCategory === 'MATERIAL_INNER_TRANSFER') { + this.loadWarehouseDictOptions('ASSEMBLE,OUTERFLANGE,INNERFLANG,HEATTREATMENT') + this.loadMaterialDictOptions('OUTER_FLANGE,INNER_FLANGE,STEEL_BALL,BLANK,COMPONENTS') } - this.modelDefault.inboundCategory = inboundCategory; + this.modelDefault.inboundCategory = inboundCategory this.edit(this.modelDefault) }, edit(record) { @@ -178,35 +194,51 @@ }) }, loadWarehouseDictOptions(productionType) { - let params = {productionType : productionType} + let params = { productionType: productionType } getAction(this.url.queryByProductionType, params).then(res => { - if(res.success) { - this.warehouseDictOptions = res.result.map(warehouse => ({...warehouse, value : warehouse.id, text: warehouse.warehouseName + '(' + warehouse.warehouseCode+')'})); + if (res.success) { + this.warehouseDictOptions = res.result.map(warehouse => ({ + ...warehouse, + value: warehouse.id, + text: warehouse.warehouseName + '(' + warehouse.warehouseCode + ')' + })) } }) }, loadMaterialDictOptions(materialCategory) { - let params = {materialCategory : materialCategory} + let params = { materialCategory: materialCategory } getAction(this.url.queryByMaterialCategory, params).then(res => { - if(res.success) { - this.materialDictOptions = res.result.map(material => ({...material, value : material.materialNumber, text: material.materialNumber})); + if (res.success) { + this.materialDictOptions = res.result.map(material => ({ + ...material, + value: material.materialNumber, + text: material.materialNumber + '(' + material.materialName + ')' + })) } }) }, warehouseSelectChange(value) { let warehouse = this.warehouseDictOptions.find(option => option.value === value) - if(warehouse) { + if (warehouse) { this.model.factoryId = warehouse.factoryId - }else { - this.model.factoryId = undefined; + } else { + this.model.factoryId = undefined } }, materialSelectChange(value) { let material = this.materialDictOptions.find(option => option.value === value) - if(material) { + if (material) { this.model.materialName = material.materialName - }else { - this.model.materialName = undefined; + } else { + this.model.materialName = undefined + } + }, + originalCodeSelectChange(value) { + let warehouse = this.originalCodeDictOptions.find(option => option.value === value) + if (warehouse) { + this.model.originalName = warehouse.warehouseName + } else { + this.model.originalName = undefined } } } -- Gitblit v1.9.3