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', 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, fixed: false,
sortable: true, sortable: true,
}, },
{
prop: 'unloadNum',
label: '卸车数',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'isDataName', prop: 'isDataName',
label: '有无数据', label: '有无数据',

27
src/option/distribution/addVehicleStowage.js

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

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

@ -592,6 +592,7 @@ import {
debounce, debounce,
handleClearTableQuery, handleClearTableQuery,
handleTranslationDataSeclect, handleTranslationDataSeclect,
computeNumber,
} from '@/utils/util'; } from '@/utils/util';
import { columnList } from '@/option/distribution/VehicleArrivalManagement'; import { columnList } from '@/option/distribution/VehicleArrivalManagement';
import { packageColumnList } from '@/option/distribution/VehicleStowage'; import { packageColumnList } from '@/option/distribution/VehicleStowage';
@ -824,14 +825,20 @@ const onLoad = debounce(async (params = {}) => {
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.data = data.records; 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); 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; details.page.total = data.total;
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);

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

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

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

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

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

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

Loading…
Cancel
Save