|
|
@@ -9,6 +9,7 @@
|
|
|
max-height="300"
|
|
|
@columns-change="handleColumnChange"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
+ :selection.sync="selection"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
@@ -52,6 +53,18 @@
|
|
|
>
|
|
|
保存
|
|
|
</el-button>
|
|
|
+ <setAllValue
|
|
|
+ :disabled="!selection.length"
|
|
|
+ title="客户期望交期"
|
|
|
+ @success="setAllValueChange"
|
|
|
+ valueKey="customerExpectDeliveryDeadline"
|
|
|
+ />
|
|
|
+ <setAllValue
|
|
|
+ :disabled="!selection.length"
|
|
|
+ title="生产交付交期"
|
|
|
+ valueKey="produceDeliveryDeadline"
|
|
|
+ @success="setAllValueChange"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="pricebox">
|
|
|
<span class="amount">总计:{{ allPrice }}元</span>
|
|
|
@@ -317,9 +330,8 @@
|
|
|
}"
|
|
|
>
|
|
|
<el-input
|
|
|
- v-model="scope.row.singlePrice"
|
|
|
+ v-model.number="scope.row.singlePrice"
|
|
|
placeholder="请输入"
|
|
|
- type="number"
|
|
|
@input="changeCount(scope.row, scope.$index)"
|
|
|
>
|
|
|
<template slot="append">元</template>
|
|
|
@@ -363,7 +375,9 @@
|
|
|
}}</span>
|
|
|
</template>
|
|
|
<template v-slot:headerCustomerExpectDeliveryDeadline="{ column }">
|
|
|
- <span class="is-required">{{ column.label }}</span>
|
|
|
+ <span :class="isDate == 1 ? 'is-required' : ''">{{
|
|
|
+ column.label
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:technicalAnswerName="{ row, $index }">
|
|
|
@@ -428,15 +442,16 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template v-slot:headerProduceDeliveryDeadline="{ column }">
|
|
|
- <span :class="isProduceDeliveryDeadline ? 'is-required' : ''">{{
|
|
|
- column.label
|
|
|
- }}</span>
|
|
|
+ <span
|
|
|
+ :class="isProduceDeliveryDeadline && isDate == 1 ? 'is-required' : ''"
|
|
|
+ >{{ column.label }}</span
|
|
|
+ >
|
|
|
</template>
|
|
|
<template v-slot:produceDeliveryDeadline="scope">
|
|
|
<el-form-item
|
|
|
:prop="'datasource.' + scope.$index + '.produceDeliveryDeadline'"
|
|
|
:rules="{
|
|
|
- required: isProduceDeliveryDeadline ? true : false,
|
|
|
+ required: isProduceDeliveryDeadline && isDate == 1 ? true : false,
|
|
|
message: '选择生产交付交期',
|
|
|
trigger: 'change'
|
|
|
}"
|
|
|
@@ -457,7 +472,7 @@
|
|
|
<el-form-item
|
|
|
v-if="scope.row.arrivalWay == 1"
|
|
|
:rules="{
|
|
|
- required: true,
|
|
|
+ required: isDate == 1 ? true : false,
|
|
|
message:
|
|
|
contractBookType == 1 ? '请选择客户期望交期' : '请选择交付日期',
|
|
|
trigger: 'change'
|
|
|
@@ -762,11 +777,15 @@
|
|
|
import timeDialog from '@/components/timeDialog/index.vue';
|
|
|
import { copyObj } from '@/utils/util';
|
|
|
import selectStockLedgerDialog from '@/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue'; //库存台账
|
|
|
+ import setAllValue from '@/BIZComponents/setAllValue.vue'; //批量修改
|
|
|
+
|
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
import commodityPriceListDialog from '@/views/commodityManagement/commodityPriceList/components/commodityPriceListDialog.vue';
|
|
|
const dayjs = require('dayjs');
|
|
|
import { levelList } from '@/enum/dict.js';
|
|
|
import { getGoodsPriceByCondition } from '@/api/goodsManage/index';
|
|
|
+ import { parameterGetByCode } from '@/api/main/index.js';
|
|
|
+
|
|
|
export default {
|
|
|
mixins: [dictMixins, tabMixins],
|
|
|
components: {
|
|
|
@@ -778,7 +797,8 @@
|
|
|
taskinstanceDialog,
|
|
|
timeDialog,
|
|
|
selectStockLedgerDialog,
|
|
|
- commodityPriceListDialog
|
|
|
+ commodityPriceListDialog,
|
|
|
+ setAllValue
|
|
|
},
|
|
|
props: {
|
|
|
pageName: {
|
|
|
@@ -928,6 +948,7 @@
|
|
|
datasource: [],
|
|
|
discountTotalPrice: 0
|
|
|
},
|
|
|
+ isDate: 1,
|
|
|
pricingWayList,
|
|
|
curIndex: '',
|
|
|
rules: {},
|
|
|
@@ -936,7 +957,8 @@
|
|
|
{ label: '一次性到货', value: 1 },
|
|
|
{ label: '分批到货', value: 2 }
|
|
|
],
|
|
|
- columnsVersion: 1
|
|
|
+ columnsVersion: 1,
|
|
|
+ selection: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -967,6 +989,14 @@
|
|
|
align: 'center',
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '选择',
|
|
|
+ width: 45,
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
orderColumn,
|
|
|
{
|
|
|
width: 280,
|
|
|
@@ -1361,6 +1391,13 @@
|
|
|
this.requestDict('保质期单位');
|
|
|
this.requestDict('产地');
|
|
|
this.requestDict('商品价格类型');
|
|
|
+ parameterGetByCode({
|
|
|
+ code: 'eom_inventoryTable_customerExpectDeliveryDeadline'
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.value) {
|
|
|
+ this.isDate = res.value;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
packingChange(item, index) {
|
|
|
@@ -1577,6 +1614,13 @@
|
|
|
this.$forceUpdate();
|
|
|
this.$refs.table.reRenderTable();
|
|
|
},
|
|
|
+ setAllValueChange({ key, value }) {
|
|
|
+ let indexS = this.selection.map((item) => item.key - 1);
|
|
|
+ indexS.forEach((i) => {
|
|
|
+ this.$set(this.form.datasource[i], key, value);
|
|
|
+ this.setDeliveryDays(this.form.datasource[i], i, 'guaranteePeriod');
|
|
|
+ });
|
|
|
+ },
|
|
|
//获取折让单价
|
|
|
getDiscountSinglePrice(row) {
|
|
|
let num =
|
|
|
@@ -1604,7 +1648,8 @@
|
|
|
if (productList) {
|
|
|
let supplierObj = await this.getSupplierObj(productList, 'productId');
|
|
|
|
|
|
- productList.forEach((item) => {
|
|
|
+ productList.forEach((item, index) => {
|
|
|
+ item['key'] = index + 1;
|
|
|
item.pricingWay =
|
|
|
item.pricingWay ||
|
|
|
data.pricingWay ||
|
|
|
@@ -1708,7 +1753,7 @@
|
|
|
let row = JSON.parse(JSON.stringify(this.defaultForm));
|
|
|
row.key = this.form.datasource.length + 1;
|
|
|
let parasm = idx == -1 ? row : this.form.datasource[i];
|
|
|
- console.log(this.defTaxRate,'this.defTaxRate')
|
|
|
+ console.log(this.defTaxRate, 'this.defTaxRate');
|
|
|
this.$set(parasm, 'taxRate', this.defTaxRate);
|
|
|
this.$set(parasm, 'productId', item.id);
|
|
|
this.$set(parasm, 'categoryName', item.name);
|
|
|
@@ -1725,6 +1770,23 @@
|
|
|
this.$set(parasm, 'singleWeight', item.netWeight);
|
|
|
this.$set(parasm, 'pricingWay', 1);
|
|
|
this.$set(parasm, 'goodsLevel', item.goodsLevel);
|
|
|
+ this.$set(parasm, 'guaranteePeriod', item.warrantyPeriod);
|
|
|
+ this.$set(
|
|
|
+ parasm,
|
|
|
+ 'guaranteePeriodUnitCode',
|
|
|
+ item.warrantyPeriodUnit ? item.warrantyPeriodUnit + '' : ''
|
|
|
+ );
|
|
|
+ if (item.warrantyPeriod && item.warrantyPeriodUnit) {
|
|
|
+ this.$set(
|
|
|
+ parasm,
|
|
|
+ 'guaranteePeriodDeadline',
|
|
|
+ this.setDay(
|
|
|
+ item.warrantyPeriod,
|
|
|
+ this.guaranteePeriodUnit(item.warrantyPeriodUnit),
|
|
|
+ {}
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
this.$set(
|
|
|
parasm,
|
|
|
'packageDispositionList',
|
|
|
@@ -1751,7 +1813,7 @@
|
|
|
this.$set(parasm, 'orderNo', this.orderOption[0]?.orderNo);
|
|
|
this.$set(parasm, 'orderId', this.orderOption[0]?.orderId);
|
|
|
}
|
|
|
- if (this.isGoods&&item.goodsId) {
|
|
|
+ if (this.isGoods && item.goodsId) {
|
|
|
this.$set(parasm, 'goodsId', item.goodsId);
|
|
|
this.$set(parasm, 'goodsPriceId', item.goodsPriceId);
|
|
|
this.$set(parasm, 'goodsPriceType', item.goodsPriceType);
|
|
|
@@ -1761,6 +1823,7 @@
|
|
|
this.$set(parasm, 'discountSinglePrice', item.singlePrice);
|
|
|
this.$set(parasm, 'totalCount', '');
|
|
|
}
|
|
|
+
|
|
|
if (this.isSupplier) {
|
|
|
this.$set(
|
|
|
parasm,
|