diff --git a/src/api/ManufacturingCenter/AddingOrder.js b/src/api/ManufacturingCenter/AddingOrder.js new file mode 100644 index 00000000..10e24f63 --- /dev/null +++ b/src/api/ManufacturingCenter/AddingOrder.js @@ -0,0 +1,135 @@ +import request from '@/utils/request' + +// 机床名称 +export function getMachines() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_机床名称_根据机床查询', + param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int' + } + }) +} +// 获取组号 +export function getGroups(stepNumber) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组', + param: '机床流水号=' + stepNumber + '=int' + } + }) +} +// 获取工艺 +export function initProcessNumber() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间管理_工艺_查询数据' + } + }) +} +// 获取组号 +export function addProcess(NUM, NUM1, NUM2, NUM3) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间管理_自制件插序_增加数据', + param: '工艺计划流水号=' + NUM + '&工序顺序=' + NUM1 + '&工艺编号=' + NUM2 + '&操作工=' + NUM3 + } + }) +} +export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, k, m, pageCurrent, pageSize) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_横向赋值新建存储过程_新', + param: '项目流水号_check=0=string&机床流水号_check=' + checkbox_Machine + '=string&机床流水号=' + Machine + '=string&组件流水号_check=' + checkbox_Group + '=string&组件流水号=' + Group + '=string&零件图号_check=' + checkbox_number + '=string&零件图号=' + number + '=string&是否查询全部数据=1=string&单件是否外协=1=string&考核状态=6=int&开始时间_check=0&开始时间=' + k + '&结束时间_check=0&结束时间=' + m, + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 获取组号 +export function gettabledata1(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理工艺_加工进度查询_查询_New_加序', + param: '工艺计划流水号=' + num + '=int' + } + }) +} +// 补录加工完成日期 +export function editdata(processSerialNumber) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间生产管理工艺_加工进度查询_查询_New', + param: '工艺计划流水号=' + processSerialNumber + '=int' + } + }) +} +// 初始化人员信息 弹出框 +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 submitEdit(Number1, completetime, processSerialNumber) { + return request({ + url: '', + method: 'post', + data: { + type: 2, + name: '车间生产管理工艺_零件工序_修改数据_工作者_根据人员编号和完成日期', + param: '人员编号=' + Number1 + '=string&完成日期=' + completetime + '=string&工序流水号=' + processSerialNumber + '=string' + } + }) +} diff --git a/src/api/ManufacturingCenter/Enter0therData.js b/src/api/ManufacturingCenter/Enter0therData.js new file mode 100644 index 00000000..9f328a07 --- /dev/null +++ b/src/api/ManufacturingCenter/Enter0therData.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' + +export function searchPerson() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间管理_其他数据_查询数据_人员' + } + }) +} +export function fetchDate(month) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间管理_其他数据_查询数据', + param: '月份=' + month + } + }) +} +export function saveDate(time, num, partNum, partName, procedure, num1, num2, num3, number, time1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间管理_其他数据_增加数据', + param: '加工日期=' + time + '&操作工流水号=' + num + '&零件图号=' + partNum + '&名称=' + partName + '&工序=' + procedure + '&责任人流水号=' + num1 + '&确认人流水号=' + num2 + '&录入人流水号=' + num3 + '&数量=' + number + '&单件工时=' + time1 + } + }) +} +export function editDate(ID, time, num, partNum, partName, procedure, num1, num2, num3, number, time1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间管理_其他数据_编辑数据', + param: 'ID=' + ID + '&加工日期=' + time + '&操作工流水号=' + num + '&零件图号=' + partNum + '&名称=' + partName + '&工序=' + procedure + '&责任人流水号=' + num1 + '&确认人流水号=' + num2 + '&录入人流水号=' + num3 + '&数量=' + number + '&单件工时=' + time1 + } + }) +} +export function deleteDate(ID) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '车间管理_其他数据_删除数据', + param: 'ID=' + ID + } + }) +} diff --git a/src/api/Outsourcing/OutsourcingTaskQuery.js b/src/api/Outsourcing/OutsourcingTaskQuery.js index ac006459..9fc5abcd 100644 --- a/src/api/Outsourcing/OutsourcingTaskQuery.js +++ b/src/api/Outsourcing/OutsourcingTaskQuery.js @@ -156,14 +156,14 @@ export function deleteData1(Number) { }) } // 零件到货 -export function Arrival(Number) { +export function Arrival(Number, Num) { return request({ url: '', method: 'post', data: { type: '2', name: '车间生产管理_外协零件_到货', - param: `外协加工任务单明细流水号组=${Number}` + param: `外协加工任务单明细流水号组=${Number}&工艺计划流水号组=${Num}` } }) } diff --git a/src/views/ManufacturingCenter/ActualWorkQuery/index.vue b/src/views/ManufacturingCenter/ActualWorkQuery/index.vue index ae8aa405..8ffe0043 100644 --- a/src/views/ManufacturingCenter/ActualWorkQuery/index.vue +++ b/src/views/ManufacturingCenter/ActualWorkQuery/index.vue @@ -48,7 +48,7 @@ diff --git a/src/views/ManufacturingCenter/AddingOrder/index.vue b/src/views/ManufacturingCenter/AddingOrder/index.vue new file mode 100644 index 00000000..419a4637 --- /dev/null +++ b/src/views/ManufacturingCenter/AddingOrder/index.vue @@ -0,0 +1,560 @@ + + + + + diff --git a/src/views/ManufacturingCenter/Enter0therData/index.vue b/src/views/ManufacturingCenter/Enter0therData/index.vue index e69de29b..d810ddd5 100644 --- a/src/views/ManufacturingCenter/Enter0therData/index.vue +++ b/src/views/ManufacturingCenter/Enter0therData/index.vue @@ -0,0 +1,245 @@ + + + diff --git a/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue b/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue index e0d450cc..71a1f1b3 100644 --- a/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue +++ b/src/views/ManufacturingCenter/EquipmentMonitoring/index.vue @@ -643,12 +643,7 @@ export default { getOP_state() { getOP_state().then(response => { for (let i = 0; i < response.data.length; i++) { - if (response.data[i].状态代码 === '1') { - $('#' + response.data[i].工位号 + '_circle').removeClass('circle3') - $('#' + response.data[i].工位号 + '_circle').removeClass('circle1') - $('#' + response.data[i].工位号 + '_circle').removeClass('circle') - $('#' + response.data[i].工位号 + '_circle').addClass('circle2') - } else if (response.data[i].状态代码 === '2') { + if (response.data[i].状态代码 === '2') { $('#' + response.data[i].工位号 + '_circle').removeClass('circle') $('#' + response.data[i].工位号 + '_circle').removeClass('circle3') $('#' + response.data[i].工位号 + '_circle').removeClass('circle2') @@ -663,6 +658,11 @@ export default { $('#' + response.data[i].工位号 + '_circle').removeClass('circle1') $('#' + response.data[i].工位号 + '_circle').removeClass('circle2') $('#' + response.data[i].工位号 + '_circle').addClass('circle3') + } else { + $('#' + response.data[i].工位号 + '_circle').removeClass('circle3') + $('#' + response.data[i].工位号 + '_circle').removeClass('circle1') + $('#' + response.data[i].工位号 + '_circle').removeClass('circle') + $('#' + response.data[i].工位号 + '_circle').addClass('circle2') } } }) diff --git a/src/views/ManufacturingCenter/InitialProduction/index.vue b/src/views/ManufacturingCenter/InitialProduction/index.vue index 46c70e4d..ac84aea2 100644 --- a/src/views/ManufacturingCenter/InitialProduction/index.vue +++ b/src/views/ManufacturingCenter/InitialProduction/index.vue @@ -422,14 +422,22 @@ export default { }, watch: { // 如果路由有变化,会再次执行该方法 - '$route': { - handler(route) { - const _this = this - if (route.name === 'InitialProduction') { - _this.typeChange() - } + '$route'(to) { + const _this = this + console.log(to, 2222) + if (to.name === 'InitialProduction') { + _this.typeChange() } } + // '$route': { + // handler(route) { + // const _this = this + // console.log(route.name) + // if (route.name === 'InitialProduction') { + // _this.typeChange() + // } + // } + // } }, created() { // this.typeChange() @@ -503,10 +511,12 @@ export default { }) }, typeChange() { + console.log(Cookie.get('machineValue'), 1111111) + this.toolNumValue = '' + this.toolNum = [] + this.NumValue = '' + this.Num = [] if (Cookie.get('machineValue') !== undefined) { - this.toolNumValue = '' - this.NumValue = '' - this.Num = [] getToolNum().then(response => { for (let i = 0; i < response.data.length; i++) { this.toolNum.push({ @@ -524,9 +534,6 @@ export default { Cookie.remove('group') }) } else { - this.toolNumValue = '' - this.NumValue = '' - this.Num = [] getToolNum().then(response => { for (let i = 0; i < response.data.length; i++) { this.toolNum.push({ diff --git a/src/views/ManufacturingCenter/ManHourStatistics/index.vue b/src/views/ManufacturingCenter/ManHourStatistics/index.vue index b7384daa..debedd5e 100644 --- a/src/views/ManufacturingCenter/ManHourStatistics/index.vue +++ b/src/views/ManufacturingCenter/ManHourStatistics/index.vue @@ -33,9 +33,9 @@ {{ scope.row.理论加工时间段 }} - + @@ -175,7 +175,7 @@ export default { } searchtable(this.workerName_ckeck, this.workerName, this.timeCheck, this.startTime, this.endTime).then(response => { response.data.map(v => { - this.$set(v, '比例', v.理论加工时间段 === 0 ? 0 : Math.round(v.实际加工时间段 / v.理论加工时间段 * 100) / 100.00) + this.$set(v, '比例', v.理论加工时间段 === 0 ? 0 : Math.round(v.设备工时 / v.理论加工时间段 * 100) / 100.00) }) this.tableData = response.data this.loading = false diff --git a/src/views/ManufacturingCenter/ProcessTaskAssignment/index.vue b/src/views/ManufacturingCenter/ProcessTaskAssignment/index.vue index c5d633cc..f4f92039 100644 --- a/src/views/ManufacturingCenter/ProcessTaskAssignment/index.vue +++ b/src/views/ManufacturingCenter/ProcessTaskAssignment/index.vue @@ -24,7 +24,7 @@ 全选 保存 - + 通用件保存 { - if (!v.工艺员) { - check = 0 - } - this.工艺计划流水号组.push(v.工艺计划流水号) - this.通用件图号.push(v.零件号) - this.通用件规格.push(v.规格) - this.工艺员.push(v.工艺员) - }) - if (check === 1) { - console.log(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员) - save2(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员).then(response => { - console.log(response.data, 231) - if (response.data[0].结果 === 'success') { - this.$message.success('保存成功') - this.PageCurrent = 1 - this.getTable() - } else { - this.$message.error('请选择工艺员') - } - }) + if (this.multipleSelection.length === 0) { + this.$message.error('请先选择零件') } else { - this.$message.error('请选择工艺员') + this.工艺计划流水号组 = [] + this.通用件图号 = [] + this.通用件规格 = [] + this.工艺员 = [] + var check = 1 + this.multipleSelection.map(v => { + if (!v.工艺员) { + check = 0 + } + this.工艺计划流水号组.push(v.工艺计划流水号) + this.通用件图号.push(v.零件号) + this.通用件规格.push(v.规格) + this.工艺员.push(v.工艺员) + }) + if (check === 1) { + console.log(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员) + save2(this.工艺计划流水号组, this.通用件图号, this.通用件规格, this.工艺员).then(response => { + console.log(response.data, 231) + if (response.data[0].结果 === 'success') { + this.$message.success('保存成功') + this.PageCurrent = 1 + this.getTable() + } else { + var messages = [] + messages = response.data[0].结果.split('||||') + messages.shift() + console.log(messages) + this.$message.error(`图号${messages}无已完成`) + } + }) + } else { + this.$message.error('请选择工艺员') + } } } } diff --git a/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue b/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue index 8b409fe0..ed3ac8d7 100644 --- a/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue +++ b/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue @@ -90,12 +90,12 @@ {{ scope.row.跟单号 }} - + - + @@ -346,6 +346,7 @@ export default { for (let i = 0; i < response.data.rows.length; i++) { this.tableData.push({ 工艺计划流水号: response.data.rows[i].工艺计划流水号, + 考核状态: response.data.rows[i].考核状态, 序号: response.data.rows[i].序号, 跟单号: response.data.rows[i].跟单号, 零件图号: response.data.rows[i].零件图号, @@ -448,7 +449,7 @@ export default { // 完成日期变色 tableRowClassName({ row, rowIndex }) { row.index = rowIndex - if (row.完成日期 !== '') { + if (parseInt(row.考核状态) > 6) { return 'CompleteColor' } }, // 重置表单 diff --git a/src/views/ManufacturingCenter/ScheduleCompletionDetails/index.vue b/src/views/ManufacturingCenter/ScheduleCompletionDetails/index.vue index f2a4a0ce..aa2f6807 100644 --- a/src/views/ManufacturingCenter/ScheduleCompletionDetails/index.vue +++ b/src/views/ManufacturingCenter/ScheduleCompletionDetails/index.vue @@ -45,9 +45,9 @@ {{ scope.row.理论加工时间段 }} - + @@ -106,7 +106,7 @@ @@ -197,6 +197,7 @@ export default { 工艺名称: response.data.rows[i].工艺名称, 完成数量: response.data.rows[i].完成数量, 质检结果: response.data.rows[i].质检结果, + 设备工时: response.data.rows[i].设备工时, 不合格数量: response.data.rows[i].不合格数量, 理论加工时间段: response.data.rows[i].理论加工时间段, 实际加工时间段: response.data.rows[i].实际加工时间段, diff --git a/src/views/Outsourcing/OutsourcingTaskQuery/index.vue b/src/views/Outsourcing/OutsourcingTaskQuery/index.vue index f5164e9c..5faed134 100644 --- a/src/views/Outsourcing/OutsourcingTaskQuery/index.vue +++ b/src/views/Outsourcing/OutsourcingTaskQuery/index.vue @@ -42,11 +42,11 @@ - 收货 + 收货 - + { + this.List3[i].外协工序 = '' this.procedure[i] = '' for (let j = 0; j < response.data.length; j++) { this.procedure[i] = this.procedure[i] + ' ' + response.data[j].工艺名称简称 @@ -597,18 +596,20 @@ export default { }, handleSelectionChange(val) { this.OutsouringNumber = [] + this.工艺计划流水号 = [] for (let i = 0; i < val.length; i++) { this.OutsouringNumber.push(val[i].外协加工任务单明细流水号) + this.工艺计划流水号.push(val[i].工艺计划流水号) } }, - getSpareParts() { // 选入零件 + getSpareParts() { if (this.OutsouringNumber.length !== 0) { - Arrival(this.OutsouringNumber).then(response => { + this.loading = true + Arrival(this.OutsouringNumber, this.工艺计划流水号).then(response => { if (response.data[0].result === '1') { this.$message.success('到货成功') this.contrast = 3000000000000 this.contrast1 = 0 - this.loading = true this.List3 = [] this.零件图号 = [] this.零件名称 = [] @@ -688,9 +689,6 @@ export default { } this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费 this.大写金额 = convertCurrency(this.总计) - if (response.data.length === 0) { - this.loading = false - } for (let i = 0; i < response.data.length; i++) { // 声明二维数组 this.零件图号.push(response.data[i].零件图号) this.零件名称.push(response.data[i].零件名称) diff --git a/src/views/WorkshopProcurement/OutsourcingMaterialsInvoice/index.vue b/src/views/WorkshopProcurement/OutsourcingMaterialsInvoice/index.vue index 1145927f..18bd4904 100644 --- a/src/views/WorkshopProcurement/OutsourcingMaterialsInvoice/index.vue +++ b/src/views/WorkshopProcurement/OutsourcingMaterialsInvoice/index.vue @@ -144,7 +144,7 @@ @@ -204,7 +204,7 @@ @@ -232,7 +232,7 @@