This commit is contained in:
zhangdingyu
2018-11-24 08:29:46 +08:00
37 changed files with 3258 additions and 266 deletions

View File

@@ -0,0 +1,63 @@
import request from '@/utils/request'
// 初始化获取工艺
export function getTechnology() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_工艺名称_查询数据',
param: '工艺分类流水号_check=0'
}
})
}
// 查询表格数据
export function searchtable(pageCurrent, pageSize, num1, ManufacturerNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '设备管理_设备加工能力_查询数据_设备维护',
param: '设备名称_check=' + num1 + '&设备名称=' + ManufacturerNumber,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 增加
export function edittype(ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备加工能力_增加数据_设备维护New',
param: '设备名称=' + ManufacturerNumber + '&设备型号=' + ManufacturerName + '&设备性能指标=' + ManufacturerAbbreviation + '&设备工时系数=' + address + '&工艺编号=' + phNumber + '&班次类型=' + Fax + '&设备加工能力工时=' + Remarks + '&整改工时系数=' + category + '&设备编号=' + attention + '&预留工时系数=' + EquipmentCondition
}
})
}
// 编辑
export function handlechange(num, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备加工能力_修改数据_设备维护New',
param: '设备流水号=' + num + '&设备名称=' + ManufacturerNumber + '&设备型号=' + ManufacturerName + '&设备性能指标=' + ManufacturerAbbreviation + '&设备工时系数=' + address + '&工艺属性代码=' + phNumber + '&班次类型=' + Fax + '&设备加工能力工时=' + Remarks + '&整改工时系数=' + category + '&设备编号=' + attention + '&预留工时系数=' + EquipmentCondition
}
})
}
// 删除
export function handledelete(CoManufacturerFlowNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备加工能力_删除数据_设备维护',
param: '设备流水号=' + CoManufacturerFlowNumber
}
})
}

View File

@@ -0,0 +1,47 @@
import request from '@/utils/request'
export function featchMaterial(num1, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_材质表_查询数据_根据材料名称',
param: '材料名称=' + num1,
pagination: pageCurrent + '&' + pageSize
}
})
}
export function addMaterial(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_材质表_增加数据',
param: '材料=' + num1
}
})
}
export function delMaterial(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_材质表_删除数据',
param: '材料流水号=' + num1
}
})
}
export function editMaterial(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_材质表_修改数据',
param: '材料流水号=' + num1 + '=int&材料=' + num2
}
})
}

View File

@@ -0,0 +1,59 @@
import request from '@/utils/request'
export function InitRolefunction(pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单系统模块_项目角色_查询数据_MESWORK',
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function deleteData(code) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单系统模块_项目角色_删除_MESWORK',
param: '角色编号=' + code + '=int'
}
})
}
export function searchTable(num, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单系统模块_项目角色_查询数据_MESWORK',
param: '角色功能=' + num + '=string',
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function addData(code) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单系统模块_项目角色_增加_MESWORK',
param: '角色功能=' + code + '=string'
}
})
}
export function addData2(code1, num1) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单系统模块_项目角色_修改数据_MESWORK',
param: '角色功能=' + code1 + '&角色编号=' + num1
}
})
}

View File

@@ -0,0 +1,151 @@
import request from '@/utils/request.js'
// 查询项目名称
export function dialogtablevisible() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_部门关系_查询节点',
param: '子节点=0'
}
})
}
export function dialogtablevisible1() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_部门关系_查询节点',
param: '子节点=0'
}
})
}
export function addData1(code, groupNum) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单系统模块_项目角色员工综合_增加数据',
param: '人员编号=' + code + '=int&角色编号=' + groupNum + '=int&项目编号=10=int'
}
})
}
export function addData2(lsh, code, groupNum) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单系统模块_项目角色员工综合_修改数据',
param: '人员角色流水号=' + lsh + '&人员编号=' + code + '&角色编号=' + groupNum
}
})
}
// 初始化科室
export function initDepartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_部门关系_查询节点'
}
})
}
// 初始化人员信息 弹出框
export function getTree() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '人事档案管理_部门关系_查询节点',
param: '子节点=0=int'
}
})
}
export function fn(data, pid) {
const result = []
let temp
for (let i = 0; i < data.length; i++) {
if (data[i].父节点 === pid) {
const obj = { label: data[i].节点名称, id: data[i].子节点 }
temp = fn(data, data[i].子节点)
if (temp.length > 0) {
obj.children = temp
}
result.push(obj)
}
}
return result
}
export function getTable8(code) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + code + '=int'
}
})
}
export function handledelete(ryjslsh) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单系统模块_项目角色员工综合_删除数据',
param: '人员角色流水号=' + ryjslsh + '=string'
}
})
}
export function deleteData(Number) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '菜单系统模块_项目角色员工综合_删除数据',
param: '人员角色流水号=' + Number + '=int'
}
})
}
export function searchdesigner(num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + num2 + '=int'
}
})
}
export function initOrderType() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单系统模块_项目角色_查询数据_new'
}
})
}
export function searchTable(check1, staffName, check2, systemAdministrator, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单系统模块_项目角色员工综合_查询数据',
param: '姓名_check=' + check1 + '=int&姓名=' + staffName + '=string&角色编号_check=' + check2 + ' =int&角色编号=' + systemAdministrator + '=int',
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -0,0 +1,157 @@
import request from '@/utils/request'
// 查工艺分类名称
export function searchProcessClassification(ProcessClassification) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_工艺分类名称_查询数据',
param: '工艺分类名称=' + ProcessClassification
}
})
}
// 增加工艺分类
export function addProcessClassification(ProcessClassification) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_工艺分类名称_增加数据',
param: '工艺分类名称=' + ProcessClassification
}
})
}
// 编辑工艺分类
export function editProcessClassification(ProcessClassificationNum, ProcessClassification) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_工艺分类名称_修改数据',
param: '工艺分类流水号=' + ProcessClassificationNum + '&工艺分类名称=' + ProcessClassification
}
})
}
// 通过工艺编分类流水号查工艺分类名称
export function searchProcessClassificationOfProcessClassificationNum(ProcessNum) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_工艺分类名称_根据流水号_查询数据_MESWORK',
param: '工艺分类流水号=' + ProcessNum
}
})
}
// 删除工艺分类
export function delProcessClassification(ProcessClassificationNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_工艺分类名称_删除数据',
param: '工艺分类流水号=' + ProcessClassificationNum
}
})
}
// 通过工艺分类流水号查工艺名称
export function searchProcessNameOfProcessClassification(ProcessClassificationNum) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_基础表_工艺名称_查询数据_按工艺分类流水号查_MESWORK',
param: '工艺分类流水号=' + ProcessClassificationNum
}
})
}
// 通过工艺编号查工艺要求
export function searchTechnologicalRequirementsOfProcessNum(ProcessNum) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_基础表_工艺要求_查询数据',
param: '工艺编号=' + ProcessNum
}
})
}
// 增加工艺
export function addProcess(ProcessClassificationNum, ProcessName, ShortName) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'dbo.车间生产管理工艺_基础表_工艺名称_增加数据',
param: '工艺分类流水号=' + ProcessClassificationNum + '&工艺名称=' + ProcessName + '&工艺名称简称=' + ShortName
}
})
}
// 编辑工艺
export function editProcess(ProcessClassificationNum, ProcessName, ShortName) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_工艺名称_修改名称及简称',
param: '工艺编号=' + ProcessClassificationNum + '&工艺名称=' + ProcessName + '&工艺名称简称=' + ShortName
}
})
}
// 删除工艺
export function delProcess(ProcessNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_工艺名称_删除数据',
param: '工艺编号=' + ProcessNum
}
})
}
// 新增工艺要求
export function addTechnologicalRequirements(ProcessClassificationNum, ProcessName) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理_基础表_工艺要求_增加数据',
param: '工艺编号=' + ProcessClassificationNum + '&工艺要求=' + ProcessName
}
})
}
// 编辑工艺要求
export function editTechnologicalRequirements(ProcessClassificationNum, ProcessName) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理_基础表_工艺要求_修改数据',
param: '工艺要求流水号=' + ProcessClassificationNum + '&工艺要求=' + ProcessName
}
})
}
// 删除工艺要求
export function delTechnologicalRequirements(ProcessClassificationNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理_基础表_工艺要求_删除数据',
param: '工艺要求流水号=' + ProcessClassificationNum
}
})
}

View File

@@ -0,0 +1,97 @@
import request from '@/utils/request'
// 初始化设备名称
export function getEquipment(id, equipmentNum) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '设备管理_设备名称与班次关系_查询数据',
param: `查询代码=${id}=int&设备流水号=${equipmentNum}`
}
})
}
export function getDepartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '设备管理_部门查询'
}
})
}
export function getTablePeople(number) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: `考核部门编号=${number}`
}
})
}
export function getTableData(equipmentCheck, equipmentNameValue, operatorCheck, operatorNumber, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '设备管理_设备名称_人员关系_查询数据',
param: `设备流水号_check=${equipmentCheck}&设备流水号=${equipmentNameValue}&操作者编号_check=${operatorCheck}&操作者编号=${operatorNumber}`,
pagination: pageCurrent + '&' + pageSize
}
})
}
export function deleteTable(number) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备名称_人员关系_删除数据',
param: '设备人员关系流水号=' + number + '=int'
}
})
}
export function getStaff() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '设备管理_基础表_班次表_查询班次'
}
})
}
export function addTable(equipmentNumber, equipment, shift, operator, operatorNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备名称_人员关系_增加数据',
param: '设备流水号=' + equipmentNumber + '=int&设备名称=' + equipment + '=string&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int'
}
})
}
export function editTable(equipment, equipmentNumber, shift, operator, operatorNumber, Number) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_设备名称_人员关系_修改数据',
param: '设备流水号=' + equipmentNumber + '=int&设备名称=' + equipment + '=string&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int&设备人员关系流水号=' + Number + '=int'
}
})
}

View File

@@ -59,14 +59,14 @@ export function searchContractDetail(contractnumber) {
}) })
} }
// 直达件查询 // 直达件查询
export function searchDirectPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group, contract) { export function searchDirectPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group, contract_check, contract) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '库存管理_直达件_零件查询', name: '库存管理_直达件_零件查询',
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group + '&合同流水号=' + contract, param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group + '&合同流水号_check=' + contract_check + '&合同流水号=' + contract,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })
@@ -79,7 +79,7 @@ export function searchPeople() {
data: { data: {
type: '1', type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + 18 param: '考核部门编号=18'
} }
}) })
} }

View File

@@ -0,0 +1,48 @@
import request from '@/utils/request'
// 查询零件入库情况
export function searchTable(partnumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'MES_机加工MES_库存管理_入库模块_零件基础信息查询_根据零件图号',
param: '零件图号=' + partnumber + '=string'
}
})
}
// 仓库查询
export function getinventory() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_货位主文件_仓库查询'
}
})
}
// 货位查询
export function getlocate(housenumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_货位主文件_查询数据',
param: '仓库流水号=' + housenumber + '=int'
}
})
}
// 修改入库数量
export function insertOne(num0, num1, people, num4, num5, num6, num7) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'MES_机加工MES_库存管理_入库模块_增加入库信息_修改入库数量',
param: '工艺计划流水号=' + num0 + '=int&入库数量=' + num1 + '=int&收件人员编号=' + people + '=int&送件人员编号=1001' + '&漆塑=' + num4 + '&仓库流水号=' + num5 + '&货位流水号=' + num6 + '&备注=' + num7
}
})
}

View File

