|
@@ -211,7 +211,7 @@
|
|
|
<template slot="cntrVolumn" slot-scope="{row}">
|
|
|
<span>{{ row.cntrVolumn ? parseFloat(row.cntrVolumn) : row.cntrVolumn }}</span>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<!-- <template slot="corpId" slot-scope="{ row, index }">-->
|
|
|
<!-- <crop-select-->
|
|
|
<!-- v-if="row.$cellEdit"-->
|
|
@@ -236,12 +236,23 @@
|
|
|
</el-select>
|
|
|
<span v-else>{{ row.storageName }}</span>
|
|
|
</template>
|
|
|
+ <template slot="surplusRouteQuantity" slot-scope="{ row }">
|
|
|
+ <template v-if="row.$cellEdit">
|
|
|
+ <span v-for="(item, index) in surplusRouteQuantityOption" :key="index">{{ item.surplusRouteQuantity !==
|
|
|
+ null && item.surplusRouteQuantity !== undefined ? item.surplusRouteQuantity : '0' }}</span>
|
|
|
+ </template>
|
|
|
+ <span v-else>{{ row.surplusRouteQuantity !== null && row.surplusRouteQuantity !== undefined ?
|
|
|
+ row.surplusRouteQuantity : '0:00' }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<template slot="purchaseAmount" slot-scope="{ row }">
|
|
|
- <el-select v-if="row.$cellEdit" v-model="row.purchaseAmount" @focus="getPurchasePrice(row)" allow-create
|
|
|
+ <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" @focus="getPurchasePrice(row)" allow-create
|
|
|
filterable v-input-limit="2" default-first-option>
|
|
|
<el-option v-for="(item, index) in purchasePriceOption" :key="index" :label="item.purchasePrice"
|
|
|
:value="item.purchasePrice"></el-option>
|
|
|
- </el-select>
|
|
|
+ </el-input>
|
|
|
<span v-else>{{ row.purchaseAmount }}</span>
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
@@ -558,7 +569,7 @@ import check from "@/components/check/check";
|
|
|
import checkSchedule from "@/components/check/checkSchedule";
|
|
|
import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import {customerList as storageType} from "@/api/basicData/basicStorageType"
|
|
|
+import { customerList as storageType } from "@/api/basicData/basicStorageType"
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
props: {
|
|
@@ -581,7 +592,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- storageName:[],
|
|
|
+ storageName: [],
|
|
|
+ surplusRouteQuantityOption: [],
|
|
|
saveLoading: false,
|
|
|
disabled: false,
|
|
|
form: {
|
|
@@ -746,7 +758,7 @@ export default {
|
|
|
bankOfDepositData: [],
|
|
|
tableDataCost: [],
|
|
|
dic: [],
|
|
|
- storageId:[],
|
|
|
+ storageId: [],
|
|
|
tableData: [],
|
|
|
policyData: [],
|
|
|
policyDataTwo: [],
|
|
@@ -1285,7 +1297,7 @@ export default {
|
|
|
trigger: 'change'
|
|
|
}
|
|
|
]
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: '仓库',
|
|
|
prop: 'storageId',
|
|
|
dicData: [],
|
|
@@ -1361,7 +1373,7 @@ export default {
|
|
|
goodsShowData: [],
|
|
|
arrivalOptions: [],
|
|
|
shippingOptions: [],
|
|
|
- storageOptions:[],
|
|
|
+ storageOptions: [],
|
|
|
applicationDialog: false,
|
|
|
itemType: '销售',
|
|
|
packageOptions: [],
|
|
@@ -1369,7 +1381,7 @@ export default {
|
|
|
browse: false,
|
|
|
roleName: '',
|
|
|
userList: [],
|
|
|
- storageIdOption:[],
|
|
|
+ storageIdOption: [],
|
|
|
feesOption: [],
|
|
|
checkDisabled: false,
|
|
|
checkData: {},
|
|
@@ -1412,12 +1424,13 @@ export default {
|
|
|
this.getWorkDicts("payment_term").then(res => {
|
|
|
this.paymentOption = res.data.data
|
|
|
})
|
|
|
- storageType().then(res=>{
|
|
|
+ storageType().then(res => {
|
|
|
+ console.log('1', res.data.data);
|
|
|
this.storageIdOption = res.data.data.records
|
|
|
|
|
|
})
|
|
|
// this.getWorkDicts("storageType").then(res => {
|
|
|
-
|
|
|
+
|
|
|
// this.storageIdOption = res.data.data
|
|
|
// })
|
|
|
this.getWorkDicts("order_status").then(res => {
|
|
@@ -1524,6 +1537,14 @@ export default {
|
|
|
// })
|
|
|
}
|
|
|
},
|
|
|
+ handleStorageNameChange(row) {
|
|
|
+ // console.log(row.storageQuantity);
|
|
|
+ this.surplusRouteQuantityOption = row.storageQuantity
|
|
|
+ console.log(this.surplusRouteQuantityOption);
|
|
|
+ // this.surplusRouteQuantityOption = Object.values(row.surplusRouteQuantity);
|
|
|
+ // console.log('2222',row.surplusRouteQuantity);
|
|
|
+
|
|
|
+ },
|
|
|
getGoodsRow(event, row) {
|
|
|
row.priceCategory = event.goodsTypeName
|
|
|
row.code = event.code
|
|
@@ -1794,6 +1815,9 @@ export default {
|
|
|
},
|
|
|
//商品新增触发
|
|
|
commoditySelection() {
|
|
|
+ if (this.form.storageId == '') {
|
|
|
+ return this.$message.error('请选择仓库')
|
|
|
+ }
|
|
|
this.dialogVisible = !this.dialogVisible
|
|
|
this.tableData = []
|
|
|
this.commodityData = false
|
|
@@ -2211,7 +2235,7 @@ export default {
|
|
|
tradeType: 'GN'
|
|
|
}).then(res => {
|
|
|
row.storageQuantity = res.data.data
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
row.integralMultiples = event[0].integralMultiples
|
|
|
this.quantityChange(row)
|
|
@@ -2279,6 +2303,7 @@ export default {
|
|
|
},
|
|
|
//确认导入触发
|
|
|
async importGoods() {
|
|
|
+ this.surplusRouteQuantityOption.push({ surplusRouteQuantity: '0' });
|
|
|
if (this.goodsListSave.length > 0) {
|
|
|
this.goodsListSaveHandle()
|
|
|
} else {
|
|
@@ -2374,8 +2399,9 @@ export default {
|
|
|
goodsId: this.tableData[item].id,
|
|
|
itemType: this.tableData[item].typeno,
|
|
|
tradeType: 'GN',
|
|
|
- warehouseId:selectedValue
|
|
|
+ warehouseId: selectedValue
|
|
|
}).then(res => {
|
|
|
+ console.log('1', res.data.data);
|
|
|
this.storageName = res.data.data
|
|
|
this.tableData[item].priceCategory = this.tableData[item].goodsTypeName;
|
|
|
this.tableData[item].storageQuantity = res.data.data;
|
|
@@ -2916,7 +2942,6 @@ export default {
|
|
|
// 销售金额
|
|
|
this.form.orderAmount = 0;
|
|
|
// 计算销售金额
|
|
|
- console.log(this.form.orderItemsList)
|
|
|
this.form.orderItemsList.forEach(item => {
|
|
|
if (item.goodType == 0) {
|
|
|
if (item.purchaseAmount) {
|
|
@@ -2940,6 +2965,16 @@ export default {
|
|
|
// 如果有id解锁,没有跳过
|
|
|
// this.form.id && this.unLock({moduleName: 'xs',tableName: 'business_order', billId: this.form.id})
|
|
|
this.saveLoading = true
|
|
|
+ this.form.orderItemsList.forEach((item) => {
|
|
|
+ console.log(this.storageIdOption);
|
|
|
+ this.storageIdOption.forEach((itm)=>{
|
|
|
+ console.log(itm.id);
|
|
|
+ })
|
|
|
+ item.storageId = this.storageIdOption
|
|
|
+ console.log(item.storageQuantity);
|
|
|
+ item.storageQuantity = item.storageQuantity.surplusRouteQuantity;
|
|
|
+ });
|
|
|
+
|
|
|
await this.computedCost()
|
|
|
typeSave(this.form).then(res => {
|
|
|
// this.$set(this.detailData, 'seeDisabled', true);
|