diff --git a/src/api/Inventory/OfflinePartOut.js b/src/api/Inventory/OfflinePartOut.js index a8175c7b..8d6fb8b7 100644 --- a/src/api/Inventory/OfflinePartOut.js +++ b/src/api/Inventory/OfflinePartOut.js @@ -36,14 +36,15 @@ export function searchTeam(machineNumber) { }) } // 初始化物料 -export function searchPart(data1) { +export function searchPart(...params) { return request({ url: '', method: 'post', data: { type: '1', name: '库存管理_离线外购件_出库查询', - param: '离线合同编号=' + data1 + param: `物料名称_check=${params[0]}&物料名称=${params[1]}&物料规格_check=${params[2]}&物料规格=${params[3]}&物料型号_check=${params[4]}&物料型号=${params[5]}`, + Pagination: params[6] + '&' + params[7] } }) } diff --git a/src/views/Inventory/OfflinePartOut/index.vue b/src/views/Inventory/OfflinePartOut/index.vue index ab022fbc..b367fb36 100644 --- a/src/views/Inventory/OfflinePartOut/index.vue +++ b/src/views/Inventory/OfflinePartOut/index.vue @@ -1,31 +1,89 @@ - - @@ -152,10 +175,10 @@ export default { return { Project: [], ProjectValue_check: 1, - MachineValue: ' ', + MachineValue: '', Machine: [], MachineValue_check: 1, - GroupNumValue: ' ', + GroupNumValue: '', GroupNumValue_check: 1, GroupNum: [], tableDataBasic: [], @@ -180,7 +203,12 @@ export default { listLoading: '', listLoading1: '', partnumber: '', - offlineContract: null // 离线合同编号 + pageCurrent1: 1, + pageSize1: 10, + total1: 0, + materialName: '', // 物料名称 + materialSpec: '', // 物料规格 + materialModel: '' // 物料型号 } }, computed: { @@ -190,7 +218,7 @@ export default { ]) }, created() { - this.searchPurchasePartinfo() + this.searchTable1() this.fetchData() this.searchPeopleData() this.getpeopleid() @@ -207,6 +235,10 @@ export default { if (this.ProjectValue === '') { this.ProjectValue_check = 0 } + this.Machine = [] + this.MachineValue = '' + this.GroupNum = [] + this.GroupNumValue = '' searchmachine(this.ProjectValue_check, this.form.ProjectValue).then(response => { for (let i = 0; i < response.data.length; i++) { this.Machine.push({ @@ -217,24 +249,41 @@ export default { }) }, searchGroupList() { // 查询组号 + this.GroupNum = [] + this.GroupNumValue = '' searchTeam(this.MachineValue).then(response => { for (let i = 0; i < response.data.length; i++) { this.GroupNum.push({ - label: response.data[i].组件名称, + label: response.data[i].组号, value: response.data[i].组件流水号 }) } }) }, // 离线件查询 - searchPurchasePartinfo() { + searchTable1() { this.listLoading = true this.tableDataBasic = [] - searchPart(this.offlineContract).then(response => { - this.tableDataBasic = response.data + let check1, check2, check3 + this.materialName ? check1 = 1 : check1 = 0 + this.materialSpec ? check2 = 1 : check2 = 0 + this.materialModel ? check3 = 1 : check3 = 0 + searchPart(check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.pageCurrent1, this.pageSize1).then(response => { + console.log(response.data) + this.tableDataBasic = response.data.rows + this.total1 = response.data.total this.listLoading = false }) }, + handleSizeChange1(val) { + this.pageSize1 = val + this.pageCurrent1 = 1 + this.searchTable1() + }, + handleCurrentChange1(val) { + this.pageCurrent1 = val + this.searchTable1() + }, // 离线记录查询 searchoutRecord(row) { this.contractNumber = row.离线合同明细流水号 @@ -246,7 +295,7 @@ export default { }, // 打开表单 parOut(row) { - this.form = [] + this.form = {} this.MachineValue = '' this.GroupNumValue = '' this.dialogFormVisible = true @@ -254,7 +303,6 @@ export default { this.locateNumber = row.货位流水号 this.materialNumber = row.物料流水号 this.partnumber = row.货位存量 - this.searchoutRecord() }, // 重置表单 callOff() { @@ -282,7 +330,7 @@ export default { if (response.data[0].result === '1') { this.$message.success('零件出库成功') this.dialogFormVisible = false - this.searchPurchasePartinfo() + this.searchTable1() outRecord(this.contractNumber).then(response => { this.tableDataOut = response.data this.listLoading1 = false @@ -305,4 +353,10 @@ export default { span{ margin: 10px 0 10px 10px; } + .el-select{ + width:200px + } + .el-input{ + width:200px + } diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue index 9803aece..ae292dff 100644 --- a/src/views/PurchasingCenter/OfflineContract/index.vue +++ b/src/views/PurchasingCenter/OfflineContract/index.vue @@ -235,7 +235,7 @@ @@ -853,9 +853,9 @@ export default { sums[index] = values.reduce((prev, curr) => { const value = Number(curr) if (!isNaN(value)) { - return prev + curr + return Number((prev + curr).toFixed(2)) } else { - return prev + return Number((prev).toFixed(2)) } }, 0) sums[index] += ' 元' @@ -1008,11 +1008,12 @@ export default { document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料型号 document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量 document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价 - document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].数量 * this.tableData3[j].单价 + document.getElementsByClassName('tableData')[j].children[6].innerHTML = (this.tableData3[j].数量 * this.tableData3[j].单价).toFixed(2) document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData3[j].交货期要求 document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].备注 - total += this.tableData3[j].数量 * this.tableData3[j].单价 + total += Number(this.tableData3[j].数量 * this.tableData3[j].单价) } + total = total.toFixed(2) document.getElementById('contractNum').innerHTML = row.离线合同编号 document.getElementById('contractName').innerHTML = row.离线合同名称 document.getElementById('supplier').innerHTML = row.供应商名称