@@ -1,14 +1,14 @@
import request from '@/utils/request' import request from '@/utils/request'
// 领料单查询 // 领料单查询
export function searchList(listNumber) { export function searchList(listNumber_check, listNumber) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间装配管理_领料单_领料单查询', name: '车间装配管理_领料单_领料单查询',
param: '领料单编号=' + listNumber param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber
} }
}) })
} }
@@ -24,6 +24,18 @@ export function searchListDetail(listNumber) {
} }
}) })
} }
// 领料单明细出库
export function ListDetailOut(listNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_领料单_领料单明细出库',
param: '领料单明细流水号=' + listNumber
}
})
}
// 外购件零件出库 // 外购件零件出库
export function PurchasePart(data1, data2, data3, data4, data5) { export function PurchasePart(data1, data2, data3, data4, data5) {
return request({ return request({

View File

@@ -75,18 +75,19 @@ export function searchHoursePart(pageCurrent, pageSize, project_check, project,
}) })
} }
// 领料单查询 // 领料单查询
export function searchList(pageCurrent, pageSize, listNumber) { export function searchList(pageCurrent, pageSize, listNumber_check, listNumber) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间装配管理_领料单_领料单查询', name: '车间装配管理_领料单_领料单查询',
param: '领料单编号=' + listNumber, param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
// 领料单明细查询 // 领料单明细查询
export function searchListDetail(listNumber) { export function searchListDetail(listNumber) {
return request({ return request({
@@ -136,14 +137,14 @@ export function dropListDetail(DetailNumberx) {
}) })
} }
// 增加领料单明细 // 增加领料单明细
export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, project, machine, team, materialName, materialNumber, materialType, outNumber, partType, Note, data1, data2, data3, data4, data5, data6) { export function addListDetail(PickingListNumberx, projectnumber, machinenumber, teamNumber, project, machine, team, materialName, materialNumber, materialType, outNumber, partType, Note, data1, data2, data3, data4, data5, data6, data7) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间装配管理_领料单_领料单明细增加', name: '车间装配管理_领料单_领料单明细增加',
param: '领料单流水号=' + PickingListNumberx + '&项目流水号=' + projectnumber + '&机床流水号=' + machinenumber + '&组件流水号=' + teamNumber + '&项目名称=' + project + '&机床图号=' + machine + '&组号=' + team + '&物料名称=' + materialName + '&物料型号=' + materialNumber + '&物料规格=' + materialType + '&出库数量=' + outNumber + '&零件类型=' + partType + '&备注=' + Note + '&工艺计划流水号=' + data1 + '&收件信息ID=' + data2 + '&组件零件流水号=' + data3 + '&采购合同明细流水号=' + data4 + '&货位流水号=' + data5 + '&车间外购=' + data6 param: '领料单流水号=' + PickingListNumberx + '&项目流水号=' + projectnumber + '&机床流水号=' + machinenumber + '&组件流水号=' + teamNumber + '&项目名称=' + project + '&机床图号=' + machine + '&组号=' + team + '&物料名称=' + materialName + '&物料型号=' + materialNumber + '&物料规格=' + materialType + '&出库数量=' + outNumber + '&零件类型=' + partType + '&备注=' + Note + '&工艺计划流水号=' + data1 + '&收件信息ID=' + data2 + '&组件零件流水号=' + data3 + '&采购合同明细流水号=' + data4 + '&货位流水号=' + data5 + '&车间外购=' + data6 + '&物料与货位对照流水号=' + data7
} }
}) })
} }

View File

@@ -1,12 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 替换单查询 // 替换单查询
export function searchSubstitutedCard() { export function searchSubstitutedCard(...params) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '库存管理_替换件_替换单查询' name: '库存管理_替换件_替换单查询',
param: `替换单编号_check=${params[0]}&替换单编号=${params[1]}&替换件名称_check=${params[2]}&替换件名称=${params[3]}`
} }
}) })
} }

View File

@@ -0,0 +1,62 @@
import request from '@/utils/request'
// 初始化工艺员
export function initCraftmen() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=17'
}
})
}
// 根据工艺员查零件
export function searchPart(person) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_在制零件工艺调整_被调整零件查询',
param: '工艺人员编号=' + person
}
})
}
// 根据零件查工艺 旧
export function searchProcessOld(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_在制零件工艺调整_查询工艺',
param: '工艺计划流水号=' + num
}
})
}
// 根据零件查工艺 新
export function searchProcessNew(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询工序信息',
param: '工艺计划流水号=' + num
}
})
}
// 查询各工艺员调整工艺情况
export function searchChart() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_在制零件工艺调整_被调整零件数量查询'
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1532937900139" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1990" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M737 942a207 207 0 1 1 207-207 207.234 207.234 0 0 1-207 207z m0-342a135 135 0 1 0 135 135 135.152 135.152 0 0 0-135-135z m-36 60h72v54h40v72H701V660zM508 906H174a96.11 96.11 0 0 1-96-96V174a96.108 96.108 0 0 1 96-96h540a96.11 96.11 0 0 1 96 96v304h-72V174a24.028 24.028 0 0 0-24-24H174a24.028 24.028 0 0 0-24 24v636a24.028 24.028 0 0 0 24 24h334v72zM292.74 464L188 356.624l51.4-50.094 50.814 52.09 98.042-110.632L442 295.566zM666 414H460v-72h206v72zM292.74 716L188 608.624l51.4-50.094 50.814 52.09 98.042-110.632L442 547.566z" p-id="1991" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 954 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1532937378997" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2118" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M128 384h128v512H128zM320 128h128v768H320zM512 544h128v352H512zM896 576a96 96 0 0 0-64-90.53V576h-64v-90.53a96 96 0 0 0 0 181.06v216.31A13.16 13.16 0 0 0 781.16 896h37.68A13.16 13.16 0 0 0 832 882.84V666.53A96 96 0 0 0 896 576z" p-id="2119" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 655 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1532937719569" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4070" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M596.48 332.288l-368.64-2.048c-14.336 0-25.6-11.776-25.6-25.6 0-14.336 11.776-25.6 25.6-25.6l368.64 2.048c14.336 0 25.6 11.776 25.6 25.6 0 14.336-11.776 25.6-25.6 25.6zM601.6 521.728l-368.64-2.048c-14.336 0-25.6-11.776-25.6-25.6 0-14.336 11.776-25.6 25.6-25.6l368.64 2.048c14.336 0 25.6 11.776 25.6 25.6 0 14.336-11.776 25.6-25.6 25.6zM471.04 711.168l-235.52-2.048c-14.336 0-25.6-11.776-25.6-25.6s11.776-25.6 25.6-25.6l235.52 2.048c14.336 0 25.6 11.776 25.6 25.6 0 14.336-11.776 25.6-25.6 25.6zM788.992 939.52c-78.848 0-143.36-64.512-143.36-143.36s64.512-143.36 143.36-143.36 143.36 64.512 143.36 143.36-64.512 143.36-143.36 143.36z m0-235.52c-50.688 0-92.16 41.472-92.16 92.16s41.472 92.16 92.16 92.16 92.16-41.472 92.16-92.16-41.472-92.16-92.16-92.16z" p-id="4071"></path><path d="M785.92 683.52c-14.336 0-25.6-11.264-25.6-25.6v-40.96c0-14.336 11.264-25.6 25.6-25.6s25.6 11.264 25.6 25.6v40.96c0 14.336-11.264 25.6-25.6 25.6zM691.712 726.016c-6.656 0-13.312-2.56-18.432-7.68l-29.696-30.72c-9.728-10.24-9.728-26.624 0.512-36.352 10.24-9.728 26.624-9.728 36.352 0.512l29.696 30.72c9.728 10.24 9.728 26.624-0.512 36.352-5.12 4.608-11.264 7.168-17.92 7.168zM652.8 821.76h-40.96c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h40.96c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM663.552 948.736c-6.656 0-13.312-2.56-17.92-7.68-10.24-10.24-10.24-26.112 0-36.352l30.208-30.208c10.24-10.24 26.112-10.24 36.352 0s10.24 26.112 0 36.352l-30.208 30.208c-5.12 5.12-11.776 7.68-18.432 7.68zM791.04 1000.96c-14.336 0-25.6-11.264-25.6-25.6v-46.08c0-14.336 11.264-25.6 25.6-25.6s25.6 11.264 25.6 25.6v46.08c0 14.336-11.264 25.6-25.6 25.6zM916.48 947.712c-6.656 0-13.312-2.56-17.92-7.68l-30.208-30.208c-10.24-10.24-10.24-26.112 0-36.352s26.112-10.24 36.352 0l30.208 30.208c10.24 10.24 10.24 26.112 0 36.352-5.12 5.12-11.776 7.68-18.432 7.68zM970.24 821.76h-46.08c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h46.08c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6zM884.736 724.992c-6.656 0-13.312-2.56-17.92-7.68-10.24-10.24-10.24-26.112 0-36.352l30.208-30.208c10.24-10.24 26.112-10.24 36.352 0s10.24 26.112 0 36.352l-30.208 30.208c-5.12 5.12-11.776 7.68-18.432 7.68zM317.44 1005.056H38.4c-14.336 0-25.6-11.264-25.6-25.6V35.84c0-14.336 11.264-25.6 25.6-25.6h733.696c14.336 0 25.6 11.264 25.6 25.6v276.992c0 14.336-11.264 25.6-25.6 25.6s-25.6-11.264-25.6-25.6V61.44H64v892.416H317.44c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6z" p-id="4072"></path></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.sfont.cn -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.sfont.cn </metadata>
<g><path d="M667.5,650c4.7,3.4,10.4,5.5,16.7,5.5c15.7,0,28.4-12.7,28.4-28.4c0-9.9-5-18.5-12.7-23.6l0,0c-33.9-23-71.2-41.3-111-54c91.6-47.6,154.3-143.3,154.3-253.7C743.2,138,615.3,10,457.4,10c-157.9,0-285.8,128-285.8,285.8c0,110.4,62.6,206.1,154.2,253.7c-174,55.5-300.2,217.9-301.3,410c0,0.2,0.1,2.5,0.1,2.5c1,14.8,13.2,26.6,28.2,26.6c15.1,0,27.5-11.8,28.5-26.6c0-207.6,168.3-376,376-376c77.8,0,150.1,23.6,210,64.1L667.5,650z M228.7,295.8c0-126.3,102.4-228.7,228.7-228.7c126.3,0,228.7,102.4,228.7,228.7c0,126.3-102.4,228.7-228.7,228.7C331.1,524.5,228.7,422.1,228.7,295.8z"/><path d="M947.9,786.1H827.4V666.6c0-15.2-12.3-27.6-27.6-27.6s-27.6,12.3-27.6,27.6v119.5H652c-15.2,0-27.6,12.3-27.6,27.6c0,15.2,12.3,27.6,27.6,27.6h120.3v121.2c0,15.2,12.3,27.6,27.6,27.6s27.6-12.3,27.6-27.6V841.2h120.5c15.2,0,27.6-12.3,27.6-27.6C975.4,798.4,963.1,786.1,947.9,786.1z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.sfont.cn -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.sfont.cn </metadata>
<g><g transform="translate(0.000000,511.000000) scale(0.100000,-0.100000)"><path d="M4391.9,4998.3c-285.2-50.9-482.8-136.5-790.4-342.2c-413.5-275-778.2-686.5-935-1055.2c-120.2-283.1-154.8-456.3-152.8-792.4c0-285.2,20.4-427.8,81.5-590.8c10.2-22.4-2-30.6-50.9-30.6c-40.7,0-85.6-20.4-128.3-59.1c-63.1-57-67.2-67.2-73.3-222c-10.2-203.7,32.6-419.6,138.5-721.1c85.6-246.5,185.4-411.5,266.9-448.2c44.8-20.4,57-46.9,85.6-191.5C2974.1-133.2,3324.5-638.4,3831.7-889c497.1-244.5,994.1-273,1476.9-79.4c529.6,211.8,892.2,666.1,1069.5,1346.5l65.2,250.6l63.2-6.1c85.5-8.2,152.8,50.9,238.3,213.9c132.4,256.7,238.4,660,238.4,914.7c0,160.9-28.5,248.5-101.9,299.4l-40.7,28.5l44.8,252.6c36.7,205.7,44.8,330,46.9,670.2c0,374.8-4.1,433.9-46.9,576.5c-103.9,360.6-287.2,586.7-537.8,666.1c-52.9,16.3-97.8,53-146.7,120.2c-136.5,185.4-325.9,334.1-598.9,470.6c-264.8,132.4-415.6,165-788.4,173.2C4634.4,5012.5,4444.9,5008.4,4391.9,4998.3z"/><path d="M3043.4-901.2c-425.8-291.3-1189.7-643.7-1735.6-802.6c-156.9-44.8-332-105.9-393.2-136.5C607-1989,378.8-2388.3,330-2865l-12.2-132.4l158.9-152.8C1265-3903.9,2340.6-4458,3438.6-4678c509.3-101.9,621.3-112,1263-112c517.4,2,641.7,8.2,886.1,46.8c488.9,77.4,1004.3,218,1432.1,393.2c105.9,42.8,197.6,81.5,201.7,87.6c6.1,4.1-53,71.3-130.4,148.7c-226.1,222-364.6,448.2-464.5,759.8c-73.3,226.1-93.7,637.6-44.8,880c75.4,356.5,248.5,676.3,507.2,935c79.4,79.4,138.5,144.6,136.5,146.7c-4.1,2.1-134.5,67.2-287.2,144.6c-154.8,77.4-372.8,199.6-486.9,270.9c-114.1,71.3-209.8,126.3-209.8,124.2c-2-4-158.9-497-346.3-1095.9c-488.9-1552.3-582.6-1839.5-598.9-1823.2c-8.2,6.1-93.7,238.3-189.5,513.4L4929.7-2757l89.6,138.5c207.8,319.8,299.4,598.9,252.6,770c-55,207.8-270.9,328-588.7,328c-605,0-757.8-387.1-393.2-990c53-89.6,110-179.3,124.3-203.7c26.5-38.7,10.2-97.8-150.7-556.1c-97.8-281.1-187.4-511.3-195.6-511.3c-10.2,0-18.3,4.1-18.3,10.2c0,16.3-914.7,2909-922.8,2915.1C3122.8-852.3,3086.2-872.7,3043.4-901.2z"/><path d="M8022-1530.7c-741.5-201.7-1169.3-992.1-926.9-1711.2c146.7-438,450.2-727.2,906.5-867.8c191.5-59.1,493-63.2,692.6-10.2c220,59.1,440,187.4,600.9,348.3c163,165,254.6,309.6,332,523.5c46.9,130.4,53,179.3,55,413.5c0,224.1-8.1,287.3-46.8,407.4c-132.4,401.3-433.9,711-835.2,861.7c-114.1,42.8-179.3,53-401.3,57.1C8209.5-1502.1,8103.5-1508.2,8022-1530.7z M8492.6-1905.5l59.1-59.1v-338.1v-338.2h334.1c323.9,0,338.1-2,393.2-48.9c44.8-38.7,57-65.2,57-134.5s-12.2-95.8-57-134.4c-55-46.9-69.3-48.9-393.2-48.9h-334.1v-338.2v-338.2l-59.1-59.1c-97.8-95.7-236.3-77.4-297.4,42.8c-22.4,44.8-30.5,132.4-30.5,376.9v315.8h-336.1c-332.1,0-338.1,0-387.1,50.9c-38.7,36.7-50.9,71.3-50.9,132.4s12.2,95.7,50.9,132.4c48.9,50.9,55,50.9,387.1,50.9h336.1v315.7c0,403.3,30.5,476.7,199.6,478.7C8413.2-1846.4,8449.8-1862.7,8492.6-1905.5z"/></g></g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -11,8 +11,12 @@ export const upload = `http://123.56.95.229:8411/submit/uploadFile.ashx`
export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx` export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx`
const service = axios.create({ const service = axios.create({
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,git
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间
}) })

