Initial commit: 景耀JY1.0项目
This commit is contained in:
@@ -42,7 +42,15 @@
|
||||
style="margin-left: 10px"
|
||||
plain
|
||||
size="small"
|
||||
@click="submitInStorage">入库/入库单
|
||||
@click="submitInStorage">入库
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-s-home"
|
||||
style="margin-left: 10px"
|
||||
plain
|
||||
size="small"
|
||||
@click="showRKDDialog">入库单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -68,6 +76,16 @@
|
||||
height="740px"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
|
||||
<el-table-column label="供应商" align="center" show-overflow-tooltip width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同号" align="center" show-overflow-tooltip width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
@@ -111,9 +129,9 @@
|
||||
<el-table-column width="140px" label="本次到货数" prop="本次到货数" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.本次到货数"
|
||||
v-model=" scope.row.等待入库数量"
|
||||
:min="0"
|
||||
:max="scope.row.采购数-scope.row.已到数"
|
||||
:max="scope.row.采购数 - scope.row.已到数"
|
||||
size="mini"
|
||||
style="margin: 0;width: 100%"/>
|
||||
</template>
|
||||
@@ -505,6 +523,18 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleRKD" title="入库单" center width="700px">
|
||||
<el-table :data="tableDataRKD" border stripe size="small" height="400px">
|
||||
<el-table-column prop="采购合同号" label="采购合同" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="供应商名称" label="供应商" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="到货数" label="到货数" align="center" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="selectRKDRow(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-card v-show="false">
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
@@ -659,6 +689,8 @@ export default {
|
||||
tableData2: [], // 合同信息表
|
||||
tableData3: [], // 合同信息表
|
||||
tableData30: [], // 合同信息表
|
||||
dialogFormVisibleRKD: false,
|
||||
tableDataRKD: [],
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 30, // 分页每页显示条数
|
||||
pageCurrent1: 1, // 分页当前页
|
||||
@@ -689,6 +721,7 @@ export default {
|
||||
this.getSelectTheOutsourcingManufacturers()
|
||||
this.initWebpack()
|
||||
this.getorderSelection()
|
||||
// this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
onChangeSupplierSelection() {
|
||||
@@ -698,6 +731,24 @@ export default {
|
||||
})
|
||||
this.supplierSelectionName = obj.label
|
||||
},
|
||||
showRKDDialog() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_入库单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableDataRKD = response.data.filter(item => item.是否入库 === 0)
|
||||
this.dialogFormVisibleRKD = true
|
||||
})
|
||||
},
|
||||
selectRKDRow(row) {
|
||||
this.supplierSelectionValue = row.供应商流水号
|
||||
this.getContractState()
|
||||
this.$nextTick(() => {
|
||||
this.contractStateValue = row.采购合同流水号
|
||||
this.searchTable1()
|
||||
this.orderSelectionValue = row.供应商
|
||||
})
|
||||
this.dialogFormVisibleRKD = false
|
||||
},
|
||||
exportTable() {
|
||||
const htmlNode = $('#WGBLD').html()
|
||||
const body = $('body')
|
||||
@@ -991,55 +1042,71 @@ export default {
|
||||
},
|
||||
submitInStorage() {
|
||||
// this.exportTable()
|
||||
if (this.contractStateValue) {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
const materialGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
const purchaseGroup = []
|
||||
const locateGroup = []
|
||||
const isPurchaseGroup = []
|
||||
const batchGroup = []
|
||||
this.multipleSelection_variable = this.multipleSelection
|
||||
this.multipleSelection = []
|
||||
for (let i = 0; i < this.multipleSelection_variable.length; i++) {
|
||||
if (this.multipleSelection_variable[i].货位流水号 === 0) {
|
||||
this.$message.warning('存在未绑定货位的物料')
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable[i].本次到货数
|
||||
partGroup[i] = this.multipleSelection_variable[i].标准件和外购件流水号
|
||||
purchaseGroup[i] = this.multipleSelection_variable[i].采购合同明细流水号
|
||||
locateGroup[i] = this.multipleSelection_variable[i].货位流水号
|
||||
isPurchaseGroup[i] = this.multipleSelection_variable[i].采购类型
|
||||
batchGroup[i] = this.multipleSelection_variable[i].批号
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
param[1] = ['实际到货数量组', numberGroup]
|
||||
param[2] = ['标准件和外购件流水号组', partGroup]
|
||||
param[3] = ['采购合同明细流水号组', purchaseGroup]
|
||||
param[4] = ['入库人员流水号', this.id]
|
||||
param[5] = ['货位流水号组', locateGroup]
|
||||
param[6] = ['是否采购组', isPurchaseGroup]
|
||||
param[7] = ['批号组', batchGroup]
|
||||
var Data = this.CreateData('12', '仓储管理_采购件入库_循环执行', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('入库成功')
|
||||
this.exportTable()
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.success('入库失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择物料')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择合同')
|
||||
if (!this.multipleSelection || this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请先选择物料')
|
||||
return
|
||||
}
|
||||
|
||||
const firstContractNo = this.multipleSelection[0]['采购合同流水号']
|
||||
const hasDifferent = this.multipleSelection.some(item => item['采购合同流水号'] !== firstContractNo)
|
||||
|
||||
if (hasDifferent) {
|
||||
this.$message.warning('只能选择一个合同的物料')
|
||||
return
|
||||
}
|
||||
console.log(this.multipleSelection)
|
||||
// if (this.contractStateValue) {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
const materialGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
const purchaseGroup = []
|
||||
const locateGroup = []
|
||||
const isPurchaseGroup = []
|
||||
const batchGroup = []
|
||||
const batchCodeGroup = []
|
||||
this.multipleSelection_variable = this.multipleSelection
|
||||
this.multipleSelection = []
|
||||
for (let i = 0; i < this.multipleSelection_variable.length; i++) {
|
||||
if (this.multipleSelection_variable[i].货位流水号 === 0) {
|
||||
this.$message.warning('存在未绑定货位的物料')
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable[i].等待入库数量
|
||||
partGroup[i] = this.multipleSelection_variable[i].标准件和外购件流水号
|
||||
purchaseGroup[i] = this.multipleSelection_variable[i].采购合同明细流水号
|
||||
locateGroup[i] = this.multipleSelection_variable[i].货位流水号
|
||||
isPurchaseGroup[i] = this.multipleSelection_variable[i].采购类型
|
||||
batchGroup[i] = this.multipleSelection_variable[i].批号
|
||||
batchCodeGroup[i] = this.multipleSelection_variable[i].批次编码
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
param[1] = ['实际到货数量组', numberGroup]
|
||||
param[2] = ['标准件和外购件流水号组', partGroup]
|
||||
param[3] = ['采购合同明细流水号组', purchaseGroup]
|
||||
param[4] = ['入库人员流水号', this.id]
|
||||
param[5] = ['货位流水号组', locateGroup]
|
||||
param[6] = ['是否采购组', isPurchaseGroup]
|
||||
param[7] = ['批号组', batchGroup]
|
||||
param[8] = ['批次编码组', batchCodeGroup]
|
||||
var Data = this.CreateData('12', '仓储管理_采购件入库_循环执行', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('入库成功')
|
||||
this.exportTable()
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.success('入库失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择物料')
|
||||
}
|
||||
// } else {
|
||||
// this.$message.warning('请先选择合同')
|
||||
// }
|
||||
},
|
||||
searchTable2() {
|
||||
let materialNameTypeValue_check
|
||||
@@ -1126,6 +1193,7 @@ export default {
|
||||
const typeGroup = []
|
||||
const locateGroup = []
|
||||
const batchGroup = []
|
||||
const batchCodeGroup = []
|
||||
this.multipleSelection_variable2 = this.multipleSelection2
|
||||
this.multipleSelection2 = []
|
||||
for (let i = 0; i < this.multipleSelection_variable2.length; i++) {
|
||||
@@ -1134,11 +1202,12 @@ export default {
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable2[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable2[i].本次入库
|
||||
numberGroup[i] = this.multipleSelection_variable2[i].等待入库数量
|
||||
processGroup[i] = this.multipleSelection_variable2[i].工艺计划流水号
|
||||
typeGroup[i] = this.multipleSelection_variable2[i].类型
|
||||
locateGroup[i] = this.multipleSelection_variable2[i].货位流水号
|
||||
batchGroup[i] = this.multipleSelection_variable2[i].批号
|
||||
batchCodeGroup[i] = this.multipleSelection_variable2[i].批次编码
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
|
||||
Reference in New Issue
Block a user