|
|
@@ -10,10 +10,10 @@
|
|
|
full-height="calc(100vh - 76px)"
|
|
|
@columns-change="handleColumnChange"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
- :selection.sync="selection"
|
|
|
- :show-summary="showSummary"
|
|
|
- :summary-method="getSummaries"
|
|
|
+ :selection.sync="selection"
|
|
|
>
|
|
|
+ <!-- :show-summary="showSummary"
|
|
|
+ :summary-method="getSummaries" -->
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
<div class="headbox">
|
|
|
@@ -70,6 +70,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="pricebox">
|
|
|
+ <span class="amount" v-if="showSummary">数量合计:{{ allQuantity }}</span>
|
|
|
<span class="amount">总计:{{ allPrice }}元</span>
|
|
|
|
|
|
<el-form-item
|
|
|
@@ -926,6 +927,17 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
+ <template v-slot:cuttingLength="{ row, $index }">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'datasource.' + $index + '.cuttingLength'"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="row.cuttingLength"
|
|
|
+ placeholder="请输入"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="scope">
|
|
|
<el-popconfirm
|
|
|
@@ -985,7 +997,7 @@
|
|
|
import ProductionVersion from '@/components/ProductionVersion2/index.vue';
|
|
|
import { getInventoryTotalAPI } from '@/api/wms';
|
|
|
import { pricingWayList, lbjtList } from '@/enum/dict.js';
|
|
|
- import { changeCount, getAllPrice, getAllDiscountPrice, formatPrice } from '@/BIZComponents/setProduct.js';
|
|
|
+ import { changeCount, getAllPrice, getAllDiscountPrice, formatPrice, getAllQuantity } from '@/BIZComponents/setProduct.js';
|
|
|
import { contactQueryByCategoryIdsAPI } from '@/api/saleManage/contact';
|
|
|
import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
|
|
|
import timeDialog from '@/components/timeDialog/index.vue';
|
|
|
@@ -1192,6 +1204,7 @@
|
|
|
levelList,
|
|
|
taskinstanceDialogFlag: false,
|
|
|
allPrice: 0,
|
|
|
+ allQuantity: 0,
|
|
|
numberReg,
|
|
|
defaultForm,
|
|
|
form: {
|
|
|
@@ -1221,13 +1234,6 @@
|
|
|
|
|
|
// 基础列定义
|
|
|
let baseColumns = [
|
|
|
- {
|
|
|
- width: 65,
|
|
|
- type: 'index',
|
|
|
- columnKey: 'index',
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
{
|
|
|
label: '选择',
|
|
|
width: 45,
|
|
|
@@ -1236,6 +1242,13 @@
|
|
|
align: 'center',
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
+ {
|
|
|
+ width: 65,
|
|
|
+ type: 'index',
|
|
|
+ columnKey: 'index',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
{
|
|
|
minWidth: 200,
|
|
|
prop: 'orderNo',
|
|
|
@@ -1441,6 +1454,14 @@
|
|
|
slot: 'productionRequirements',
|
|
|
isNone: !this.isProductionRequirements && this.quoteType === 2
|
|
|
},
|
|
|
+ {
|
|
|
+ minWidth: 280,
|
|
|
+ prop: 'cuttingLength',
|
|
|
+ label: '裁线米段',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'cuttingLength',
|
|
|
+ isNone: this.quoteType === 2
|
|
|
+ },
|
|
|
{
|
|
|
width: 200,
|
|
|
prop: 'productCategoryName',
|
|
|
@@ -1546,6 +1567,14 @@
|
|
|
align: 'center',
|
|
|
isNone: this.quoteType === 2
|
|
|
},
|
|
|
+ {
|
|
|
+ width: 120,
|
|
|
+ prop: 'warehouseName',
|
|
|
+ label: '仓库名称',
|
|
|
+ slot: 'warehouseName',
|
|
|
+ align: 'center',
|
|
|
+ isNone: this.quoteType === 2
|
|
|
+ },
|
|
|
{
|
|
|
width: 120,
|
|
|
prop: 'availableCountBase',
|
|
|
@@ -2028,6 +2057,7 @@
|
|
|
|
|
|
changeAll() {
|
|
|
this.allPrice = getAllPrice(this.form.datasource) || 0;
|
|
|
+ this.allQuantity = getAllQuantity(this.form.datasource, this.countObj) || 0;
|
|
|
this.form.discountTotalPrice = getAllDiscountPrice(this.form.datasource) || 0;
|
|
|
if (this.isDiscountTotalPrice) {
|
|
|
this.form.discountTotalPrice = this.form.discountTotalPrice;
|
|
|
@@ -2213,7 +2243,7 @@
|
|
|
|
|
|
let codeList = this.form.datasource
|
|
|
.filter((item) => item.productCode)
|
|
|
- .map((item) => item.productCode);
|
|
|
+ .map((item) => item.batchNo ? [item.productCode, item.batchNo].join(',') : item.productCode);
|
|
|
//获取仓库库存
|
|
|
let inventoryTotalList = await getInventoryTotalAPI(codeList);
|
|
|
this.form.datasource
|
|
|
@@ -2221,7 +2251,7 @@
|
|
|
.forEach((item, index) => {
|
|
|
let find =
|
|
|
inventoryTotalList.find(
|
|
|
- (key) => key.code == item.productCode
|
|
|
+ (key) => (key.code + ',' + key.batchNo == item.productCode+','+item.batchNo)
|
|
|
) || {};
|
|
|
this.form.datasource;
|
|
|
this.$set(
|
|
|
@@ -2234,6 +2264,7 @@
|
|
|
this.changeCount();
|
|
|
} else {
|
|
|
this.allPrice = data.totalAmount || data?.contractVO?.totalPrice;
|
|
|
+ this.allQuantity = getAllQuantity(this.form.datasource, this.countObj);
|
|
|
}
|
|
|
|
|
|
if (this.isDiscountTotalPrice) {
|
|
|
@@ -2424,6 +2455,8 @@
|
|
|
this.$set(parasm, 'productCode', item.productCode);
|
|
|
this.$set(parasm, 'productName', item.productName);
|
|
|
this.$set(parasm, 'modelType', item.categoryModel);
|
|
|
+ this.$set(parasm, 'warehouseId', item.warehouseId);
|
|
|
+ this.$set(parasm, 'warehouseName', item.warehouseName);
|
|
|
this.$set(parasm, 'availableCountBase', item.measureQuantity);
|
|
|
this.$set(parasm, 'measuringUnit', item.measuringUnit);
|
|
|
this.$set(parasm, 'specification', item.specification);
|