From 158e6044cfaf8e9d16facb2bacd4f543f3d2d39a Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Mon, 30 Dec 2019 10:43:11 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=B7=A5=E8=89=BA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=88=86=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcessTaskAssignment/index.vue | 64 +++++++++++-------- 1 file changed, 36 insertions(+), 28 deletions(-) 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('请选择工艺员') + } } } } From 5b5a47359287b01a97d09760b5c51a2f86a28516 Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Mon, 30 Dec 2019 15:57:35 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A4=96=E5=8D=8F=E9=9B=B6=E4=BB=B6?= =?UTF-8?q?=E5=88=B0=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Outsourcing/OutsourcingTaskQuery.js | 4 ++-- src/utils/request.js | 2 +- src/views/Outsourcing/OutsourcingTaskQuery/index.vue | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) 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/utils/request.js b/src/utils/request.js index fc41e22d..2cb92ad8 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -26,7 +26,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx` export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx` const service = axios.create({ - baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`, + baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`, timeout: 1500000 // 请求超时时间 }) export default service diff --git a/src/views/Outsourcing/OutsourcingTaskQuery/index.vue b/src/views/Outsourcing/OutsourcingTaskQuery/index.vue index f5164e9c..1b1e433b 100644 --- a/src/views/Outsourcing/OutsourcingTaskQuery/index.vue +++ b/src/views/Outsourcing/OutsourcingTaskQuery/index.vue @@ -167,6 +167,7 @@ export default { }, data() { return { + 工艺计划流水号: [], OutsouringNumber: [], wancheng: '', gongxulsh: [], @@ -529,6 +530,7 @@ export default { getProcedure(row) { for (let i = 0; i < row.length; i++) { getprocedure(row[i].工艺计划流水号, row[i].单件是否外协).then(response => { + 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,13 +599,15 @@ 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 => { + Arrival(this.OutsouringNumber, this.工艺计划流水号).then(response => { if (response.data[0].result === '1') { this.$message.success('到货成功') this.contrast = 3000000000000 From e39e3d31b64e488caebd2d29bd5a73f00b6244a3 Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Mon, 30 Dec 2019 17:32:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A4=96=E5=8D=8F=E9=9B=B6=E4=BB=B6?= =?UTF-8?q?=E5=88=B0=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Outsourcing/OutsourcingTaskQuery/index.vue | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/views/Outsourcing/OutsourcingTaskQuery/index.vue b/src/views/Outsourcing/OutsourcingTaskQuery/index.vue index 1b1e433b..5faed134 100644 --- a/src/views/Outsourcing/OutsourcingTaskQuery/index.vue +++ b/src/views/Outsourcing/OutsourcingTaskQuery/index.vue @@ -42,11 +42,11 @@ - 收货 + 收货 - + { if (response.data[0].result === '1') { this.$message.success('到货成功') this.contrast = 3000000000000 this.contrast1 = 0 - this.loading = true this.List3 = [] this.零件图号 = [] this.零件名称 = [] @@ -692,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].零件名称) From d1547f23181815adb90e38a163093561605e0241 Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Tue, 31 Dec 2019 17:04:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=BF=BD=E8=BF=B0=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E5=9B=BD=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 2 +- .../InitialProduction/index.vue | 31 ++++++++++++------- .../ProcessingStatusNew/index.vue | 7 +++-- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 2cb92ad8..fc41e22d 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -26,7 +26,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx` export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx` const service = axios.create({ - baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`, + baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`, timeout: 1500000 // 请求超时时间 }) export default service 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/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' } }, // 重置表单