From 035b9bcd3147ba998d28c470e6824742c7b17307 Mon Sep 17 00:00:00 2001 From: chenjianan Date: Thu, 28 Mar 2019 11:24:09 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=BB=9E=E8=B4=A7=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchasingCenter/BacklogGoodsAnalysis.js | 40 +++ src/icons/svg/BacklogGoodsAnalysis.svg | 1 + .../BacklogGoodsAnalysis/index.vue | 251 ++++++++++++++++++ .../CreateInquirySheet/index.vue | 76 +++++- 4 files changed, 354 insertions(+), 14 deletions(-) create mode 100644 src/api/PurchasingCenter/BacklogGoodsAnalysis.js create mode 100644 src/icons/svg/BacklogGoodsAnalysis.svg create mode 100644 src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue diff --git a/src/api/PurchasingCenter/BacklogGoodsAnalysis.js b/src/api/PurchasingCenter/BacklogGoodsAnalysis.js new file mode 100644 index 00000000..b0e934a8 --- /dev/null +++ b/src/api/PurchasingCenter/BacklogGoodsAnalysis.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 查询库存量 +export function searchMaterialNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '采购管理_物料与货位对照_查询数据', + param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`, + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 查询滞货库存量 +export function searchBacklogNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '采购管理_滞货物料与货位对照_查询数据', + param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`, + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 转为滞货 +export function submitTurn(...params) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '采购管理_转为滞货', + param: `物料流水号=${params[0]}&转滞货数量=${params[1]}&物料与货位对照流水号=${params[2]}&货位流水号=${params[3]}` + } + }) +} diff --git a/src/icons/svg/BacklogGoodsAnalysis.svg b/src/icons/svg/BacklogGoodsAnalysis.svg new file mode 100644 index 00000000..7302de17 --- /dev/null +++ b/src/icons/svg/BacklogGoodsAnalysis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue b/src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue new file mode 100644 index 00000000..30f456fc --- /dev/null +++ b/src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/src/views/PurchasingCenter/CreateInquirySheet/index.vue b/src/views/PurchasingCenter/CreateInquirySheet/index.vue index 5ffdedab..d7e11703 100644 --- a/src/views/PurchasingCenter/CreateInquirySheet/index.vue +++ b/src/views/PurchasingCenter/CreateInquirySheet/index.vue @@ -36,7 +36,7 @@ 物料变更 - + - - - + + + + + - - - - + + + + - + + + + + + + + + + + + + @@ -656,7 +685,10 @@ export default { standardAndPurchaseValue: '', // 标准件和外购件流水号 title2: '', orderExport: '', - supplierExport: '' + supplierExport: '', + useNumber: '', + maxUseNumber: '', + dialogVisible4: false } }, computed: { @@ -672,6 +704,22 @@ export default { this.searchTable2() // 查表2 }, methods: { + submitUseInventory() { + this.$confirm('该操作不可逆,确定使用滞货?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.dialogVisible4 = false + }).catch(() => { + this.$message.info('已取消操作') + }) + }, + useInventory(row) { // 使用滞货 + console.log(row) + this.maxUseNumber = Number(row.滞货数量) + this.dialogVisible4 = true + }, saveOrder() { // 保存询价单 const orderNumGroup = [] const numGroup = [] From 40e88b96cd399437c769d97b9bbfe1fef81e5020 Mon Sep 17 00:00:00 2001 From: chenjianan Date: Thu, 28 Mar 2019 16:38:37 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=BB=9E=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchasingCenter/CreateInquirySheet.js | 20 ++++- .../CreateInquirySheet/index.vue | 90 ++++++++++--------- .../PurchaseTaskAllocate/index.vue | 20 +++++ 3 files changed, 86 insertions(+), 44 deletions(-) diff --git a/src/api/PurchasingCenter/CreateInquirySheet.js b/src/api/PurchasingCenter/CreateInquirySheet.js index f1c797f6..c2261111 100644 --- a/src/api/PurchasingCenter/CreateInquirySheet.js +++ b/src/api/PurchasingCenter/CreateInquirySheet.js @@ -1,27 +1,27 @@ import request from '@/utils/request' // 查询分配后的标准件和外购件 -export function searchMaterial(pageCurrent, pageSize, check1, num1, check2, num2, person) { +export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, person) { return request({ url: '', method: 'post', data: { type: '1', name: '采购管理_采购部采购_查询物料_分配后', - param: `询价状态编号_check=${check1}&询价状态编号=${num1}&物料名称_check=${check2}&物料名称=${num2}&人员编号=${person}`, + param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&人员编号=${person}`, Pagination: pageCurrent + '&' + pageSize } }) } // 查询分配后的基本件 -export function searchPart(pageCurrent, pageSize, check1, num1, person) { +export function searchPart(pageCurrent, pageSize, num1, person) { return request({ url: '', method: 'post', data: { type: '1', name: '采购管理_采购部采购_查询物料_基本件_分配后', - param: `询价状态编号_check=${check1}&询价状态编号=${num1}&人员编号=${person}`, + param: `物料状态编号=${num1}&人员编号=${person}`, Pagination: pageCurrent + '&' + pageSize } }) @@ -183,3 +183,15 @@ export function saveOrder(num1, num2, num3) { } }) } +// 编辑询价单 +export function submitUseInventory(...params) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '采购管理_使用滞货', + param: `物料流水号=${params[0]}&使用滞货数量=${params[1]}&组件零件流水号=${params[2]}` + } + }) +} diff --git a/src/views/PurchasingCenter/CreateInquirySheet/index.vue b/src/views/PurchasingCenter/CreateInquirySheet/index.vue index d7e11703..695f6d66 100644 --- a/src/views/PurchasingCenter/CreateInquirySheet/index.vue +++ b/src/views/PurchasingCenter/CreateInquirySheet/index.vue @@ -4,13 +4,7 @@ 询价状态: - - - + 物料名称: @@ -140,13 +134,7 @@ 询价状态: - - - + - + - + @@ -593,7 +581,7 @@ + + + diff --git a/src/views/TechnologyCenter/CreatePackingList/index.vue b/src/views/TechnologyCenter/CreatePackingList/index.vue index 10d6df98..579ef7b3 100644 --- a/src/views/TechnologyCenter/CreatePackingList/index.vue +++ b/src/views/TechnologyCenter/CreatePackingList/index.vue @@ -9,7 +9,7 @@ :label="item.label" :value="item.value"/> - 增加 + 增加 导出
总装箱单
+ style="margin-top:20px" + @row-click="searchTable"> 确定
-
+
@@ -597,6 +598,7 @@ export default { receiptVisible: false, machineTitle: '', machineVisible: false, + GroupDataVisible: false, spareVisible: false, spareTitle: '', spareForm: { @@ -621,6 +623,18 @@ export default { 联系人: '', 联系方式: '' }, + GroupDataForm: { + 部件编号: '', + 代号: '', + 名称: '', + 规格: '', + 备注: '', + 数量: '' + }, + GroupDataRule: { + 名称: [{ required: true, message: '请输入名称', trigger: 'blur' }], + 数量: [{ required: true, message: '请输入数量', trigger: 'blur' }] + }, receiptRules: { 装箱单号: [{ required: true, message: '请输入装箱单号', trigger: 'blur' }], 名称: [{ required: true, message: '请输入名称', trigger: 'blur' }], @@ -678,6 +692,8 @@ export default { this.receiptData = [] this.spareData = [] this.fileData = [] + this.receiptNum = 0 + this.receiptName = '' if (val) { this.getMachineSelect(val) } @@ -686,13 +702,12 @@ export default { receiptNum(val) { if (val !== 0) { this.getMachineData() - this.getFileData() - this.getSpareData() } }, - machine(val) { + machineTableData(val) { if (val.length > 0) { - this.machineValue = val[0].value + this.getFileData() + this.getSpareData() } } }, @@ -712,12 +727,12 @@ export default { const response = await getReciptData(this.projectValue) const data = response.data if (data.length > 0) { - this.receiptNum = data[0].装箱单编号 - this.receiptName = data[0].装箱单号 + // this.receiptNum = data[0].装箱单编号 + // this.receiptName = data[0].装箱单号 this.receiptData = data } else { - this.receiptNum = 0 - this.receiptName = '' + // this.receiptNum = 0 + // this.receiptName = '' } }, addReceipt() { @@ -733,6 +748,8 @@ export default { submitAddReceipt() { this.addTable(insertReciptData, [this.receiptForm.装箱单号, this.receiptForm.发货节点, this.receiptForm.名称, this.receiptForm.收货单位, this.receiptForm.联系方式, this.receiptForm.联系人, this.projectValue], 'receiptForm', function() { this.receiptVisible = false + this.receiptNum = 0 + this.receiptName = '' this.getReceipt() }) }, @@ -745,6 +762,8 @@ export default { submitEditReceipt() { this.editTable(updateReciptData, [this.receiptForm.装箱单号, this.receiptForm.发货节点, this.receiptForm.名称, this.receiptForm.收货单位, this.receiptForm.联系方式, this.receiptForm.联系人, this.receiptNum], 'receiptForm', function() { this.receiptVisible = false + this.receiptNum = 0 + this.receiptName = '' this.getReceipt() }) }, @@ -761,11 +780,24 @@ export default { this.fileVisible = false this.spareVisible = false }, + searchTable(row) { + console.log(row) + this.receiptNum = row.装箱单编号 + this.receiptName = row.装箱单号 + }, async getMachineData() { this.machineTableData = [] const response = await getMachineData(this.receiptNum) const data = response.data - console.log(data, 1111) + console.log(data, 111) + if (data.length === 0) { + this.machineValue = '' + this.spareData = [] + this.fileData = [] + } else { + this.machineValue = data[0].机床号 + } + console.log(this.machineValue, 222) this.groupData = [] for (let i = 0; i < data.length; i++) { const resp = await getGroupData(data[i].机床号) @@ -782,7 +814,6 @@ export default { 数量: data[i].数量, 备注: data[i].备注 }) - console.log(this.groupData, 11112) } }, addMachine() { @@ -824,6 +855,24 @@ export default { this.getMachineData() }) }, + // editGroupData(row) { + // console.log(row) + // this.editForm(row, 'GroupDataForm', function() { + // this.GroupDataVisible = true + // }) + // }, + // async submitEditGroupData() { + // console.log(this.GroupDataForm.部件编号, this.GroupDataForm.代号, this.GroupDataForm.名称, this.GroupDataForm.规格, this.GroupDataForm.数量, this.GroupDataForm.备注) + // editGroupData(this.GroupDataForm.部件编号, this.GroupDataForm.代号, this.GroupDataForm.名称, this.GroupDataForm.规格, this.GroupDataForm.数量, this.GroupDataForm.备注).then(response => { + // if (response.data[0].result === '1') { + // this.$message.success('编辑成功') + // this.GroupDataVisible = false + // this.getMachineData() + // } else { + // this.$message.error('编辑失败') + // } + // }) + // }, async getFileData() { const response = await getFileData(this.receiptNum) this.fileData = response.data @@ -858,6 +907,7 @@ export default { }) }, async getSpareData() { + console.log(this.machineValue, 333) const response = await getSpareData(this.projectValue, this.machineValue) console.log(response) for (let i = 0; i < response.data.length; i++) { @@ -910,7 +960,7 @@ export default { }, exportTable() { const htmlNode = $('#cjn').html() - const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;') + const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 950px;background: #fff;') body.children().hide() const printNode = $(htmlNode) body.append(printNode) diff --git a/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue b/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue index ee7d47f6..6712cb25 100644 --- a/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue +++ b/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue @@ -18,7 +18,7 @@ :label="item.label" :value="item.value"/> - 传递 + 传递 diff --git a/src/views/TechnologyCenter/ImportParts/specificationData.vue b/src/views/TechnologyCenter/ImportParts/specificationData.vue index 42fd6277..d5204623 100644 --- a/src/views/TechnologyCenter/ImportParts/specificationData.vue +++ b/src/views/TechnologyCenter/ImportParts/specificationData.vue @@ -18,7 +18,7 @@ :label="item.label" :value="item.value"/> - 传递 + 传递 一键删除 @@ -92,20 +92,20 @@ {{ scope.row.分类码 }} - - - + + + + + + + + + + + + + +
{ if (response.data[0].result === '1') { this.tableData = [] + this.tableData10 = [] this.$message.success('删除成功') } else { this.$message.error('删除失败') @@ -575,6 +577,7 @@ export default { this.$message.success(`传递成功`) this.tableDataAll = [] this.tableData = [] + this.tableData10 = [] } else { this.$message.error(`${this.err}个零件传递失败`) }