创建领料单增加字段流水号

This commit is contained in:
liulujia1
2020-04-17 18:04:34 +08:00
parent 51282657d9
commit f22e6935d1
2 changed files with 14 additions and 9 deletions

View File

@@ -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({ return request({
url: '', url: '',
method: 'post', method: 'post',
@@ -98,7 +98,7 @@ export function createList(num, remark, isElectrical) {
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '2', type: '2',
name: '车间装配管理_领料单_增加数据', name: '车间装配管理_领料单_增加数据',
param: '领料人流水号=' + num + '&领料单备注=' + remark + '&是否电气=' + isElectrical param: '领料人流水号=' + num + '&领料单备注=' + remark + '&是否电气=' + isElectrical + '&机床流水号=' + macnum + '&组件流水号=' + groupnum
} }
}) })
} }

View File

@@ -538,12 +538,16 @@ export default {
}, },
methods: { methods: {
sss() { sss() {
let obj = {} let obj_mac = {}
obj = this.machineNumber.find((item) => { obj_mac = this.machineNumber.find((item) => {
return item.value === this.form1.机床图号 return item.value === this.form1.机床图号
}) })
console.log(obj.label, this.form1.组号) let obj_num = {}
this.form1.领料单备注 = obj.label + '-' + this.form1.组号 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() { // initProject() {
@@ -565,8 +569,8 @@ export default {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.groupNumber.push({ this.groupNumber.push({
label: response.data[i].组号, 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.form1.领料单备注 = ''
this.createList_disable = false this.createList_disable = false
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
this.groupNumber = []
}, },
// 提交创建领料单 // 提交创建领料单
submitCreateList() { submitCreateList() {
this.createList_disable = true this.createList_disable = true
let isElectrical let isElectrical
Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长 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') { if (response.data[0].result === '1') {
this.$message.success('创建成功') this.$message.success('创建成功')
this.dialogFormVisible1 = false this.dialogFormVisible1 = false