离线
This commit is contained in:
@@ -20,8 +20,7 @@
|
||||
<el-button type="success" size="small" style="margin-left: 10px" @click="searchContractDetail">查询明细</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
|
||||
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px">
|
||||
<el-table-column label="合同编号" sortable prop="离线合同编号" width="120px" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
@@ -237,6 +236,7 @@ export default {
|
||||
},
|
||||
// 查询离线合同明细
|
||||
async searchContractDetail() {
|
||||
this.table1 = []
|
||||
if (this.contractValue && this.searchType === '2') {
|
||||
this.qrCode = this.contractValue
|
||||
} else if (!this.supplierValue) {
|
||||
@@ -265,11 +265,15 @@ export default {
|
||||
this.contractNumber = ''
|
||||
}
|
||||
// this.table1 = res.data
|
||||
console.log(res.data)
|
||||
res.data.map(v => {
|
||||
this.table1.push({
|
||||
离线合同编号: v.离线合同编号,
|
||||
物料名称: v.物料名称,
|
||||
规格型号: v.物料规格 + v.物料型号,
|
||||
离线合同明细流水号: v.离线合同明细流水号,
|
||||
物料流水号: v.物料流水号,
|
||||
组件零件基本件流水号: v.组件零件基本件流水号,
|
||||
物料名称: v.物料名称 ? v.物料名称 : v.零件名称,
|
||||
规格型号: v.物料规格 + (v.零件图号 === null ? v.物料型号 : v.零件图号),
|
||||
数量: v.数量,
|
||||
到货数量: v.到货数量,
|
||||
本次到货数量: v.本次到货数量
|
||||
@@ -280,21 +284,24 @@ export default {
|
||||
// 多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
console.log(val, 123)
|
||||
},
|
||||
// 提交入库
|
||||
submitInStorage() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请勾选入库物料')
|
||||
} else if (!this.locateNumber) {
|
||||
if (!this.locateNumber) {
|
||||
this.$message.warning('请选择货位或者扫码货位二维码')
|
||||
} else {
|
||||
const materialGroup = []
|
||||
const BasicGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
materialGroup.push(this.multipleSelection[i].物料流水号)
|
||||
numberGroup.push(this.multipleSelection[i].本次到货数量)
|
||||
partGroup.push(this.multipleSelection[i].离线合同明细流水号)
|
||||
for (let i = 0; i < this.table1.length; i++) {
|
||||
if (this.table1[i].本次到货数量 !== 0) {
|
||||
materialGroup.push(this.table1[i].物料流水号)
|
||||
BasicGroup.push(this.table1[i].组件零件基本件流水号)
|
||||
numberGroup.push(this.table1[i].本次到货数量)
|
||||
partGroup.push(this.table1[i].离线合同明细流水号)
|
||||
}
|
||||
}
|
||||
this.$confirm('确认入库?', '提示', {
|
||||
confirmButtonText: '确定入库',
|
||||
@@ -308,7 +315,7 @@ export default {
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线采购件入库_增加数据',
|
||||
param: `物料流水号组=${materialGroup}&离线合同明细流水号组=${partGroup}&数量组=${numberGroup}&货位流水号=${this.locateNumber}&入库人员流水号=${this.inventoryPeople}`
|
||||
param: `物料流水号组=${materialGroup}&组件零件基本件流水号组=${BasicGroup}&离线合同明细流水号组=${partGroup}&数量组=${numberGroup}&货位流水号=${this.locateNumber}&入库人员流水号=${this.inventoryPeople}`
|
||||
}
|
||||
}
|
||||
const res = await axios(param)
|
||||
|
||||
Reference in New Issue
Block a user