Browse Source

优化开单,修复部分bug

dev
qb 4 months ago
parent
commit
e115cd1fa8
  1. 8
      src/option/waybill/TemporaryStorageList.js
  2. 88
      src/views/distribution/inventory/CreateOrder.vue
  3. 6
      src/views/finance/ReconciliationDepositSlip.vue

8
src/option/waybill/TemporaryStorageList.js

@ -670,9 +670,9 @@ export const packageColumnList = [
head: false,
},
{
prop: 'volume',
prop: 'confirmVolume',
label: '方数',
type: 2,
type: 13,
values: '',
width: '150',
checkarr: [],
@ -681,9 +681,9 @@ export const packageColumnList = [
head: false,
},
{
prop: 'weight',
prop: 'confirmWeight',
label: '重量',
type: 2,
type: 13,
values: '',
width: '150',
checkarr: [],

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

@ -1165,7 +1165,25 @@
:isShowRefresh="false"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '是否维护'">
<template v-if="slotProps.scope.column.label === '方数'">
<el-input-number
:controls="false"
v-model="slotProps.scope.row.confirmVolume"
:precision="4"
:value-on-clear="0"
/>
</template>
<template v-else-if="slotProps.scope.column.label === '重量'">
<el-input-number
:controls="false"
v-model="slotProps.scope.row.confirmWeight"
:precision="3"
:value-on-clear="0"
/>
</template>
<template v-else-if="slotProps.scope.column.label === '是否维护'">
<el-tag
:class="{
red: slotProps.scope.row.MaintenanceOrNot === '否',
@ -2091,6 +2109,33 @@ getList({}).then(res => {
});
});
/** 初始化包件数据 */
const initPackage = element => {
element.MaintenanceOrNot = element.incomeCategoryId ? '是' : '否';
//
element.confirmIncomeCategoryName = element.incomeCategoryName || '其它';
element.confirmIncomeCategoryId = element.incomeCategoryId || '';
element.incomeCategoryName = element.incomeCategoryName || '其它';
element.incomeCategory = element.incomeCategoryName || '其它';
element.incomeCategoryId = element.incomeCategoryId || '';
//
element.confirmCostCategoryName = element.costCategoryName || '其它';
element.confirmCostCategoryId = element.costCategoryId || '';
element.costCategoryName = element.costCategoryName || '其它';
element.costCategory = element.costCategoryName || '其它';
element.costCategoryId = element.costCategoryId || '';
element.volume = isNumber(element.volume) ? Number(element.volume) : 0;
element.confirmVolume = element.volume; //
element.initVolume = element.volume; //
element.weight = isNumber(element.weight) ? Number(element.weight) : 0;
element.confirmWeight = element.weight; //
element.initWeight = element.weight; //
};
/** 初始化获取暂存单转运单信息 */
const onLoad = async (idsArr = []) => {
try {
@ -2191,6 +2236,8 @@ const onLoad = async (idsArr = []) => {
val.chargeType = val.chargeType || 1;
val.goodsListOptions = [];
val.goodsId = val.goodsId || '';
//
handleComputed(val);
//
@ -2228,21 +2275,7 @@ const onLoad = async (idsArr = []) => {
for (let i = 0; i < details.package.data.length; i++) {
const element = details.package.data[i];
element.MaintenanceOrNot = element.incomeCategoryId ? '是' : '否';
//
element.confirmIncomeCategoryName = element.incomeCategoryName || '其它';
element.confirmIncomeCategoryId = element.incomeCategoryId || '';
element.incomeCategoryName = element.incomeCategoryName || '其它';
element.incomeCategory = element.incomeCategoryName || '其它';
element.incomeCategoryId = element.incomeCategoryId || '';
//
element.confirmCostCategoryName = element.costCategoryName || '其它';
element.confirmCostCategoryId = element.costCategoryId || '';
element.costCategoryName = element.costCategoryName || '其它';
element.costCategory = element.costCategoryName || '其它';
element.costCategoryId = element.costCategoryId || '';
initPackage(element);
!element.incomeCategoryId && (_flag = true);
}
@ -2402,23 +2435,13 @@ const onEditLoad = async () => {
for (let i = 0; i < details.package.data.length; i++) {
const element = details.package.data[i];
element.MaintenanceOrNot = element.incomeCategoryId ? '是' : '否';
initPackage(element);
//
element.confirmIncomeCategoryName = element.incomeCategoryName || '其它';
element.confirmIncomeCategoryId = element.incomeCategoryId || '';
element.cloneIncomeCategoryId = element.incomeCategoryId || ''; // , confirmIncomeCategoryId
element.incomeCategoryName = element.incomeCategoryName || '其它';
element.incomeCategory = element.incomeCategoryName || '其它';
element.incomeCategoryId = element.incomeCategoryId || '';
//
element.confirmCostCategoryName = element.costCategoryName || '其它';
element.confirmCostCategoryId = element.costCategoryId || '';
element.cloneCostCategoryId = element.costCategoryId || ''; // , confirmCostCategoryId
element.costCategoryName = element.costCategoryName || '其它';
element.costCategory = element.costCategoryName || '其它';
element.costCategoryId = element.costCategoryId || '';
!element.incomeCategoryId && (_flag = true);
}
@ -3902,7 +3925,9 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
if (
value.cloneCostCategoryId === value.confirmCostCategoryId &&
value.cloneIncomeCategoryId === value.confirmIncomeCategoryId
value.cloneIncomeCategoryId === value.confirmIncomeCategoryId &&
value.initVolume === value.volume &&
value.initWeight === value.weight
)
continue;
@ -3912,6 +3937,8 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
incomeCategoryName: value.confirmIncomeCategoryName,
costCategoryId: value.confirmCostCategoryId,
costCategoryName: value.confirmCostCategoryName,
weight: value.weight,
volume: value.volume,
};
submitData.updateAdvanceDetailList.push(_obj);
@ -4750,10 +4777,15 @@ const handleClearPackageQuery = () => {
/** 确认包件结算品类弹窗 */
const handleSubmitPackage = () => {
console.log('details.goodsList :>> ', details.goodsList);
const _goodsArr = [];
for (let i = 0; i < details.package.data.length; i++) {
const value = details.package.data[i];
console.log('value :>> ', value);
value.weight = value.confirmWeight;
value.volume = value.confirmVolume;
// if (!value.incomeCategoryId) return ElMessage.error('');
value.confirmCostCategoryId = value.costCategoryId;

6
src/views/finance/ReconciliationDepositSlip.vue

@ -109,7 +109,7 @@
icon="Stamp"
@click="handleBatchSettle"
>
批量结算
批量确认收款
</el-button>
<!-- 导出 -->
@ -615,9 +615,9 @@ const handleFullScrean = (_type: 'open' | 'close', _name: string) => {
/** 批量结算 */
const handleBatchSettle = () => {
try {
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要结算的数据');
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要确认的数据');
ElMessageBox.confirm('是否批量结算?', '提示', {
ElMessageBox.confirm('是否批量确认收款?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',

Loading…
Cancel
Save