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/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/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/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].零件名称)