From 275284f157388d41b153a2eda586200728446baf Mon Sep 17 00:00:00 2001 From: chenjianan Date: Sat, 23 Mar 2019 18:00:39 +0800 Subject: [PATCH] fix bug --- src/api/Inventory/OfflinePartOut.js | 9 +-- src/views/Inventory/OfflinePartOut/index.vue | 65 +++++++++++++++---- src/views/Inventory/PickingList/index.vue | 67 ++++++++++++++------ 3 files changed, 105 insertions(+), 36 deletions(-) diff --git a/src/api/Inventory/OfflinePartOut.js b/src/api/Inventory/OfflinePartOut.js index a0630836..9295448d 100644 --- a/src/api/Inventory/OfflinePartOut.js +++ b/src/api/Inventory/OfflinePartOut.js @@ -61,26 +61,27 @@ export function searchPeople(data1) { }) } // 离线件出库 -export function outlinePartOut(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10) { +export function outlinePartOut(data2, data3, data4, data5, data6, data7, data8, data9, data10) { return request({ url: '', method: 'post', data: { type: '2', name: '库存管理_离线采购件_零件出库', - param: '离线合同明细流水号=' + data1 + '&领用者=' + data2 + '&出库数量=' + data3 + '&货位流水号=' + data4 + '&备注=' + data5 + '&项目流水号=' + data6 + '&机床流水号=' + data7 + '&组件流水号=' + data8 + '&物料流水号=' + data9 + '&出库人员流水号=' + data10 + param: '领用者=' + data2 + '&出库数量=' + data3 + '&货位流水号=' + data4 + '&备注=' + data5 + '&项目流水号=' + data6 + '&机床流水号=' + data7 + '&组件流水号=' + data8 + '&物料流水号=' + data9 + '&出库人员流水号=' + data10 } }) } // 查询出库记录 -export function outRecord(data1) { +export function outRecord(...params) { return request({ url: '', method: 'post', data: { type: '1', name: '库存管理_离线外购件出库_出库记录', - param: '离线合同明细流水号=' + data1 + param: '物料流水号=' + params[0], + Pagination: params[1] + '&' + params[2] } }) } diff --git a/src/views/Inventory/OfflinePartOut/index.vue b/src/views/Inventory/OfflinePartOut/index.vue index 2c1862b3..975facad 100644 --- a/src/views/Inventory/OfflinePartOut/index.vue +++ b/src/views/Inventory/OfflinePartOut/index.vue @@ -45,7 +45,7 @@ @@ -81,7 +81,7 @@ {{ scope.row.物料型号 }} - + @@ -106,12 +106,28 @@ {{ scope.row.组号 }} - + + + + +
+ +
@@ -192,7 +208,6 @@ export default { MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }], DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }] }, - contractNumber: '', locateNumber: '', materialNumber: '', PeopleNumber: '', @@ -203,6 +218,9 @@ export default { pageCurrent1: 1, pageSize1: 10, total1: 0, + pageCurrent2: 1, + pageSize2: 10, + total2: 0, materialName: '', // 物料名称 materialSpec: '', // 物料规格 materialModel: '' // 物料型号 @@ -279,10 +297,31 @@ export default { }, // 离线记录查询 searchoutRecord(row) { - this.contractNumber = row.离线合同明细流水号 + // 物料流水号查 + this.materialNumber = row.物料流水号 this.listLoading1 = true - outRecord(this.contractNumber).then(response => { - this.tableDataOut = response.data + outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => { + this.tableDataOut = response.data.rows + this.total2 = response.data.total + this.listLoading1 = false + }) + }, + handleSizeChange2(val) { + this.pageSize2 = val + this.pageCurrent2 = 1 + this.listLoading1 = true + outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => { + this.tableDataOut = response.data.rows + this.total2 = response.data.total + this.listLoading1 = false + }) + }, + handleCurrentChange2(val) { + this.pageCurrent2 = val + this.listLoading1 = true + outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => { + this.tableDataOut = response.data.rows + this.total2 = response.data.total this.listLoading1 = false }) }, @@ -295,7 +334,6 @@ export default { this.form.MachineValue = '' this.form.GroupNumValue = '' this.dialogFormVisible = true - this.contractNumber = row.离线合同明细流水号 this.locateNumber = row.货位流水号 this.materialNumber = row.物料流水号 this.partnumber = row.货位存量 @@ -319,18 +357,21 @@ export default { }, // 离线外购件出库 addDirectPartm() { - if (this.partnumber < this.form.DirectNumber) { + console.log(this.partnumber, this.form.DirectNumber) + if (Number(this.partnumber) < Number(this.form.DirectNumber)) { this.$message.error('请正确输入数量') } else { this.$refs['form'].validate((valid) => { if (valid) { - outlinePartOut(this.contractNumber, this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => { + outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => { if (response.data[0].result === '1') { this.$message.success('零件出库成功') this.dialogFormVisible = false this.searchTable1() - outRecord(this.contractNumber).then(response => { - this.tableDataOut = response.data + // 物料流水号查 + outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => { + this.tableDataOut = response.data.rows + this.total2 = response.data.total this.listLoading1 = false }) } else { diff --git a/src/views/Inventory/PickingList/index.vue b/src/views/Inventory/PickingList/index.vue index f0c2bf69..9b85f6ab 100644 --- a/src/views/Inventory/PickingList/index.vue +++ b/src/views/Inventory/PickingList/index.vue @@ -261,7 +261,7 @@
@@ -271,7 +271,7 @@ @@ -304,11 +304,6 @@ {{ scope.row.物料型号 }}
- - - - + - + + + + + + + @@ -334,6 +339,11 @@ {{ scope.row.待出库数量 }} + + +