Browse Source

新增开单和录单字段

dev-xx
qb 5 months ago
parent
commit
b6fb2e0aba
  1. 10
      src/option/waybill/WaybillOrderList.js
  2. 207
      src/views/distribution/inventory/BookingNote.vue
  3. 172
      src/views/distribution/inventory/CreateOrder.vue
  4. 172
      src/views/waybill/CreateZeroOrder.vue

10
src/option/waybill/WaybillOrderList.js

@ -348,7 +348,7 @@ export const columnList = [
},
{
prop: 'handlingFee',
label: '装卸费',
label: '仓储操作费',
type: 1,
values: '',
width: '130',
@ -357,9 +357,9 @@ export const columnList = [
isshowSummary: true,
sortable: true,
},
/* {
prop: 'carrierName',
label: '其它费用',
{
prop: 'sortingFee',
label: '仓储分拣费',
type: 1,
values: '',
width: '130',
@ -367,7 +367,7 @@ export const columnList = [
fixed: false,
isshowSummary: true,
sortable: true,
}, */
},
/* {
prop: 'carrierName',
label: '报价费',

207
src/views/distribution/inventory/BookingNote.vue

@ -381,17 +381,28 @@
</el-row>
<el-row>
<el-form-item label="装卸费:">
<el-form-item label="仓储操作费:">
<el-input-number
readonly
:value-on-clear="0"
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.handlingFee"
></el-input-number>
</el-form-item>
<el-form-item label="仓储分拣费:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.sortingFee"
:value-on-clear="0"
></el-input-number>
</el-form-item>
<el-form-item label="其它费用:">
<el-input-number
readonly
@ -599,17 +610,29 @@
</el-row>
<el-row>
<el-form-item label="装卸费:">
<el-form-item label="仓储操作费:">
<el-input-number
readonly
:value-on-clear="0"
:controls="false"
:precision="2"
:min="0"
:step="0.1"
controls-position="right"
v-model="query.handlingFee"
></el-input-number>
</el-form-item>
<el-form-item label="仓储分拣费:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.sortingFee"
:value-on-clear="0"
></el-input-number>
</el-form-item>
<el-form-item label="其它费用:">
<el-input-number
readonly
@ -1141,178 +1164,6 @@ const details = reactive<any>({
TransactionColumnList: deepClone(TransactionColumnList),
/** 页面表单数据 */
pageInfo: {},
info: {
/** 支付字典 */
payOption: [
{
label: '现金',
value: 1,
},
{
label: '银行卡',
value: 2,
},
{
label: '微信',
value: 3,
},
{
label: '支付宝',
value: 4,
},
{
label: '支票',
value: 5,
},
{
label: '账本',
value: 6,
},
],
/** 开单付款字典 */
paymentOption: [
{
label: '现付',
value: 1,
},
{
label: '到付',
value: 2,
},
{
label: '月结',
value: 3,
},
{
label: '回付',
value: 4,
},
{
label: '内部结算',
value: 5,
},
{
label: '多笔付',
value: 6,
},
],
/** 紧急度 */
emergencyOption: [
{
label: '正常',
value: 1,
},
{
label: '急',
value: 2,
},
{
label: '特急',
value: 3,
},
{
label: '加急',
value: 4,
},
],
/** 送货方式字典 */
shippingOption: [
{
label: '自提',
value: 1,
},
{
label: '送货',
value: 2,
},
{
label: '送货上门',
value: 3,
},
{
label: '送货上门(有电梯)',
value: 4,
},
{
label: '送货上门(无电梯)',
value: 5,
},
{
label: '送货卸货',
value: 6,
},
{
label: '送货安装',
value: 7,
},
],
/** 开单回单方式 */
receiptOption: [
{
label: '签回单',
value: 1,
},
{
label: '打收条',
value: 2,
},
{
label: '签信封',
value: 3,
},
{
label: '签回单盖章',
value: 4,
},
{
label: '1份回单',
value: 5,
},
{
label: '2份回单',
value: 6,
},
{
label: '3份回单',
value: 7,
},
{
label: '4份回单',
value: 8,
},
{
label: '5份回单',
value: 9,
},
],
/** 运输方式 */
transportationOption: [
{
label: '公路快运',
value: 1,
},
{
label: '海运',
value: 2,
},
{
label: '卡车航班',
value: 3,
},
{
label: '空运',
value: 4,
},
{
label: '普通汽班',
value: 5,
},
{
label: '快递',
value: 6,
},
],
},
/** 合计 */
totalObj: {
/** 总件数 */

172
src/views/distribution/inventory/CreateOrder.vue

@ -791,7 +791,7 @@
</el-row>
<el-row>
<el-form-item label="装卸费:">
<el-form-item label="仓储操作费:">
<el-input-number
:controls="false"
controls-position="right"
@ -802,6 +802,19 @@
:value-on-clear="0"
></el-input-number>
</el-form-item>
<el-form-item label="仓储分拣费:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.sortingFee"
:value-on-clear="0"
></el-input-number>
</el-form-item>
<el-form-item label="其它费用:">
<el-input-number
:controls="false"
@ -1562,8 +1575,10 @@ const details = reactive<any>({
warehouseManagementFee: 0,
/** 仓储费 */
storageFee: 0,
/** 装卸费 */
/** 仓储操作费 */
handlingFee: 0,
/** 仓储分拣费 */
sortingFee: 0,
/** 其他费 */
otherFee: 0,
/** 保价费 */
@ -1999,6 +2014,7 @@ const totalCost = computed(() => {
.next('+', details.query.warehouseManagementFee || 0)
.next('+', details.query.storageFee || 0)
.next('+', details.query.handlingFee || 0)
.next('+', details.query.sortingFee || 0)
.next('+', details.query.otherFee || 0)
.next('+', details.query.insuranceFee || 0)
.next('+', details.query.installFee || 0)
@ -2765,7 +2781,9 @@ const handleComputed = (row: any, onlyComputedTrunline = false) => {
const _trunklineKey = typeArr[row.chargeType];
const _pickupKey = typeArr[row.systemPickupChargeType];
const _dispatchKey = typeArr[row.systemDeliveryChargeType];
const _warehouseKey = typeArr[row.warehouseManagementType];
const _warehouseManagementKey = typeArr[row.warehouseManagementType];
const _warehouseHandlingKey = typeArr[row.warehouseHandlingType];
const _warehouseSortingKey = typeArr[row.warehouseSortingType];
// 线 --
if (_trunklineKey)
@ -2786,9 +2804,22 @@ const handleComputed = (row: any, onlyComputedTrunline = false) => {
// ? computeNumber(row.deliveryPrice || 0, '*', row[_dispatchKey]).result
// : 0;
if (_warehouseKey)
row.subtotalWarehouseManagement = _warehouseKey
? computeNumber(row.warehouseManagementPrice || 0, '*', row[_warehouseKey]).result
if (_warehouseManagementKey)
// --
row.subtotalWarehouseManagement = _warehouseManagementKey
? computeNumber(row.warehouseManagementPrice || 0, '*', row[_warehouseManagementKey]).result
: 0;
if (_warehouseHandlingKey)
// --
row.subtotalWarehouseHandlingFee = _warehouseHandlingKey
? computeNumber(row.warehouseHandlingPrice || 0, '*', row[_warehouseHandlingKey]).result
: 0;
if (_warehouseSortingKey)
// --
row.subtotalWarehouseSortingFee = _warehouseSortingKey
? computeNumber(row.warehouseSortingPrice || 0, '*', row[_warehouseSortingKey]).result
: 0;
console.log('row :>> ', row);
}
@ -3267,6 +3298,32 @@ const handleWarehouseManagement = () => {
details.query.warehouseManagementFee = _total;
};
/** 处理仓储操作费 */
const handleWarehouseHandlingFee = () => {
let _total = 0;
for (let i = 0; i < details.goodsList.length; i++) {
const value = details.goodsList[i];
_total = computeNumber(_total, '+', value.subtotalWarehouseHandlingFee || 0).result;
}
details.query.handlingFee = _total;
};
/** 处理仓储分拣费 */
const handleWarehouseSortingFee = () => {
let _total = 0;
for (let i = 0; i < details.goodsList.length; i++) {
const value = details.goodsList[i];
_total = computeNumber(_total, '+', value.subtotalWarehouseSortingFee || 0).result;
}
details.query.sortingFee = _total;
};
/** 处理模板费用 -- 计算 */
const handlePrice = (isAll = false, type) => {
const { dispatch, pickup, template, trunkLine } = details.priceTemplate;
@ -3282,6 +3339,10 @@ const handlePrice = (isAll = false, type) => {
(isAll || type === 'dispatch') && handleDispatchPrice(dispatch, template);
/** 处理仓库管理费 */
(isAll || type === 'warehouseMangement') && handleWarehouseManagement();
/** 处理仓储操作费 */
(isAll || type === 'warehousehandling') && handleWarehouseHandlingFee();
/** 处理仓储分拣费 */
(isAll || type === 'warehouseSorting') && handleWarehouseSortingFee();
};
/** 重置值 */
@ -4248,6 +4309,92 @@ const handleAssignmentItemPriceWarehouseManagementPrice = (value, warehouse, tem
}
};
/** 仓储管理价格赋值 */
const handleAssignmentItemPriceWarehouseHandingPrice = (value, warehouse, template) => {
if (!template || !template.warehouseIsAddFee || !template.warehouseIsManageFee) {
value.warehouseHandlingPrice = 0;
value.warehouseHandlingType = 1;
return;
}
value.warehouseHandlingType = Number(template.warehousePricingType);
const { additionalCategory } = warehouse;
if (template.warehouseIsCategorySubjoin) {
// id
if (!value.goodsId) value.warehouseHandlingPrice = 0;
else {
let _item: any = {};
if (getObjType(additionalCategory) === 'array') {
for (let j = 0; j < additionalCategory.length; j++) {
const item = additionalCategory[j];
if (item.categoryId !== value.goodsId) continue;
_item = item;
value.warehouseHandlingPrice = _item.operatePrice;
return;
}
}
//
value.warehouseHandlingPrice = 0;
}
} else {
// --
value.warehouseHandlingPrice =
getObjType(additionalCategory) === 'array' && additionalCategory.length > 0
? additionalCategory[0].operatePrice || 0
: 0;
}
};
/** 仓储管理价格赋值 */
const handleAssignmentItemPriceWarehouseSortingPrice = (value, warehouse, template) => {
if (!template || !template.warehouseIsAddFee || !template.warehouseIsManageFee) {
value.warehouseSortingPrice = 0;
value.warehouseSortingType = 1;
return;
}
value.warehouseSortingType = Number(template.warehousePricingType);
const { additionalCategory } = warehouse;
if (template.warehouseIsCategorySubjoin) {
// id
if (!value.goodsId) value.warehouseSortingPrice = 0;
else {
let _item: any = {};
if (getObjType(additionalCategory) === 'array') {
for (let j = 0; j < additionalCategory.length; j++) {
const item = additionalCategory[j];
if (item.categoryId !== value.goodsId) continue;
_item = item;
value.warehouseSortingPrice = _item.warehouseSortPrice;
return;
}
}
//
value.warehouseSortingPrice = 0;
}
} else {
// --
value.warehouseSortingPrice =
getObjType(additionalCategory) === 'array' && additionalCategory.length > 0
? additionalCategory[0].warehouseSortPrice || 0
: 0;
}
};
/**
* isOnload 是否为初始化价格赋值, 初始化不赋值干线单价以及计算价格
*/
@ -4284,9 +4431,18 @@ const handleAssignmentItemPrice = (value, isOnload = false, chargeType?: number
}
//
if (warehouse && template)
if (warehouse && template) {
//
handleAssignmentItemPriceWarehouseManagementPrice(value, warehouse, template);
else value.warehouseManagementPrice = 0;
//
handleAssignmentItemPriceWarehouseHandingPrice(value, warehouse, template);
//
handleAssignmentItemPriceWarehouseSortingPrice(value, warehouse, template);
} else {
value.warehouseManagementPrice = 0;
value.warehouseHandlingPrice = 0;
value.warehouseSortingPrice = 0;
}
//
if (!isOnload) handleComputed(value);

172
src/views/waybill/CreateZeroOrder.vue

@ -717,7 +717,7 @@
</el-row>
<el-row>
<el-form-item label="装卸费:">
<el-form-item label="仓储操作费:">
<el-input-number
:value-on-clear="0"
:controls="false"
@ -727,6 +727,19 @@
v-model="query.handlingFee"
></el-input-number>
</el-form-item>
<el-form-item label="仓储分拣费:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.sortingFee"
:value-on-clear="0"
></el-input-number>
</el-form-item>
<el-form-item label="其它费用:">
<el-input-number
:value-on-clear="0"
@ -1216,8 +1229,10 @@ const details = reactive<any>({
warehouseManagementFee: 0,
/** 仓储费 */
storageFee: 0,
/** 装卸费 */
/** 仓储操作费 */
handlingFee: 0,
/** 仓储分拣费 */
sortingFee: 0,
/** 其他费 */
otherFee: 0,
/** 保价费 */
@ -1634,6 +1649,7 @@ const totalCost = computed(() => {
.next('+', details.query.warehouseManagementFee || 0)
.next('+', details.query.storageFee || 0)
.next('+', details.query.handlingFee || 0)
.next('+', details.query.sortingFee || 0)
.next('+', details.query.otherFee || 0)
.next('+', details.query.insuranceFee || 0)
.next('+', details.query.rebate || 0)
@ -2092,7 +2108,9 @@ const handleComputed = (row: any, onlyComputedTrunline = false) => {
const _trunklineKey = typeArr[row.chargeType];
const _pickupKey = typeArr[row.systemPickupChargeType];
const _dispatchKey = typeArr[row.systemDeliveryChargeType];
const _warehouseKey = typeArr[row.warehouseManagementType];
const _warehouseManagementKey = typeArr[row.warehouseManagementType];
const _warehouseHandlingKey = typeArr[row.warehouseHandlingType];
const _warehouseSortingKey = typeArr[row.warehouseSortingType];
// 线 --
if (_trunklineKey)
@ -2113,9 +2131,22 @@ const handleComputed = (row: any, onlyComputedTrunline = false) => {
? computeNumber(row.deliveryPrice || 0, '*', row[_dispatchKey]).result
: 0;
if (_warehouseKey)
row.subtotalWarehouseManagement = _warehouseKey
? computeNumber(row.warehouseManagementPrice || 0, '*', row[_warehouseKey]).result
if (_warehouseManagementKey)
// --
row.subtotalWarehouseManagement = _warehouseManagementKey
? computeNumber(row.warehouseManagementPrice || 0, '*', row[_warehouseManagementKey]).result
: 0;
if (_warehouseHandlingKey)
// --
row.subtotalWarehouseHandlingFee = _warehouseHandlingKey
? computeNumber(row.warehouseHandlingPrice || 0, '*', row[_warehouseHandlingKey]).result
: 0;
if (_warehouseSortingKey)
// --
row.subtotalWarehouseSortingFee = _warehouseSortingKey
? computeNumber(row.warehouseSortingPrice || 0, '*', row[_warehouseSortingKey]).result
: 0;
console.log('row :>> ', row);
}
@ -2510,6 +2541,32 @@ const handleWarehouseManagement = () => {
details.query.warehouseManagementFee = _total;
};
/** 处理仓储操作费 */
const handleWarehouseHandlingFee = () => {
let _total = 0;
for (let i = 0; i < details.goodsList.length; i++) {
const value = details.goodsList[i];
_total = computeNumber(_total, '+', value.subtotalWarehouseHandlingFee || 0).result;
}
details.query.handlingFee = _total;
};
/** 处理仓储分拣费 */
const handleWarehouseSortingFee = () => {
let _total = 0;
for (let i = 0; i < details.goodsList.length; i++) {
const value = details.goodsList[i];
_total = computeNumber(_total, '+', value.subtotalWarehouseSortingFee || 0).result;
}
details.query.sortingFee = _total;
};
/** 处理模板费用 */
const handlePrice = (isAll = false, type) => {
const { dispatch, pickup, template, trunkLine } = details.priceTemplate;
@ -2522,6 +2579,10 @@ const handlePrice = (isAll = false, type) => {
(isAll || type === 'dispatch') && handleDispatchPrice(dispatch, template);
/** 处理仓库管理费 */
(isAll || type === 'warehouseMangement') && handleWarehouseManagement();
/** 处理仓储操作费 */
(isAll || type === 'warehousehandling') && handleWarehouseHandlingFee();
/** 处理仓储分拣费 */
(isAll || type === 'warehouseSorting') && handleWarehouseSortingFee();
};
/** 重置值 */
@ -3378,6 +3439,92 @@ const handleAssignmentItemPriceWarehouseManagementPrice = (value, warehouse, tem
}
};
/** 仓储管理价格赋值 */
const handleAssignmentItemPriceWarehouseHandingPrice = (value, warehouse, template) => {
if (!template || !template.warehouseIsAddFee || !template.warehouseIsManageFee) {
value.warehouseHandlingPrice = 0;
value.warehouseHandlingType = 1;
return;
}
value.warehouseHandlingType = Number(template.warehousePricingType);
const { additionalCategory } = warehouse;
if (template.warehouseIsCategorySubjoin) {
// id
if (!value.goodsId) value.warehouseHandlingPrice = 0;
else {
let _item: any = {};
if (getObjType(additionalCategory) === 'array') {
for (let j = 0; j < additionalCategory.length; j++) {
const item = additionalCategory[j];
if (item.categoryId !== value.goodsId) continue;
_item = item;
value.warehouseHandlingPrice = _item.operatePrice;
return;
}
}
//
value.warehouseHandlingPrice = 0;
}
} else {
// --
value.warehouseHandlingPrice =
getObjType(additionalCategory) === 'array' && additionalCategory.length > 0
? additionalCategory[0].operatePrice || 0
: 0;
}
};
/** 仓储管理价格赋值 */
const handleAssignmentItemPriceWarehouseSortingPrice = (value, warehouse, template) => {
if (!template || !template.warehouseIsAddFee || !template.warehouseIsManageFee) {
value.warehouseSortingPrice = 0;
value.warehouseSortingType = 1;
return;
}
value.warehouseSortingType = Number(template.warehousePricingType);
const { additionalCategory } = warehouse;
if (template.warehouseIsCategorySubjoin) {
// id
if (!value.goodsId) value.warehouseSortingPrice = 0;
else {
let _item: any = {};
if (getObjType(additionalCategory) === 'array') {
for (let j = 0; j < additionalCategory.length; j++) {
const item = additionalCategory[j];
if (item.categoryId !== value.goodsId) continue;
_item = item;
value.warehouseSortingPrice = _item.warehouseSortPrice;
return;
}
}
//
value.warehouseSortingPrice = 0;
}
} else {
// --
value.warehouseSortingPrice =
getObjType(additionalCategory) === 'array' && additionalCategory.length > 0
? additionalCategory[0].warehouseSortPrice || 0
: 0;
}
};
/**
* isOnload 是否为初始化价格赋值, 初始化不赋值干线单价以及计算价格
*/
@ -3410,9 +3557,18 @@ const handleAssignmentItemPrice = (value, isOnload = false, chargeType?: number
console.log('warehouse :>> ', warehouse);
//
if (warehouse && template)
if (warehouse && template) {
//
handleAssignmentItemPriceWarehouseManagementPrice(value, warehouse, template);
else value.warehouseManagementPrice = 0;
//
handleAssignmentItemPriceWarehouseHandingPrice(value, warehouse, template);
//
handleAssignmentItemPriceWarehouseSortingPrice(value, warehouse, template);
} else {
value.warehouseManagementPrice = 0;
value.warehouseHandlingPrice = 0;
value.warehouseSortingPrice = 0;
}
//
if (!isOnload) handleComputed(value);

Loading…
Cancel
Save