From 7f56d8a0703e18ca1818934b671d48e81ee4a765 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Wed, 5 Jun 2024 15:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/normalSearch.js | 4 + src/api/material/poReceive.js | 2 + .../com_poReceiving_add_or_update.vue | 255 ++++++++++++++++-- src/views/modules/material/poReceiving.vue | 103 ++++--- 4 files changed, 302 insertions(+), 62 deletions(-) diff --git a/src/api/base/normalSearch.js b/src/api/base/normalSearch.js index 07db551..e23bcd6 100644 --- a/src/api/base/normalSearch.js +++ b/src/api/base/normalSearch.js @@ -1 +1,5 @@ import { createAPI } from "@/utils/httpRequest.js"; + +export const getLocationListForSearch = data => createAPI(`/normalSearch/getLocationListForSearch`,'post',data) +export const getPartListForSearch = data => createAPI(`/normalSearch/getPartListForSearch`,'post',data) + diff --git a/src/api/material/poReceive.js b/src/api/material/poReceive.js index 9b5c1aa..0f4c280 100644 --- a/src/api/material/poReceive.js +++ b/src/api/material/poReceive.js @@ -13,3 +13,5 @@ export const saveTransHeaderData= data => createAPI(`/poReceive/saveTransHeaderD export const searchTransDetailAndSubCach= data => createAPI(`/poReceive/searchTransDetailAndSubCach`,'post',data) export const createNewCachRoll= data => createAPI(`/poReceive/createNewCachRoll`,'post',data) export const finalSaveTransHeaderDetail= data => createAPI(`/poReceive/finalSaveTransHeaderDetail`,'post',data) +export const deleteSubCach= data => createAPI(`/poReceive/deleteSubCach`,'post',data) +export const deleteTransHeaderData= data => createAPI(`/poReceive/deleteTransHeaderData`,'post',data) diff --git a/src/views/modules/material/com_poReceiving_add_or_update.vue b/src/views/modules/material/com_poReceiving_add_or_update.vue index 240b04b..d4e920b 100644 --- a/src/views/modules/material/com_poReceiving_add_or_update.vue +++ b/src/views/modules/material/com_poReceiving_add_or_update.vue @@ -60,8 +60,9 @@ - - + + 物料编码 + @@ -71,12 +72,14 @@ - + + + - {{'扫描条码入库'}} + {{'扫描条码入库'}} @@ -133,7 +136,7 @@ {{'最终保存'}} - {{'关闭'}} + @@ -144,6 +147,16 @@ border v-loading="false" style="width: 100%; "> + + + + + + + + + + + + + + + + 物料编码 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{'创建分卷'}} + + + + + {{'关闭'}} + + + + + + 最终保存 + 取消 + + diff --git a/src/views/modules/material/poReceiving.vue b/src/views/modules/material/poReceiving.vue index 50d1252..f51055f 100644 --- a/src/views/modules/material/poReceiving.vue +++ b/src/views/modules/material/poReceiving.vue @@ -153,7 +153,7 @@ - + @@ -207,8 +207,11 @@ ,searchTransDetailSub ,getWareHouseList ,saveTransHeaderData - + ,deleteTransHeaderData } from "@/api/material/poReceive.js" + import { + getLocationListForSearch + } from "@/api/base/normalSearch.js" import addOrUpdate from './com_poReceiving_add_or_update' import Chooselist from '@/views/modules/common/Chooselist' export default { @@ -238,7 +241,7 @@ wareHouseList:[], jumpFlag:true, modelData:{ - addFlag:0, + transNo:'', site:this.$store.state.user.site, transDate:new Date(), warehouseID:'', @@ -619,6 +622,23 @@ status: true, fixed: '', columnWidth: 100 + },{ + userId: this.$store.state.user.name, + functionId: 200001, + serialNumber: '200001Table3ExpiredDate', + tableId: "200001Table3", + tableName: "采购入库卷明细", + columnProp: "expiredDate", + headerAlign: "center", + align: "center", + columnLabel: "失效日期", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 },{ userId: this.$store.state.user.name, functionId: 200001, @@ -778,47 +798,43 @@ }, addModal(){ this.getWareHouseList(); - - this.modelData={ - addFlag:0, - site:this.$store.state.user.site, - transDate:new Date(), - warehouseID:this.wareHouseList.length>0?this.wareHouseList[0].wareHouseId:'', - receiver:this.$store.state.user.name, - orderRef1:'', - supplierId:'', - supplierName:'', - enterBy:this.$store.state.user.name, - }; - // if(this.wareHouseList.length>0){ - // this.modelData.wareHouseId=this.wareHouseList[0].wareHouseId - // } - this.modelFlag=true; + setTimeout(() => { + this.modelData={ + transNo:"0", + site:this.$store.state.user.site, + transDate:new Date(), + warehouseID:this.wareHouseList.length>0?this.wareHouseList[0].wareHouseId:'', + receiver:this.$store.state.user.name, + orderRef1:'', + supplierId:'', + supplierName:'', + enterBy:this.$store.state.user.name, + }; + this.modelFlag=true; + },200) }, updateModel(row){ + this.getWareHouseList(); this.modelData={ - id:row.id, - site: row.site, - projectId: row.projectId, - testPartNo:row.testPartNo, - partType:row.partType, - partTypeDesc:row.partTypeDesc, - partName:row.partName, - partDesc:row.partDesc, - partSpec:row.partSpec, - remark:row.remark, - materialNumber:row.materialNumber, - username:this.$store.state.user.name, + transNo:row.transNo, + site:row.site, + transDate:row.transDate, + warehouseID:row.warehouseID, + receiver:row.receiver, + orderRef1:row.orderRef1, + supplierId:row.partnerID, + supplierName:row.partnerName, + enterBy:row.userName, } this.modelFlag=true; }, - deleteData(){ + deleteData(row){ this.$confirm('确定要删除这条数据?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { - deleteProjectPartWithId(this.modelData).then(({data}) => { + deleteTransHeaderData(row).then(({data}) => { if (data && data.code === 0) { this.$message.success( '操作成功') this.searchTable(); @@ -850,21 +866,21 @@ } saveTransHeaderData(this.modelData).then(({data}) => { if (data && data.code === 0) { + var transNo=data.transNo this.$message.success( '操作成功') this.modelFlag = false this.searchTable() if(this.jumpFlag){ this.$nextTick(function () { setTimeout(() => { - console.log(data.transNo) - // let inData = { - // site: this.$store.state.user.site, - // codeNo: data.row.codeNo, - // buNo: data.row.buNo, - // username: this.$store.state.user.name - // }; - // localStorage.setItem('tsfData', JSON.stringify(inData)) - // window.open('#/BMPage'); + let data={ + site:this.$store.state.user.site, + transNo:transNo, + } + this.addOrUpdateVisible = true + this.$nextTick(() => { + this.$refs.addOrUpdate.init(data) + }) },500) }) } @@ -878,6 +894,7 @@ getWareHouseList({site:this.$store.state.user.site}).then(({data}) => { if (data && data.code === 0) { this.wareHouseList=data.rows + } }) }, @@ -896,7 +913,7 @@ async createExportData() { this.searchData.limit = -1 this.searchData.page = 1 - await projectInfoSearch(this.searchData).then(({data}) => { + await searchTransHeader(this.searchData).then(({data}) => { this.exportList= data.page.list; })