diff --git a/src/api/Inventory/InventoryCheck.js b/src/api/Inventory/InventoryCheck.js index bee8c771..0fccc1e9 100644 --- a/src/api/Inventory/InventoryCheck.js +++ b/src/api/Inventory/InventoryCheck.js @@ -171,4 +171,29 @@ export function searchGeneralPart(pageCurrent, pageSize, project_check, project, } }) } - +// 车间采购基本件查询 +export function searchHourseBasicPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_库存盘点_车间采购基本件查询', + param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group, + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 车间采购外购件查询 +export function searchHoursePurchasePart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '库存管理_库存盘点_车间采购外购件查询', + param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group, + Pagination: pageCurrent + '&' + pageSize + } + }) +} diff --git a/src/api/ManufacturingCenter/TypicalProcessMaintenance.js b/src/api/ManufacturingCenter/TypicalProcessMaintenance.js index a40b448c..a7d5bb4f 100644 --- a/src/api/ManufacturingCenter/TypicalProcessMaintenance.js +++ b/src/api/ManufacturingCenter/TypicalProcessMaintenance.js @@ -23,14 +23,15 @@ export function getPartsName(num) { }) } -export function getTableData(partsCategoriesCheck, partsCategories, partsNameCheck, partsName) { +export function getTableData(pageCurrent, pageSize, partsCategoriesCheck, partsCategories, partsNameCheck, partsName) { return request({ url: '', method: 'post', data: { type: '1', name: '车间生产管理工艺_基础表_典型工艺名称_查询数据_综合查询', - param: `典型工艺名称分类流水号_check=${partsCategoriesCheck}&典型工艺名称分类流水号=${partsCategories}&典型工艺流水号_check=${partsNameCheck}&典型工艺流水号=${partsName}&典型工艺流水号1_check=0` + param: `典型工艺名称分类流水号_check=${partsCategoriesCheck}&典型工艺名称分类流水号=${partsCategories}&典型工艺流水号_check=${partsNameCheck}&典型工艺流水号=${partsName}&典型工艺流水号1_check=0`, + Pagination: pageCurrent + '&' + pageSize } }) } diff --git a/src/api/PurchasingCenter/MaterialManagement.js b/src/api/PurchasingCenter/MaterialManagement.js new file mode 100644 index 00000000..ab4513ce --- /dev/null +++ b/src/api/PurchasingCenter/MaterialManagement.js @@ -0,0 +1,197 @@ +import request from '@/utils/request' + +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/icons/svg/MaterialManagement.svg b/src/icons/svg/MaterialManagement.svg new file mode 100644 index 00000000..04d16d08 --- /dev/null +++ b/src/icons/svg/MaterialManagement.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/utils/curd.js b/src/utils/curd.js index 3cca2d30..1436c6b3 100644 --- a/src/utils/curd.js +++ b/src/utils/curd.js @@ -79,9 +79,6 @@ export default { }) } } - if (this[carrier].length !== 0) { - this[carrier] = response.data[0][select[0]] - } }) } else { requestData(param).then(response => { // 这个方法没什么难度,不注释了 @@ -139,7 +136,7 @@ export default { // 3)接受值,数组,一般是['table','total','loading']顺序不能变 Vue.prototype.getTable = function(requestData, param, e) { requestData(...param).then(response => { - const data = response.data.rows ? response.data.rows : response.data + const data = response.data.rows this[e[0]] = [] this[e[1]] = 0 if (data && data.length > 0) { @@ -159,9 +156,7 @@ export default { // console.log('暂无数据') } }).then(() => { - if (this[e[2]]) { - this[e[2]] = false - } + this[e[2]] = false }) } // 添加表格数据 diff --git a/src/views/BasicData/MaintenanceEquipmentPerson/index.vue b/src/views/BasicData/MaintenanceEquipmentPerson/index.vue index 3b86d47d..bf91fc18 100644 --- a/src/views/BasicData/MaintenanceEquipmentPerson/index.vue +++ b/src/views/BasicData/MaintenanceEquipmentPerson/index.vue @@ -135,7 +135,7 @@ export default { equipmentNameCheck: null, equipmentName: [], operator: '', - operatorNum: null, + operatorNum: '', operatorCheck: null, dialogFormVisible: false, tablePeople: [], @@ -200,10 +200,11 @@ export default { } }, getTableData() { + console.log(typeof (this.equipmentName)) this.equipmentNameValue ? this.equipmentNameCheck = 1 : this.equipmentNameCheck = 0 this.operator ? this.operatorCheck = 1 : this.operatorCheck = 0 this.loading = true - this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operator, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading']) + this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operatorNum, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading']) }, handleAdd() { this.addForm('form', [this.dialogFormVisible_form = true, this.title = '增加']) diff --git a/src/views/BasicData/SystemRrolemaintenance/index.vue b/src/views/BasicData/SystemRrolemaintenance/index.vue index c7cfe2bd..d43cd398 100644 --- a/src/views/BasicData/SystemRrolemaintenance/index.vue +++ b/src/views/BasicData/SystemRrolemaintenance/index.vue @@ -10,7 +10,6 @@ diff --git a/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue b/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue index 739da3b8..627dcda8 100644 --- a/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue +++ b/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue @@ -4,7 +4,7 @@ 员工姓名: - + 角色名称: - + {{ scope.row.姓名 }} @@ -116,7 +116,7 @@ - + @@ -207,7 +207,6 @@ export default { roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }] }, rules1: { - staffName: [{ required: true, message: '请选择员工姓名', trigger: 'change' }], roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }] }, staffName: '', @@ -249,12 +248,15 @@ export default { } }, submitEdit(index, row) { + if (this.$refs['form2'] !== undefined) { + this.$refs['form2'].resetFields() + } this.dialogFormVisible2 = true this.personnelStream = row.人员角色流水号 this.form2.staffName = row.姓名 this.ssks = row.部门名称 this.personnelNumber = row.人员编号 - this.form2.roleName = row.角色功能 + this.form2.roleName = parseInt(row.角色编号) this.cjscgy = row.考勤编号 }, callOFF() { @@ -304,25 +306,39 @@ export default { this.searchData() }, submitAdd1() { - addData1(this.personnelNumber, this.form1.roleName).then(response => { - if (response.data[0].result === '1') { - this.$message.success('增加成功') - this.ssks = '' - this.form1.staffName = '' - this.form1.roleName = '' - this.searchData() - this.dialogFormVisible1 = false - } else { this.$message.error('增加失败') } + this.$refs['form1'].validate((valid) => { + if (valid) { + addData1(this.personnelNumber, this.form1.roleName).then(response => { + if (response.data[0].result === '1') { + this.$message.success('增加成功') + this.ssks = '' + this.form1.staffName = '' + this.form1.roleName = '' + this.searchData() + this.dialogFormVisible1 = false + } else { this.$message.error('增加失败') } + }) + } else { + console.log('error submit!!') + return false + } }) }, submitAdd2() { - addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => { - if (response.data[0].result === '1') { - this.$message.success('修改成功') - this.ssks = '' - this.searchData() - this.dialogFormVisible2 = false - } else { this.$message.error('修改失败') } + this.$refs['form2'].validate((valid) => { + if (valid) { + addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => { + if (response.data[0].result === '1') { + this.$message.success('修改成功') + this.ssks = '' + this.searchData() + this.dialogFormVisible2 = false + } else { this.$message.error('修改失败') } + }) + } else { + console.log('error submit!!') + return false + } }) }, handleCurrentChange3(val) { diff --git a/src/views/Inventory/InventoryCheck/index.vue b/src/views/Inventory/InventoryCheck/index.vue index c36d6457..80325396 100644 --- a/src/views/Inventory/InventoryCheck/index.vue +++ b/src/views/Inventory/InventoryCheck/index.vue @@ -1,8 +1,16 @@ - - - 项目名称: + + + + 基本件 + 通用件 + + 项目名称: - 基本件查询 + 基本件查询 - + - + + + 外购件 + 标准件 + 项目名称: + + + + 机床图号: + + + + 组号: + + + + 通用件查询 + + + + + + + {{ scope.row.项目名称 }} + + + + + {{ scope.row.机床图号 }} + + + + + {{ scope.row.组号 }} + + + + + {{ scope.row.零件名称 }} + + + + + {{ scope.row.可出库数量 }} + + + + + {{ scope.row.零件类型名称 }} + + + + + 选择 + + + + + + + + + + + + + {{ scope.row.实际到货数量 }} + + + + + {{ scope.row.入库人员 }} + + + + + {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }} + + + + + + + + {{ scope.row.出库数量 }} + + + + + {{ scope.row.出库时间 }} + + + + + {{ scope.row.领用者 }} + + + + - + 项目名称: @@ -175,152 +328,8 @@ :label="item.label" :value="item.value"/> - 通用件查询 + 外购件查询 - - - - - - {{ scope.row.项目名称 }} - - - - - {{ scope.row.机床图号 }} - - - - - {{ scope.row.组号 }} - - - - - {{ scope.row.零件名称 }} - - - - - {{ scope.row.可出库数量 }} - - - - - {{ scope.row.零件类型名称 }} - - - - - 选择 - - - - - - - - - - - - - {{ scope.row.实际到货数量 }} - - - - - {{ scope.row.入库人员 }} - - - - - {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }} - - - - - - - - {{ scope.row.出库数量 }} - - - - - {{ scope.row.出库时间 }} - - - - - {{ scope.row.领用者 }} - - - - - - - 项目名称: - - - - 机床图号: - - - - 组号: - - - - 外购件查询 - - - 项目名称: @@ -595,12 +602,336 @@ + + + 基本件 + 外购件 + 项目名称: + + + + 机床图号: + + + + 组号: + + + + 车间采购基本件查询 + + + + + + {{ scope.row.物料名称 }} + + + + + {{ scope.row.物料规格 }} + + + + + {{ scope.row.物料型号 }} + + + + + {{ scope.row.项目名称 }} + + + + + {{ scope.row.机床图号 }} + + + + + {{ scope.row.组号 }} + + + + + {{ scope.row.数量 }} + + + + + {{ scope.row.货位存量 }} + + + + + {{ scope.row.待出库数量 }} + + + + + {{ scope.row.类型名称 }} + + + + + 选择 + + + + + + + + + + + + {{ scope.row.实际到货数量 }} + + + + + {{ scope.row.入库人员 }} + + + + + {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }} + + + + + + + + {{ scope.row.出库数量 }} + + + + + {{ scope.row.出库时间 }} + + + + + {{ scope.row.领用者 }} + + + + + + 项目名称: + + + + 机床图号: + + + + 组号: + + + + 车间采购外购件查询 + + + + + + {{ scope.row.物料名称 }} + + + + + {{ scope.row.物料规格 }} + + + + + {{ scope.row.物料型号 }} + + + + + {{ scope.row.项目名称 }} + + + + + {{ scope.row.机床图号 }} + + + + + {{ scope.row.组号 }} + + + + + {{ scope.row.数量 }} + + + + + {{ scope.row.货位存量 }} + + + + + {{ scope.row.待出库数量 }} + + + + + {{ scope.row.类型名称 }} + + + + + 选择 + + + + + + + + + + + + {{ scope.row.实际到货数量 }} + + + + + {{ scope.row.入库人员 }} + + + + + {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }} + + + + + + + + {{ scope.row.出库数量 }} + + + + + {{ scope.row.出库时间 }} + + + + + {{ scope.row.领用者 }} + + + + + + +