From 3ece884906b5222933970051376b005b3641f3c6 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Tue, 4 Jun 2024 18:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/normalSearch.js | 1 + src/api/material/poReceive.js | 4 + .../com_poReceiving_add_or_update.vue | 581 ++++++++++++++++++ src/views/modules/material/poReceiving.vue | 62 +- 4 files changed, 628 insertions(+), 20 deletions(-) create mode 100644 src/api/base/normalSearch.js create mode 100644 src/views/modules/material/com_poReceiving_add_or_update.vue diff --git a/src/api/base/normalSearch.js b/src/api/base/normalSearch.js new file mode 100644 index 0000000..07db551 --- /dev/null +++ b/src/api/base/normalSearch.js @@ -0,0 +1 @@ +import { createAPI } from "@/utils/httpRequest.js"; diff --git a/src/api/material/poReceive.js b/src/api/material/poReceive.js index 08e416e..9b5c1aa 100644 --- a/src/api/material/poReceive.js +++ b/src/api/material/poReceive.js @@ -9,3 +9,7 @@ export const searchTransDetailSub = data => createAPI(`/poReceive/searchTransDet export const getWareHouseList = data => createAPI(`/poReceive/getWareHouseList`,'post',data) export const saveTransHeaderData= data => createAPI(`/poReceive/saveTransHeaderData`,'post',data) + +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) diff --git a/src/views/modules/material/com_poReceiving_add_or_update.vue b/src/views/modules/material/com_poReceiving_add_or_update.vue new file mode 100644 index 0000000..240b04b --- /dev/null +++ b/src/views/modules/material/com_poReceiving_add_or_update.vue @@ -0,0 +1,581 @@ + + + + + diff --git a/src/views/modules/material/poReceiving.vue b/src/views/modules/material/poReceiving.vue index fe692e9..50d1252 100644 --- a/src/views/modules/material/poReceiving.vue +++ b/src/views/modules/material/poReceiving.vue @@ -51,6 +51,8 @@ @row-click="changeData" :height="height" border + highlight-current-row + ref="mainTable" v-loading="dataListLoading" style="width: 100%; "> 编辑 删除 - 扫描 + 扫描 @@ -91,6 +93,8 @@ :total="totalPage" layout="total, sizes, prev, pager, next, jumper"> + + - + @@ -189,6 +193,9 @@ 关闭 + + + @@ -200,11 +207,14 @@ ,searchTransDetailSub ,getWareHouseList ,saveTransHeaderData + } from "@/api/material/poReceive.js" + import addOrUpdate from './com_poReceiving_add_or_update' import Chooselist from '@/views/modules/common/Chooselist' export default { components: { Chooselist + ,addOrUpdate }, data() { return { @@ -214,6 +224,7 @@ dataList: [], dataList2: [], dataList3: [], + addOrUpdateVisible:false, searchData: { page: 1, limit: 100, @@ -230,7 +241,7 @@ addFlag:0, site:this.$store.state.user.site, transDate:new Date(), - wareHouseId:'', + warehouseID:'', receiver:'', orderRef1:'', supplierId:'', @@ -299,10 +310,10 @@ },{ userId: this.$store.state.user.name, functionId: 200001, - serialNumber: '200001Table1WareHouseId', + serialNumber: '200001Table1WareHouseID', tableId: "200001Table1", tableName: "采购入库主表", - columnProp: "wareHouseId", + columnProp: "warehouseID", headerAlign: "center", align: "left", columnLabel: "仓库编码", @@ -333,10 +344,10 @@ },{ userId: this.$store.state.user.name, functionId: 200001, - serialNumber: '200001Table1Receiver', + serialNumber: '200001Table1ReceiverName', tableId: "200001Table1", tableName: "采购入库主表", - columnProp: "receiver", + columnProp: "receiverName", headerAlign: "center", align: "left", columnLabel: "经手人", @@ -455,10 +466,10 @@ },{ userId: this.$store.state.user.name, functionId: 200001, - serialNumber: '200001Table2LocationId', + serialNumber: '200001Table2LocationID', tableId: "200001Table2", tableName: "采购入库明细", - columnProp: "locationId", + columnProp: "locationID", headerAlign: "center", align: "left", columnLabel: "库位", @@ -729,17 +740,17 @@ this.dataList2 = data.rows } else { - this.dataList = []; + this.dataList2 = []; } }); }else { searchTransDetailSub(this.currentRow).then(({data}) => { //区分请求成功和失败的状况 if (data && data.code == 0) { - this.dataList2 = data.rows + this.dataList3 = data.rows } else { - this.dataList = []; + this.dataList3 = []; } }); } @@ -772,16 +783,16 @@ addFlag:0, site:this.$store.state.user.site, transDate:new Date(), - wareHouseId:this.wareHouseList.length>0?this.wareHouseList[0].wareHouseId:'', + 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 - } + // if(this.wareHouseList.length>0){ + // this.modelData.wareHouseId=this.wareHouseList[0].wareHouseId + // } this.modelFlag=true; }, updateModel(row){ @@ -819,25 +830,25 @@ }) }, saveHeaderData(){ - if(this.dataForm.wareHouseId===''){ + if(this.modelData.warehouseID===''){ this.$alert('请选择仓库!', '错误', { confirmButtonText: '确定' }) return false } - if(this.dataForm.receiver===''){ + if(this.modelData.receiver===''){ this.$alert('请选择经手人!', '错误', { confirmButtonText: '确定' }) return false } - if(this.dataForm.transDate===''){ + if(this.modelData.transDate===''){ this.$alert('请选择入库日期!', '错误', { confirmButtonText: '确定' }) return false } - saveTransHeaderData(this.dataForm).then(({data}) => { + saveTransHeaderData(this.modelData).then(({data}) => { if (data && data.code === 0) { this.$message.success( '操作成功') this.modelFlag = false @@ -845,6 +856,7 @@ if(this.jumpFlag){ this.$nextTick(function () { setTimeout(() => { + console.log(data.transNo) // let inData = { // site: this.$store.state.user.site, // codeNo: data.row.codeNo, @@ -869,6 +881,16 @@ } }) }, + scanRoll(row){ + let data={ + site:row.site, + transNo:row.transNo, + } + this.addOrUpdateVisible = true + this.$nextTick(() => { + this.$refs.addOrUpdate.init(data) + }) + }, //导出excel //导出excel async createExportData() {