View File

@@ -0,0 +1,305 @@
<template>
<div class="app-container">
<el-card>
<span>设备名称</span>
<el-input v-model="equipmentName" clearable size="small" style="width:200px;margin:10px;"/>
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
<el-button type="primary" class="el-icon-circle-plus-outline" size="small" @click="handleAdd('form');param = 0">新增</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border highlight-current-row>
<el-table-column
label=" "
align="center"
type="index"
width="50"/>
<el-table-column label="设备名称" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.设备名称 }}
</template>
</el-table-column>
<el-table-column label="设备编号" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.设备编号 }}
</template>
</el-table-column>
<el-table-column label="设备型号" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.设备型号 }}
</template>
</el-table-column>
<el-table-column label="设备性能指标" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.设备性能指标 }}
</template>
</el-table-column>
<el-table-column label="设备加工能力" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.设备加工能力工时 }}
</template>
</el-table-column>
<el-table-column label="设备工时系数" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.设备工时系数 }}
</template>
</el-table-column>
<el-table-column label="设备加工工艺" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.工艺属性 }}
</template>
</el-table-column>
<el-table-column label="班次类型" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.班次类型 }}
</template>
</el-table-column>
<el-table-column label="整改工时系数" align="center">
<template slot-scope="scope">
{{ scope.row.整改工时比例 }}
</template>
</el-table-column>
<el-table-column label="预留工时系数" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.设备预留工时系数 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleEdit(scope.row);param = 1">编辑</el-button>
<el-button
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="800px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm" style="margin: auto">
<el-row>
<el-col :span="12">
<el-form-item label="设备名称" prop="设备名称">
<el-input v-model="form.设备名称" placeholder="设备名称" clearable size="small" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备型号" prop="设备型号">
<el-input v-model="form.设备型号" placeholder="设备型号" clearable size="small" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="性能指标" prop="设备性能指标">
<el-input v-model="form.设备性能指标" placeholder="性能指标" clearable size="small" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="加工能力" prop="设备加工能力工时">
<el-input v-model="form.设备加工能力工时" placeholder="加工能力" clearable size="small" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="整改工时系数" prop="整改工时比例">
<el-input v-model="form.整改工时比例" placeholder="设备整改工时系数" clearable size="small" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备编号" prop="设备编号">
<el-input v-model="form.设备编号" placeholder="设备编号" clearable size="small" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="工艺" prop="工艺属性代码">
<el-select v-model="form.工艺属性代码" filterable size="small" style="width:230px;">
<el-option
v-for="item in Technology"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班次类型" prop="班次类型">
<el-select v-model="form.班次类型" filterable size="small" style="width:230px;">
<el-option
v-for="item in ClassType"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="工时系数" prop="设备工时系数">
<el-input v-model="form.设备工时系数" placeholder="工时系数" clearable size="small" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="预留工时系数" prop="设备预留工时系数">
<el-input v-model="form.设备预留工时系数" placeholder="设备预留工时系数" clearable size="small" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff()">取消</el-button>
<el-button v-show="title==='增加'" type="primary" @click="submitAdd()">确定</el-button>
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getTechnology, searchtable, edittype, handlechange, handledelete } from '@/api/BasicData/EquipmentCapabilitySetting'
export default {
data() {
return {
equipmentNum: '',
num1: '',
equipmentName: '',
loading: false,
tableData: [], // 表格数据
pageSize: 10,
pageCurrent: 1,
total: 0,
dialogFormVisible: false,
title: '',
Technology: [],
ClassType: [{
value: 0,
label: 0
}, {
value: 1,
label: 1
}, {
value: 2,
label: 2
}, {
value: 3,
label: 3
}, {
value: 4,
label: 4
}],
form: {
设备名称: '', // 设备名称
设备型号: '', // 设备型号
设备性能指标: '', // 性能指标
设备加工能力工时: '', // 加工能力
整改工时比例: '', // 设备整改工时指数
设备编号: '', // 设备编号
工艺属性代码: '', // 工艺
班次类型: '', // 班次类型
设备工时系数: '', // 工时系数
设备预留工时系数: '' // 设备预留工时系数
},
rules: {
设备名称: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
设备型号: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
设备性能指标: [{ required: true, message: '请输入性能指标', trigger: 'blur' }],
设备加工能力工时: [{ required: true, message: '请输入加工能力', trigger: 'blur' }],
整改工时比例: [{ required: true, message: '请输入设备整改工时指数', trigger: 'blur' }],
设备编号: [{ required: true, message: '请输入设备编号', trigger: 'blur' }],
工艺属性代码: [{ required: true, message: '请选择工艺', trigger: 'change' }],
班次类型: [{ required: true, message: '请选择班次类型', trigger: 'change' }],
设备工时系数: [{ required: true, message: '请输入工时系数', trigger: 'blur' }],
设备预留工时系数: [{ required: true, message: '请输入设备预留工时系数', trigger: 'blur' }]
}
}
},
created() {
this.searchTable()
this.fetchData()
},
methods: {
// 初始化获取工艺
fetchData() {
this.getSelect(getTechnology, ['工艺名称', '工艺编号'], 'Technology')
},
// 查询
searchTable() {
this.loading = true
this.equipmentName ? this.num1 = 1 : this.num1 = 0
this.getTable(searchtable, [this.pageCurrent, this.pageSize, this.num1, this.equipmentName], ['tableData', 'total', 'loading'])
},
// 点击增加
handleAdd() {
this.dialogFormVisible = true
this.title = '增加'
this.addForm('form')
},
// 增加确定
submitAdd() {
this.addTable(edittype, [this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备工时系数, this.form.工艺属性代码, this.form.班次类型, this.form.设备加工能力工时, this.form.整改工时比例, this.form.设备编号, this.form.设备预留工时系数], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
},
// 编辑打开
handleEdit(row) {
this.dialogFormVisible = true
this.title = '编辑'
this.equipmentNum = row.设备流水号
this.editForm(row, 'form')
},
// 编辑确定
submitEdit() {
this.editTable(handlechange, [this.equipmentNum, this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备工时系数, this.form.工艺属性代码, this.form.班次类型, this.form.设备加工能力工时, this.form.整改工时比例, this.form.设备编号, this.form.设备预留工时系数], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
},
// 重置表单
callOff() {
this.dialogFormVisible = false
},
// 删除
handleDelete(index, row) {
this.deleteRow(handledelete, row.设备流水号, function() { this.searchTable() })
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-input{
width: 200px!important;
}
</style>

View File

@@ -0,0 +1,250 @@
<template>
<div class="app-container">
<el-card>
<span>设备名称:</span>
<el-select v-model="equipmentNameValue" placeholder="设备名称" style="width:200px" size="small" clearable filterable>
<el-option
v-for="item in equipmentName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>操作者:</span>
<el-input v-model="operator" placeholder="操作者" size="small" clearable style="width:200px" @dblclick.native="getOperator();param = 0"/>
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left:10px" @click="getTableData">查询</el-button>
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" @click="handleAdd">增加</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" highlight-current-row border style="height: 500px">
<el-table-column label="设备名称" align="center" >
<template slot-scope="scope">
{{ scope.row.设备名称 }}
</template>
</el-table-column>
<el-table-column label="班次" align="center" >
<template slot-scope="scope">
{{ scope.row.班次 }}
</template>
</el-table-column>
<el-table-column label="操作者" align="center" >
<template slot-scope="scope">
{{ scope.row.操作者 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" >
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible" title="选择人员" center style="min-height: 300px">
<span>部门名称:</span>
<el-select v-model="departmentValue" placeholder="部门名称" size="small" clearable style="width:180px" @change="getTablePeople">
<el-option
v-for="item in department"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-table
:data="tablePeople"
style="width:100%;max-height: 300px;margin-top: 20px"
height="300"
highlight-current-row
@row-click="currentPeople">
<el-table-column align="center" label="考勤编号">
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="性别">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column align="center" label="工作岗位">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogFormVisible = false">确定</el-button>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="dialogFormVisible_form" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="设备名称" prop="设备名称">
<el-select v-model="form.设备流水号" placeholder="设备名称" style="width:200px" size="small" clearable filterable>
<el-option
v-for="item in equipmentName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="班次" prop="班次" >
<el-select v-model="form.班次" placeholder="班次" style="width:200px" size="small" clearable filterable>
<el-option
v-for="item in staff"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="操作者" prop="操作者" >
<el-input v-model="form.操作者" placeholder="操作者" size="small" style="width:200px" clearable @dblclick.native="getOperator();param = 1"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel">取消</el-button>
<el-button v-show="title === '增加'" type="primary" @click="submitAdd()">确定</el-button>
<el-button v-show="title === '编辑'" type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getEquipment, getDepartment, getTablePeople, getTableData, deleteTable, getStaff, addTable, editTable } from '@/api/BasicData/MaintenanceEquipmentPerson'
import { SectionToChinese } from '@/utils/tool'
export default {
data() {
return {
equipmentNameValue: '',
equipmentNameCheck: null,
equipmentName: [],
operator: '',
operatorNum: null,
operatorCheck: null,
dialogFormVisible: false,
tablePeople: [],
departmentValue: '',
department: [],
tableData: [],
pageCurrent: 1,
pageSize: 10,
total: 0,
loading: false,
title: '',
dialogFormVisible_form: false,
param: null,
form: {
设备名称: '',
设备流水号: null,
班次: '',
班次代码: '',
操作者: '',
操作者编号: null
},
rules: {
设备名称: [{ required: true, message: '请选择设备名称', trigger: 'blur' }],
操作者: [{ required: true, message: '请选择操作者', change: 'blur' }]
},
staff: [],
No: null
}
},
created() {
this.fetchData()
this.getTableData()
},
methods: {
fetchData() {
this.getSelect(getEquipment, ['设备名称', '设备流水号'], 'equipmentName', [0, this.equipmentNameValue]) // 获取设备名称
getStaff().then(res => { // 获取班次
res.data.map(row => {
this.staff.push({
label: `${SectionToChinese(row.班次代码)}`,
value: row.班次代码
})
})
})
},
getOperator() {
this.dialogFormVisible = true
this.getSelect(getDepartment, ['部门', '考核部门编号'], 'department')
},
getTablePeople() {
this.getData(getTablePeople, 'tablePeople', this.departmentValue)
},
currentPeople(row) {
if (this.param === 0) {
this.operator = row.姓名
this.operatorNum = row.人员编号
} else if (this.param === 1) {
this.form.操作者 = row.姓名
this.form.操作者编号 = row.人员编号
} else {
console.log(`err`)
}
},
getTableData() {
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'])
},
handleAdd() {
this.addForm('form', [this.dialogFormVisible_form = true, this.title = '增加'])
},
handleEdit(row) {
this.No = row.设备人员关系流水号
this.editForm(row, 'form', [this.dialogFormVisible_form = true, this.title = '编辑'])
},
submitAdd() {
for (let i = 0; i < this.equipmentName.length; i++) {
if (this.form.设备流水号 === this.equipmentName[i].value) {
this.form.设备名称 = this.equipmentName[i].label
break
}
}
this.addTable(addTable, [this.form.设备流水号, this.form.设备名称, this.form.班次, this.form.操作者, this.form.操作者编号], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
},
submitEdit() {
this.editTable(editTable, [this.form.设备名称, this.form.设备流水号, this.form.班次代码, this.form.操作者, this.form.操作者编号, this.No], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
},
cancel() {
this.dialogFormVisible_form = false
},
handleDelete(row) {
this.deleteRow(deleteTable, row.设备人员关系流水号, function() { this.getTableData() })
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.getTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.getTableData()
}
}
}
</script>
<style scoped>
span{
margin: 20px;
}
</style>

View File

@@ -0,0 +1,206 @@
<template>
<div class="app-container">
<el-card>
<span>材料名称:</span>
<el-input v-model="Material" placeholder="请输材料名称" size="small" style="width:200px" clearable/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent = 1;pageSize = 10;featchMaterial()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="add()">增加</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData"
style="width: 100%"
height="580"
highlight-current-row
border>
<el-table-column align="center" label="材料编号" width="110">
<template slot-scope="scope">
{{ scope.row.材料流水号 }}
</template>
</el-table-column>
<el-table-column align="center" label="材料名称">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column align="center" label="变更日期">
<template slot-scope="scope">
{{ scope.row.操作日期 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="Edit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="delMaterial(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible" title="新增材料" center style="min-height: 200px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
<el-input v-model="form.MaterialName" size="small" style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff()">取消</el-button>
<el-button type="primary" size="small" @click="addMaterial('form')">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="编辑材料" center style="min-height: 200px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
<el-input v-model="form.MaterialName" size="small" style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff()">取消</el-button>
<el-button type="primary" size="small" @click="editMaterial('form')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { featchMaterial, addMaterial, delMaterial, editMaterial } from '@/api/BasicData/Materialmaintenance'
export default {
data() {
return {
ID: '',
dialogFormVisible: false,
dialogFormVisible2: false,
tableData: [],
Material: '', // 材质名称
listLoading: false,
pageCurrent: 1,
pageSize: 10,
total: null,
form: {
MaterialName: ''
},
rules: {
MaterialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }]
}
}
},
created() {
this.featchMaterial()
},
methods: {
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.featchMaterial()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.featchMaterial()
},
featchMaterial() {
featchMaterial(this.Material, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
})
},
callOff() {
this.dialogFormVisible = false
this.dialogFormVisible2 = false
},
add() {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.dialogFormVisible = true
},
addMaterial(formName) {
this.dialogFormVisible = false
this.$refs[formName].validate((valid) => {
if (valid) {
addMaterial(this.form.MaterialName).then(response => {
if (response.data[0].result === '1') {
this.featchMaterial()
this.$message.success('添加成功')
this.form = {}
} else {
this.$message.error('添加失败')
this.form = {}
}
})
}
})
},
delMaterial(row) {
console.log(row)
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delMaterial(row.材料流水号).then(response => {
if (response.data[0].result === '1') {
this.form.MaterialName = ''
this.featchMaterial()
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
})
},
Edit(row) {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.dialogFormVisible2 = true
this.form.MaterialName = row.材料
this.ID = row.材料流水号
},
editMaterial(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.dialogFormVisible2 = false
editMaterial(this.ID, this.form.MaterialName).then(response => {
if (response.data[0].result === '1') {
this.featchMaterial()
this.$message.success('编辑成功')
this.form = {}
} else {
this.$message.error('编辑失败')
this.form = {}
}
})
}
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom:15px;
}
.el-date-editor{
width:200px;
}
</style>

View File

@@ -0,0 +1,219 @@
<template>
<div class="app-container">
<el-card>
<span>角色功能:</span>
<el-input v-model="RoleFunctioning" size="small" clearable style="width:200px"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent=1;pageSize = 10;searchData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
</el-card>
<el-card style="margin-top: 15px">
<el-table
v-loading="loading"
:data="tableData"
height="580"
highlight-current-row
border>
<el-table-column align="center" label="角色编号" width="100">
<template slot-scope="scope">
{{ scope.row.角色编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="角色功能">
<template slot-scope="scope">
{{ scope.row.角色功能 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作日期">
<template slot-scope="scope">
{{ scope.row.操作日期 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible1" title="新增角色" center style="min-height: 200px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="角色名称" prop="角色功能" style="display: inline-block">
<el-input
v-model="form.角色功能"
clearable
size="small"
placeholder="角色功能"
style="width: 200px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogFormVisible1 = false">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="编辑角色" center style="min-height: 200px" width="400px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px">
<el-form-item label="角色名称" prop="角色功能" style="display: inline-block">
<el-input
v-model="form2.角色功能"
clearable
size="small"
placeholder="角色功能"
style="width: 200px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogFormVisible2 = false">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd2('form2')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { InitRolefunction, deleteData, searchTable, addData, addData2 } from '@/api/BasicData/SystemRrolemaintenance'
export default {
data() {
return {
RoleFunctioning: '',
pageCurrent: 1,
pageSize: 10,
total: null,
loading: false,
tableData: [],
dialogFormVisible1: false,
dialogFormVisible2: false,
name: '',
num: '', // 角色编号
form: {
角色功能: ''
},
form2: {
角色功能: ''
},
rules: {
角色功能: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
},
rules2: {
角色功能: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
}
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
InitRolefunction(this.pageCurrent, this.pageSize).then(response => { // 初始化
this.tableData = response.data.rows
this.total = response.data.total
})
},
searchData() {
this.loading = true
searchTable(this.RoleFunctioning, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
console.log(response.data)
})
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.fetchData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.fetchData()
},
handleEdit(row) {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.dialogFormVisible2 = true
this.form2.角色功能 = row.角色功能
this.num = row.角色编号
},
submitAdd2(formName) { // 编辑角色功能
this.$refs[formName].validate((valid) => {
if (valid) {
addData2(this.form2.角色功能, this.num).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.fetchData()
this.dialogFormVisible2 = false
} else { this.$message.error('编辑失败') }
})
}
})
},
submitAdd1(formName) { // 增加角色功能
this.$refs[formName].validate((valid) => {
if (valid) {
addData(this.form.角色功能).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.form.角色功能 = ''
this.fetchData()
this.dialogFormVisible1 = false
} else { this.$message.error('增加失败') }
})
}
})
},
handleAdd() {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.dialogFormVisible1 = true
},
handleDelete(row) { // 删除
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteData(row.角色编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
this.fetchData()
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,383 @@
<template>
<div class="app-container">
<table style="width: 100%">
<el-card>
<span>员工姓名:</span>
<el-input v-model="staffName" size="small" clearable style="width:200px"/>
<span style="margin-left: 15px">角色名称:</span>
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px">
<el-option
v-for="item in roleNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent1=1;searchData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handelAdd">增加</el-button>
</el-card>
<el-card>
<el-table :data="tableData" height="659" highlight-current-row>
<el-table-column label="员工姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column disabled label="所属部门" >
<template slot-scope="scope">
{{ scope.row.部门名称 }}
</template>
</el-table-column>
<el-table-column label="岗位名称">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
<el-table-column label="角色名称">
<template slot-scope="scope">
{{ scope.row.角色功能 }}
</template>
</el-table-column>
<el-table-column label="考勤编号">
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="submitEdit(scope.$index, scope.row)">修改</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="10"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</table>
<el-dialog :visible.sync="dialogFormVisible" title="人员信息" center width="750px">
<div style="height: 500px">
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">
<el-tree
:data="data2"
node-key="id"
style="width: 150px;float: left"
height="400"
accordion
@node-click="handleNodeClick"
/>
</div>
<el-table :data="List1" highlight-current-row height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleCurrentChange">
<el-table-column label="考勤编号" align="center" >
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column label="姓名" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column label="工作岗位" align="center">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
</div>
<el-button style="margin-left: 260px" @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible1" title="增加" center style="min-height: 270px" width="800px">
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="员工姓名" prop="staffName">
<el-input v-model="form1.staffName" size="small" clearable style="width:200px" @dblclick.native="dialogTableVisible()"/>
</el-form-item>
<el-form-item label="角色名称" prop="roleName">
<el-select v-model="form1.roleName" placeholder="角色名称" size="small" clearable style="width:200px">
<el-option
v-for="item in roleNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考勤编号" >
<el-input
v-model="cjscgy"
disabled
size="small"
style="width:200px"/>
</el-form-item>
<el-form-item label="所属部门" >
<el-input v-model="ssks" size="small" style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOFF"> </el-button>
<el-button type="primary" @click="submitAdd1()"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="编辑" center style="min-height: 270px" width="800px">
<el-form ref="form2" :model="form2" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="员工姓名" >
<el-input v-model="form2.staffName" disabled size="small" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="角色名称" prop="roleName">
<el-select v-model="form2.roleName" placeholder="角色名称" clearable size="small" style="width:200px">
<el-option
v-for="item in roleNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考勤编号" >
<el-input
v-model="cjscgy"
disabled
size="small"
style="width:200px"/>
</el-form-item>
<el-form-item disabled="true" label="所属部门" >
<el-input v-model="ssks" disabled size="small" style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOFF">取消</el-button>
<el-button type="primary" @click="submitAdd2()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { dialogtablevisible, deleteData, getTree, fn, getTable8, initOrderType, addData1, addData2, searchTable } from '@/api/BasicData/WorkshopPersonnelRoleMana'
export default {
data() {
return {
number: '',
form1: {
staffName: '',
roleName: ''
},
form2: {
staffName: '',
roleName: ''
},
rules: {
staffName: [{ required: true, message: '请选择员工姓名', trigger: 'change' }],
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
},
rules1: {
staffName: [{ required: true, message: '请选择员工姓名', trigger: 'change' }],
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
},
staffName: '',
cjscgy: '',
List1: [],
ssks: '',
data2: [],
dialogFormVisible1: false,
dialogFormVisible2: false,
tableData: [],
check1: '',
check2: '',
name: '', // 中间变量
check3: '',
check4: '',
staffNum: '',
personnelNumber: '',
personnelStream: '',
pageCurrent1: 1,
pageSize1: 10,
total1: null,
roleName: null,
roleNames: [],
rybh: '',
jsbh: '',
dialogFormVisible: false
}
},
created() {
this.fetchData()
},
methods: {
handelAdd(row) {
this.dialogFormVisible1 = true
this.ssks = ''
this.cjscgy = ''
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
},
submitEdit(index, row) {
this.dialogFormVisible2 = true
this.personnelStream = row.人员角色流水号
this.form2.staffName = row.姓名
this.ssks = row.部门名称
this.personnelNumber = row.人员编号
this.form2.roleName = row.角色功能
this.cjscgy = row.考勤编号
},
callOFF() {
this.dialogFormVisible1 = false
this.dialogFormVisible2 = false
this.ssks = ''
this.cjscgy = ''
},
searchData() {
if (this.staffName !== '' && this.staffName !== null) {
this.check1 = 1
} else {
this.check1 = 0
}
if (this.roleName !== '' && this.roleName !== null) {
this.check2 = 1
} else {
this.check2 = 0
}
searchTable(this.check1, this.staffName, this.check2, this.roleName, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData = response.data.rows
this.total1 = response.data.total
})
},
fetchData() {
getTree().then(response => { // 获取人员信息树
const data = response.data
this.data2 = fn(data, 0)
})
initOrderType().then(response => { // 角色名称
for (let i = 0; i < response.data.length; i++) {
this.roleNames.push({
label: response.data[i].角色功能,
value: response.data[i].角色编号
})
}
})
this.searchData()
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchData()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
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('增加失败') }
})
},
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('修改失败') }
})
},
handleCurrentChange3(val) {
this.searchgroup()
},
handleNodeClick(data) { // 树节点点击
this.ssks = data.label
getTable8(data.id).then(response => {
this.List1 = response.data
})
},
handleDelete(row) { // 删除
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteData(row.人员角色流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
} else { this.$message.error('删除失败') }
this.searchData()
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
dialogTableVisible() {
this.dialogFormVisible = true
dialogtablevisible().then(response => {
})
},
handleCurrentChange(row) { // 获取当前行人员信息
this.ssks = row.节点名称
this.number = row.考勤编号
this.name = row.姓名
this.personnelNumber = row.人员编号
},
getName() { // 提交人员
this.cjscgy = this.number
this.dialogFormVisible = false
this.form1.staffName = this.name
this.form2.staffName = this.name
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom:15px;
margin-left: 15px;
margin-right: 15px;
}
</style>

View File

@@ -0,0 +1,542 @@
<template>
<div class="app-container">
<el-row>
<el-col :span="6">
<el-card>
<span>工艺分类</span>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addProcessClassification()">新增</el-button>
<el-button size="small" type="warning" icon="el-icon-edit" @click="editProcessClassification()">编辑</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" @click="delProcessClassification()">删除</el-button>
</el-card>
</el-col>
<el-col :span="18">
<el-card>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺名称</el-button>
</el-card>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-card>
<el-table
v-loading="loading1"
ref="multipleTable"
:data="tableData1"
stripe
tooltip-effect="dark"
style="width: 100%"
height="700"
highlight-current-row
border>
<el-table-column align="center" label="流水号" width="80">
<template slot-scope="scope">
<el-radio :label="scope.row.工艺分类流水号" v-model="radio" @change.native="getCurrentRow(scope.row.工艺分类流水号, scope.row.工艺分类名称)"/>
</template>
</el-table-column>
<el-table-column align="center" label="工艺分类">
<template slot-scope="scope">
{{ scope.row.工艺分类名称 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="18">
<el-card >
<el-table
:data="tableData2"
:row-key="getRowKeys"
:expand-row-keys="expands"
height="700"
width="100%"
@expand-change="searchTechnologicalRequirementsOfProcessNum">
<el-table-column type="expand">
<template slot-scope="scope">
<el-table :data="tableData3" border>
<el-table-column label="工艺要求">
<template slot-scope="scope">
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-edit"
@click="editTechnologicalRequirements(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="delTechnologicalRequirements(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column label="工艺名称">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column>
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-edit"
@click="editProcess(scope.row)">编辑工艺</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="delProcess(scope.row)">删除工艺</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-circle-plus-outline"
@click="addTechnologicalRequirements(scope.row)">新增要求</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-dialog :visible.sync="dialogFormVisible1" title="增加工艺分类" center style="min-height: 300px" width="400px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
<el-form-item label="工艺分类" prop="ProcessClassification">
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button>
<el-button type="primary" @click="submit1('form1')"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="编辑工艺分类" center style="min-height: 300px" width="400px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
<el-form-item label="工艺分类" prop="ProcessClassification">
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button>
<el-button type="primary" @click="submit1('form1')"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible3" title="增加工艺" center style="min-height: 300px" width="400px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
<el-form-item label="工艺名称" prop="Process">
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="工艺名称简称" prop="ProcessShort">
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button>
<el-button type="primary" @click="submit1('form2')"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible4" title="编辑工艺" center style="min-height: 300px" width="400px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
<el-form-item label="工艺名称" prop="Process">
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
</el-form-item>
<el-form-item label="工艺名称简称" prop="ProcessShort">
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button>
<el-button type="primary" @click="submit1('form2')"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible5" title="新增工艺要求" center style="min-height: 300px" width="400px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
<el-form-item label="工艺要求" prop="Process">
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button>
<el-button type="primary" @click="submit1('form3')"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible6" title="编辑工艺要求" center style="min-height: 300px" width="400px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
<el-form-item label="工艺要求" prop="TechnologicalRequirements">
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button>
<el-button type="primary" @click="submit1('form3')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchProcessClassification, searchProcessNameOfProcessClassification, searchTechnologicalRequirementsOfProcessNum, searchProcessClassificationOfProcessClassificationNum, addProcessClassification, editProcessClassification, delProcessClassification, addProcess, delProcess, editProcess, addTechnologicalRequirements, editTechnologicalRequirements, delTechnologicalRequirements } from '@/api/BasicData/WorkshopProcessMaintenance'
export default {
data() {
return {
// 工艺分类所需变量
expands: [],
tableData1: [],
ProcessNum: '',
loading1: false,
loading2: false,
loading3: false,
ProcessClassificationNum: '',
radio: null,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
dialogFormVisible5: false,
dialogFormVisible6: false,
temp: null,
ProcessClassificationNumS: '',
form1: {
ProcessClassification: ''
},
form2: {
Process: '',
ProcessShort: ''
},
form3: {
TechnologicalRequirements: ''
},
rules1: {
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }]
},
rules2: {
Process: [{ required: true, message: '请输入工艺名称', trigger: 'blur' }],
ProcessShort: [{ required: true, message: '请输入工艺名称简称', trigger: 'blur' }]
},
rules3: {
TechnologicalRequirements: [{ required: true, message: '请输入工艺要求', trigger: 'blur' }]
},
tableData2: [],
tableData3: [],
Num: [],
maxNum: '',
max: [],
code: ''
}
},
created() {
this.searchProcessClassification()
},
methods: {
searchProcessClassification() {
this.loading1 = true
searchProcessClassification(this.ProcessClassification).then(response => {
this.loading1 = false
this.tableData1 = response.data
this.total1 = response.data
return this.tableData1
}).then(data => {
this.Num = data
for (let i = 0; i < this.Num.length; i++) {
this.max.push(this.Num[i].工艺分类流水号)
}
return this.max
}).then(data => {
const a = data
this.maxNum = a[0]
for (let j = 0; j < a.length; j++) {
if (this.maxNum < a[j]) {
this.maxNum = a[j]
}
}
return this.maxNum
}).then(data => {
const b = data
this.radio = b
return this.radio
}).then(data => {
const c = data
this.loading2 = true
searchProcessNameOfProcessClassification(c).then(response => {
this.loading2 = false
this.tableData2 = response.data
})
})
},
addProcessClassification() {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1 = {}
this.dialogFormVisible1 = true
this.temp = 1
},
editProcessClassification() {
if (this.radio !== '') {
this.temp = 2
this.dialogFormVisible2 = true
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
this.form1.ProcessClassification = response.data[0].工艺分类名称
})
} else {
this.$message.warning('请选择工艺分类')
}
},
submitProcessClassification() {
editProcessClassification(this.radio, this.form1.ProcessClassification).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.dialogFormVisible2 = false
this.searchProcessClassification()
} else {
this.$message.error('信息更新失败')
}
})
},
submitaddProcessClassification() {
addProcessClassification(this.form1.ProcessClassification).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchProcessClassification()
this.dialogFormVisible1 = false
} else { this.$message.error('增加失败') }
})
},
submit1(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.temp === 1) {
this.submitaddProcessClassification()
this.form1 = {}
this.temp = null
} else if (this.temp === 2) {
this.submitProcessClassification()
this.form1 = {}
this.temp = null
} else if (this.temp === 3) {
this.submitaddProcess()
this.form2 = {}
this.temp = null
} else if (this.temp === 4) {
this.submiteditProcess()
this.form2 = {}
this.temp = null
} else if (this.temp === 5) {
this.submitTechnologicalRequirements()
this.form3 = {}
this.temp = null
} else if (this.temp === 6) {
this.submiteditTechnologicalRequirements()
this.form3 = {}
this.temp = null
}
}
})
},
delProcessClassification() {
if (this.radio !== '') {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delProcessClassification(this.radio).then(response => {
if (response.data[0].result === '1') {
this.searchProcessClassification()
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
})
} else {
this.$message.warning('请选择工艺分类')
}
},
calloff() {
this.dialogFormVisible1 = false
this.dialogFormVisible2 = false
this.dialogFormVisible3 = false
this.dialogFormVisible4 = false
this.dialogFormVisible5 = false
this.dialogFormVisible6 = false
this.form1 = {}
this.form2 = {}
this.form3 = {}
},
getCurrentRow(row) {
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
this.form1.ProcessClassification = response.data[0].工艺分类名称
})
this.loading2 = true
searchProcessNameOfProcessClassification(row).then(response => {
this.loading2 = false
this.tableData2 = response.data
})
},
searchTechnologicalRequirementsOfProcessNum(row) {
this.expands = []
this.expands.push(row.工艺编号)
this.loading3 = true
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
this.loading3 = false
this.tableData3 = response.data
})
},
addProcess() {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
if (this.radio !== '') {
this.form2.Process = ''
this.form2.ProcessShort = ''
this.dialogFormVisible3 = true
this.temp = 3
} else {
this.$message.warning('请选择一个工艺分类')
}
},
submitaddProcess() {
addProcess(this.radio, this.form2.Process, this.form2.ProcessShort).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.loading2 = true
searchProcessNameOfProcessClassification(this.radio).then(response => {
this.loading2 = false
this.tableData2 = response.data
})
this.dialogFormVisible3 = false
} else { this.$message.error('增加失败') }
})
},
editProcess(row) {
this.dialogFormVisible4 = true
this.temp = 4
this.form2.Process = row.工艺名称
this.form2.ProcessShort = row.工艺名称简称
this.ProcessNum = row.工艺编号
},
submiteditProcess() {
editProcess(this.ProcessNum, this.form2.Process, this.form2.ProcessShort).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.dialogFormVisible4 = true
searchProcessNameOfProcessClassification(this.radio).then(response => {
this.loading2 = false
this.tableData2 = response.data
})
this.dialogFormVisible4 = false
} else {
this.$message.error('信息更新失败')
}
})
},
getRowKeys(row) {
return row.工艺编号
},
delProcess(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delProcess(row.工艺编号).then(response => {
if (response.data[0].result === '1') {
this.loading2 = true
searchProcessNameOfProcessClassification(this.radio).then(response => {
this.loading2 = false
this.tableData2 = response.data
})
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
})
},
addTechnologicalRequirements(row) {
if (this.$refs['form3'] !== undefined) {
this.$refs['form3'].resetFields()
}
this.ProcessNum = row.工艺编号
this.form3.TechnologicalRequirements = ''
this.dialogFormVisible5 = true
this.temp = 5
},
submitTechnologicalRequirements() {
addTechnologicalRequirements(this.ProcessNum, this.form3.TechnologicalRequirements).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.loading3 = true
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
this.loading3 = false
this.tableData3 = response.data
})
this.dialogFormVisible5 = false
} else { this.$message.error('增加失败') }
})
},
editTechnologicalRequirements(row) {
this.temp = 6
this.dialogFormVisible6 = true
this.form3.TechnologicalRequirements = row.工艺要求
this.code = row.工艺要求流水号
this.ProcessNum = row.工艺编号
},
submiteditTechnologicalRequirements() {
editTechnologicalRequirements(this.code, this.form3.TechnologicalRequirements).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.loading3 = true
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
this.loading3 = false
this.tableData3 = response.data
})
this.dialogFormVisible6 = false
} else {
this.$message.error('信息更新失败')
}
})
},
delTechnologicalRequirements(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delTechnologicalRequirements(row.工艺要求流水号).then(response => {
if (response.data[0].result === '1') {
this.loading3 = true
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
this.loading3 = false
this.tableData3 = response.data
})
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
})
}
}
}
</script>
<style scoped>
.el-card {
margin-top: 15px;
margin-left: 15px;
}
</style>

