|
@@ -275,7 +275,7 @@ import optionTwoCost from "./configuration/mainListCost.json"
|
|
|
import {getDeptLazyTree, customerList,getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
|
|
|
import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
|
|
|
import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
|
|
|
-import {revokeOutGoods} from "../../../api/basicData/deliveryNotice";
|
|
|
+import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -587,6 +587,7 @@ export default {
|
|
|
this.$set(this.form, 'totalQuantity', 0)
|
|
|
this.$set(this.form, 'purchaseAmount', 0)
|
|
|
this.contactsData.forEach(item => {
|
|
|
+ this.$set(item, "inventoryNumber", item.storageQuantity)
|
|
|
this.$set(item, "srcId", item.id)
|
|
|
this.$set(item, "deliveryAmount", item.amount)
|
|
|
this.$set(item, "actualQuantity", (Number(item.purchaseQuantity) - Number(item.actualQuantity)))
|
|
@@ -595,6 +596,8 @@ export default {
|
|
|
this.form.deliveryAmount += Number(item.deliveryAmount)
|
|
|
this.form.totalQuantity += Number(item.actualQuantity)
|
|
|
this.form.purchaseAmount += Number(item.deliveryAmount)
|
|
|
+ this.form.deliveryAmount = (this.form.deliveryAmount).toFixed(2)
|
|
|
+ this.form.purchaseAmount = (this.form.purchaseAmount).toFixed(2)
|
|
|
delete item.id
|
|
|
delete item.pid
|
|
|
})
|
|
@@ -614,8 +617,8 @@ export default {
|
|
|
this.bankOfDepositData = this.form.deliveryFilesList
|
|
|
this.configuration.dicData = this.form.corpName
|
|
|
this.contactsData.forEach(item => {
|
|
|
- this.form.deliveryAmount += Number(item.deliveryAmount)
|
|
|
- this.form.totalQuantity += Number(item.actualQuantity)
|
|
|
+ // this.form.deliveryAmount += Number(item.deliveryAmount)
|
|
|
+ // this.form.totalQuantity += Number(item.actualQuantity)
|
|
|
// 入库金额和入库数量的比例
|
|
|
this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
|
|
|
})
|
|
@@ -676,6 +679,7 @@ export default {
|
|
|
delete item.id
|
|
|
delete item.pid
|
|
|
})
|
|
|
+ form.deliveryStatus == '录入'
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -684,7 +688,9 @@ export default {
|
|
|
},
|
|
|
// 入库数量变化时调用
|
|
|
actualQuantityChange(row) {
|
|
|
- row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
|
|
|
+ if (row.scale) {
|
|
|
+ row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
|
|
|
+ }
|
|
|
},
|
|
|
// 类别变换时触发
|
|
|
warehouseTreeChange(id) {
|
|
@@ -726,6 +732,7 @@ export default {
|
|
|
//商品新增触发
|
|
|
commoditySelection() {
|
|
|
this.dialogVisible = !this.dialogVisible
|
|
|
+ this.tableData = []
|
|
|
this.commodityData = false
|
|
|
},
|
|
|
//点击费用明细选择触发
|
|
@@ -750,6 +757,12 @@ export default {
|
|
|
this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
|
|
|
this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
|
|
|
this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
|
|
|
+ selectGoodsNum({
|
|
|
+ goodsId: this.tableData[0].id,
|
|
|
+ typeno: this.tableData[0].specs
|
|
|
+ }).then(res => {
|
|
|
+ this.contactsData[this.choiceIndexT].storageQuantity = res.data.data
|
|
|
+ })
|
|
|
}
|
|
|
this.dialogVisible = !this.dialogVisible
|
|
|
this.commodityData = false
|
|
@@ -789,25 +802,29 @@ export default {
|
|
|
// this.contactsData = this.contactsData.concat(this.tableData)
|
|
|
if (this.tableData.length > 0) {
|
|
|
for (let item in this.tableData) {
|
|
|
- console.log(this.tableData[item])
|
|
|
- this.tableData[item].itemId = this.tableData[item].id
|
|
|
- this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
|
|
|
- delete this.tableData[item].goodsTypeName
|
|
|
- delete this.tableData[item].id
|
|
|
- delete this.tableData[item].status
|
|
|
- delete this.tableData[item].isDeleted
|
|
|
- this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
|
|
|
- this.$set(this.tableData[item], 'purchaseQuantity', 0)
|
|
|
- this.$set(this.tableData[item], 'actualQuantity', 0)
|
|
|
- this.$set(this.tableData[item], 'purchaseAmount', 0)
|
|
|
- this.$set(this.tableData[item], 'deliveryAmount', 0)
|
|
|
- this.tableData[item].sort = this.maxGoodsNum + 1
|
|
|
- this.maxGoodsNum++
|
|
|
- this.$refs.crudContact.rowCellAdd(this.tableData[item]);
|
|
|
- this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
|
|
|
+ selectGoodsNum({
|
|
|
+ goodsId: this.tableData[item].id,
|
|
|
+ typeno: this.tableData[item].specs
|
|
|
+ }).then(res => {
|
|
|
+ this.tableData[item].storageQuantity = res.data.data
|
|
|
+ this.tableData[item].itemId = this.tableData[item].id
|
|
|
+ this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
|
|
|
+ delete this.tableData[item].goodsTypeName
|
|
|
+ delete this.tableData[item].id
|
|
|
+ delete this.tableData[item].status
|
|
|
+ delete this.tableData[item].isDeleted
|
|
|
+ this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].specs)
|
|
|
+ this.$set(this.tableData[item], 'purchaseQuantity', 0)
|
|
|
+ this.$set(this.tableData[item], 'actualQuantity', 0)
|
|
|
+ this.$set(this.tableData[item], 'purchaseAmount', 0)
|
|
|
+ this.$set(this.tableData[item], 'deliveryAmount', 0)
|
|
|
+ this.tableData[item].sort = this.maxGoodsNum + 1
|
|
|
+ this.maxGoodsNum++
|
|
|
+ this.$refs.crudContact.rowCellAdd(this.tableData[item]);
|
|
|
+ this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- this.tableData = []
|
|
|
this.dialogVisible = false
|
|
|
},
|
|
|
closeGoods() {
|
|
@@ -1058,6 +1075,16 @@ export default {
|
|
|
console.log(this.form)
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ this.form.deliveryAmount = 0
|
|
|
+ this.form.totalQuantity = 0
|
|
|
+ this.form.purchaseAmount = 0
|
|
|
+ this.contactsData.forEach(item => {
|
|
|
+ this.form.deliveryAmount += Number(item.deliveryAmount)
|
|
|
+ this.form.totalQuantity += Number(item.actualQuantity)
|
|
|
+ this.form.purchaseAmount += Number(item.deliveryAmount)
|
|
|
+ this.form.deliveryAmount = (this.form.deliveryAmount).toFixed(2)
|
|
|
+ this.form.purchaseAmount = (this.form.purchaseAmount).toFixed(2)
|
|
|
+ })
|
|
|
//商品信息
|
|
|
this.form.deliveryItemsList = this.contactsData
|
|
|
this.form.deliveryFeesList = this.advantageProjectData
|