Browse Source

修复 部分bug

dev-xx
qb 9 months ago
parent
commit
ea8862739d
  1. 11
      src/api/distribution/truckLoadingDetails.js
  2. 10
      src/option/distribution/TripartiteTransfer.js
  3. 27
      src/option/distribution/addVehicleStowage.js
  4. 21
      src/views/distribution/artery/VehicleArrivalManagement.vue
  5. 27
      src/views/distribution/artery/VehicleStowage.vue
  6. 2
      src/views/distribution/artery/VehicleStowageDetails.vue
  7. 64
      src/views/distribution/artery/abnormalList.vue
  8. 42
      src/views/distribution/artery/truckLoadingDetails.vue

11
src/api/distribution/truckLoadingDetails.js

@ -88,3 +88,14 @@ export const postLoadingDetailExport = (data = {}) => {
responseType: 'blob',
});
};
/**
* 零担二维码
*/
export const postShowOrderCodeByCode = params => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/showOrderCodeByCode',
method: 'get',
params,
});
};

10
src/option/distribution/TripartiteTransfer.js

@ -468,6 +468,16 @@ export const detailsColumnList = [
fixed: false,
sortable: true,
},
{
prop: 'unloadNum',
label: '卸车数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'isDataName',
label: '有无数据',

27
src/option/distribution/addVehicleStowage.js

@ -1046,18 +1046,21 @@ export const detailsColumnList = [
isColumnMerge: true,
sortable: true,
},
// {
// prop: 'totalFee',
// label: '审核状态',
// type: 2,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// isshowSummary: true,
// isColumnMerge: true,
// sortable: true,
// },
{
prop: 'checkStatusName',
label: '审核状态',
type: 3,
values: '',
width: '130',
checkarr: [
{ label: '未审核', value: '0' },
{ label: '已审核', value: '1' },
],
fixed: false,
isshowSummary: true,
isColumnMerge: true,
sortable: true,
},
// {
// prop: 'freight',
// label: '作废运单号',

21
src/views/distribution/artery/VehicleArrivalManagement.vue

@ -592,6 +592,7 @@ import {
debounce,
handleClearTableQuery,
handleTranslationDataSeclect,
computeNumber,
} from '@/utils/util';
import { columnList } from '@/option/distribution/VehicleArrivalManagement';
import { packageColumnList } from '@/option/distribution/VehicleStowage';
@ -824,14 +825,20 @@ const onLoad = debounce(async (params = {}) => {
const { code, data } = res.data;
if (code !== 200) return;
details.data = data.records;
//
// const codes = details.carsStatus.map(val => val.value);
// for (let item of details.data) {
// const _index = codes.indexOf(Number(item.loadStatus));
// item.loadStatusName = _index !== -1 ? details.carsStatus[_index].label : '';
// item.NumberOfPiecesInTheCar = item.realLoadingNumber - item.unloadNumber;
// }
//
handleTranslationDataSeclect(details.data, details.columnList);
//
for (let i = 0; i < details.data.length; i++) {
const value = details.data[i];
value.NumberOfPiecesInTheCar = computeNumber(
value.realLoadingNumber || 0,
'-',
value.unloadNumber || 0
).result;
}
details.page.total = data.total;
} catch (error) {
console.log('error :>> ', error);

27
src/views/distribution/artery/VehicleStowage.vue

@ -539,6 +539,7 @@ import {
deepClone,
handleClearTableQuery,
handleTranslationDataSeclect,
computeNumber,
} from '@/utils/util';
import { columnList, packageColumnList } from '@/option/distribution/VehicleStowage';
import {
@ -767,23 +768,19 @@ const onLoad = debounce(async (params = {}) => {
if (code !== 200) return;
details.data = data.records;
//
handleTranslationDataSeclect(details.data, details.columnList);
// for (let item of details.data) {
// item.loadStatusName = item.loadStatusName = carStateDictionaries.find(
// val => Number(item.loadStatus) === val.value
// ).label;
// item.NumberOfPiecesInTheCar = item.realLoadingNumber - item.unloadNumber;
// for (let index = 0; index < details.selectionList.length; index++) {
// const element = details.selectionList[index];
// if (element.id === item.id) {
// details.selectionList.splice(index, 1, element);
// break;
// }
// }
// }
//
for (let i = 0; i < details.data.length; i++) {
const value = details.data[i];
value.NumberOfPiecesInTheCar = computeNumber(
value.realLoadingNumber || 0,
'-',
value.unloadNumber || 0
).result;
}
details.page.total = data.total;
} catch (error) {

2
src/views/distribution/artery/VehicleStowageDetails.vue

@ -465,6 +465,7 @@ import {
handleSelectQuery,
handleTimeQuery,
handleFilterData,
handleTranslationDataSeclect,
} from '@/utils/util';
import { detailsColumnList, nodeInfoColumnList } from '@/option/distribution/addVehicleStowage';
import { detailsColumnList as abnormalColumn } from '@/option/distribution/TripartiteTransfer';
@ -913,6 +914,7 @@ const handleData = async () => {
console.log('_data :>> ', _data);
details.renderData = _data;
handleTranslationDataSeclect(details.renderData, details.detailsColumnList);
console.log('details.renderData :>> ', details.renderData);
};

64
src/views/distribution/artery/abnormalList.vue

@ -15,37 +15,18 @@
<el-form-item label="运单号:" class="el-times">
<el-input v-model="query.stockupArea" clearable placeholder="请输入运单号"></el-input>
</el-form-item>
<el-form-item label="制单时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
/>
</el-form-item>
<el-form-item label="创建时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
<el-form-item label="仓库:" class="el-times">
<el-input
v-model="query.warehouseName"
clearable
/>
placeholder="请输入仓库名称"
></el-input>
</el-form-item>
<el-form-item label="送货时间:" class="el-times">
<el-form-item label="处理时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
v-model="query.dealDateArr"
type="daterange"
unlink-panels
range-separator="至"
@ -57,9 +38,9 @@
/>
</el-form-item>
<el-form-item label="签收时间:" class="el-times">
<el-form-item label="创建时间:" class="el-times">
<el-date-picker
v-model="stockupDate"
v-model="query.createDateArr"
type="daterange"
unlink-panels
range-separator="至"
@ -70,6 +51,7 @@
clearable
/>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item class="el-btn">
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
@ -146,9 +128,9 @@
<div class="flex-c-c mt20">
<el-button @click="details.popUpShow.abnormalVisited = false"> </el-button>
<el-button type="primary" icon="Delete" @click="handleDeleteOrder">无效包条</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleSynchronization"
>同步数据</el-button
>
<el-button type="primary" icon="el-icon-search" @click="handleSynchronization">
同步数据
</el-button>
</div>
</el-dialog>
@ -175,6 +157,7 @@ import {
getHtmls,
deepClone,
handleClearTableQuery,
getObjType,
} from '@/utils/util';
import { columnList } from '@/option/distribution/abnormalList';
import { useRouter } from 'vue-router';
@ -292,7 +275,23 @@ const onLoad = async (page?: any, params = {}) => {
let _page = details.page;
if (page) _page = page;
//
const res = await postFindPageList({ ..._page, ...details.query, ...params });
const submitData = { ..._page, ...details.query, ...params };
const { createDateArr, dealDateArr } = details.query;
if (getObjType(createDateArr) === 'array' && createDateArr.length > 0) {
submitData.createDateStartStr = details.query.createDateArr[0];
submitData.createDateEndStr = details.query.createDateArr[1];
}
if (getObjType(dealDateArr) === 'array' && dealDateArr.length > 0) {
submitData.dealDateStartStr = details.query.dealDateArr[0];
submitData.dealDateEndStr = details.query.dealDateArr[1];
}
delete submitData.createDateArr;
delete submitData.dealDateArr;
const res = await postFindPageList(submitData);
console.log('res :>> ', res);
const { code, data } = res.data;
if (code !== 200) return;
@ -314,6 +313,7 @@ const onLoad = async (page?: any, params = {}) => {
details.page.total = data.total;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.list = false;
}

42
src/views/distribution/artery/truckLoadingDetails.vue

@ -135,11 +135,11 @@
<template v-if="Number(slotProps.scope.row.type) === 2">
<el-text
type="text"
@click="handleZeroUnLoad(slotProps.scope)"
@click="() => handleZeroUnLoad(slotProps.scope)"
v-if="
permissionObj.truckLoadingDetails_zeroUnload &&
details.pageInfo.type !== 'VehicleStowage' &&
Number(slotProps.scope.row.scanStatus) === 1
Number(slotProps.scope.row.unloadCheck) === 0
"
>
零担卸车
@ -157,7 +157,8 @@
v-if="
permissionObj.truckLoadingDetails_packageUnload &&
details.pageInfo.type !== 'VehicleStowage' &&
Number(slotProps.scope.row.scanStatus) === 1
Number(slotProps.scope.row.scanStatus) === 1 &&
Number(slotProps.scope.row.unloadCheck) === 0
"
>
包件卸车
@ -297,6 +298,7 @@ import {
postRemoveCarsLoadScan,
postSignLoadScanByIds,
postLoadingDetailExport,
postShowOrderCodeByCode,
} from '@/api/distribution/truckLoadingDetails';
import {
postFindNextNodeList,
@ -854,22 +856,22 @@ const handleBatchUnLoad = async () => {
let isHaveAbnormalData = false;
for (const iterator of details.selectionList) {
if (Number(iterator.scanStatus) === 1) {
//
if (Number(iterator.type) === 1) {
//
if (Number(iterator.type) === 1) {
if (Number(iterator.scanStatus) === 1) {
_orderArr.push({ orderPackageCode: iterator.scanCode, carsLoadScanId: iterator.id });
} else {
_zeroArr.push({
waybillNo: iterator.waybillNo,
enterNum: iterator.num,
orderCode: iterator.orderCode,
});
}
} else {
_zeroArr.push({
waybillNo: iterator.waybillNo,
enterNum: iterator.num,
orderCode: iterator.orderCode,
});
}
//
if (!isHaveAbnormalData) {
isHaveAbnormalData = iterator.finalNodeId !== myWarehouseId;
}
//
if (!isHaveAbnormalData) {
isHaveAbnormalData = iterator.finalNodeId !== myWarehouseId;
}
}
@ -1160,7 +1162,7 @@ const handleZeroUnLoad = async ({ row }) => {
}
details.zeroItem = { ...row };
details.zeroItem.enterNum = row.num;
details.zeroItem.enterNum = !details.zeroItem.unloadNum ? row.num : details.zeroItem.unloadNum;
details.popUpShow.transferVisited = true;
};
@ -1179,7 +1181,7 @@ const handleZeroUnLoadSubmit = async () => {
unloadZeroList: [
{
waybillNo: details.zeroItem.waybillNo,
enterNum: details.zeroItem.num,
enterNum: details.zeroItem.enterNum,
orderCode: details.zeroItem.orderCode,
},
],
@ -1239,10 +1241,10 @@ const printOrderByZero = async ({ row }) => {
details.loadingObj.pageLoading = true;
let ids = {
ids: row.id,
orderCodes: row.orderCode,
};
const res = await postShowOrderCode(ids);
const res = await postShowOrderCodeByCode(ids);
if (res.data.code !== 200) return;
details.popUpShow.QRCodeVisible = true;

Loading…
Cancel
Save