From fee437d2d5e8b3b1204782760fd6d4dd383066b3 Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Sat, 12 Oct 2019 16:35:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/PurchasingCenter/MaterialMProcure.js | 218 ++++++ .../PurchasingCenter/MaterialManagement.js | 43 ++ .../EquipmentMonitoring/index.vue | 8 +- .../MaterialMProcure/index.vue | 729 ++++++++++++++++++ .../MaterialManagement/index.vue | 124 ++- 5 files changed, 1115 insertions(+), 7 deletions(-) create mode 100644 src/api/PurchasingCenter/MaterialMProcure.js create mode 100644 src/views/PurchasingCenter/MaterialMProcure/index.vue diff --git a/src/api/PurchasingCenter/MaterialMProcure.js b/src/api/PurchasingCenter/MaterialMProcure.js new file mode 100644 index 00000000..8d0697ff --- /dev/null +++ b/src/api/PurchasingCenter/MaterialMProcure.js @@ -0,0 +1,218 @@ +import request from '@/utils/request' + +export function getSupplier1(check, num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_供货商_查询数据_根据条件', + param: '供货商_check=' + check + '=int&供货商=' + num + } + }) +} +export function AddGonghuoshang(num) { + return request({ + url: '', + method: 'post', + data: { + type: '4', + name: `insert into dbo.库存管理_供货商 (供货商) VALUES(\'${num}\')` + } + }) +} +export function initDepartmentName() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料主文件_基本_物料部门_查询数据' + } + }) +} +export function initMaterialCategory(check, DepartmentValue) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料类别编号_查询数据_根据物料部门编号', + param: '物料部门流水号_check=' + check + '=int&物料部门流水号=' + DepartmentValue + } + }) +} +export function initMaterialVariety(MaterialCategoryValue) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料品种编号_查询数据', + param: '物料类别流水号=' + MaterialCategoryValue + } + }) +} +export function initMeasurementUnit() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_计量单位主文件_查询数据' + } + }) +} +export function initMaterialSource() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料来源_查询数据' + } + }) +} +export function searchmaterial(check1, MaterialName, check2, FullNameOfMaterial, check3, MaterialSpecification, check4, MaterialModel, pageCurrent, pageSize, check5, MaterialCategoryValue, check6, MaterialVarietyValue, check7, MeasurementUnitValue, check8, MaterialSourceValue, check9, supplierValue) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料主文件_基本_采购部_查询数据_分页', + param: '物料流水号_check=0&物料代码_check=0&物料名称_check=' + check1 + '=int&物料名称=' + MaterialName + '&物料全名_check=' + check2 + '=int&物料全名=' + FullNameOfMaterial + '&物料规格_check=' + check3 + '=int&物料规格=' + MaterialSpecification + '&物料型号_check=' + check4 + '=int&物料型号=' + MaterialModel + '&物料类别流水号_check=' + check5 + '=int&物料类别流水号=' + MaterialCategoryValue + '&物料品种流水号_check=' + check6 + '=int&物料品种流水号=' + MaterialVarietyValue + '&供货商流水号_check=' + check9 + '&供货商流水号=' + supplierValue + '&计量单位流水号_check=' + check7 + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号_check=' + check8 + '&物料来源流水号=' + MaterialSourceValue + '&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output' + } + }) +} +export function getSupplier(check, num, pageCurrent, pageSize) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_供货商_查询数据_根据条件', + param: '供货商_check=' + check + '=int&供货商=' + num, + Pagination: pageCurrent + '&' + pageSize + } + }) +} +export function addData(MaterialVariety, MaterialName, FullNameOfMaterial, MaterialSpecification, MaterialModel, MeasurementUnitValue, MaterialSourceValue, supplierValue1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料主文件_基本_采购部_增加数据', + param: '物料品种流水号=' + MaterialVariety + '&物料名称\\=' + MaterialName + '&物料全名\\=' + FullNameOfMaterial + '&物料规格\\=' + MaterialSpecification + '&物料型号\\=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1 + } + }) +} +export function editData(MaterialValue, MaterialVariety, MaterialName, FullNameOfMaterial, MaterialSpecification, MaterialModel, MeasurementUnitValue, MaterialSourceValue, supplierValue1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料主文件_基本_修改数据', + param: '物料流水号=' + MaterialValue + '&物料品种流水号=' + MaterialVariety + '&物料名称\\=' + MaterialName + '&物料全名\\=' + FullNameOfMaterial + '&物料规格\\=' + MaterialSpecification + '&物料型号\\=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1 + } + }) +} +export function deleteData(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料主文件_基本_删除数据', + param: '物料流水号=' + num + } + }) +} +export function searchCategory() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料类别编号_查询数据_根据物料部门编号' + } + }) +} +export function searchVarieties(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料品种编号_查询数据', + param: '物料类别流水号=' + num + } + }) +} +export function editCategory(MaterialCategoryNum, MaterialCategory2, CategoryNumber) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料类别编号_修改数据', + param: '物料类别流水号=' + MaterialCategoryNum + '&物料类别=' + MaterialCategory2 + '&类别编号=' + CategoryNumber + } + }) +} +export function addCategory(MaterialCategory2, CategoryNumber) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料类别编号_增加数据', + param: '物料类别=' + MaterialCategory2 + '&类别编号=' + CategoryNumber + } + }) +} +export function deleteCategory(MaterialCategoryNum) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料类别编号_删除数据', + param: '物料类别流水号=' + MaterialCategoryNum + } + }) +} +export function editVariety(MaterialVarietyNum, MaterialCategoryNum, MaterialVariety2, VarietyNumber, Specifications1, Specifications2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料品种编号_修改数据', + param: '物料品种流水号=' + MaterialVarietyNum + '&物料类别流水号=' + MaterialCategoryNum + '&物料品种=' + MaterialVariety2 + '&品种编号=' + VarietyNumber + '&规格1=' + Specifications1 + '&规格2=' + Specifications2 + } + }) +} +export function addVariety(MaterialCategoryNum, MaterialVariety2, VarietyNumber, Specifications1, Specifications2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料品种编号_增加数据', + param: '物料类别流水号=' + MaterialCategoryNum + '&物料品种=' + MaterialVariety2 + '&品种编号=' + VarietyNumber + '&规格1=' + Specifications1 + '&规格2=' + Specifications2 + } + }) +} +export function deleteVariety(MaterialVarietyNum) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料品种编号_删除数据', + param: '物料品种流水号=' + MaterialVarietyNum + } + }) +} diff --git a/src/api/PurchasingCenter/MaterialManagement.js b/src/api/PurchasingCenter/MaterialManagement.js index 491b0464..9845ba63 100644 --- a/src/api/PurchasingCenter/MaterialManagement.js +++ b/src/api/PurchasingCenter/MaterialManagement.js @@ -216,3 +216,46 @@ export function deleteVariety(MaterialVarietyNum) { } }) } +export function getMaterial() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料主文件_基本_采购部_查询未审核数量' + } + }) +} +export function searchmateria5(check1, MaterialName, check2, FullNameOfMaterial, check3, MaterialSpecification, check4, MaterialModel, pageCurrent, pageSize, check5, MaterialCategoryValue, check6, MaterialVarietyValue, check7, MeasurementUnitValue, check8, MaterialSourceValue, check9, supplierValue) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_物料主文件_基本_采购部_查询数据_分页1', + param: '物料流水号_check=0&物料代码_check=0&物料名称_check=' + check1 + '=int&物料名称=' + MaterialName + '&物料全名_check=' + check2 + '=int&物料全名=' + FullNameOfMaterial + '&物料规格_check=' + check3 + '=int&物料规格=' + MaterialSpecification + '&物料型号_check=' + check4 + '=int&物料型号=' + MaterialModel + '&物料类别流水号_check=' + check5 + '=int&物料类别流水号=' + MaterialCategoryValue + '&物料品种流水号_check=' + check6 + '=int&物料品种流水号=' + MaterialVarietyValue + '&供货商流水号_check=' + check9 + '&供货商流水号=' + supplierValue + '&计量单位流水号_check=' + check7 + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号_check=' + check8 + '&物料来源流水号=' + MaterialSourceValue + '&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output' + } + }) +} +export function Dahui(num, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料主文件_基本_采购部_打回', + param: '物料流水号=' + num + '&打回原因=' + num1 + } + }) +} +export function Tongguo(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '库存管理_物料主文件_基本_采购部_通过', + param: '物料流水号=' + num + } + }) +} diff --git a/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue b/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue index 83315b89..b53986dd 100644 --- a/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue +++ b/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue @@ -706,7 +706,7 @@ export default { if (res1.data.length !== 0) { this.tooltip3 = '热处理零件:' + res1.data[0].零件图号 } else { - this.tooltip3 = '无' + this.tooltip3 = '热处理零件:无' } }) } else { @@ -723,7 +723,7 @@ export default { if (res1.data.length !== 0) { this.tooltip3 = '处理零件:' + res1.data[0].零件图号 } else { - this.tooltip3 = '无' + this.tooltip3 = '处理零件:无' } }) } else { @@ -740,7 +740,7 @@ export default { if (res1.data.length !== 0) { this.tooltip3 = '处理零件:' + res1.data[0].零件图号 } else { - this.tooltip3 = '无' + this.tooltip3 = '处理零件:无' } }) } else { @@ -757,7 +757,7 @@ export default { if (res1.data.length !== 0) { this.tooltip3 = '加工零件:' + res1.data[0].零件图号 } else { - this.tooltip3 = '无' + this.tooltip3 = '加工零件:无' } }) } else { diff --git a/src/views/PurchasingCenter/MaterialMProcure/index.vue b/src/views/PurchasingCenter/MaterialMProcure/index.vue new file mode 100644 index 00000000..0aa8996c --- /dev/null +++ b/src/views/PurchasingCenter/MaterialMProcure/index.vue @@ -0,0 +1,729 @@ + + + + + + 物料类别: + + + + + + 物料品种: + + + + + + 物料名称: + + + + 物料全称: + + + + 物料规格: + + + + 物料型号: + + + + 计算单位: + + + + + + 物料来源: + + + + + + 供货商: + + + + + + + + + + + + + 查询 + 申请 + + + + + + + + + {{ scope.row.物料名称 }} + + + + + {{ scope.row.物料规格 }} + + + + + {{ scope.row.物料型号 }} + + + + + {{ scope.row.供货商 }} + + + + + 未审核 + 已通过 + 未通过 + + + + + {{ scope.row.打回原因 ? scope.row.打回原因 : '——' }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Φ × ∠ — ○ ⊥ m² μ δ Ⅰ Ⅱ Ⅲ ∥ ± + + + + + + + + + + + + + diff --git a/src/views/PurchasingCenter/MaterialManagement/index.vue b/src/views/PurchasingCenter/MaterialManagement/index.vue index f3be0ab8..975112c0 100644 --- a/src/views/PurchasingCenter/MaterialManagement/index.vue +++ b/src/views/PurchasingCenter/MaterialManagement/index.vue @@ -113,7 +113,7 @@ - + 维护物料类别 新增供货商 + + 待审核 + @@ -480,6 +483,61 @@ 确定 + + + + + + + {{ scope.row.物料名称 }} + + + + + {{ scope.row.物料规格 }} + + + + + {{ scope.row.物料型号 }} + + + + + {{ scope.row.供货商 }} + + + + + + 通过 + + + + 打回原因: + + 确认 + 打回 + + + + + + + + @@ -504,13 +562,22 @@ import { deleteCategory, editVariety, addVariety, - deleteVariety + deleteVariety, + getMaterial, + searchmateria5, + Dahui, + Tongguo } from '@/api/PurchasingCenter/MaterialManagement' import { mapGetters } from 'vuex' export default { data() { return { + 打回原因: '', + 物料流水号: '', + tableData5: [], + dialogFormVisible4: false, + weishenhe: 0, Gonghuoshang: [], Gonghuoshang2: [], GonghuoshangValue: '', @@ -605,11 +672,62 @@ export default { ]) }, created() { + this.getMaterial() this.fetchData() this.searchMaterialCategory() this.getGonghuoshang() }, methods: { + // 通过 + Tongguo(row) { + this.$confirm('通过该物料, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + Tongguo(row.物料流水号).then(response => { + if (response.data[0].result === '1') { + this.getMaterial() + this.daishenhe() + this.searchMaterial() + this.$message.success('通过成功') + } else { this.$message.error('通过失败') } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消通过' + }) + }) + }, + // 打回 + Dahui(row) { + this.物料流水号 = row.物料流水号 + }, + // 打回确认 + queren() { + Dahui(this.物料流水号, this.打回原因).then(response => { + if (response.data[0].result === '1') { + this.getMaterial() + this.daishenhe() + this.$message.success('打回成功') + } else { this.$message.error('打回失败') } + }) + }, + // 查询采购部物料申请明细 + daishenhe() { + this.tableData5 = [] + searchmateria5(0, 0, 0, 0, 0, 0, 0, 0, 1, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0).then(response => { + this.tableData5 = response.data.result + this.dialogFormVisible4 = true + }) + }, + // 查询待审核物料数量 + getMaterial() { + getMaterial().then(response => { + this.weishenhe = response.data[0].数量 + }) + }, getGonghuoshang() { // 供货商初始化查询 this.Gonghuoshang = [] this.Gonghuoshang2 = [] @@ -726,7 +844,7 @@ export default { this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true]) }, submitEdit() { - this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() { + this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue], 'form', function() { this.searchMaterial() this.dialogFormVisible1 = false })