diff --git a/src/api/Inventory/ExchangeApproval.js b/src/api/Inventory/ExchangeApproval.js index 0f6f1d73..21c190be 100644 --- a/src/api/Inventory/ExchangeApproval.js +++ b/src/api/Inventory/ExchangeApproval.js @@ -13,14 +13,14 @@ export function searchExchangePart(pageCurrent, pageSize) { }) } // 通过交换件 -export function approvalExchangepart(data1, data2, data3, data4, data5, data6) { +export function approvalExchangepart(data1, data2, data22, data3, data33, data4, data5, data55, data6) { return request({ url: '', method: 'post', data: { type: '2', name: '库存管理_交换件_交换件审批通过', - param: '交换单流水号=' + data1 + '&交换件物料流水号=' + data2 + '&交换件组件零件流水号=' + data3 + '&交换件采购合同明细流水号=' + data4 + '&货位流水号=' + data5 + '&交换数量=' + data6 + param: '交换单流水号=' + data1 + '&交换件物料流水号=' + data2 + '&被交换件物料流水号=' + data22 + '&交换件组件零件流水号=' + data3 + '&被交换件组件零件流水号=' + data33 + '&交换件采购合同明细流水号=' + data4 + '&货位流水号=' + data5 + '&被货位流水号=' + data55 + '&交换数量=' + data6 } }) } diff --git a/src/api/Inventory/ExchangePart.js b/src/api/Inventory/ExchangePart.js index 450b71ef..47028fdc 100644 --- a/src/api/Inventory/ExchangePart.js +++ b/src/api/Inventory/ExchangePart.js @@ -73,14 +73,14 @@ export function searchExchangePart(pageCurrent, pageSize) { }) } // 增加交换件 -export function addExchangepart(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11) { +export function addExchangepart(data1, data2, data3, data4, data5, data6, data7, data8, data88, data9, data10, data11, data12, data13) { return request({ url: '', method: 'post', data: { type: '2', name: '库存管理_交换件_交换件增加', - param: '交换单编号=' + data1 + '&交换件组件零件流水号=' + data2 + '&交换件物料流水号=' + data3 + '&交换件采购合同明细流水号=' + data4 + '&被交换件组件零件流水号=' + data5 + '&交换件名称=' + data6 + '&被交换件名称=' + data7 + '&货位流水号=' + data8 + '&交换数量=' + data9 + '&申请人=' + data10 + '&备注=' + data11 + param: '交换单编号=' + data1 + '&交换件组件零件流水号=' + data2 + '&交换件物料流水号=' + data3 + '&交换件采购合同明细流水号=' + data4 + '&被交换件组件零件流水号=' + data5 + '&交换件名称=' + data6 + '&被交换件名称=' + data7 + '&货位流水号=' + data8 + '&被交换货位流水号=' + data88 + '&交换数量=' + data9 + '&申请人=' + data10 + '&备注=' + data11 + '&领料单流水号=' + data12 + '&被交换件物料流水号=' + data13 } }) } @@ -108,3 +108,15 @@ export function editExchangeList(data1, data2, data3, data4) { } }) } +// 领料单查询 +export function searchList1(listNumber_check, listNumber) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间装配管理_领料单_领料单查询', + param: '领料单编号_check=' + 0 + '&领料单编号=' + listNumber + } + }) +} diff --git a/src/api/Inventory/Inboundscanning.js b/src/api/Inventory/Inboundscanning.js index f60553b3..211ac2eb 100644 --- a/src/api/Inventory/Inboundscanning.js +++ b/src/api/Inventory/Inboundscanning.js @@ -7,7 +7,7 @@ export function searchTable(partnumber) { data: { type: '1', name: 'MES_机加工MES_库存管理_入库模块_零件基础信息查询_根据零件图号', - param: '零件图号=' + partnumber + '=string' + param: '工艺计划流水号=' + partnumber + '=string' } }) } diff --git a/src/api/Inventory/InventoryManagement.js b/src/api/Inventory/InventoryManagement.js index 99fdef63..dda1f073 100644 --- a/src/api/Inventory/InventoryManagement.js +++ b/src/api/Inventory/InventoryManagement.js @@ -79,7 +79,7 @@ export function alterLocate(num, num0, num1, num2, num3, num4) { data: { type: '2', name: '库存管理_货位主文件_修改数据', - param: '货位流水号=' + num + '货位名称=' + num0 + '&工作中心=' + num1 + '&仓库流水号=' + num2 + '&永久=' + num3 + '&不可用量=' + num4 + param: '货位流水号=' + num + '&货位名称=' + num0 + '&工作中心=' + num1 + '&仓库流水号=' + num2 + '&永久=' + num3 + '&不可用量=' + num4 } }) } diff --git a/src/api/Inventory/SubPartCome.js b/src/api/Inventory/SubPartCome.js index 39cd829b..b817862e 100644 --- a/src/api/Inventory/SubPartCome.js +++ b/src/api/Inventory/SubPartCome.js @@ -1,13 +1,13 @@ import request from '@/utils/request' // 替换单查询 -export function searchSubstitutedCard(...params) { +export function searchSubstitutedCard(data1, data2, data3, data4) { return request({ url: '', method: 'post', data: { type: '1', name: '库存管理_替换件_替换单查询', - param: `替换单编号_check=${params[0]}&替换单编号=${params[1]}&替换件名称_check=${params[2]}&替换件名称=${params[3]}` + param: '替换单编号_check=' + data1 + '&替换单编号=' + data2 + '&替换件名称_check=' + data3 + '&替换件名称=' + data4 } }) } diff --git a/src/api/ManufacturingCenter/InitialProduction.js b/src/api/ManufacturingCenter/InitialProduction.js index ceeba752..d9442abe 100644 --- a/src/api/ManufacturingCenter/InitialProduction.js +++ b/src/api/ManufacturingCenter/InitialProduction.js @@ -12,7 +12,7 @@ export function getEntryNameValue() { } }) } -// 项目名称 +// 机床名称 export function getToolNum(num) { return request({ url: '', diff --git a/src/api/ManufacturingCenter/ProcessingStatusEdit.js b/src/api/ManufacturingCenter/ProcessingStatusEdit.js new file mode 100644 index 00000000..ab5fd66c --- /dev/null +++ b/src/api/ManufacturingCenter/ProcessingStatusEdit.js @@ -0,0 +1,147 @@ +import request from '@/utils/request' + +export function getNames() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改' + } + }) +} + +export function getMachines(gongyi) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_机床名称_查询数据_查询所有机床', + param: '项目流水号=' + gongyi + '=int' + } + }) +} + +export function getGroups(stepNumber) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组', + param: '机床流水号=' + stepNumber + '=int' + } + }) +} + +export function getTable(stepNumber, a, b, c, d, e, f, g, pageCurrent, pageSize) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_加工进度修改专用', + param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=0', + Pagination: pageCurrent + '&' + pageSize + } + }) +} + +export function getTable2(stepNumber, a, b, c, d, e, g) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_加工进度修改', + param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=1=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=0' + } + }) +} + +export function handlechange(Number, code) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_修改实际完成时间', + param: '工序流水号=' + Number + '&实际完成时间=' + code + } + }) +} + +export function handlechange2(Number, code) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_工作者', + param: '工序流水号=' + Number + '&工作者考勤编号=' + code + } + }) +} + +export function handlechange3(Number, code) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_零件工序_修改数据_工作者_MESWORK', + param: '工序流水号=' + Number + '&工作者考勤编号=' + code + } + }) +} +export function dialogtablevisible() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '人事档案管理_部门关系_查询节点', + param: '子节点=0' + } + }) +} +// 初始化人员信息 弹出框 +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' + } + }) +} diff --git a/src/api/Outsourcing/InterBudgetaryBudgets.js b/src/api/Outsourcing/InterBudgetaryBudgets.js index 69e43574..50046a4e 100644 --- a/src/api/Outsourcing/InterBudgetaryBudgets.js +++ b/src/api/Outsourcing/InterBudgetaryBudgets.js @@ -1,27 +1,47 @@ import request from '@/utils/request' -// 查询(未编制) -export function searchPartNum1(num1, start, end, pageCurrent, pageSize) { +export function machine() { return request({ url: '', method: 'post', data: { type: '1', - name: '车间生产管理工艺_零件工艺计划_查询序间外协零件_价格预算', - param: '定额人员编号=0&零件图号=' + num1 + '&开始时间=' + start + '&结束时间=' + end + '&预算状态=0', - Pagination: pageCurrent + '&' + pageSize + name: '车间生产管理工艺_序间外协_项目查询' } }) } -// 查询零件号(已编制) -export function searchPartNum2(num, start, end, pageCurrent, pageSize) { +export function getToolNum(num) { return request({ url: '', method: 'post', data: { type: '1', - name: '车间生产管理工艺_零件工艺计划_查询序间外协零件_价格预算', - param: '定额人员编号=0&零件图号=' + num + '&开始时间=' + start + '&结束时间=' + end + '&预算状态=1', + name: '车间生产管理工艺_传递后_机床名称_查询数据_查询所有机床', + param: '项目流水号=' + num + } + }) +} +// 组号 +export function getNum(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组', + param: '机床流水号=' + num + } + }) +} +// 查询(未编制) +export function searchPartNum1(num1, num2, num3, num4, num5, num6, num7, num8, num9, pageCurrent, pageSize) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工艺计划_查询序间外协零件_价格预算_new', + param: '项目流水号_check=' + num1 + '&项目流水号=' + num2 + '&机床流水号_check=' + num3 + '&机床流水号=' + num4 + '&组件流水号_check=' + num5 + '&组件流水号=' + num6 + '&零件图号_check=' + num7 + '&零件图号=' + num8 + '&预算状态=' + num9, Pagination: pageCurrent + '&' + pageSize } }) diff --git a/src/api/Outsourcing/PreorderAssociation.js b/src/api/Outsourcing/PreorderAssociation.js index 47747967..f421df05 100644 --- a/src/api/Outsourcing/PreorderAssociation.js +++ b/src/api/Outsourcing/PreorderAssociation.js @@ -1,14 +1,47 @@ import request from '@/utils/request' +export function machine() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_序间外协_项目查询' + } + }) +} +export function getToolNum(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_机床名称_查询数据_查询所有机床', + param: '项目流水号=' + num + } + }) +} +// 组号 +export function getNum(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组', + param: '机床流水号=' + num + } + }) +} // 查询表1 -export function searchTable(check, num1, pageCurrent, pageSize) { +export function searchTable(num1, num2, num3, num4, num5, num6, check, num7, pageCurrent, pageSize) { return request({ url: '', method: 'post', data: { type: '1', name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新', - param: '项目流水号_check=0&项目流水号=0&机床流水号_check=0&机床流水号=0&组件流水号_check=0&组件流水号=0&零件图号_check=' + check + '&零件图号=' + num1 + '&考核状态_check=0&考核状态=0&单件是否外协_check=1&单件是否外协=1&时间=0&机加工开始时间=0&机加工结束时间=0&零件类型=0', + param: '项目流水号_check=' + num1 + '&项目流水号=' + num2 + '&机床流水号_check=' + num3 + '&机床流水号=' + num4 + '&组件流水号_check=' + num5 + '&组件流水号=' + num6 + '&零件图号_check=' + check + '&零件图号=' + num7 + '&考核状态_check=0&考核状态=0&单件是否外协_check=1&单件是否外协=1&时间=0&机加工开始时间=0&机加工结束时间=0&零件类型=0', Pagination: pageCurrent + '&' + pageSize } }) diff --git a/src/api/PurchasingCenter/ReceiveCheck.js b/src/api/PurchasingCenter/ReceiveCheck.js index 8fe18b05..7491a60d 100644 --- a/src/api/PurchasingCenter/ReceiveCheck.js +++ b/src/api/PurchasingCenter/ReceiveCheck.js @@ -12,15 +12,14 @@ export function initProject() { }) } // 初始化项目金额统计表 -export function searchReceiveCheck(pageCurrent, pageSize, check, num) { +export function searchReceiveCheck(check, num) { return request({ url: '', method: 'post', data: { type: '1', name: '采购管理_领用核算_查询数据', - param: `项目流水号_check=${check}&项目流水号=${num}`, - Pagination: pageCurrent + '&' + pageSize + param: `项目流水号_check=${check}&项目流水号=${num}` } }) } diff --git a/src/icons/svg/InterBudgetaryBudgets.svg b/src/icons/svg/InterBudgetaryBudgets.svg new file mode 100644 index 00000000..3b6092af --- /dev/null +++ b/src/icons/svg/InterBudgetaryBudgets.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/OutFactoryMaintenance.svg b/src/icons/svg/OutFactoryMaintenance.svg new file mode 100644 index 00000000..232d82de --- /dev/null +++ b/src/icons/svg/OutFactoryMaintenance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/OutsourcingDataMaintenance.svg b/src/icons/svg/OutsourcingDataMaintenance.svg new file mode 100644 index 00000000..c0666d55 --- /dev/null +++ b/src/icons/svg/OutsourcingDataMaintenance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/OutsourcingInspectionEntry.svg b/src/icons/svg/OutsourcingInspectionEntry.svg new file mode 100644 index 00000000..3db054d4 --- /dev/null +++ b/src/icons/svg/OutsourcingInspectionEntry.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/OutsourcingPaymentPlanManagement.svg b/src/icons/svg/OutsourcingPaymentPlanManagement.svg new file mode 100644 index 00000000..3644bfe7 --- /dev/null +++ b/src/icons/svg/OutsourcingPaymentPlanManagement.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/OutsourcingTaskExecution.svg b/src/icons/svg/OutsourcingTaskExecution.svg new file mode 100644 index 00000000..0ac127f6 --- /dev/null +++ b/src/icons/svg/OutsourcingTaskExecution.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/PreorderAssociation.svg b/src/icons/svg/PreorderAssociation.svg new file mode 100644 index 00000000..422943c0 --- /dev/null +++ b/src/icons/svg/PreorderAssociation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/ProcessingStatusEdit.svg b/src/icons/svg/ProcessingStatusEdit.svg new file mode 100644 index 00000000..4a78ad01 --- /dev/null +++ b/src/icons/svg/ProcessingStatusEdit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/UnqualifiedTreatment.svg b/src/icons/svg/UnqualifiedTreatment.svg new file mode 100644 index 00000000..bd787aef --- /dev/null +++ b/src/icons/svg/UnqualifiedTreatment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index 5351b088..a9554197 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -3,7 +3,7 @@ import axios from 'axios' // import store from '../store' // import { getToken } from '@/utils/auth' -export const wsuri = `ws://192.168.1.128:61101//WebMoudule//websocket` +export const wsuri = `ws://192.168.1.149:61101//WebMoudule//websocket` export const name = `OP8888` // 创建axios实例 @@ -12,11 +12,11 @@ export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx` const service = axios.create({ // 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`, - // 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`, + // baseURL: `http://192.168.1.112:8411/submit/MESCommonBase.ashx`, timeout: 1500000 // 请求超时时间 }) diff --git a/src/vendor/Export2Excelcjn.js b/src/vendor/Export2Excelcjn.js new file mode 100644 index 00000000..64952a91 --- /dev/null +++ b/src/vendor/Export2Excelcjn.js @@ -0,0 +1,206 @@ +/* eslint-disable */ +require('script-loader!file-saver'); +import XLSX from 'xlsx' + +function generateArray(table) { + var out = []; + var rows = table.querySelectorAll('tr'); + var ranges = []; + for (var R = 0; R < rows.length; ++R) { + var outRow = []; + var row = rows[R]; + var columns = row.querySelectorAll('td'); + for (var C = 0; C < columns.length; ++C) { + var cell = columns[C]; + var colspan = cell.getAttribute('colspan'); + var rowspan = cell.getAttribute('rowspan'); + var cellValue = cell.innerText; + if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue; + + //Skip ranges + ranges.forEach(function (range) { + if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) { + for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null); + } + }); + + //Handle Row Span + if (rowspan || colspan) { + rowspan = rowspan || 1; + colspan = colspan || 1; + ranges.push({ + s: { + r: R, + c: outRow.length + }, + e: { + r: R + rowspan - 1, + c: outRow.length + colspan - 1 + } + }); + }; + + //Handle Value + outRow.push(cellValue !== "" ? cellValue : null); + + //Handle Colspan + if (colspan) + for (var k = 0; k < colspan - 1; ++k) outRow.push(null); + } + out.push(outRow); + } + return [out, ranges]; +}; + +function datenum(v, date1904) { + if (date1904) v += 1462; + var epoch = Date.parse(v); + return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000); +} + +function sheet_from_array_of_arrays(data, opts) { + var ws = {}; + var range = { + s: { + c: 10000000, + r: 10000000 + }, + e: { + c: 0, + r: 0 + } + }; + for (var R = 0; R != data.length; ++R) { + for (var C = 0; C != data[R].length; ++C) { + if (range.s.r > R) range.s.r = R; + if (range.s.c > C) range.s.c = C; + if (range.e.r < R) range.e.r = R; + if (range.e.c < C) range.e.c = C; + var cell = { + v: data[R][C] + }; + if (cell.v == null) continue; + var cell_ref = XLSX.utils.encode_cell({ + c: C, + r: R + }); + + if (typeof cell.v === 'number') cell.t = 'n'; + else if (typeof cell.v === 'boolean') cell.t = 'b'; + else if (cell.v instanceof Date) { + cell.t = 'n'; + cell.z = XLSX.SSF._table[14]; + cell.v = datenum(cell.v); + } else cell.t = 's'; + + ws[cell_ref] = cell; + } + } + if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range); + return ws; +} + +function Workbook() { + if (!(this instanceof Workbook)) return new Workbook(); + this.SheetNames = []; + this.Sheets = {}; +} + +function s2ab(s) { + var buf = new ArrayBuffer(s.length); + var view = new Uint8Array(buf); + for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; + return buf; +} + +export function export_table_to_excel(id) { + var theTable = document.getElementById(id); + var oo = generateArray(theTable); + var ranges = oo[1]; + + /* original data */ + var data = oo[0]; + var ws_name = "SheetJS"; + + var wb = new Workbook(), + ws = sheet_from_array_of_arrays(data); + + /* add ranges to worksheet */ + // ws['!cols'] = ['apple', 'banan']; + ws['!merges'] = ranges; + + /* add worksheet to workbook */ + wb.SheetNames.push(ws_name); + wb.Sheets[ws_name] = ws; + + var wbout = XLSX.write(wb, { + bookType: 'xlsx', + bookSST: false, + type: 'binary' + }); + + saveAs(new Blob([s2ab(wbout)], { + type: "application/octet-stream" + }), "test.xlsx") +} + +export function export_json_to_excel({ + header, + data, + filename, + autoWidth = true, + bookType= 'xlsx' +} = {}) { + /* original data */ + filename = filename || 'excel-list' + data = [...data] + data.unshift(header); + var ws_name = filename || 'excel-list'; + var wb = new Workbook(), + ws = sheet_from_array_of_arrays(data); + + if (autoWidth) { + /*设置worksheet每列的最大宽度*/ + const colWidth = data.map(row => row.map(val => { + /*先判断是否为null/undefined*/ + if (val == null) { + return { + 'wch': 10 + }; + } + /*再判断是否为中文*/ + else if (val.toString().charCodeAt(0) > 255) { + return { + 'wch': val.toString().length * 2 + }; + } else { + return { + 'wch': val.toString().length + }; + } + })) + /*以第一行为初始值*/ + let result = colWidth[0]; + for (let i = 1; i < colWidth.length; i++) { + for (let j = 0; j < colWidth[i].length; j++) { + if (result[j]['wch'] < colWidth[i][j]['wch']) { + result[j]['wch'] = colWidth[i][j]['wch']; + } + } + } + ws['!cols'] = result; + } + + /* add worksheet to workbook */ + wb.SheetNames.push(ws_name); + wb.Sheets[ws_name] = ws; + + var wbout = XLSX.write(wb, { + bookType: bookType, + bookSST: false, + type: 'binary' + }); + saveAs(new Blob([s2ab(wbout)], { + type: "application/octet-stream" + }), `${filename}.${bookType}`); +} diff --git a/src/views/BasicData/PersonnelManagement/index.vue b/src/views/BasicData/PersonnelManagement/index.vue index 7e38a3db..e8d75235 100644 --- a/src/views/BasicData/PersonnelManagement/index.vue +++ b/src/views/BasicData/PersonnelManagement/index.vue @@ -3,7 +3,7 @@ - 新增 + 新增 编辑 删除 @@ -187,8 +187,8 @@ @@ -353,7 +353,8 @@ export default { Title: [{ required: true, message: '请输入', trigger: 'change' }], PositionStatus: [{ required: true, message: '请输入', trigger: 'change' }], Education: [{ required: true, message: '请输入', trigger: 'change' }], - Post: [{ required: true, message: '请输入', trigger: 'change' }] + Post: [{ required: true, message: '请输入', trigger: 'change' }], + DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }] }, SexData: [{ value: 1, @@ -365,7 +366,9 @@ export default { EducationDate: [], PostData: [], multipleSelection: [], - nodeName1: [] + nodeName1: [], + count1: 0, + count2: 0 } }, created() { @@ -418,10 +421,14 @@ export default { } } }, - handleAdd() { + handleAdd(formName) { this.department_Title = '新增部门' this.department_DFV = true - this.addForm('department_Form') + this.department_Form.DepartmentName = '' + this.count1 = this.count1 + 1 + if (this.count1 !== 1) { + this.$refs[formName].resetFields() + } }, handleEdit() { this.addForm('department_Form') @@ -433,44 +440,75 @@ export default { this.$message.warning(`请选择要修改的部门`) } }, - submitAdd() { - this.department_DFV = false - if (this.id) { - addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => { - console.log(response.data[0].result === '1') - if (response.data[0].result === '1') { - this.getTreeData() - this.$message.success('添加成功') + submitAdd(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + this.department_DFV = false + if (this.id) { + addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.$message.success('添加成功') + } else { + this.$message.error('添加失败') + } + }) } else { - this.$message.error('添加失败') + addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.$message.success('添加成功') + } else { + this.$message.error('添加失败') + } + }) } - }) - } else { - addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => { - if (response.data[0].result === '1') { - this.getTreeData() - this.$message.success('添加成功') - } else { - this.$message.error('添加失败') - } - }) - } - }, - submitEdit() { - this.department_DFV = false - editList(this.id, this.department_Form.DepartmentName).then(response => { - if (response.data[0].result === '1') { - this.getTreeData() - this.$message.success('编辑成功') } else { - this.$message.error('编辑失败') + return false + } + }) + }, + submitEdit(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + this.department_DFV = false + editList(this.id, this.department_Form.DepartmentName).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.$message.success('编辑成功') + } else { + this.$message.error('编辑失败') + } + }) + } else { + return false } }) }, deleteTable() { if (this.id) { - this.deleteRow(delList, this.id, function() { this.getTreeData() }) - this.i = 1 + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + delList(this.id).then(response => { + if (response.data[0].result === '1') { + this.getTreeData() + this.i = 1 + this.id = '' + this.$message({ + message: '已被成功删除', + type: 'success' + }) + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }) + }) } else { this.$message.warning(`请选择部门`) } @@ -508,6 +546,7 @@ export default { if (this.id) { addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => { if (response.data[0].result === '1') { + this.i = 1 this.handleNodeClick() this.$message.success('添加成功') } else { diff --git a/src/views/Inventory/ExchangeApproval/index.vue b/src/views/Inventory/ExchangeApproval/index.vue index 44b806c0..fd9d97ae 100644 --- a/src/views/Inventory/ExchangeApproval/index.vue +++ b/src/views/Inventory/ExchangeApproval/index.vue @@ -129,7 +129,7 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - approvalExchangepart(row.交换单流水号, row.交换件物料流水号, row.交换件组件零件流水号, row.交换件采购合同明细流水号, row.货位流水号, row.交换数量).then(response => { + approvalExchangepart(row.交换单流水号, row.交换件物料流水号, row.被交换件物料流水号, row.交换件组件零件流水号, row.被交换件组件零件流水号, row.交换件采购合同明细流水号, row.货位流水号, row.被交换货位流水号, row.交换数量).then(response => { if (response.data[0].result === '1') { this.$message.success('执行成功') this.searchTable1() diff --git a/src/views/Inventory/ExchangePart/index.vue b/src/views/Inventory/ExchangePart/index.vue index 9506ffba..fdf92e01 100644 --- a/src/views/Inventory/ExchangePart/index.vue +++ b/src/views/Inventory/ExchangePart/index.vue @@ -71,8 +71,8 @@ @@ -166,7 +166,7 @@ - + + + + + + @@ -260,7 +269,7 @@ diff --git a/src/views/Inventory/PartOut/index.vue b/src/views/Inventory/PartOut/index.vue index d8acc84e..a1b44d7b 100644 --- a/src/views/Inventory/PartOut/index.vue +++ b/src/views/Inventory/PartOut/index.vue @@ -184,6 +184,7 @@ export default { if (response.data[0].result === '1') { ListDetailOut(row.领料单明细流水号) this.$message.success('出库成功') + this.searchListDetailt() } else { this.$message.error('出库失败') } }) } else if (row.零件类型 === 1 || row.零件类型 === 2) { @@ -191,6 +192,7 @@ export default { if (response.data[0].result === '1') { ListDetailOut(row.领料单明细流水号) this.$message.success('出库成功') + this.searchListDetailt() } else { this.$message.error('出库失败') } }) } else { @@ -198,10 +200,10 @@ export default { if (response.data[0].result === '1') { this.$message.success('出库成功') ListDetailOut(row.领料单明细流水号) + this.searchListDetailt() } else { this.$message.error('增加失败') } }) } - this.searchListDetailt() } } } diff --git a/src/views/Inventory/PickingList/index.vue b/src/views/Inventory/PickingList/index.vue index a5997c08..e57c3f11 100644 --- a/src/views/Inventory/PickingList/index.vue +++ b/src/views/Inventory/PickingList/index.vue @@ -787,6 +787,7 @@ export default { this.materialType = row.零件类型名称 this.materialNumber = row.零件图号 this.enableOut = row.可出库数量 + this.purchaseDetailNum = row.采购合同明细流水号 }, addBasicListDetail(formName) { if (this.pickingListNumberx === '') { @@ -796,9 +797,10 @@ export default { } 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 => { + addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialNumber, this.materialType, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => { if (response.data[0].result === '1') { this.$message.success('增加成功') + this.searchPartinfo() } else { this.$message.error('增加失败') } @@ -829,12 +831,13 @@ export default { this.dialogFormVisible = true this.purchaseDetailNum = row.采购合同明细流水号 this.materialLocate = row.物料与货位对照流水号 - this.enableOut = row.货位存量 + this.enableOut = row.货位存量 - row.待出库数量 }, execaddListDetail(formName) { if (this.pickingListNumberx === '') { this.$message.error('请选择领料单') } else if (this.form2.OutNumber === '' || this.form2.OutNumber > this.enableOut) { + console.log(this.enableOut) this.$message.error('请正确输入领用数量') } else { this.$refs[formName].validate((valid) => { @@ -842,6 +845,7 @@ export default { 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') { this.$message.success('增加成功') + this.searchPartinfo() } else { this.$message.error('增加失败') } @@ -884,6 +888,7 @@ export default { 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') { this.$message.success('增加成功') + this.searchPartinfo() } else { this.$message.error('增加失败') } diff --git a/src/views/Inventory/SubstitutePart/index.vue b/src/views/Inventory/SubstitutePart/index.vue index a3c908db..1bd744ac 100644 --- a/src/views/Inventory/SubstitutePart/index.vue +++ b/src/views/Inventory/SubstitutePart/index.vue @@ -349,18 +349,24 @@ export default { this.picikingPeople = this.id console.log(this.picikingPeople) }, - searchMachine() { // 查询机床 - if (this.ProjectValue === '') { + searchMachine() { + 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 } - 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() { // 查询组号 searchTeam(this.MachineValue).then(response => { diff --git a/src/views/ManufacturingCenter/InitialProduction/index.vue b/src/views/ManufacturingCenter/InitialProduction/index.vue index 8a6617ee..d0fa55ee 100644 --- a/src/views/ManufacturingCenter/InitialProduction/index.vue +++ b/src/views/ManufacturingCenter/InitialProduction/index.vue @@ -167,16 +167,16 @@ - + @@ -283,7 +283,7 @@ - + @@ -409,7 +409,7 @@ export default { toolNumValue: '', toolNum: [], // 机床号 NumValue: '', - Num: [], // 机床后什么号 + Num: [], // 分组 liushuihao: '', gongyijihua: '', radio: 0, // 第一组 diff --git a/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue b/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue index 363e9397..8a863728 100644 --- a/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue +++ b/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue @@ -29,7 +29,7 @@ @@ -588,7 +588,7 @@ export default { total: 0, tableData: [], loading: false, - PrNum: '027W191482-0001', + PrNum: '', tableData2: [], tableData3: [], 机床号: '', @@ -617,6 +617,7 @@ export default { searchData() { this.loading = true search(this.pageCurrent, this.pageSize, this.PrNum).then(response => { + console.log(response.data) this.tableData = response.data.rows this.total = response.data.total this.loading = false diff --git a/src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue b/src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue new file mode 100644 index 00000000..5133f0e9 --- /dev/null +++ b/src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue @@ -0,0 +1,733 @@ + + + + + diff --git a/src/views/ManufacturingCenter/ProductionCapacityBalance/index.vue b/src/views/ManufacturingCenter/ProductionCapacityBalance/index.vue index a16a697c..c526014d 100644 --- a/src/views/ManufacturingCenter/ProductionCapacityBalance/index.vue +++ b/src/views/ManufacturingCenter/ProductionCapacityBalance/index.vue @@ -1206,6 +1206,7 @@ export default { if (this.零件图号.length !== 0) { for (let i = 0; i < this.零件图号.length; i++) { selection2(this.工艺计划流水号[i]).then(response => { + console.log(response.data, 2) for (let k = 0; k < response.data.length; k++) { this.process[i][k] = response.data[k].工艺名称简称 this.planDate[i][k] = response.data[k].计划日期_短 @@ -1224,7 +1225,6 @@ export default { } }).then(() => { this.tableData1.push(this.result[i]) - console.log(this.tableData1) selection2(this.工艺计划流水号[this.indexAdjust]).then(response => { // 刷新对话框显示和颜色 for (let i = 0; i < response.data.length; i++) { this.partType = response.data[i].零件类型 @@ -1473,7 +1473,6 @@ export default { }).then(() => { plan(this.tableData1[i].工艺计划流水号).then(response => { if (this.tableData1[i].平衡次数 !== 0 || this.tableData1[i].是否焊接 !== 1) { - console.log(this.tableData1[i].平衡次数, 111) this.result1 += parseInt(response.data[0].result) if (this.result1 === this.length) { this.$message.success('零件计划制定成功') diff --git a/src/views/ManufacturingCenter/QuotaFormulation/index.vue b/src/views/ManufacturingCenter/QuotaFormulation/index.vue index e893d321..63d20dc6 100644 --- a/src/views/ManufacturingCenter/QuotaFormulation/index.vue +++ b/src/views/ManufacturingCenter/QuotaFormulation/index.vue @@ -308,6 +308,7 @@ export default { this.result += parseInt(response.data[0].result) if (this.result === this.tableData.length) { this.$message.success('保存成功') + this.typeChange() } else if (response.data[0].result === '0') { this.$message.error('第' + (i + 1) + '行保存失败') } diff --git a/src/views/ManufacturingCenter/StatusQuery/index.vue b/src/views/ManufacturingCenter/StatusQuery/index.vue index d82822f5..114b821e 100644 --- a/src/views/ManufacturingCenter/StatusQuery/index.vue +++ b/src/views/ManufacturingCenter/StatusQuery/index.vue @@ -122,10 +122,10 @@ - - - - + + + + @@ -267,6 +267,7 @@ export default { groupNum: null, // 组件流水号 partNumber: '', // 零件号 partStateValue: null, // 零件状态 + partStateValue1: null, partState: [], // 零件状态数组 partTypeValue: null, // 零件类型 num: null, @@ -300,15 +301,7 @@ export default { }, { value: 2, label: '外协生产' - }], - form: { - 零件状态: null - }, - rules: { - 零件状态: [ - { required: true, message: '请选择零件状态', trigger: 'change' } - ] - } + }] } }, created() { @@ -442,34 +435,24 @@ export default { this.dialogFormVisible3 = false }, handleEdit(row) { - if (this.$refs['form'] !== undefined) { - this.$refs['form'].resetFields() - } - this.form = {} + console.log(row) this.title = '编辑' + this.partStateValue1 = parseInt(row.考核状态) + 2 this.dialogFormVisible4 = true this.num = row.工艺计划流水号 }, - submitEdit(formName) { // 提交编辑 - this.$refs[formName].validate((valid) => { - if (valid) { - editData(this.num, this.form.零件状态).then(response => { - if (response.data[0].result === '1') { - this.$message.success('编辑成功') - this.dialogFormVisible4 = false - this.pageCurrent = 1 - this.searchData() - } else { this.$message.error('编辑失败') } - }) - } else { - return false - } + submitEdit() { // 提交编辑 + editData(this.num, this.partStateValue1).then(response => { + if (response.data[0].result === '1') { + this.$message.success('编辑成功') + this.dialogFormVisible4 = false + this.pageCurrent = 1 + this.searchData() + } else { this.$message.error('编辑失败') } }) }, - cancel(formName) { // 取消 - this.form = {} + cancel() { // 取消 this.dialogFormVisible4 = false - this.$refs[formName].resetFields() }, handleSizeChange(val) { this.pageSize = val diff --git a/src/views/MarketingCenter/ContractCapitalManagement/index.vue b/src/views/MarketingCenter/ContractCapitalManagement/index.vue index 4e298a0a..935b26dc 100644 --- a/src/views/MarketingCenter/ContractCapitalManagement/index.vue +++ b/src/views/MarketingCenter/ContractCapitalManagement/index.vue @@ -12,7 +12,7 @@ 销售经理 查询收款计划 - 新增收款计划 + 新增收款计划 查看收款信息 @@ -490,6 +490,7 @@ export default { } return { entryName2: [], + count1: 0, type: '', a: 1, b: 1, @@ -576,7 +577,7 @@ export default { rules: { // 表单验证规则 ContractNumberValue: [{ required: true, message: '请输入合同编号', trigger: 'blur' }], TotalContractAmount: [{ required: true, message: '请输入合同总金额', trigger: 'blur' }], - entryNameValue: [{ required: true, message: '请输入项目名称', trigger: 'change' }] + entryNameValue: [{ required: true, message: '请选择项目名称', trigger: 'change' }] }, rules1: { // 表单验证规则 ThisPayment: [ @@ -819,9 +820,11 @@ export default { this.peoplename = '' }, searchProjectName() { - searchProjectName(this.form2.entryNameValue).then(response => { - this.form2.ContractNumberValue = response.data[0].合同编号 - }) + if (this.form2.entryNameValue !== '' && this.form2.entryNameValue !== null) { + searchProjectName(this.form2.entryNameValue).then(response => { + this.form2.ContractNumberValue = response.data[0].合同编号 + }) + } }, handleEdit(row) { this.contractTotal = parseFloat(row.合同总金额) @@ -1025,8 +1028,14 @@ export default { }) }) }, - ADD() { - this.addForm('form2') + ADD(formName) { + this.form2.entryNameValue = '' + this.form2.ContractNumberValue = '' + this.form2.TotalContractAmount = '' + this.count1 = this.count1 + 1 + if (this.count1 !== 1) { + this.$refs[formName].resetFields() + } this.dialogFormVisible2 = true this.temp = 1 }, diff --git a/src/views/Outsourcing/InterBudgetaryBudgets/index.vue b/src/views/Outsourcing/InterBudgetaryBudgets/index.vue index dba02f81..5595bd25 100644 --- a/src/views/Outsourcing/InterBudgetaryBudgets/index.vue +++ b/src/views/Outsourcing/InterBudgetaryBudgets/index.vue @@ -7,28 +7,33 @@ 未编制 已编制 - + 项目名称: + + + + 机床名称: + + + + 分组: + + + 零件图号: - 开始时间: - - - 结束时间: - - 查询 @@ -71,30 +76,30 @@ {{ scope.row.原材料规格 }} - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
@@ -165,10 +170,16 @@