View File

@@ -268,9 +268,8 @@ export default {
this.PeopleNumber = this.id this.PeopleNumber = this.id
}, },
searchMachine() { // 查询机床 searchMachine() { // 查询机床
if (this.ProjectValue === '') { this.Machine = []
this.ProjectValue_check = 0 this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
}
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => { searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.Machine.push({ this.Machine.push({
@@ -281,6 +280,7 @@ export default {
}) })
}, },
searchGroupList() { // 查询组号 searchGroupList() { // 查询组号
this.GroupNum = []
searchTeam(this.MachineValue).then(response => { searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({ this.GroupNum.push({
@@ -291,16 +291,19 @@ export default {
}) })
}, },
searchPeopleData() { // 查询人员 searchPeopleData() { // 查询人员
this.People = []
searchPeople().then(response => { searchPeople().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.People.push({ this.People.push({
label: response.data[i].姓名, label: response.data[i].姓名,
value: response.data[i].考勤编号 value: parseInt(response.data[i].考勤编号)
}) })
} }
console.log(this.People)
}) })
}, },
searchContractData() { // 查询合同 searchContractData() { // 查询合同
this.Contract = []
searchContract().then(response => { searchContract().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.Contract.push({ this.Contract.push({
@@ -312,18 +315,10 @@ export default {
}, },
searchPartinfo() { searchPartinfo() {
this.tableDataPurchase = [] this.tableDataPurchase = []
if (this.ProjectValue === '') { this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
this.ProjectValue_check = 0 this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
} this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
if (this.MachineValue === '') { this.ContractValue ? this.ContractValue_check = 1 : this.ContractValue_check = 0
this.MachineValue_check = 0
}
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
}
if (this.ContractValue === '') {
this.ContractValue_check = 0
}
this.listLoading = true this.listLoading = true
searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => { searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => {
this.tableDataPurchase = response.data.rows this.tableDataPurchase = response.data.rows
@@ -349,8 +344,7 @@ export default {
// 打开直达件表单 // 打开直达件表单
addDirect(row) { addDirect(row) {
this.PeopleValue = '' this.PeopleValue = ''
this.form = [] this.form = {}
console.log(row)
this.dialogFormVisible = true this.dialogFormVisible = true
this.materialNum = row.物料流水号 this.materialNum = row.物料流水号
this.purchaseContractNumber = row.采购合同明细流水号 this.purchaseContractNumber = row.采购合同明细流水号
@@ -367,7 +361,7 @@ export default {
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
this.directPartNumber = row.直达件流水号 this.directPartNumber = row.直达件流水号
this.form.DirectNumber = row.到货数量 this.form.DirectNumber = row.到货数量
this.PeopleValue = row.领用人员流水号 this.PeopleValue = parseInt(row.领用人员流水号)
this.form.DirectNote = row.备注 this.form.DirectNote = row.备注
}, },
// 修改直达件 // 修改直达件

View File

@@ -76,17 +76,17 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card> </el-card>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<el-card> <el-card>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
@@ -127,7 +127,7 @@
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<div style="margin: 10px 15px"> <div style="margin: 10px 15px">
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange()" >交换</el-button> <el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange('form')" >交换</el-button>
</div> </div>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
@@ -167,24 +167,6 @@
</el-col> </el-col>
</el-row> </el-row>
<!--新增交换件对话框--> <!--新增交换件对话框-->
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
<el-form ref="form" :model="form" :rules="rules" label-position="left">
<el-form-item label="交换单编号" prop="ContractNumberValue" label-width="100px" size="small">
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
</el-form-item>
<el-form-item label="交换数量" prop="TotalContractAmount" label-width="100px">
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')"> </el-button>
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
</div>
</el-dialog>
</el-card> </el-card>
<el-card> <el-card>
<el-table <el-table
@@ -240,22 +222,40 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="180"> <el-table-column label="操作" align="center" min-width="180">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button> <el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button> <el-button :disabled="scope.row.是否禁用" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card> </el-card>
<div class="block" style="margin-top: 10px;"> <el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
<el-pagination <el-form ref="form" :model="form" :rules="rules" label-position="left">
:current-page="PageCurrent1" <el-form-item label="交换单编号" prop="ExchangeNumber" label-width="100px" size="small">
:page-sizes="[10, 20, 30, 40]" <el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
:page-size="10" </el-form-item>
:total="total1" <el-form-item label="交换数量" prop="ExchangeNumberx" label-width="100px">
layout="total, sizes, prev, pager, next, jumper" <el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
@size-change="handleSizeChange1" </el-form-item>
@current-change="handleCurrentChange1"/> <el-form-item label="备注" prop="ExchangeNote" label-width="100px">
</div> <el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')"> </el-button>
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit(scope.$index, scope.row, 'form')">确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@@ -265,13 +265,15 @@ import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
ProjectValue: ' ', count1: 0,
count2: 0, // 清表单验证计数器
ProjectValue: '',
Project: [], Project: [],
ProjectValue_check: 1, ProjectValue_check: 0,
MachineValue: ' ', MachineValue: '',
Machine: [], Machine: [],
MachineValue_check: 1, MachineValue_check: 1,
GroupNumValue: ' ', GroupNumValue: '',
GroupNumValue_check: 1, GroupNumValue_check: 1,
GroupNum: [], GroupNum: [],
tableDataBasic: [], tableDataBasic: [],
@@ -302,7 +304,7 @@ export default {
rules: { // 表单验证规则 rules: { // 表单验证规则
ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }], ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }],
ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }], ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }],
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'change' }] ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'blur' }]
}, },
PageCurrent: 1, PageCurrent: 1,
PageSize: 10, PageSize: 10,
@@ -334,26 +336,33 @@ export default {
// 获取人员编号 // 获取人员编号
getpeopleid() { getpeopleid() {
this.picikingPeople = this.id this.picikingPeople = this.id
console.log(this.picikingPeople)
}, },
searchMachine() { // 查询机床 searchMachine() {
if (this.ProjectValue === '') { this.MachineValue = ''
this.Machine = []
this.GroupNumValue = ''
this.GroupNum = []
if (this.ProjectValue !== '') {
this.ProjectValue_check = 1
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
} else {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} }
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}, },
searchGroupList() { // 查询组号 searchGroupList() {
this.GroupNumValue = ''
this.GroupNum = []
searchTeam(this.MachineValue).then(response => { searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({ this.GroupNum.push({
label: response.data[i].件名称, label: response.data[i].,
value: response.data[i].组件流水号 value: response.data[i].组件流水号
}) })
} }
@@ -362,19 +371,18 @@ export default {
searchPartinfo() { searchPartinfo() {
this.tableDataPurchase = [] this.tableDataPurchase = []
this.tableDataBasic = [] this.tableDataBasic = []
if (this.ProjectValue === ' ') { if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} }
if (this.MachineValue === ' ') { if (this.MachineValue === '') {
this.MachineValue_check = 0 this.MachineValue_check = 0
} }
if (this.GroupNumValue === ' ') { if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0 this.GroupNumValue_check = 0
} }
this.listLoading = true this.listLoading = true
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => { searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataPurchase = response.data.rows this.tableDataPurchase = response.data.rows
console.log(this.tableDataPurchase)
this.total = response.data.total this.total = response.data.total
}) })
this.listLoading = false this.listLoading = false
@@ -392,44 +400,76 @@ export default {
getExchangeTable() { getExchangeTable() {
this.listLoading1 = true this.listLoading1 = true
searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => { searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => {
this.tableDataExchange = response.data.rows const data = response.data.rows
console.log(data)
for (let i = 0; i < data.length; i++) {
data[i].审批通过 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataExchange = data
this.total1 = response.data.total this.total1 = response.data.total
this.listLoading1 = false this.listLoading1 = false
}) })
}, },
handleSizeChange1(val) {
this.PageCurrent1 = 1
this.PageSize1 = val
this.getExchangeTable()
},
handleCurrentChange1(val) {
this.PageCurrent1 = val
this.getExchangeTable()
},
// 选择领料单 // 选择领料单
chooseListinfor(row) { chooseListinfor(row) {
this.pickingListNumberx = row.领料单流水号 this.pickingListNumberx = row.领料单流水号
console.log(this.pickingListNumberx)
this.searchListDetailt() this.searchListDetailt()
}, },
// 增加交换件 // 增加交换件
addListDetailinfor() { addListDetailinfor(form) {
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => { this.$refs[form].validate((valid) => {
if (response.data[0].result === '1') { if (valid) {
this.$message.success('增加成功') addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => {
} else { this.$message.error('增加失败') } if (response.data[0].result === '1') {
this.$message.success('增加成功')
} else { this.$message.error('增加失败') }
}).then(() => {
this.dialogFormVisible = false
this.PageCurrent1 = 1
this.getExchangeTable()
})
}
}) })
this.dialogFormVisible = false
this.getExchangeTable()
}, },
// 打开交换表单 // 打开交换表单
exchange() { exchange(form) {
this.title = '交换' if (this.tableData1.length === 0) {
this.dialogFormVisible = true this.$message.error('请选择交换件')
} else if (this.tableData2.length === 0) {
this.$message.error('请选择交换件')
} else {
this.count1 = this.count1 + 1
if (this.count1 !== 1) {
this.$refs[form].resetFields()
}
this.title = '交换'
this.form.ExchangeNumber = ''
this.form.ExchangeNumberx = ''
this.form.ExchangeNote = ''
this.dialogFormVisible = true
}
}, },
// 重置表单 // 重置表单
callOff() { callOff(formName) {
this.form.ExchangeNumber = '' this.form.ExchangeNumber = ''
this.form.ExchangeNumberx = '' this.form.ExchangeNumberx = ''
this.form.ExchangeNote = '' this.form.ExchangeNote = ''
this.dialogFormVisible = false this.dialogFormVisible = false
this.$refs[formName].resetFields()
}, },
// 选中零件交换 // 选中零件交换
selecting(row) { selecting(row) {
const arr = new Array(row) const arr = new Array(row)
this.tableData1 = arr this.tableData1 = arr
console.log(this.tableData1)
}, },
// 选中被零件交换 // 选中被零件交换
selected(row) { selected(row) {
@@ -448,8 +488,9 @@ export default {
dropExchangeList(this.exchangeListNumber, this.eTeamPartNumber).then(response => { dropExchangeList(this.exchangeListNumber, this.eTeamPartNumber).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getExchangeTable().then(response => { this.dialogFormVisible = false
}) this.PageCurrent1 = 1
this.getExchangeTable()
} else { } else {
this.$message.error('删除失败') this.$message.error('删除失败')
} }

View File

@@ -90,7 +90,7 @@
</template> </template>
<script> <script>
import { searchTable, insertOne, getinventory, getlocate } from '@/api/Inventory/Inboundscanning' import { searchTable, insertOne, getinventory, getlocate } from '@/api/Inventory/GenneralPart'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { wsuri, name } from '@/utils/request' import { wsuri, name } from '@/utils/request'
import print from '@/vendor/print' import print from '@/vendor/print'
@@ -245,7 +245,7 @@ export default {
this.locateName = [] this.locateName = []
this.locateNumber = '' this.locateNumber = ''
if (this.inventoryNumber) { if (this.inventoryNumber) {
this.getSelect(getlocate, ['货位名称'], 'locateName', this.inventoryNumber) this.getSelect(getlocate, ['货位名称', '货位流水号'], 'locateName', this.inventoryNumber)
} }
} }
} }

