diff --git a/src/api/Inventory/PartOut.js b/src/api/Inventory/PartOut.js index 066a83bb..3b82dfd3 100644 --- a/src/api/Inventory/PartOut.js +++ b/src/api/Inventory/PartOut.js @@ -1,14 +1,15 @@ import request from '@/utils/request' // 领料单查询 -export function searchList(listNumber_check, listNumber) { +export function searchList(listNumber_check, listNumber, pageCurrent, pageSize) { return request({ url: '', method: 'post', data: { type: '1', name: '车间装配管理_领料单_领料单查询', - param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber + param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber, + Pagination: pageCurrent + '&' + pageSize } }) } diff --git a/src/icons/svg/PurchaseSituationSearch.svg b/src/icons/svg/PurchaseSituationSearch.svg new file mode 100644 index 00000000..a0560fb7 --- /dev/null +++ b/src/icons/svg/PurchaseSituationSearch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/Inventory/OfflinePartOut/index.vue b/src/views/Inventory/OfflinePartOut/index.vue index eae2fabc..ab022fbc 100644 --- a/src/views/Inventory/OfflinePartOut/index.vue +++ b/src/views/Inventory/OfflinePartOut/index.vue @@ -6,20 +6,8 @@ 查询 - - + + - + - + + - - + + - + @@ -148,22 +127,13 @@ :label="item.label" :value="item.value"/> - 查询
+ 查询
- - +

自制件

+ + - + @@ -184,17 +154,17 @@ {{ scope.row.零件名称 }} - + - + - + @@ -214,18 +184,18 @@ {{ scope.row.零件图号 }} - + - + -
+
- - +
+

采购部采购件

+ + - + - + - - - - - - @@ -277,43 +229,53 @@ {{ scope.row.机床图号 }} - + - + - + + + + + + + - + - + - + - + -
+
- - +
+

车间采购件

+ + - + - + - + - + - + - + -
+
+ + + @@ -538,8 +495,8 @@ export default { outNote: '' // 出库备注 }, rules2: { // 表单验证规则 - OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }], - outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }] + OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }] + // outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }] }, form3: { // 车间采购出库 OutNumber: '', // 出库数量 @@ -568,19 +525,19 @@ export default { listLoading3: false, PageCurrent: 1, PageSize: 10, - total: null, + total: 0, PageCurrent1: 1, PageSize1: 10, - total1: null, + total1: 0, PageCurrent2: 1, PageSize2: 10, - total2: null, + total2: 0, PageCurrent3: 1, PageSize3: 10, - total3: null, + total3: 0, PageCurrentx: 1, PageSizex: 10, - totalx: null, + totalx: 0, materialName: '', materialNumber: '', materialType: '', @@ -612,6 +569,8 @@ export default { created() { this.fetchData() this.getpeopleid() + this.searchListinfor() + this.searchPartinfo() }, methods: { fetchData() { @@ -621,7 +580,8 @@ export default { getpeopleid() { this.picikingPeople = this.id }, - searchMachine() { // 查询机床 + // 查询机床 + searchMachine() { this.MachineValue = '' this.Machine = [] this.GroupNumValue = '' @@ -640,7 +600,8 @@ export default { } }) }, - searchGroupList() { // 查询组号 + // 查询组号 + searchGroupList() { this.GroupNumValue = '' this.GroupNum = [] searchTeam(this.MachineValue).then(response => { @@ -652,18 +613,13 @@ export default { } }) }, + // 根据项目机床分组查零件/物料 searchPartinfo() { this.tableDataPurchase = [] this.tableDataBasic = [] - if (this.ProjectValue !== null && this.ProjectValue !== '') { - this.ProjectValue_check = 1 - } - if (this.MachineValue !== null && this.MachineValue !== '') { - this.MachineValue_check = 1 - } - if (this.GroupNumValue !== null && this.GroupNumValue !== '') { - this.GroupNumValue_check = 1 - } + this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0 + this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0 + this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0 this.listLoading = true this.listLoading1 = true this.listLoadingx = true @@ -697,13 +653,11 @@ export default { this.tableDataBasic = response.data.rows this.listLoading1 = false this.total = response.data.total - console.log(response) }) searchHoursePart(this.PageCurrentx, this.PageSizex, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => { this.tableDataHouse = response.data.rows this.listLoadingx = false this.totalx = response.data.total - console.log(response) }) }, handleSizeChange(val) { @@ -746,7 +700,6 @@ export default { this.tableData1 = response.data.rows this.listLoading2 = false this.total2 = response.data.total - console.log(response) }) }, handleSizeChange2(val) { @@ -772,13 +725,21 @@ export default { }, // 增加领料单 addListinfor() { - addList(this.picikingPeople).then(response => { - if (response.data[0].result === '1') { - this.$message.success('增加成功') - this.searchListinfor() - } else { - this.$message.error('增加失败') - } + this.$confirm('确认创建新的领料单?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + addList(this.picikingPeople).then(response => { + if (response.data[0].result === '1') { + this.$message.success('增加成功') + this.searchListinfor() + } else { + this.$message.error('增加失败') + } + }) + }).catch(() => { + this.$message('已取消操作') }) }, // 删除领料单 @@ -816,6 +777,7 @@ export default { if (response.data[0].result === '1') { this.$message.success('删除成功') this.searchListDetailt() + this.searchPartinfo() } else { this.$message.error('数据占用') } @@ -830,6 +792,7 @@ export default { // 选择领料单 chooseListinfor(row) { this.pickingListNumberx = row.领料单流水号 + this.pickingListNumber = row.领料单编号 this.searchListDetailt() }, // 增加基本件领料单明细 @@ -878,7 +841,7 @@ export default { }, // 增加外购件领料单明细 addListDetailinfor(row) { - this.form2 = [] + this.form2 = {} this.outType = 2 this.partProjectNumber = row.项目流水号 this.partProjectName = row.项目名称 @@ -905,7 +868,6 @@ export default { if (this.pickingListNumberx === '') { this.$message.error('请选择领料单') } else if (this.form2.OutNumber === '' || this.form2.OutNumber > this.enableOut) { - console.log(this.enableOut) this.$message.error('请正确输入领用数量') } else { this.$refs[formName].validate((valid) => { @@ -929,7 +891,6 @@ export default { addWorkshopDetailinfor(row) { this.form3 = [] this.outType = 3 - console.log(row) this.partProjectNumber = row.项目流水号 this.partMachineNumber = row.机床流水号 this.partGroupNumber = row.组件流水号 @@ -1035,5 +996,16 @@ export default { diff --git a/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue b/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue index 8aa07dd5..179ec660 100644 --- a/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue +++ b/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue @@ -210,6 +210,7 @@ export default { }, created() { this.fetchData() + this.searchTable() }, methods: { fetchData() { @@ -267,7 +268,6 @@ export default { this.searchTable2() }, searchTable1() { // 查询标准件和外购件 - this.total1 = 0 let check1, check2 this.machineNumberValue ? check1 = 1 : check1 = 0 this.groupNumberValue ? check2 = 1 : check2 = 0 @@ -277,7 +277,6 @@ export default { }) }, searchTable2() { // 查询基本件 - this.total2 = 0 let check1, check2 this.machineNumberValue ? check1 = 1 : check1 = 0 this.groupNumberValue ? check2 = 1 : check2 = 0