diff --git a/src/api/BasicData/PartsNumberMaintenance.js b/src/api/BasicData/PartsNumberMaintenance.js index f730742e..0a49aaea 100644 --- a/src/api/BasicData/PartsNumberMaintenance.js +++ b/src/api/BasicData/PartsNumberMaintenance.js @@ -11,14 +11,13 @@ export function projectSelect() { }) } -export function machineSelect(projectValue) { +export function machineSelect() { return request({ url: '', method: 'post', data: { type: '1', - name: 'PDM_机床名称_查询数据2', - param: `项目流水号=${projectValue}` + name: 'PDM_项目名称_查询数据' } }) } @@ -34,48 +33,36 @@ export function groupSelect(machineValue) { } }) } -export function searchTable5(projectCheck, project, machineCheck, machine, groupCheck, group) { +export function searchTable5(machineCheck, machine, groupCheck, group) { return request({ url: '', method: 'post', data: { type: '1', name: 'PDM_零件明细表_外购件和标准件_临时表数据查询', - param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}` + param: `机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}` } }) } -export function searchTable6(projectCheck, project, machineCheck, machine, groupCheck, group) { +export function searchTable6(machineCheck, machine, groupCheck, group) { return request({ url: '', method: 'post', data: { type: '1', name: 'PDM_零件明细表_基本件_临时表数据查询', - param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}` + param: `机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}` } }) } -export function searchTable7(pageCurrent, pageSize, projectCheck, project, machineCheck, machine, groupCheck, group) { - return request({ - url: '', - method: 'post', - data: { - type: '1', - name: 'PDM_零件明细表_外购件_临时表数据查询', - param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`, - Pagination: pageCurrent + '&' + pageSize - } - }) -} -export function basicPartsData(project_check, project, machine_check, machine, group_check, group) { +export function basicPartsData(machine_check, machine, group_check, group) { return request({ url: '', method: 'post', data: { type: '1', name: 'PDM_零件明细表_基本件_查询数据_综合gj', - param: `项目流水号_check=${project_check}&项目流水号=${project}&机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}` + param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}` } }) } @@ -123,14 +110,14 @@ export function deleteBasicParts5(basicNum) { } }) } -export function alldeleteBasicParts5(project, machine, group) { +export function alldeleteBasicParts5(machine, group) { return request({ url: '', method: 'post', data: { type: '2', name: 'PDM_零件明细表_外购件和标准件_临时表_全部删除', - param: `项目=${project}&机床=${machine}&组号=${group}` + param: `机床=${machine}&组号=${group}` } }) } @@ -145,14 +132,14 @@ export function deleteBasicParts6(basicNum) { } }) } -export function alldeleteBasicParts6(project, machine, group) { +export function alldeleteBasicParts6(machine, group) { return request({ url: '', method: 'post', data: { type: '2', name: 'PDM_零件明细表_基本件_临时表_全部删除', - param: `项目=${project}&机床=${machine}&组号=${group}` + param: `机床=${machine}&组号=${group}` } }) } @@ -228,8 +215,8 @@ export function getTable1(num, a, b, c, d, e, f, g) { method: 'post', data: { type: '1', - name: '车间生产管理工艺_新排产算法_能力平衡_查询数据_要平衡的零件', - param: '项目流水号_check=' + num + '=string&项目流水号=' + a + '=int&机床流水号_check=' + b + '=string&机床流水号=' + c + '=int&组件流水号_check=' + d + '=string&组件流水号=' + e + '=int&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=1=int&考核状态=5=int' + name: '车间生产管理工艺_新排产算法_能力平衡_查询数据_要平衡的零件_数量维护', + param: '机床流水号_check=' + b + '=string&机床流水号=' + c + '=int&组件流水号_check=' + d + '=string&组件流水号=' + e + '=int&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=1=int&考核状态=5=int' } }) } @@ -252,7 +239,7 @@ export function searchTable1(...params) { data: { type: '1', name: '采购管理_采购部采购_查询物料_数量维护', - param: `项目流水号_check=${params[0]}&项目流水号=${params[1]}&机床流水号_check=${params[2]}&机床流水号=${params[3]}&组件流水号_check=${params[4]}&组件流水号=${params[5]}&物料状态=1` + param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&物料状态=1` } }) } @@ -264,7 +251,7 @@ export function searchTable2(...params) { data: { type: '1', name: '采购管理_采购部采购_查询物料_基本件_数量维护', - param: `项目流水号_check=${params[0]}&项目流水号=${params[1]}&机床流水号_check=${params[2]}&机床流水号=${params[3]}&组件流水号_check=${params[4]}&组件流水号=${params[5]}&物料状态=1` + param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&物料状态=1` } }) } diff --git a/src/api/ManufacturingCenter/MonthEndHourAccounting.js b/src/api/ManufacturingCenter/MonthEndHourAccounting.js new file mode 100644 index 00000000..8738f855 --- /dev/null +++ b/src/api/ManufacturingCenter/MonthEndHourAccounting.js @@ -0,0 +1,13 @@ +import request from '@/utils/request' + +export function searchTable(time, time1) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '工艺月底工时核算_查询数据', + param: '开始时间=' + time + '&结束时间=' + time1 + } + }) +} diff --git a/src/api/ManufacturingCenter/OnlineProcessChange.js b/src/api/ManufacturingCenter/OnlineProcessChange.js new file mode 100644 index 00000000..3bdefd7b --- /dev/null +++ b/src/api/ManufacturingCenter/OnlineProcessChange.js @@ -0,0 +1,551 @@ +import request from '@/utils/request' + +// 查询零件未编制(包含借用件) +export function getPartnames3(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_编制工艺_按人员机床组号或图号查', + param: '工艺人员编号=' + num1 + '&机床组号或图号=' + num2 + } + }) +} +// 查询零件已编制(包含借用件) +export function getPartnames4(num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_查询已完成工艺制定零件_按机床组号或图号查_更改', + param: '机床组号或图号=' + num2 + } + }) +} +// 典艺查询<高精原有数据> +export function searchProcess11(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_原零件工艺查询_MESWORK', + param: '零件图号=' + num + } + }) +} +// 典艺查询<高精原有数据> +export function numChange(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_原零件工艺明细查询_MESWORK', + param: '典艺流水号=' + num + } + }) +} +// 保存主表工艺 +export function selectRequest(num0, num1, num2, num3, request0) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_根据工序流水号和工艺计划流水号', + param: '工序流水号=' + num0 + '&工艺计划流水号=' + num1 + '&工艺编号=' + num2 + '&工艺顺序=' + num3 + '&工艺要求=' + request0 + } + }) +} +// 初始化 工艺员A +export function initCraftmen() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', + param: '考核部门编号=20' + } + }) +} +// 查询 未编制 零件号 +export function getPartnames1(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_编制工艺_按人员查', + param: '工艺人员编号=' + num1 + '&零件图号=' + num2 + } + }) +} +// 初始化 已编制 零件号 +export function getPartnames2(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_查询已完成工艺制定零件', + param: '工艺人员编号=' + num1 + '&零件图号=' + num2 + } + }) +} +// 零件详细信息 +export function detailInfo(serialNum) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_查已投产零件信息', + param: '工艺计划流水号=' + serialNum + '=int' + } + }) +} +// 初始化材质 +export function getMaterial(pageCurrent, pageSize) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_材质表_查询数据', + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 根据材质名称查材质 +export function searchMaterial(pageCurrent, pageSize, name) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_材质表_查询数据_根据材料名称', + param: '材料名称=' + name, + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 典型工艺选择零件分类A +export function typicalProcess() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_基础表_典型工艺名称_分类_查询数据' + } + }) +} +// 典型工艺选择零件名称、工艺号、备注 +export function FcK(serialNum) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_基础表_典型工艺名称_查询数据_查典型工艺名称', + param: '典型工艺名称分类流水号=' + serialNum + '=int' + } + }) +} +// 典型工艺查询 +export function searchProcess(check1, a, check2, b, check3, c) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_基础表_典型工艺名称_查询数据_综合查询', + param: '典型工艺名称分类流水号_check=' + check1 + '=bit&典型工艺名称分类流水号=' + a + '=int&典型工艺流水号_check=' + check2 + '=bit&典型工艺流水号=' + b + '=int&典型工艺流水号1_check=' + check3 + '=bit&典型工艺流水号1=' + c + '=int' + } + }) +} +// 初始化工艺名称 +export function processNameClick() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_基础表_工艺分类名称_查询数据_零件工艺制定专用' + } + }) +} +// 工艺名称查询 +export function processNameSelect(val) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_基础表_工艺名称_查询数据', + param: '工艺分类流水号_check=1=bit&工艺分类流水号=' + val + '=int' + } + }) +} +// 工艺要求查询 +export function processRequestSelect(val) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理_基础表_工艺要求_查询数据', + param: '工艺编号=' + val + '=int' + } + }) +} +// 初始化公差A +export function initTolerance() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_基础表_公差对照表_查询数据' + } + }) +} +// 公差查询 +export function searchTolerance(val1, val2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_基础表_公差对照表_公差_查询数据', + param: '输入数值=' + val1 + '&参数=' + val2 + } + }) +} +// 工艺定额人员查询 +export function initPerson() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', + param: '考核部门编号=9' + } + }) +} +// 完艺工艺查询 +export function searchWYgongyi(check1, tuhao, check2, bianhao, check3, start, end, check4, name) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_查询数据_根据零件图号查询已投产的工艺计划流水号', + param: '零件图号_check=' + check1 + '&零件图号=' + tuhao + '&工艺员编号_check=' + check2 + '&工艺员编号=' + bianhao + '&工艺时间_check=' + check3 + '&工艺开始时间=' + start + '=datetime&工艺结束时间=' + end + '=datetime&零件名称_check=' + check4 + '&零件名称=' + name + } + }) +} +// 完艺工艺要求查询 +export function gongyiYQ(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_查询数据', + param: '工艺计划流水号=' + num + } + }) +} +// 完艺工艺拷贝 +export function gongyiCopy(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工序_工艺拷贝_工艺计划流水号', + param: '工艺计划流水号_完成工艺=' + num1 + '=int&工艺计划流水号_被拷工艺=' + num2 + '=int' + } + }) +} +// 主界面选择零件号查主表 +export function mainTable(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工序_查询工序信息', + param: '工艺计划流水号=' + num + '=int' + } + }) +} +// 主界面主表难度等级修改 +export function hardEdit(num, hard) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_工艺难度等级', + param: '工序流水号=' + num + '=int&工艺难度等级=' + hard + } + }) +} +// 主界面主表工艺要求修改 +export function requestEdit(num, request0) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_工艺要求_根据工序流水号', + param: '工序流水号=' + num + '=int&工艺要求=' + request0 + } + }) +} +// 保存更改 +export function saveUpadate(num, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_更改保存', + param: '工艺计划流水号=' + num + '&工序流水号=' + num1 + } + }) +} +// 主界面主表插入功能 +export function insertOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_工艺计划流水号和工序流水号_更改', + param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int' + } + }) +} +// 主界面主表删除功能 +export function deleteOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_删除数据_工序流水号', + param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int' + } + }) +} +// 主界面主表上移功能 +export function upOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_上移工序', + param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int' + } + }) +} +// 主界面主表下移功能 +export function downOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_下移工序', + param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int' + } + }) +} +// 保存变更材质 +export function saveMaterial(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工艺计划_修改零件材料', + param: '工艺计划流水号=' + num0 + '&材料流水号=' + num1 + } + }) +} +// 核准保存 +export function saveApprove(num0, num1, request0, spec, num2, outhelp, num3, num4, weight, area, num5, level) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_增加数据_同时修改工艺计划', + param: '工艺计划流水号=' + num0 + '&工艺编号=' + num1 + '&工艺要求=' + request0 + '&原材料规格=' + spec + '&工序顺序=' + num2 + '&工序间是否外协=' + outhelp + '&工序流水号=' + num3 + '&材料流水号=' + num4 + '&重量=' + weight + '&面积=' + area + '&工艺人员编号=' + num5 + '&工艺难度等级=' + level + } + }) +} + +// 粘贴 +export function pasteTable(oldNum, newNum) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工艺计划_拷贝零件工艺', + param: '工艺计划流水号旧=' + oldNum + '&工艺计划流水号新=' + newNum + } + }) +} +// 删除 +export function deleteTable(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_删除零件工艺', + param: '工艺计划流水号=' + num + } + }) +} +// 在制零件工艺修改 +export function returnEdit(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_在制零件工艺调整_修改工艺', + param: '工艺计划流水号=' + num + } + }) +} +// 查询工艺记录 +export function searchRecord(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_在制零件工艺调整_查询工艺', + param: '工艺计划流水号=' + num + } + }) +} +// 重量拷贝 +export function WeightCopy(num, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_重量拷贝_工艺计划流水号', + param: '工艺计划流水号=' + num + '&重量信息=' + num2 + } + }) +} +// 保存变更材质 +export function saveWeight(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工艺计划_修改零件重量', + param: '工艺计划流水号=' + num0 + '&重量=' + num1 + } + }) +} +// 单件工时改变 +export function singleChange(val1, val2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_单件准结定额_修改数据', + param: '工序流水号=' + val1 + '&单件定额工时=' + val2 + } + }) +} +// 准结工时改变 +export function readyChange(val1, val2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_单件准结定额_修改数据', + param: '工序流水号=' + val1 + '&准结定额工时=' + val2 + } + }) +} +// 未编制定额保存 +export function TableAddLi1(a, b) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_定额任务分配_保存数据', + param: '工艺计划流水号=' + a + '=string&人员编号=' + b + '=string' + } + }) +} +// 已编制定额保存 +export function TableAddLi(a, b, c, num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_增加数据_修改数据', + param: '单件定额工时=' + a + '=string&准结定额工时=' + b + '=string&零件图号=' + c + '=string&工序流水号=' + num0 + '=int&工艺计划流水号=' + num1 + '=int' + } + }) +} +// 修改备注 +export function modifyRemark(...params) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工艺计划_工艺修改记录_增加数据', + param: `修改人员编号=${params[0]}&修改备注=${params[1]}&工艺计划流水号=${params[2]}` + } + }) +} +export function editGongyi(num, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_2027zdyNew', + param: `工艺计划流水号=${num}&工艺编号=${num1}` + } + }) +} +export function dropGongyi(num, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_删除数据_2027zdyNew', + param: `工艺计划流水号=${num}&工序流水号=${num1}` + } + }) +} diff --git a/src/api/PurchasingCenter/PurchaseSituationSearch.js b/src/api/PurchasingCenter/PurchaseSituationSearch.js index 85e6001b..eee2f3d6 100644 --- a/src/api/PurchasingCenter/PurchaseSituationSearch.js +++ b/src/api/PurchasingCenter/PurchaseSituationSearch.js @@ -31,7 +31,7 @@ export function searchTable1(...params) { data: { type: '1', name: '采购管理_采购部采购_查询物料_分配后_加供应商_新', - param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件类型=${params[6]}&物料名称_check=${params[7]}&物料名称=${params[8]}&物料规格_check=${params[9]}&物料规格=${params[10]}&物料型号_check=${params[11]}&物料型号=${params[12]}`, + param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件类型=${params[6]}&物料名称_check=${params[7]}&物料名称=${params[8]}&物料规格_check=${params[9]}&物料规格=${params[10]}&物料型号_check=${params[11]}&物料型号=${params[12]}&时间_check=${params[13]}&开始时间=${params[14]}&结束时间=${params[15]}`, Pagination: params[4] + '&' + params[5] } }) @@ -44,7 +44,7 @@ export function searchTable2(...params) { data: { type: '1', name: '采购管理_采购部采购_查询物料_基本件_分配后_加供应商_新', - param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件名称_check=${params[6]}&零件名称=${params[7]}&零件规格_check=${params[8]}&零件规格=${params[9]}&零件图号_check=${params[10]}&零件图号=${params[11]}`, + param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件名称_check=${params[6]}&零件名称=${params[7]}&零件规格_check=${params[8]}&零件规格=${params[9]}&零件图号_check=${params[10]}&零件图号=${params[11]}&时间_check=${params[12]}&开始时间=${params[13]}&结束时间=${params[14]}`, Pagination: params[4] + '&' + params[5] } }) @@ -57,7 +57,7 @@ export function searchTable1Export(...params) { data: { type: '1', name: '采购管理_采购部采购_查询物料_分配后_加供应商', - param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件类型=${params[4]}` + param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件类型=${params[4]}&时间_check=${params[5]}&开始时间=${params[6]}&结束时间=${params[7]}` } }) } @@ -69,7 +69,7 @@ export function searchTable2Export(...params) { data: { type: '1', name: '采购管理_采购部采购_查询物料_基本件_分配后_加供应商', - param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}` + param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&时间_check=${params[4]}&开始时间=${params[5]}&结束时间=${params[6]}` } }) } diff --git a/src/views/BasicData/PartsNumberMaintenance/index.vue b/src/views/BasicData/PartsNumberMaintenance/index.vue index 572c2ff5..55d90c68 100644 --- a/src/views/BasicData/PartsNumberMaintenance/index.vue +++ b/src/views/BasicData/PartsNumberMaintenance/index.vue @@ -1,14 +1,6 @@ + + +
+ + +
+ + +
{ // 标准件 - searchTable1Export(check1, this.machineNumberValue, check2, this.groupNumberValue, 2).then(res2 => { // 外购件 - searchTable2Export(check1, this.machineNumberValue, check2, this.groupNumberValue).then(res3 => { // 基本件 + this.startTime ? check3 = 1 : (check3 = 0, this.startTime = '') + searchTable1Export(check1, this.machineNumberValue, check2, this.groupNumberValue, 1, check3, this.startTime[0], this.startTime[1]).then(res1 => { // 标准件 + searchTable1Export(check1, this.machineNumberValue, check2, this.groupNumberValue, 2, check3, this.startTime[0], this.startTime[1]).then(res2 => { // 外购件 + searchTable2Export(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.startTime[0], this.startTime[1]).then(res3 => { // 基本件 import('./Export2Excel').then(excel => { const dataGroup = [] - const filterVal1 = ['机床图号', '组号', '物料名称', '物料型号', '物料规格', '零件数量', ['数量', '离线采购数量'], ['已到货数量', '离线到货数量'], ['供应商名称', '离线合同供应商名称'], ['采购合同编号', '离线合同编号'], '姓名', '供货商', '备注'] // tableData0里的属性名 - const filterVal2 = ['机床图号', '组号', '物料名称', '物料型号', '物料规格', '零件数量', ['数量', '离线采购数量'], ['已到货数量', '离线到货数量'], ['供应商名称', '离线合同供应商名称'], ['采购合同编号', '离线合同编号'], '姓名', '供货商', '备注'] // tableData1里的属性名 - const filterVal3 = ['机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '零件数量', '数量', '已到货数量', '供应商名称', '采购合同编号', '姓名', '供货商', '备注'] // tableData2里的属性名 + const filterVal1 = ['机床图号', '组号', '物料名称', '物料型号', '物料规格', '零件数量', ['数量', '离线采购数量'], ['已到货数量', '离线到货数量'], ['供应商名称', '离线合同供应商名称'], ['采购合同编号', '离线合同编号'], '姓名', '供货商', '操作日期', '备注'] // tableData0里的属性名 + const filterVal2 = ['机床图号', '组号', '物料名称', '物料型号', '物料规格', '零件数量', ['数量', '离线采购数量'], ['已到货数量', '离线到货数量'], ['供应商名称', '离线合同供应商名称'], ['采购合同编号', '离线合同编号'], '姓名', '供货商', '操作日期', '备注'] // tableData1里的属性名 + const filterVal3 = ['机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '零件数量', '数量', '已到货数量', '供应商名称', '采购合同编号', '姓名', '供货商', '操作日期', '备注'] // tableData2里的属性名 const data1 = res1.data.map(v => filterVal1.map(j => { if (typeof (j) === 'string') { return v[j] || '—' @@ -402,13 +430,13 @@ export default { data1.map(v => { v.push('') // 物料状态 if (v[10] === '—') { - v[13] = '未分配' + v[14] = '未分配' } else if (v[6] === '—') { - v[13] = '未采购' + v[14] = '未采购' } else if (v[6] !== '—' && v[6] !== v[7]) { - v[13] = '未全部到货' + v[14] = '未全部到货' } else if (v[6] !== '—' && v[6] === v[7]) { - v[13] = '全部到货' + v[14] = '全部到货' } }) dataGroup.push(data1) @@ -422,13 +450,13 @@ export default { data2.map(v => { v.push('') // 物料状态 if (v[10] === '—') { - v[13] = '未分配' + v[14] = '未分配' } else if (v[6] === '—') { - v[13] = '未采购' + v[14] = '未采购' } else if (v[6] !== '—' && v[6] !== v[7]) { - v[13] = '未全部到货' + v[14] = '未全部到货' } else if (v[6] !== '—' && v[6] === v[7]) { - v[13] = '全部到货' + v[14] = '全部到货' } }) dataGroup.push(data2) @@ -442,19 +470,19 @@ export default { data3.map(v => { v.push('') // 物料状态 if (v[11] === '—') { - v[14] = '未分配' + v[15] = '未分配' } else if (v[7] === '—') { - v[14] = '未采购' + v[15] = '未采购' } else if (v[7] !== '—' && v[7] !== v[8]) { - v[14] = '未全部到货' + v[15] = '未全部到货' } else if (v[7] !== '—' && v[7] === v[8]) { - v[14] = '全部到货' + v[15] = '全部到货' } }) dataGroup.push(data3) - const headerGroup = [['机床号', '组号', '名称', '图号或型号', '规格', '技术下达数量', '合同采购数量', '到货数量', '供应商', '合同编号', '采购员', '供货商', '备注', '物料状态'], - ['机床号', '组号', '名称', '图号或型号', '规格', '技术下达数量', '合同采购数量', '到货数量', '供应商', '合同编号', '采购员', '供货商', '备注', '物料状态'], - ['机床号', '组号', '名称', '图号或型号', '规格', '材料', '技术下达数量', '合同采购数量', '到货数量', '供应商', '合同编号', '采购员', '供货商', '备注', '物料状态']] + const headerGroup = [['机床号', '组号', '名称', '图号或型号', '规格', '技术下达数量', '合同采购数量', '到货数量', '供应商', '合同编号', '采购员', '供货商', '下达任务时间', '备注', '物料状态'], + ['机床号', '组号', '名称', '图号或型号', '规格', '技术下达数量', '合同采购数量', '到货数量', '供应商', '合同编号', '采购员', '供货商', '下达任务时间', '备注', '物料状态'], + ['机床号', '组号', '名称', '图号或型号', '规格', '材料', '技术下达数量', '合同采购数量', '到货数量', '供应商', '合同编号', '采购员', '供货商', '下达任务时间', '备注', '物料状态']] const sheetGroup = ['标准件', '外购件', '基本件'] excel.export_json_to_excel({ headerGroup: headerGroup, @@ -529,13 +557,15 @@ export default { this.searchTable2() }, searchTable0() { // 查询标准件 - let check1, check2, check3, check4, check5 + this.tableData0 = [] + let check1, check2, check3, check4, check5, check6 this.machineNumberValue ? check1 = 1 : check1 = 0 this.groupNumberValue ? check2 = 1 : check2 = 0 this.Name ? check3 = 1 : check3 = 0 this.spec ? check4 = 1 : check4 = 0 this.model ? check5 = 1 : check5 = 0 - searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1, check3, this.Name, check4, this.spec, check5, this.model).then(response => { + this.startTime ? check6 = 1 : (check6 = 0, this.startTime = '') + searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1]).then(response => { console.log(this.tableData0) if (response.data.rows.length !== 0) { for (let i = 0; i < response.data.rows.length; i++) { @@ -561,7 +591,8 @@ export default { 备注: response.data.rows[i].备注, 采购数量: Number(response.data.rows[i].询价状态编号) === 1 && response.data.rows[i].人员编号 !== '' ? '—' : response.data.rows[i].数量 || response.data.rows[i].离线采购数量 || '—', 到货数量: Number(response.data.rows[i].询价状态编号) === 1 && response.data.rows[i].人员编号 !== '' ? '—' : response.data.rows[i].已到货数量 || response.data.rows[i].离线到货数量 || '—', - 不合格数量: response.data.rows[i].不合格数量 + 不合格数量: response.data.rows[i].不合格数量, + 操作日期: response.data.rows[i].操作日期 }) } } @@ -569,13 +600,15 @@ export default { }) }, searchTable1() { // 查询外购件 - let check1, check2, check3, check4, check5 + this.tableData1 = [] + let check1, check2, check3, check4, check5, check6 this.machineNumberValue ? check1 = 1 : check1 = 0 this.groupNumberValue ? check2 = 1 : check2 = 0 this.Name ? check3 = 1 : check3 = 0 this.spec ? check4 = 1 : check4 = 0 this.model ? check5 = 1 : check5 = 0 - searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2, check3, this.Name, check4, this.spec, check5, this.model).then(response => { + this.startTime ? check6 = 1 : (check6 = 0, this.startTime = '') + searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1]).then(response => { this.total1 = response.data.total if (response.data.rows.length !== 0) { for (let i = 0; i < response.data.rows.length; i++) { @@ -601,7 +634,8 @@ export default { 备注: response.data.rows[i].备注, 采购数量: Number(response.data.rows[i].询价状态编号) === 1 && response.data.rows[i].人员编号 !== '' ? '—' : response.data.rows[i].数量 || response.data.rows[i].离线采购数量 || '—', 到货数量: Number(response.data.rows[i].询价状态编号) === 1 && response.data.rows[i].人员编号 !== '' ? '—' : response.data.rows[i].已到货数量 || response.data.rows[i].离线到货数量 || '—', - 不合格数量: response.data.rows[i].不合格数量 + 不合格数量: response.data.rows[i].不合格数量, + 操作日期: response.data.rows[i].操作日期 }) } } @@ -609,13 +643,14 @@ export default { }) }, searchTable2() { // 查询基本件 - let check1, check2, check3, check4, check5 + let check1, check2, check3, check4, check5, check6 this.machineNumberValue ? check1 = 1 : check1 = 0 this.groupNumberValue ? check2 = 1 : check2 = 0 this.Name ? check3 = 1 : check3 = 0 this.spec ? check4 = 1 : check4 = 0 this.model ? check5 = 1 : check5 = 0 - searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2, check3, this.Name, check4, this.spec, check5, this.model).then(response => { + this.startTime ? check6 = 1 : (check6 = 0, this.startTime = '') + searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2, check3, this.Name, check4, this.spec, check5, this.model, check6, this.startTime[0], this.startTime[1]).then(response => { this.tableData2 = response.data.rows this.total2 = response.data.total })