View File

@@ -76,6 +76,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button> <el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
<el-button <el-button
:disabled="scope.row.是否禁用"
size="mini" size="mini"
type="danger" type="danger"
class="el-icon-delete" class="el-icon-delete"
@@ -178,6 +179,8 @@ export default {
if (response.data.length === 0) { if (response.data.length === 0) {
this.listLoading = false this.listLoading = false
this.$message.warning('无此零件') this.$message.warning('无此零件')
} else if (response.data[0].剩余数量 === 0) {
this.$message.warning('该零件已入库完毕')
} else { } else {
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) { if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
@@ -212,18 +215,22 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
for (let i = 0; i < this.tableData.length; i++) { if (this.locateNumber === '') {
if (this.tableData[i].innumber > this.tableData[i].plannumber) { this.$message.error('请选择货位')
this.tableData[i].innumber = this.tableData[i].plannumber } else {
} for (let i = 0; i < this.tableData.length; i++) {
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => { if (this.tableData[i].innumber > this.tableData[i].plannumber) {
this.$message({ this.tableData[i].innumber = this.tableData[i].plannumber
type: 'success', }
message: '零件入库成功!' insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
this.$message({
type: 'success',
message: '零件入库成功!'
})
}).then(() => {
this.Empty()
}) })
}).then(() => { }
this.Empty()
})
} }
}).catch(() => { }).catch(() => {
this.$message({ this.$message({

View File

@@ -72,7 +72,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120"> <el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="searchBasicPartRecord(scope.row)">选择</el-button> <el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchBasicPartRecord(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -111,12 +111,7 @@
</el-table-column> </el-table-column>
<el-table-column label="入库时间" align="center" min-width="80"> <el-table-column label="入库时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.入库时间 }} {{ scope.row.入库时间 ? scope.row.入库时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -151,11 +146,6 @@
{{ scope.row.出库备注 }} {{ scope.row.出库备注 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
@@ -232,7 +222,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120"> <el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="searchGeneralPartRecord(scope.row)">选择</el-button> <el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchGeneralPartRecord(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -271,12 +261,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货时间" align="center" min-width="80"> <el-table-column label="到货时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货时间 }} {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -306,11 +291,6 @@
{{ scope.row.领用者 }} {{ scope.row.领用者 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
@@ -385,7 +365,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120"> <el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="searchPurchasePartRecord(scope.row)">选择</el-button> <el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchPurchasePartRecord(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -424,12 +404,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货时间" align="center" min-width="80"> <el-table-column label="到货时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货时间 }} {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -459,11 +434,6 @@
{{ scope.row.领用者 }} {{ scope.row.领用者 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
@@ -540,7 +510,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="200px"> <el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-button size="mini" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="standardselecting(scope.row)" >选择</el-button> <el-button size="mini" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="standardselecting(scope.row)" >选择</el-button>
<el-button size="mini" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="changesafeAmount(scope.row)">修改</el-button> <el-button size="mini" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="changesafeAmount(scope.row)">修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
@@ -592,12 +562,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货时间" align="center" min-width="80"> <el-table-column label="到货时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货时间 }} {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -627,11 +592,6 @@
{{ scope.row.领用者 }} {{ scope.row.领用者 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
@@ -654,13 +614,13 @@ export default {
PurchasePartOut: [], // 外购件出库记录 PurchasePartOut: [], // 外购件出库记录
PurchasePartIn: [], // 外购件入库记录 PurchasePartIn: [], // 外购件入库记录
tableDataStandard: [], // 标准件 tableDataStandard: [], // 标准件
ProjectValue: ' ', ProjectValue: '',
Project: [], Project: [],
ProjectValue_check: 1, ProjectValue_check: 1,
MachineValue: ' ', MachineValue: '',
Machine: [], Machine: [],
MachineValue_check: 1, MachineValue_check: 1,
GroupNumValue: ' ', GroupNumValue: '',
GroupNumValue_check: 1, GroupNumValue_check: 1,
GroupNum: [], GroupNum: [],
ContractDetailValue: '', ContractDetailValue: '',
@@ -712,23 +672,29 @@ export default {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称 this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
}, },
searchMachine() { // 查询机床 searchMachine() { // 查询机床
if (this.ProjectValue === ' ') { this.Machine = []
this.ProjectValue_check = 0 this.GroupNum = []
this.MachineValue = ''
this.GroupNumValue = ''
console.log(this.ProjectValue)
if (this.ProjectValue !== '') {
searchmachine(1, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
} }
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}, },
searchGroupList() { // 查询组号 searchGroupList() { // 查询组号
this.GroupNum = []
this.GroupNumValue = ''
searchTeam(this.MachineValue).then(response => { searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({ this.GroupNum.push({
label: response.data[i].件名称, label: response.data[i].,
value: response.data[i].组件流水号 value: response.data[i].组件流水号
}) })
} }
@@ -738,23 +704,26 @@ export default {
searchPurchasePartinfo() { searchPurchasePartinfo() {
this.listLoading6 = true this.listLoading6 = true
this.tableDataPurchase = [] this.tableDataPurchase = []
if (this.ProjectValue === ' ') { if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
} }
if (this.MachineValue === ' ') { if (this.MachineValue === '') {
this.MachineValue_check = 0 this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
} }
if (this.GroupNumValue === ' ') { if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0 this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
} }
searchPurchasePart(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => { searchPurchasePart(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataPurchase = response.data.rows this.tableDataPurchase = response.data.rows
this.total2 = response.data.total this.total2 = response.data.total
this.listLoading6 = false this.listLoading6 = false
}) })
this.projectValue = ' '
this.MachineValue = ' '
this.GroupNumValue = ' '
}, },
// 查询外购件记录 // 查询外购件记录
searchPurchasePartRecord(row) { searchPurchasePartRecord(row) {
@@ -775,14 +744,20 @@ export default {
searchStandardPartinfo() { searchStandardPartinfo() {
this.listLoading9 = true this.listLoading9 = true
this.tableDataStandard = [] this.tableDataStandard = []
if (this.ProjectValue === ' ') { if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
} }
if (this.MachineValue === ' ') { if (this.MachineValue === '') {
this.MachineValue_check = 0 this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
} }
if (this.GroupNumValue === ' ') { if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0 this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
} }
searchStandardPart(this.PageCurrent3, this.PageSize3, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => { searchStandardPart(this.PageCurrent3, this.PageSize3, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataStandard = response.data.rows this.tableDataStandard = response.data.rows
@@ -790,9 +765,6 @@ export default {
this.listLoading9 = false this.listLoading9 = false
console.log(this.tableDataPurchase) console.log(this.tableDataPurchase)
}) })
this.projectValue = ' '
this.MachineValue = ' '
this.GroupNumValue = ' '
}, },
standardselecting(row) { standardselecting(row) {
this.contractDeatilNumber = row.采购合同明细流水号 this.contractDeatilNumber = row.采购合同明细流水号
@@ -820,45 +792,51 @@ export default {
searchGeneralPartinfo() { searchGeneralPartinfo() {
this.listLoading3 = true this.listLoading3 = true
this.tableDataGeneral = [] this.tableDataGeneral = []
if (this.ProjectValue === ' ') { if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
} }
if (this.MachineValue === ' ') { if (this.MachineValue === '') {
this.MachineValue_check = 0 this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
} }
if (this.GroupNumValue === ' ') { if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0 this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
} }
searchGeneralPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => { searchGeneralPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataGeneral = response.data.rows this.tableDataGeneral = response.data.rows
this.total1 = response.data.total this.total1 = response.data.total
this.listLoading3 = false this.listLoading3 = false
}) })
this.projectValue = ' '
this.MachineValue = ' '
this.GroupNumValue = ' '
}, },
// 查询基本件 // 查询基本件
searchBasciPartinfo() { searchBasciPartinfo() {
this.listLoading = true this.listLoading = true
this.tableDataBasic = [] this.tableDataBasic = []
if (this.ProjectValue === ' ') { if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
} }
if (this.MachineValue === ' ') { if (this.MachineValue === '') {
this.MachineValue_check = 0 this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
} }
if (this.GroupNumValue === ' ') { if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0 this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
} }
searchBasicPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => { searchBasicPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataBasic = response.data.rows this.tableDataBasic = response.data.rows
this.listLoading = false this.listLoading = false
this.total = response.data.total this.total = response.data.total
}) })
this.projectValue = ' '
this.MachineValue = ' '
this.GroupNumValue = ' '
}, },
// 查询基本件记录 // 查询基本件记录
searchBasicPartRecord(row) { searchBasicPartRecord(row) {

View File

@@ -32,7 +32,7 @@
</el-table-column> </el-table-column>
<el-table-column label="联系人" align="center"> <el-table-column label="联系人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.联系人 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" width="180" align="center"> <el-table-column label="备注" width="180" align="center">

View File

@@ -93,7 +93,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button> <el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="addDirectPartm()"> </el-button> <el-button type="primary" @click="addDirectPartm()">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-card> <el-card>
@@ -177,7 +177,8 @@ export default {
PeopleNumber: '', PeopleNumber: '',
tableDataOut: [], tableDataOut: [],
listLoading: '', listLoading: '',
listLoading1: '' listLoading1: '',
partnumber: ''
} }
}, },
computed: { computed: {
@@ -200,7 +201,6 @@ export default {
this.PeopleNumber = this.id this.PeopleNumber = this.id
}, },
searchMachine() { // 查询机床 searchMachine() { // 查询机床
console.log(1351)
if (this.ProjectValue === '') { if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} }
@@ -251,6 +251,8 @@ export default {
this.contractNumber = row.离线合同明细流水号 this.contractNumber = row.离线合同明细流水号
this.locateNumber = row.货位流水号 this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号 this.materialNumber = row.物料流水号
this.partnumber = row.货位存量
console.log(this.partnumber)
this.searchoutRecord() this.searchoutRecord()
}, },
// 重置表单 // 重置表单
@@ -272,21 +274,24 @@ export default {
}, },
// 离线外购件出库 // 离线外购件出库
addDirectPartm() { addDirectPartm() {
console.log(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber) if (this.partnumber < this.form.DirectNumber) {
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => { this.$message.error('请正确输入数量')
if (response.data[0].result === '1') { } else {
this.$notify({ outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
title: '成功', if (response.data[0].result === '1') {
message: '信息添加成功', this.$notify({
type: 'success' title: '成功',
}) message: '信息添加成功',
this.dialogFormVisible = false type: 'success'
this.searchDirect() })
} else { this.dialogFormVisible = false
this.$message.error('信息添加失败') this.searchDirect()
} } else {
}) this.$message.error('信息添加失败')
this.dialogFormVisible = false }
})
this.dialogFormVisible = false
}
} }
} }
} }

