Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -156,14 +156,14 @@ export function deleteData1(Number) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 零件到货
|
// 零件到货
|
||||||
export function Arrival(Number) {
|
export function Arrival(Number, Num) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '车间生产管理_外协零件_到货',
|
name: '车间生产管理_外协零件_到货',
|
||||||
param: `外协加工任务单明细流水号组=${Number}`
|
param: `外协加工任务单明细流水号组=${Number}&工艺计划流水号组=${Num}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -422,14 +422,22 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 如果路由有变化,会再次执行该方法
|
// 如果路由有变化,会再次执行该方法
|
||||||
'$route': {
|
'$route'(to) {
|
||||||
handler(route) {
|
|
||||||
const _this = this
|
const _this = this
|
||||||
if (route.name === 'InitialProduction') {
|
console.log(to, 2222)
|
||||||
|
if (to.name === 'InitialProduction') {
|
||||||
_this.typeChange()
|
_this.typeChange()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// '$route': {
|
||||||
|
// handler(route) {
|
||||||
|
// const _this = this
|
||||||
|
// console.log(route.name)
|
||||||
|
// if (route.name === 'InitialProduction') {
|
||||||
|
// _this.typeChange()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.typeChange()
|
// this.typeChange()
|
||||||
@@ -503,10 +511,12 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
typeChange() {
|
typeChange() {
|
||||||
if (Cookie.get('machineValue') !== undefined) {
|
console.log(Cookie.get('machineValue'), 1111111)
|
||||||
this.toolNumValue = ''
|
this.toolNumValue = ''
|
||||||
|
this.toolNum = []
|
||||||
this.NumValue = ''
|
this.NumValue = ''
|
||||||
this.Num = []
|
this.Num = []
|
||||||
|
if (Cookie.get('machineValue') !== undefined) {
|
||||||
getToolNum().then(response => {
|
getToolNum().then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.toolNum.push({
|
this.toolNum.push({
|
||||||
@@ -524,9 +534,6 @@ export default {
|
|||||||
Cookie.remove('group')
|
Cookie.remove('group')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.toolNumValue = ''
|
|
||||||
this.NumValue = ''
|
|
||||||
this.Num = []
|
|
||||||
getToolNum().then(response => {
|
getToolNum().then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.toolNum.push({
|
this.toolNum.push({
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" size="small" icon="el-icon-bangzhu" style="margin-left: 10px" @click="selectAll(tableData)">全选</el-button>
|
<el-button type="primary" size="small" icon="el-icon-bangzhu" style="margin-left: 10px" @click="selectAll(tableData)">全选</el-button>
|
||||||
<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px" @click="save">保存</el-button>
|
<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px" @click="save">保存</el-button>
|
||||||
<!--<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px;float: right" @click="currency">通用件保存</el-button>-->
|
<el-button type="baocun" size="small" icon="el-icon-upload" style="margin-left: 10px;float: right" @click="currency">通用件保存</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -386,6 +386,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 直接保存工艺
|
// 直接保存工艺
|
||||||
currency() {
|
currency() {
|
||||||
|
if (this.multipleSelection.length === 0) {
|
||||||
|
this.$message.error('请先选择零件')
|
||||||
|
} else {
|
||||||
this.工艺计划流水号组 = []
|
this.工艺计划流水号组 = []
|
||||||
this.通用件图号 = []
|
this.通用件图号 = []
|
||||||
this.通用件规格 = []
|
this.通用件规格 = []
|
||||||
@@ -409,7 +412,11 @@ export default {
|
|||||||
this.PageCurrent = 1
|
this.PageCurrent = 1
|
||||||
this.getTable()
|
this.getTable()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择工艺员')
|
var messages = []
|
||||||
|
messages = response.data[0].结果.split('||||')
|
||||||
|
messages.shift()
|
||||||
|
console.log(messages)
|
||||||
|
this.$message.error(`图号${messages}无已完成`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -417,6 +424,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -90,12 +90,12 @@
|
|||||||
{{ scope.row.跟单号 }}
|
{{ scope.row.跟单号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="180">
|
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="280">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件图号 }}
|
{{ scope.row.零件图号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="零件名称" show-overflow-tooltip width="80">
|
<el-table-column align="center" label="零件名称" show-overflow-tooltip width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件名称 }}
|
{{ scope.row.零件名称 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -346,6 +346,7 @@ export default {
|
|||||||
for (let i = 0; i < response.data.rows.length; i++) {
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
工艺计划流水号: 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].跟单号,
|
||||||
零件图号: response.data.rows[i].零件图号,
|
零件图号: response.data.rows[i].零件图号,
|
||||||
@@ -448,7 +449,7 @@ export default {
|
|||||||
// 完成日期变色
|
// 完成日期变色
|
||||||
tableRowClassName({ row, rowIndex }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
row.index = rowIndex
|
row.index = rowIndex
|
||||||
if (row.完成日期 !== '') {
|
if (parseInt(row.考核状态) > 6) {
|
||||||
return 'CompleteColor'
|
return 'CompleteColor'
|
||||||
}
|
}
|
||||||
}, // 重置表单
|
}, // 重置表单
|
||||||
|
|||||||
@@ -42,11 +42,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-button type="warning" size="mini" icon="el-icon-arrow-down" style="margin-left:10px" @click="getSpareParts">收货</el-button>
|
<el-button :disabled="loading=false" type="warning" size="mini" icon="el-icon-arrow-down" style="margin-left:10px" @click="getSpareParts">收货</el-button>
|
||||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="打印外协任务单" placement="top">-->
|
<!--<el-tooltip :open-delay="1200" effect="dark" content="打印外协任务单" placement="top">-->
|
||||||
<!--<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;float: right" @click="exportTable('RWD')">导出单据</el-button>-->
|
<!--<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;float: right" @click="exportTable('RWD')">导出单据</el-button>-->
|
||||||
<!--</el-tooltip>-->
|
<!--</el-tooltip>-->
|
||||||
<el-table ref="multipleTable" :data="List3" border stripe size="mini" highlight-current-row height="595" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="List3" border stripe size="mini" highlight-current-row height="595" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:selectable="selectable"
|
:selectable="selectable"
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -167,6 +167,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
工艺计划流水号: [],
|
||||||
OutsouringNumber: [],
|
OutsouringNumber: [],
|
||||||
wancheng: '',
|
wancheng: '',
|
||||||
gongxulsh: [],
|
gongxulsh: [],
|
||||||
@@ -478,9 +479,6 @@ export default {
|
|||||||
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
|
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
|
||||||
this.大写金额 = convertCurrency(this.总计)
|
this.大写金额 = convertCurrency(this.总计)
|
||||||
// RWD end
|
// RWD end
|
||||||
if (response.data.length === 0) {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
for (let i = 0; i < response.data.length; i++) { // 声明二维数组
|
for (let i = 0; i < response.data.length; i++) { // 声明二维数组
|
||||||
this.零件图号.push(response.data[i].零件图号)
|
this.零件图号.push(response.data[i].零件图号)
|
||||||
this.零件名称.push(response.data[i].零件名称)
|
this.零件名称.push(response.data[i].零件名称)
|
||||||
@@ -529,6 +527,7 @@ export default {
|
|||||||
getProcedure(row) {
|
getProcedure(row) {
|
||||||
for (let i = 0; i < row.length; i++) {
|
for (let i = 0; i < row.length; i++) {
|
||||||
getprocedure(row[i].工艺计划流水号, row[i].单件是否外协).then(response => {
|
getprocedure(row[i].工艺计划流水号, row[i].单件是否外协).then(response => {
|
||||||
|
this.List3[i].外协工序 = ''
|
||||||
this.procedure[i] = ''
|
this.procedure[i] = ''
|
||||||
for (let j = 0; j < response.data.length; j++) {
|
for (let j = 0; j < response.data.length; j++) {
|
||||||
this.procedure[i] = this.procedure[i] + ' ' + response.data[j].工艺名称简称
|
this.procedure[i] = this.procedure[i] + ' ' + response.data[j].工艺名称简称
|
||||||
@@ -597,18 +596,20 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.OutsouringNumber = []
|
this.OutsouringNumber = []
|
||||||
|
this.工艺计划流水号 = []
|
||||||
for (let i = 0; i < val.length; i++) {
|
for (let i = 0; i < val.length; i++) {
|
||||||
this.OutsouringNumber.push(val[i].外协加工任务单明细流水号)
|
this.OutsouringNumber.push(val[i].外协加工任务单明细流水号)
|
||||||
|
this.工艺计划流水号.push(val[i].工艺计划流水号)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSpareParts() { // 选入零件
|
getSpareParts() {
|
||||||
if (this.OutsouringNumber.length !== 0) {
|
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') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('到货成功')
|
this.$message.success('到货成功')
|
||||||
this.contrast = 3000000000000
|
this.contrast = 3000000000000
|
||||||
this.contrast1 = 0
|
this.contrast1 = 0
|
||||||
this.loading = true
|
|
||||||
this.List3 = []
|
this.List3 = []
|
||||||
this.零件图号 = []
|
this.零件图号 = []
|
||||||
this.零件名称 = []
|
this.零件名称 = []
|
||||||
@@ -688,9 +689,6 @@ export default {
|
|||||||
}
|
}
|
||||||
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
|
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
|
||||||
this.大写金额 = convertCurrency(this.总计)
|
this.大写金额 = convertCurrency(this.总计)
|
||||||
if (response.data.length === 0) {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
for (let i = 0; i < response.data.length; i++) { // 声明二维数组
|
for (let i = 0; i < response.data.length; i++) { // 声明二维数组
|
||||||
this.零件图号.push(response.data[i].零件图号)
|
this.零件图号.push(response.data[i].零件图号)
|
||||||
this.零件名称.push(response.data[i].零件名称)
|
this.零件名称.push(response.data[i].零件名称)
|
||||||
|
|||||||
Reference in New Issue
Block a user