|
@ -25,7 +25,7 @@ |
|
|
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i> |
|
|
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="商品名称" align="center" min-width="200"> |
|
|
<el-table-column label="商品名称" align="center" min-width="180"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-popover placement="right" width="900" trigger="click"> |
|
|
<el-popover placement="right" width="900" trigger="click"> |
|
|
<div> |
|
|
<div> |
|
@ -35,7 +35,7 @@ |
|
|
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
|
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
|
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" /> |
|
|
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" /> |
|
|
<el-table-column prop="unit" label="单位" align="center" /> |
|
|
<el-table-column prop="unit" label="单位" align="center" /> |
|
|
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|
|
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> |
|
|
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|
|
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|
|
<el-table-column prop="count" label="账面数量" align="center" /> |
|
|
<el-table-column prop="count" label="账面数量" align="center" /> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -49,10 +49,10 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
|
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
|
<el-table-column prop="carModel" label="型号" align="center" /> |
|
|
<el-table-column prop="carModel" label="型号" align="center" /> |
|
|
<el-table-column prop="unit" label="单位" align="center" /> |
|
|
<el-table-column prop="unit" label="单位"width="70" align="center" /> |
|
|
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|
|
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> |
|
|
<el-table-column prop="warehouseRackCode" label="货位" align="center" /> |
|
|
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|
|
<el-table-column prop="taxPrice" label="单价" align="center" /> |
|
|
<el-table-column prop="cost" label="单价" align="center" /> |
|
|
<el-table-column prop="bookCount" label="账面数量" align="center" /> |
|
|
<el-table-column prop="bookCount" label="账面数量" align="center" /> |
|
|
<el-table-column label="实盘数量" align="center"> |
|
|
<el-table-column label="实盘数量" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
@ -61,7 +61,7 @@ |
|
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="state" label="状态" align="center" width="100" /> |
|
|
<el-table-column prop="stateValue" label="状态" align="center" width="100" /> |
|
|
<el-table-column prop="profitandlossNumber" label="盈亏数" align="center" width="100" /> |
|
|
<el-table-column prop="profitandlossNumber" label="盈亏数" align="center" width="100" /> |
|
|
<el-table-column prop="profitandlossAmount" label="盈亏金额" align="center" width="100" /> |
|
|
<el-table-column prop="profitandlossAmount" label="盈亏金额" align="center" width="100" /> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -85,6 +85,9 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import req from '@/api/storage/stocktaking.js' |
|
|
import req from '@/api/storage/stocktaking.js' |
|
|
|
|
|
import { |
|
|
|
|
|
getOrgSidByPath, |
|
|
|
|
|
} from '@/api/Common/dictcommons' |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -119,8 +122,8 @@ |
|
|
"profitAmount": "", |
|
|
"profitAmount": "", |
|
|
"lossCount": "", |
|
|
"lossCount": "", |
|
|
"lossAmount": "", |
|
|
"lossAmount": "", |
|
|
"useOrgSid": window.sessionStorage.getItem('orgSid'), |
|
|
"useOrgSid": '', |
|
|
"createOrgSid": window.sessionStorage.getItem('orgSid'), |
|
|
"createOrgSid": '', |
|
|
"wmsInventoryCheckbillDetailList": [ |
|
|
"wmsInventoryCheckbillDetailList": [ |
|
|
|
|
|
|
|
|
] |
|
|
] |
|
@ -147,7 +150,7 @@ |
|
|
let material = 0 |
|
|
let material = 0 |
|
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|
|
if (Number(e.bookCount) < Number(e.realCount)) { |
|
|
if (Number(e.bookCount) < Number(e.realCount)) { |
|
|
material += (e.realCount - e.bookCount) * e.taxPrice |
|
|
material += (e.realCount - e.bookCount) * e.cost |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.formobj.profitAmount = material.toFixed(2) |
|
|
this.formobj.profitAmount = material.toFixed(2) |
|
@ -173,7 +176,7 @@ |
|
|
let material = 0 |
|
|
let material = 0 |
|
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|
|
if (Number(e.bookCount) > Number(e.realCount)) { |
|
|
if (Number(e.bookCount) > Number(e.realCount)) { |
|
|
material += (e.realCount - e.bookCount) * e.taxPrice |
|
|
material += (e.realCount - e.bookCount) * e.cost |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
@ -181,15 +184,36 @@ |
|
|
|
|
|
|
|
|
return material.toFixed(2) |
|
|
return material.toFixed(2) |
|
|
}, |
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
created() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
showAdd() { |
|
|
showAdd() { |
|
|
|
|
|
getOrgSidByPath({ |
|
|
|
|
|
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.formobj.createOrgSid = res.data |
|
|
|
|
|
this.formobj.useOrgSid = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.viewTitle = '【新增】盘点记录' |
|
|
this.viewTitle = '【新增】盘点记录' |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs['form_obj'].clearValidate() |
|
|
this.$refs['form_obj'].clearValidate() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
showEdit(row) { |
|
|
showEdit(row) { |
|
|
|
|
|
getOrgSidByPath({ |
|
|
|
|
|
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.formobj.createOrgSid = res.data |
|
|
|
|
|
this.formobj.useOrgSid = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.viewTitle = '【修改】盘点记录' |
|
|
this.viewTitle = '【修改】盘点记录' |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs['form_obj'].clearValidate() |
|
|
this.$refs['form_obj'].clearValidate() |
|
@ -226,6 +250,7 @@ |
|
|
commodityAdd() { |
|
|
commodityAdd() { |
|
|
this.formobj.wmsInventoryCheckbillDetailList.push({ |
|
|
this.formobj.wmsInventoryCheckbillDetailList.push({ |
|
|
"sid": "", |
|
|
"sid": "", |
|
|
|
|
|
"stateValue": "", |
|
|
"state": "", |
|
|
"state": "", |
|
|
"billSid": "", |
|
|
"billSid": "", |
|
|
"inventorySid": "", |
|
|
"inventorySid": "", |
|
@ -233,7 +258,7 @@ |
|
|
"warehouseName": "", |
|
|
"warehouseName": "", |
|
|
"warehouseRackSid": "", |
|
|
"warehouseRackSid": "", |
|
|
"warehouseRackCode": "", |
|
|
"warehouseRackCode": "", |
|
|
"taxPrice": "", |
|
|
"cost": "", |
|
|
"bookCount": "", |
|
|
"bookCount": "", |
|
|
"realCount": "", |
|
|
"realCount": "", |
|
|
"profitandlossNumber": "", |
|
|
"profitandlossNumber": "", |
|
@ -260,19 +285,24 @@ |
|
|
this.formobj.wmsInventoryCheckbillDetailList.splice(index, 1) |
|
|
this.formobj.wmsInventoryCheckbillDetailList.splice(index, 1) |
|
|
}, |
|
|
}, |
|
|
commodityCurrentChange(value, row) { |
|
|
commodityCurrentChange(value, row) { |
|
|
row.sid = value.sid |
|
|
console.log('>>>>>>>>>commodityCurrentChange', value) |
|
|
row.goodsName = value.goodsSpuName |
|
|
|
|
|
|
|
|
row.sid = '' |
|
|
|
|
|
// row.inventorySid = value.sid |
|
|
|
|
|
row.goodsSpuSid = value.sid |
|
|
|
|
|
row.goodsSpuName = value.goodsSpuName |
|
|
row.goodsSkuCode = value.goodsSkuCode |
|
|
row.goodsSkuCode = value.goodsSkuCode |
|
|
row.goodsSkuOwnSpec = value.goodsSkuOwnSpec |
|
|
row.carModel = value.goodsSkuOwnSpec |
|
|
row.unit = value.unit |
|
|
row.unit = value.unit |
|
|
row.warehouseName = value.warehouseName |
|
|
row.warehouseName = value.warehouseName |
|
|
row.warehouseSid = value.warehouseSid |
|
|
row.warehouseSid = value.warehouseSid |
|
|
|
|
|
row.warehouseRackSid = value.warehouseRackSid |
|
|
row.warehouseRackCode = value.warehouseRackCode |
|
|
row.warehouseRackCode = value.warehouseRackCode |
|
|
row.bookCount = value.count |
|
|
row.bookCount = value.count |
|
|
row.taxPrice = value.salesPrice |
|
|
row.cost = value.salesPrice |
|
|
row.realCount = "" |
|
|
// row.realCount = "" |
|
|
row.profitandlossNumber = "" |
|
|
// row.profitandlossNumber = "" |
|
|
row.profitandlossAmount = "" |
|
|
// row.profitandlossAmount = "" |
|
|
document.body.click() |
|
|
document.body.click() |
|
|
}, |
|
|
}, |
|
|
// 计算状态 盈亏数量 盈亏金额 |
|
|
// 计算状态 盈亏数量 盈亏金额 |
|
@ -283,23 +313,26 @@ |
|
|
|
|
|
|
|
|
// 正常 |
|
|
// 正常 |
|
|
if (Number(row.bookCount) == Number(val)) { |
|
|
if (Number(row.bookCount) == Number(val)) { |
|
|
row.state = "正常" |
|
|
row.stateValue = "正常" |
|
|
|
|
|
row.state = 0 |
|
|
row.profitandlossNumber = "0" |
|
|
row.profitandlossNumber = "0" |
|
|
row.profitandlossAmount = "0.00" |
|
|
row.profitandlossAmount = "0.00" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 盘盈 |
|
|
// 盘盈 |
|
|
if (Number(row.bookCount) < Number(val)) { |
|
|
if (Number(row.bookCount) < Number(val)) { |
|
|
row.state = "盘盈" |
|
|
row.stateValue = "盘盈" |
|
|
|
|
|
row.state = 1 |
|
|
row.profitandlossNumber = val - row.bookCount |
|
|
row.profitandlossNumber = val - row.bookCount |
|
|
row.profitandlossAmount = ((val - row.bookCount) * row.taxPrice).toFixed(2) |
|
|
row.profitandlossAmount = ((val - row.bookCount) * row.cost).toFixed(2) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 盘亏 |
|
|
// 盘亏 |
|
|
if (Number(row.bookCount) > Number(val)) { |
|
|
if (Number(row.bookCount) > Number(val)) { |
|
|
row.state = "盘亏" |
|
|
row.stateValue = "盘亏" |
|
|
|
|
|
row.state = 2 |
|
|
row.profitandlossNumber = val - row.bookCount |
|
|
row.profitandlossNumber = val - row.bookCount |
|
|
row.profitandlossAmount = ((val - row.bookCount) * row.taxPrice).toFixed(2) |
|
|
row.profitandlossAmount = ((val - row.bookCount) * row.cost).toFixed(2) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -373,20 +406,20 @@ |
|
|
this.formobj = { |
|
|
this.formobj = { |
|
|
"sid": "", |
|
|
"sid": "", |
|
|
"remarks": "", |
|
|
"remarks": "", |
|
|
"createBySid": "", |
|
|
"billNo": "", |
|
|
|
|
|
"createBySid": window.sessionStorage.getItem('userSid'), |
|
|
|
|
|
"createByName":window.sessionStorage.getItem('name'), |
|
|
"createDate": "", |
|
|
"createDate": "", |
|
|
"createUserSid": "", |
|
|
"createUserSid": window.sessionStorage.getItem('userSid'), |
|
|
"createByName": "", |
|
|
|
|
|
"checkType": "", |
|
|
"checkType": "", |
|
|
"checkState": "", |
|
|
|
|
|
"profitCount": "", |
|
|
|
|
|
"profitAmount": "", |
|
|
"profitAmount": "", |
|
|
"lossCount": "", |
|
|
"lossCount": "", |
|
|
"lossAmount": "", |
|
|
"lossAmount": "", |
|
|
"useOrgSid": "", |
|
|
"useOrgSid": '', |
|
|
"createOrgName": "", |
|
|
"createOrgSid": '', |
|
|
"createOrgSid": "", |
|
|
"wmsInventoryCheckbillDetailList": [ |
|
|
"wmsInventoryCheckbillDetailList": [] |
|
|
|
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
this.submitdisabled = false |
|
|
this.submitdisabled = false |
|
|
this.settleVisible = false |
|
|
this.settleVisible = false |
|
|