| | |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.initname">{{ row.initname }}</div> |
| | | <div v-if="row.unitname">{{ row.unitname }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | }, |
| | | // 获取单据编号(入库单号)、流水号 |
| | | async getProductInHouseOrderCodeSearch() { |
| | | const { data: res } = await ProductInHouseOrderCodeSearch({ rightcode: '0604' }) |
| | | const { data: res } = await ProductInHouseOrderCodeSearch({ rightcode: '0605' }) |
| | | this.form.hbillno = res[0] |
| | | this.form.incbit = res[1] |
| | | }, |
| | |
| | | }, |
| | | // 获取大列表查询 |
| | | async getProductInHouseOrderSearch() { |
| | | if (this.form.wkshopcode === '') { |
| | | return this.$message.info('生产车间不能为空!') |
| | | } |
| | | const data = { |
| | | saleordercode: this.form.saleordercode, // 销售单号 |
| | | wkshopcode: this.form.wkshopcode, // 生产车间 |
| | |
| | | mesordercode: this.form.mesordercode, // 工单编号 |
| | | partcode: this.form.partcode, // 产品编码 |
| | | partname: this.form.partname, // 产品名称 |
| | | partspec: this.form.partspec // 规格型号 |
| | | |
| | | partspec: this.form.partspec, // 规格型号 |
| | | deptno: ''// 入库部门 |
| | | } |
| | | const { data: res } = await ProductInHouseOrderSearch(data) |
| | | this.tableDataDetail = res |
| | | }, |
| | | |
| | | // 入库仓库值改变时 |
| | | stockCodeChange() { |
| | | |
| | | stockCodeChange(val) { |
| | | this.multipleSelection.forEach(i => { |
| | | i.stockcode = val |
| | | i.stockid = this.stockcodeArr.find(j => j.code === val).noid |
| | | }) |
| | | }, |
| | | |
| | | stockCodeRowChange(val, row) { |
| | |
| | | if (this.form.stockcode === '') { |
| | | return this.$message.info('入库仓库不能为空!') |
| | | } |
| | | // if (this.form.deptno === '') { |
| | | // return this.$message.info('入库部门不能为空!') |
| | | // } |
| | | if (this.multipleSelection.find(i => i.stockid === '' || i.stockid === null)) { |
| | | return this.$message.info('表格内入库仓库不能为空!') |
| | | } |
| | | |
| | | const TableDetailData = [] |
| | | this.multipleSelection.forEach((i, index) => { |
| | |
| | | }) |
| | | |
| | | const data = { |
| | | 'rightcode': '0604', // 功能编号 |
| | | 'rightcode': '0605', // 功能编号 |
| | | 'incbit': this.form.incbit, // 流水号 |
| | | 'TableData': [ |
| | | [ |
| | |
| | | } |
| | | |
| | | // console.log(JSON.stringify(data)) |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const res = await TProductInHouseOrderSpSeave(data) |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | if (res.code === '200') { |
| | | this.$message.success('入库成功!') |
| | | this.multipleSelection = [] |
| | | this.form.deptno = '' |
| | | this.form.stockcode = '' |
| | | await this.getProductInHouseOrderSearch() |
| | | // this.form.deptno = '' |
| | | // this.form.stockcode = '' |
| | | this.reset() |
| | | // await this.getProductInHouseOrderSearch() |
| | | await this.getProductInHouseOrderCodeSearch() |
| | | } |
| | | }, |