View File

@@ -84,7 +84,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="80"> <el-table-column label="操作" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button> <el-button :disabled="scope.row.是否出库" size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -93,7 +93,7 @@
</template> </template>
<script> <script>
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart } from '@/api/Inventory/PartOut' import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut } from '@/api/Inventory/PartOut'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -113,6 +113,7 @@ export default {
tableDataPicking: [], // 领料单明细表格 tableDataPicking: [], // 领料单明细表格
listNumber: '', listNumber: '',
pickingListNumber: null, // 领料单编号 pickingListNumber: null, // 领料单编号
pickingListNumber_check: 1,
pickingListNumberx: '', // 领料单流水号 pickingListNumberx: '', // 领料单流水号
picikingPeople: '', // 领料人流水号 picikingPeople: '', // 领料人流水号
partProjectNumber: '', // 项目流水号 partProjectNumber: '', // 项目流水号
@@ -144,8 +145,14 @@ export default {
}, },
// 查询领料单 // 查询领料单
searchListinfor() { searchListinfor() {
if (this.pickingListNumber === null) {
this.pickingListNumber_check = 0
}
this.listLoading = true this.listLoading = true
searchList(this.pickingListNumber).then(response => { searchList(this.pickingListNumber_check, this.pickingListNumber).then(response => {
for (let i = 0; i < response.data.length; i++) {
response.data[i].领料时间 = response.data[i].领料时间.substring(0, response.data[i].领料时间.length - 8)
}
this.tableData1 = response.data this.tableData1 = response.data
this.listLoading = false this.listLoading = false
}) })
@@ -154,7 +161,11 @@ export default {
searchListDetailt() { searchListDetailt() {
this.listLoading1 = true this.listLoading1 = true
searchListDetail(this.pickingListNumberx).then(response => { searchListDetail(this.pickingListNumberx).then(response => {
this.tableDataPicking = response.data const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].是否出库 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataPicking = data
this.listLoading1 = false this.listLoading1 = false
}) })
}, },
@@ -171,12 +182,14 @@ export default {
if (row.车间外购 === 1) { if (row.车间外购 === 1) {
WorkShopPart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => { WorkShopPart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功') this.$message.success('出库成功')
} else { this.$message.error('出库失败') } } else { this.$message.error('出库失败') }
}) })
} else if (row.零件类型 === 1 || row.零件类型 === 2) { } else if (row.零件类型 === 1 || row.零件类型 === 2) {
PurchasePart(row.组件零件流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => { PurchasePart(row.组件零件流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功') this.$message.success('出库成功')
} else { this.$message.error('出库失败') } } else { this.$message.error('出库失败') }
}) })
@@ -184,9 +197,11 @@ export default {
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, row.备注).then(response => { BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, row.备注).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('出库成功') this.$message.success('出库成功')
ListDetailOut(row.领料单明细流水号)
} else { this.$message.error('增加失败') } } else { this.$message.error('增加失败') }
}) })
} }
this.searchListDetailt()
} }
} }
} }

