创建领料单增加字段流水号
This commit is contained in:
@@ -89,7 +89,7 @@ export function searchList(pageCurrent, pageSize, listPeople_check, listPeople,
|
||||
})
|
||||
}
|
||||
// 创建领料单
|
||||
export function createList(num, remark, isElectrical) {
|
||||
export function createList(num, remark, isElectrical, macnum, groupnum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -98,7 +98,7 @@ export function createList(num, remark, isElectrical) {
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间装配管理_领料单_增加数据',
|
||||
param: '领料人流水号=' + num + '&领料单备注=' + remark + '&是否电气=' + isElectrical
|
||||
param: '领料人流水号=' + num + '&领料单备注=' + remark + '&是否电气=' + isElectrical + '&机床流水号=' + macnum + '&组件流水号=' + groupnum
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -538,12 +538,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
sss() {
|
||||
let obj = {}
|
||||
obj = this.machineNumber.find((item) => {
|
||||
let obj_mac = {}
|
||||
obj_mac = this.machineNumber.find((item) => {
|
||||
return item.value === this.form1.机床图号
|
||||
})
|
||||
console.log(obj.label, this.form1.组号)
|
||||
this.form1.领料单备注 = obj.label + '-' + this.form1.组号
|
||||
let obj_num = {}
|
||||
obj_num = this.groupNumber.find((item2) => {
|
||||
return item2.value === this.form1.组号
|
||||
})
|
||||
console.log(obj_mac.label, obj_num.label)
|
||||
this.form1.领料单备注 = obj_mac.label + '-' + obj_num.label.replace(/\s*/g, '')
|
||||
},
|
||||
// // 加载机床号
|
||||
// initProject() {
|
||||
@@ -565,8 +569,8 @@ export default {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
// value: response.data[i].组件流水号
|
||||
value: response.data[i].组号
|
||||
value: response.data[i].组件流水号
|
||||
// value: response.data[i].组号
|
||||
|
||||
})
|
||||
}
|
||||
@@ -833,13 +837,14 @@ export default {
|
||||
this.form1.领料单备注 = ''
|
||||
this.createList_disable = false
|
||||
this.dialogFormVisible1 = true
|
||||
this.groupNumber = []
|
||||
},
|
||||
// 提交创建领料单
|
||||
submitCreateList() {
|
||||
this.createList_disable = true
|
||||
let isElectrical
|
||||
Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长
|
||||
createList(this.form1.领料人流水号, this.form1.领料单备注, isElectrical).then(response => {
|
||||
createList(this.form1.领料人流水号, this.form1.领料单备注, isElectrical, this.form1.机床图号, this.form1.组号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('创建成功')
|
||||
this.dialogFormVisible1 = false
|
||||
|
||||
Reference in New Issue
Block a user