|
@@ -71,7 +71,7 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:dataSource="loadData"
|
|
:dataSource="loadData"
|
|
- :scroll="{ x: 1255 }"
|
|
|
|
|
|
+ :scroll="{ x: 1415 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 仓库仓位 -->
|
|
<!-- 仓库仓位 -->
|
|
<template slot="warehouse" slot-scope="text, record, index">
|
|
<template slot="warehouse" slot-scope="text, record, index">
|
|
@@ -94,7 +94,7 @@
|
|
size="large"
|
|
size="large"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
@click="handleSubmit"
|
|
@click="handleSubmit"
|
|
- style="padding: 0 60px;">提交</a-button>
|
|
|
|
|
|
+ style="padding: 0 60px;">提交入库</a-button>
|
|
</div>
|
|
</div>
|
|
</a-affix>
|
|
</a-affix>
|
|
</div>
|
|
</div>
|
|
@@ -105,7 +105,7 @@ import { STable, VSelect } from '@/components'
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
import { warehouseCascadeList } from '@/api/warehouse'
|
|
import { warehouseCascadeList } from '@/api/warehouse'
|
|
-import { allocLinkagePutDetailSn, allocLinkagePutDetailList, allocLinkagePutDetailCount } from '@/api/allocLinkagePut'
|
|
|
|
|
|
+import { allocLinkagePutDetailSn, allocLinkagePutDetailList, allocLinkagePutDetailCount, allocLinkagePutDetailUpdate, allocLinkagePutAudit } from '@/api/allocLinkagePut'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
data () {
|
|
data () {
|
|
@@ -125,9 +125,9 @@ export default {
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '调入数量', dataIndex: 'putQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '调入数量', dataIndex: 'putQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -172,13 +172,18 @@ export default {
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
handleSubmit () {
|
|
handleSubmit () {
|
|
- console.log(this.loadData)
|
|
|
|
|
|
+ allocLinkagePutAudit({ sn: this.$route.params.sn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.handleBack()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 产品列表数据
|
|
// 产品列表数据
|
|
getProductList (pageNo) {
|
|
getProductList (pageNo) {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.pageNo = pageNo || this.pageNo
|
|
this.pageNo = pageNo || this.pageNo
|
|
- const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
|
|
|
|
|
|
+ const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam, { allocationLinkagePutSn: this.$route.params.sn })
|
|
allocLinkagePutDetailList(params).then(res => {
|
|
allocLinkagePutDetailList(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.getDetailCount(params)
|
|
this.getDetailCount(params)
|
|
@@ -188,6 +193,15 @@ export default {
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
|
|
+ const warehouseSn = data.list[i].warehouseSn || undefined
|
|
|
|
+ const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
|
|
|
|
+ data.list[i].warehouseSnBackups = warehouseSn
|
|
|
|
+ data.list[i].warehouseLocationSnBackups = warehouseLocationSn
|
|
|
|
+ if (warehouseSn || warehouseLocationSn) {
|
|
|
|
+ data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
|
|
|
|
+ } else {
|
|
|
|
+ data.list[i].warehouseCascade = undefined
|
|
|
|
+ }
|
|
// 成本小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
// 成本小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
data.list[i].costSubtotal = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
|
|
data.list[i].costSubtotal = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
|
|
}
|
|
}
|
|
@@ -221,13 +235,45 @@ export default {
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
changeWarehouseCascade (val, opt, ind) {
|
|
changeWarehouseCascade (val, opt, ind) {
|
|
- console.log(val, opt, ind)
|
|
|
|
if (val.length < 2) {
|
|
if (val.length < 2) {
|
|
this.$message.warning('当前仓库无仓位,请选择其他仓库')
|
|
this.$message.warning('当前仓库无仓位,请选择其他仓库')
|
|
|
|
+ const warehouseSnBackups = this.loadData[ind].warehouseSnBackups || undefined
|
|
|
|
+ const warehouseLocationSnBackups = this.loadData[ind].warehouseLocationSnBackups || undefined
|
|
|
|
+ this.loadData[ind].warehouseSn = warehouseSnBackups
|
|
|
|
+ this.loadData[ind].warehouseLocationSn = warehouseLocationSnBackups
|
|
|
|
+ if (warehouseSnBackups || warehouseLocationSnBackups) {
|
|
|
|
+ this.loadData[ind].warehouseCascade = [warehouseSnBackups, warehouseLocationSnBackups]
|
|
|
|
+ } else {
|
|
|
|
+ this.loadData[ind].warehouseCascade = undefined
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.loadData[ind].warehouseSn = val[0] ? val[0] : ''
|
|
this.loadData[ind].warehouseSn = val[0] ? val[0] : ''
|
|
this.loadData[ind].warehouseLocationSn = val[1] ? val[1] : ''
|
|
this.loadData[ind].warehouseLocationSn = val[1] ? val[1] : ''
|
|
|
|
+ this.handleAdd(this.loadData[ind])
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 添加/编辑
|
|
|
|
+ handleAdd (row) {
|
|
|
|
+ // 清空成本价或数量时,值应保持未清空前的值,因成本价和数量都不可为空
|
|
|
|
+ if (!row.warehouseSn) {
|
|
|
|
+ row.warehouseSn = row.warehouseSnBackups
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!row.warehouseLocationSn) {
|
|
|
|
+ row.warehouseLocationSn = row.warehouseLocationSnBackups
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const params = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ warehouseLocationSn: row.warehouseLocationSn,
|
|
|
|
+ warehouseSn: row.warehouseSn
|
|
}
|
|
}
|
|
|
|
+ allocLinkagePutDetailUpdate(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.getProductList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 产品分类 列表
|
|
// 产品分类 列表
|
|
getProductType () {
|
|
getProductType () {
|