|
@@ -18,9 +18,9 @@
|
|
<div slot="message" >
|
|
<div slot="message" >
|
|
<div>
|
|
<div>
|
|
产品款数 <strong>{{ item.totalPutCategory }}</strong> ,
|
|
产品款数 <strong>{{ item.totalPutCategory }}</strong> ,
|
|
- 本次发货数量合计 <strong>{{ item.totalPutQty }}</strong> ,
|
|
|
|
|
|
+ 本次发货数量合计 <strong>{{ item.totalRealPutQty }}</strong> ,
|
|
<div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
|
|
<div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
|
|
- 本次发货金额合计¥<strong>{{ item.totalPutAmount?toThousands(item.totalPutAmount,2):'0.00' }}</strong>
|
|
|
|
|
|
+ 本次发货金额合计¥<strong>{{ item.totalRealPutAmount?toThousands(item.totalRealPutAmount,2):'0.00' }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -45,11 +45,12 @@
|
|
<template slot="warehouseNum" slot-scope="text, record">
|
|
<template slot="warehouseNum" slot-scope="text, record">
|
|
<a-input-number
|
|
<a-input-number
|
|
size="small"
|
|
size="small"
|
|
- v-model="record.putQty"
|
|
|
|
|
|
+ v-model="record.realPutQty"
|
|
:precision="0"
|
|
:precision="0"
|
|
:min="0"
|
|
:min="0"
|
|
:max="999999"
|
|
:max="999999"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
|
|
+ @blur="changePutQty(record, bindex)"
|
|
placeholder="请输入入库数量" />
|
|
placeholder="请输入入库数量" />
|
|
</template>
|
|
</template>
|
|
<!-- 仓库仓位 -->
|
|
<!-- 仓库仓位 -->
|
|
@@ -87,6 +88,7 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import { purchaseWriteStockIn, receivingQuery, receivingDetail } from '@/api/purchase'
|
|
import { purchaseWriteStockIn, receivingQuery, receivingDetail } from '@/api/purchase'
|
|
|
|
+import { updateRealPutQty } from '@/api/receiving'
|
|
import { purchaseUpdateWarehouse } from '@/api/purchaseDetail'
|
|
import { purchaseUpdateWarehouse } from '@/api/purchaseDetail'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
@@ -121,7 +123,7 @@ 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
|
|
- data.list[i].shippedQty = data.list[i].putQty
|
|
|
|
|
|
+ data.list[i].shippedQty = data.list[i].realPutQty
|
|
const warehouseSn = data.list[i].warehouseSn || undefined
|
|
const warehouseSn = data.list[i].warehouseSn || undefined
|
|
const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
|
|
const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
|
|
if (warehouseSn || warehouseLocationSn) {
|
|
if (warehouseSn || warehouseLocationSn) {
|
|
@@ -151,22 +153,19 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- // { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '采购数量', dataIndex: 'qty', width: '6%', align: 'center', scopedSlots: { customRender: 'origqty' } },
|
|
{ title: '采购数量', dataIndex: 'qty', width: '6%', align: 'center', scopedSlots: { customRender: 'origqty' } },
|
|
- { title: '本次发货数量', dataIndex: 'shippedQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- // { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- // { title: '本次入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '本次入库数量', scopedSlots: { customRender: 'warehouseNum' }, width: '9%', align: 'center' },
|
|
|
|
- { title: '本次入库金额', dataIndex: 'warehouseMoney', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
|
- { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '13%', align: 'center' }
|
|
|
|
|
|
+ { title: '本次发货数量', dataIndex: 'shippedQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '本次入库数量', scopedSlots: { customRender: 'warehouseNum' }, width: '8%', align: 'center' },
|
|
|
|
+ { title: '本次入库金额', dataIndex: 'realPutAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
|
+ { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '14%', align: 'center' }
|
|
]
|
|
]
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
- arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
|
|
|
+ arr.splice(8, 0, { title: '本次发货金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
}
|
|
}
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
@@ -269,6 +268,22 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 修改入库数量
|
|
|
|
+ changePutQty(record, bindex){
|
|
|
|
+ if(record.realPutQty == record.shippedQty){
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.spinning = true
|
|
|
|
+ updateRealPutQty({id:record.id,realPutQty:record.realPutQty}).then(res => {
|
|
|
|
+ if(res.status == 200){
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.$refs['table-' + bindex][0].refresh()
|
|
|
|
+ }else{
|
|
|
|
+ record.realPutQty = record.shippedQty
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 修改仓库仓位
|
|
// 修改仓库仓位
|
|
changeWarehouseCascade (val, opt, ind, bindex) {
|
|
changeWarehouseCascade (val, opt, ind, bindex) {
|
|
let loadData = this.chooseLoadData[bindex][ind]
|
|
let loadData = this.chooseLoadData[bindex][ind]
|