View File

@@ -168,11 +168,21 @@
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="库存数量" align="center" min-width="80"> <el-table-column label="库存数量" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.可出库数量 }} {{ scope.row.可出库数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待出库数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80"> <el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
@@ -240,11 +250,21 @@
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80"> <el-table-column label="零件数量" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货位存量 }} {{ scope.row.货位存量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待出库数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80"> <el-table-column label="零件类型" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.类型名称 }} {{ scope.row.类型名称 }}
@@ -307,11 +327,21 @@
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80"> <el-table-column label="零件数量" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货位存量 }} {{ scope.row.货位存量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待出库数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80"> <el-table-column label="零件类型" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.类型名称 }} {{ scope.row.类型名称 }}
@@ -434,9 +464,9 @@ import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
ProjectValue: null, ProjectValue: '',
Project: [], Project: [],
ProjectValue_check: 0, ProjectValue_check: 1,
MachineValue: null, MachineValue: null,
Machine: [], Machine: [],
MachineValue_check: 0, MachineValue_check: 0,
@@ -525,7 +555,10 @@ export default {
listLoadingx: '', listLoadingx: '',
purchaseDetailNum: '', purchaseDetailNum: '',
dialogFormVisibleWork: false, dialogFormVisibleWork: false,
time: [] time: [],
materialLocate: '',
enableOut: '',
pickingListNumber_check: 1
} }
}, },
computed: { computed: {
@@ -547,8 +580,14 @@ export default {
console.log(this.picikingPeople) console.log(this.picikingPeople)
}, },
searchMachine() { // 查询机床 searchMachine() { // 查询机床
if (this.ProjectValue === ' ') { this.MachineValue = ''
this.Machine = []
this.GroupNumValue = ''
this.GroupNum = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0 this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
} }
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => { searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
@@ -560,6 +599,8 @@ export default {
}) })
}, },
searchGroupList() { // 查询组号 searchGroupList() { // 查询组号
this.GroupNumValue = ''
this.GroupNum = []
searchTeam(this.MachineValue).then(response => { searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({ this.GroupNum.push({
@@ -632,8 +673,11 @@ export default {
}, },
// 查询领料单 // 查询领料单
searchListinfor() { searchListinfor() {
if (this.pickingListNumber === null) {
this.pickingListNumber_check = 0
}
this.listLoading2 = true this.listLoading2 = true
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber).then(response => { searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber_check, this.pickingListNumber).then(response => {
for (let i = 0; i < response.data.rows.length; i++) { for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].领料时间 = response.data.rows[i].领料时间.substring(0, response.data.rows[i].领料时间.length - 8) response.data.rows[i].领料时间 = response.data.rows[i].领料时间.substring(0, response.data.rows[i].领料时间.length - 8)
} }
@@ -742,26 +786,28 @@ export default {
this.materialName = row.零件名称 this.materialName = row.零件名称
this.materialType = row.零件类型名称 this.materialType = row.零件类型名称
this.materialNumber = row.零件图号 this.materialNumber = row.零件图号
this.enableOut = row.可出库数量
}, },
addBasicListDetail(formName) { addBasicListDetail(formName) {
if (this.pickingListNumberx === '') { if (this.pickingListNumberx === '') {
this.$message.error('请选择领料单') this.$message.error('请选择领料单')
} if (this.form.OutNumber === '') { } else if (this.form.OutNumber === '' || this.form.OutNumber > this.enableOut) {
this.$message.error('请输入领用数量') this.$message.error('请正确输入领用数量')
} else {
this.$refs[formName].validate((valid) => {
if (valid) {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber, 0, this.materialLocate).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
} else {
this.$message.error('增加失败')
}
})
this.dialogFormVisible1 = false
this.searchListinfor()
}
})
} }
this.$refs[formName].validate((valid) => {
if (valid) {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber, 0).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
} else {
this.$message.error('增加失败')
}
})
this.dialogFormVisible1 = false
this.searchListinfor()
}
})
}, },
// 增加外购件领料单明细 // 增加外购件领料单明细
addListDetailinfor(row) { addListDetailinfor(row) {
@@ -782,16 +828,18 @@ export default {
this.materialType = row.物料规格 this.materialType = row.物料规格
this.dialogFormVisible = true this.dialogFormVisible = true
this.purchaseDetailNum = row.采购合同明细流水号 this.purchaseDetailNum = row.采购合同明细流水号
this.materialLocate = row.物料与货位对照流水号
this.enableOut = row.货位存量
}, },
execaddListDetail(formName) { execaddListDetail(formName) {
if (this.pickingListNumberx === '') { if (this.pickingListNumberx === '') {
this.$message.error('请选择领料单') this.$message.error('请选择领料单')
} else if (this.OutNumber === '') { } else if (this.form2.OutNumber === '' || this.form2.OutNumber > this.enableOut) {
this.$message.error('请输入领用数量') this.$message.error('请正确输入领用数量')
} else { } else {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form2.OutNumber, this.partType, this.form2.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0).then(response => { addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form2.OutNumber, this.partType, this.form2.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
} else { } else {
@@ -821,16 +869,19 @@ export default {
this.materialType = row.物料规格 this.materialType = row.物料规格
this.dialogFormVisibleWork = true this.dialogFormVisibleWork = true
this.purchaseDetailNum = row.采购合同明细流水号 this.purchaseDetailNum = row.采购合同明细流水号
this.materialLocate = row.物料与货位对照流水号
this.enableOut = row.货位存量
console.log(this.enableOut)
}, },
addWorkshopListDetail(formName) { addWorkshopListDetail(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if (this.pickingListNumberx === '') { if (this.pickingListNumberx === '') {
this.$message.error('请选择领料单') this.$message.error('请选择领料单')
} else if (this.OutNumber === '') { } else if (this.form3.OutNumber === '' || this.form3.OutNumber > this.enableOut) {
this.$message.error('请输入领用数量') this.$message.error('请正确输入领用数量')
} else { } else {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 1).then(response => { addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 1, this.materialLocate).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
} else { } else {

View File

@@ -3,8 +3,8 @@
<el-card> <el-card>
<span style="margin: 5px">替换单编号</span> <span style="margin: 5px">替换单编号</span>
<el-input v-model="substituteNumber" clearable size="small" style="width:200px" /> <el-input v-model="substituteNumber" clearable size="small" style="width:200px" />
<span style="margin: 5px">零件图号</span> <span style="margin: 5px">替换件名称</span>
<el-input v-model="partNumber" clearable size="small" style="width:200px" /> <el-input v-model="subPartName" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getSubstitutedCard()">查询</el-button> <el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getSubstitutedCard()">查询</el-button>
</el-card> </el-card>
<el-card> <el-card>
@@ -65,8 +65,10 @@ export default {
data() { data() {
return { return {
tableDataExchange: [], tableDataExchange: [],
substituteNumber: '', check1: 0,
partNumber: '', check2: 0,
substituteNumber: '', // 替换单编号
subPartName: '', // 替换件名称
listLoading: '', listLoading: '',
subList: '', subList: '',
locateNumber: '', locateNumber: '',
@@ -77,7 +79,9 @@ export default {
// 替换单查询 // 替换单查询
getSubstitutedCard() { getSubstitutedCard() {
this.listloading = true this.listloading = true
searchSubstitutedCard().then(response => { this.substituteNumber ? this.check1 = 1 : this.check1 = 0
this.subPartName ? this.check2 = 1 : this.check2 = 0
searchSubstitutedCard(this.check1, this.substituteNumber, this.check2, this.subPartName).then(response => {
this.tableDataExchange = response.data this.tableDataExchange = response.data
this.listloading = false this.listloading = false
}) })

View File

@@ -0,0 +1,266 @@
<template>
<div class="app-container">
<el-card>
<span>工艺员:</span>
<el-select v-model="craftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="searchParts()">
<el-option
v-for="item in craftmen"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件图号:</span>
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" clearable @clear="returnDate = ''">
<el-option
v-for="item in partNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchData()">查询</el-button>
<span>打回时间:</span>
<el-date-picker v-model="returnDate" :clearable="false" type="datetime" placeholder="打回时间" size="small" readonly/>
</el-card>
<el-row>
<el-col :span="12">
<el-card>
<div style="display: inline-block;margin-bottom: 20px">改前零件工艺</div>
<el-table id="div1" ref="div1" :data="tableData1" :row-class-name="tableRowClassName1" size="mini" border style="height:350px;overflow-y: auto;" @mouseenter.native="changeScrollBefore">
<el-table-column align="center" label="工序顺序" width="70px">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺名称" width="120px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="难度等级" width="70px">
<template slot-scope="scope">
{{ scope.row.工艺难度等级 }}
</template>
</el-table-column>
<el-table-column header-align="center" label="工艺要求">
<template slot-scope="scope">
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="12">
<el-card style="margin-left:15px">
<div style="display: inline-block;margin-bottom: 20px">改后零件工艺</div>
<el-table id="div2" ref="div2" :data="tableData2" :row-class-name="tableRowClassName2" size="mini" border style="height:350px;overflow-y: scroll;" @mouseenter.native="changeScrollAfter">
<el-table-column align="center" label="工序顺序" width="70px">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺名称" width="120px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="难度等级" width="70px">
<template slot-scope="scope">
{{ scope.row.工艺难度等级 }}
</template>
</el-table-column>
<el-table-column header-align="center" label="工艺要求">
<template slot-scope="scope">
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-card>
<div id="myChart" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
</el-card>
</div>
</template>
<script>
import echarts from 'echarts'
import { initCraftmen, searchPart, searchProcessOld, searchProcessNew, searchChart } from '@/api/ManufacturingCenter/ProcessAdjustQuery'
export default {
data() {
return {
returnDate: '',
craftmenValue: '',
craftmen: [],
partNumValue: '', // 工艺计划流水号
partNum: [],
partStatus: '',
tableData1: [],
tableData2: [],
dataX: [],
partsNum: []
}
},
created() {
this.fetchData()
this.searchChart()
},
methods: {
changeScrollBefore() {
const div1 = document.getElementById('div1')
const div2 = document.getElementById('div2')
div2.removeAttribute('onscroll')
div1.setAttribute('onscroll', 'document.getElementById(\'div2\').scrollTop = scrollTop')
},
changeScrollAfter() {
const div1 = document.getElementById('div1')
const div2 = document.getElementById('div2')
div1.removeAttribute('onscroll')
div2.setAttribute('onscroll', 'document.getElementById(\'div1\').scrollTop = scrollTop')
},
searchChart() {
searchChart().then(response => {
console.log(response, 11)
for (let i = 0; i < response.data.length; i++) {
this.dataX.push(response.data[i].姓名)
this.partsNum.push(response.data[i].零件数量)
}
this.drawLine()
})
},
drawLine() {
const myChart = echarts.init(document.getElementById('myChart'))
myChart.clear()
myChart.setOption({
title: {
text: '在制零件工艺调整统计',
left: 'center'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
xAxis: {
type: 'category',
name: '工艺员',
data: this.dataX,
axisLabel: {
interval: 0,
rotate: 0,
margin: 10
}
},
yAxis: {
type: 'value',
name: '工艺被调整零件数',
min: 0,
minInterval: 1
},
series: [
{
name: '工艺调整零件数',
type: 'bar',
data: this.partsNum,
markLine: {
data: [
{ type: 'average', name: '平均值' }
]
}
}
]
})
},
fetchData() {
this.craftmen = []
initCraftmen().then(response => { // 初始化工艺员
for (let i = 0; i < response.data.length; i++) {
this.craftmen.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchParts() {
this.tableData1 = []
this.tableData2 = []
this.partNum = []
this.partNumValue = ''
this.returnDate = ''
searchPart(this.craftmenValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partNum.push({
label: response.data[i].零件图号_零件工艺计划,
value: response.data[i].工艺计划流水号
})
}
})
},
searchData() {
this.tableData1 = []
this.tableData2 = []
if (this.partNumValue !== '' && this.partNumValue !== null) {
searchProcessOld(this.partNumValue).then(response => {
this.tableData1 = response.data
this.returnDate = response.data[0].操作时间
})
searchProcessNew(this.partNumValue).then(response => {
this.tableData2 = response.data
})
} else {
this.$message.error('请先选择零件')
}
},
tableRowClassName2({ row }) {
for (let i = 0; i < this.tableData1.length; i++) {
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级 || this.tableData1[i].工序顺序 !== row.工序顺序) {
return 'change'
}
}
}
},
tableRowClassName1({ row }) {
for (let i = 0; i < this.tableData2.length; i++) {
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级 || this.tableData2[i].工序顺序 !== row.工序顺序) {
return 'change'
}
}
}
}
}
}
</script>
<style>
.el-table .change {
background: oldlace;
}
</style>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:200px
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
</style>

View File

@@ -66,12 +66,12 @@
</el-table-column> </el-table-column>
<el-table-column prop="name" label="单件" align="center"> <el-table-column prop="name" label="单件" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.单件定额工时" style="width:50px" placeholder="单件定额工时"/> <el-input v-model="scope.row.单件定额工时" style="width:90px" placeholder="单件定额"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="准结" align="center"> <el-table-column prop="name" label="准结" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.准结定额工时" style="width:50px" placeholder="准结定额工时"/> <el-input v-model="scope.row.准结定额工时" style="width:90px" placeholder="准结定额"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="300" align="center" fixed="right"> <el-table-column label="操作" width="300" align="center" fixed="right">