Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 4 months ago
parent
commit
a73aa976d4
  1. 12
      src/api/wel/index.js
  2. 1
      src/views/aftersales/aftersalesWorkOrder.vue
  3. 12
      src/views/aftersales/aftersalesWorkOrderInfo.vue
  4. 680
      src/views/desk/DataBoard.vue
  5. 135
      src/views/finance/WaybillAudit.vue

12
src/api/wel/index.js

@ -168,3 +168,15 @@ export const postSignforData = data => {
data,
});
};
/**
* 异常数据
* @param {Object} data
* @returns
*/
export const $_aftersalesData = params => {
return request({
url: '/api/logpm-report/warehouseIndex/aftersalesData',
method: 'get',
params,
});
};

1
src/views/aftersales/aftersalesWorkOrder.vue

@ -2848,6 +2848,7 @@ const exportReport = () => {
ids: details.selectionList.length
? details.selectionList.map(item => item.id).join(',')
: undefined,
...details.query,
};
switch (TabPermissions.value) {

12
src/views/aftersales/aftersalesWorkOrderInfo.vue

@ -1186,6 +1186,13 @@ const Completionpermissions = computed(() => {
}
return false;
});
const processedText=(inputtxt)=>{
if (inputtxt.endsWith('\n') && !inputtxt.endsWith('\n ')) {
return inputtxt.slice(0, -1);
}
return inputtxt;
}
const onLoad = async () => {
pageState.value = true; //
if (await localStorage.getItem('my_data')) {
@ -1271,12 +1278,12 @@ const onLoad = async () => {
// res.data.data.personResponsibleVOS.forEach(item => {
// sum = Number(item.responsibilityRatio) + sum;
// });
FangAddList.value = res.data.data.personResponsibleVOS.map(res => {
FangAddList.value = res.data.data.personResponsibleVOS.map(res => {
return {
businessName: res.businessId, //ID
personResponsibleName: res.personResponsibleName, //
responsibilityRatio: res.responsibilityRatio, //
description: res.description, //
description: processedText(res.description), //
tripartite: res.tripartite, //
};
});
@ -1390,6 +1397,7 @@ const onLoad = async () => {
Paymentmethod.value = res.data.data;
});
};
onMounted(() => {
watch(
() => $route.path, //

680
src/views/desk/DataBoard.vue

@ -45,8 +45,8 @@
class="align_center"
@click="
() =>
handleDetails('openOrderColumn', '开单数据详情 - 总计 - ', {
tip: '总数',
handleDetails('openOrderColumn', '开单数据详情 - 总计 - ', {
tip: '总数',
prop: 'totalCount',
})
"
@ -804,7 +804,17 @@
<span>待处理</span>
</div>
<div class="mt10">
<span class="data mr5px">{{ abnormal_Info.noDealNum }}</span>
<span
class="data mr5px underline"
@click="
() =>
handleShowAbnormalData('异常数据', noDealNum, {
tip: '总单数',
prop: 'noDealNum',
})
"
>{{ abnormal_Info.noDealNum }}</span
>
<span class=""></span>
</div>
</div>
@ -983,14 +993,14 @@
<div class="align_center">
<div
:class="{ button: true, active: signforData_status === '1' }"
@click="() => (signforData_status = '1')"
:class="{ button: true, active: signforData_status === 'daySignData' }"
@click="() => (signforData_status = 'daySignData')"
>
当天
</div>
<div
:class="{ button: true, active: signforData_status === '2' }"
@click="() => (signforData_status = '2')"
:class="{ button: true, active: signforData_status === 'monthSignData' }"
@click="() => (signforData_status = 'monthSignData')"
>
当月
</div>
@ -999,8 +1009,16 @@
<div class="border pd10 flex-c-sb">
<div class="text_center">
<div class="data_box mb10">
<div class="data mr5px">{{ signforData.signNum || 0 }}</div>
<div
class="data_box mb10"
@click="
handleShowSignDetail('签收数据 - 已签收 - 件', signforData_status, {
tip: '已签收',
prop: 'signNum',
})
"
>
<div class="data mr5px underline">{{ signforData.signNum || 0 }}</div>
<div class=""></div>
</div>
<div class="">
@ -1009,8 +1027,16 @@
</div>
<div class="text_center">
<div class="data_box orange mb10">
<div class="data mr5px">{{ signforData.unSignNum || 0 }}</div>
<div
class="data_box orange mb10"
@click="
handleShowSignDetail('签收数据 - 未签收 - 件', signforData_status, {
tip: '未签收',
prop: 'unSignNum',
})
"
>
<div class="data mr5px underline">{{ signforData.unSignNum || 0 }}</div>
<div class=""></div>
</div>
<div class="">
@ -1019,8 +1045,16 @@
</div>
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">
<div
class="data_box blue mb10"
@click="
handleShowSignDetail('签收数据 - 签收率 - %', signforData_status, {
tip: '签收率',
prop: 'signScale',
})
"
>
<div class="data mr5px underline">
{{ signforData.signScale || 0 }}
</div>
<div class="">%</div>
@ -1031,8 +1065,16 @@
</div>
<div class="text_center">
<div class="data_box purple mb10">
<div class="data mr5px">{{ signforData.clerkSignNum || 0 }}</div>
<div
class="data_box purple mb10"
@click="
handleShowSignDetail('签收数据 - 文员签收任务 - 个', signforData_status, {
tip: '文员签收任务',
prop: 'clerkSignNum',
})
"
>
<div class="data mr5px underline">{{ signforData.clerkSignNum || 0 }}</div>
<div class=""></div>
</div>
<div class="">
@ -1041,8 +1083,16 @@
</div>
<div class="text_center">
<div class="data_box purple mb10">
<div class="data mr5px">
<div
class="data_box purple mb10"
@click="
handleShowSignDetail('签收数据 - 文员签收率 - %', signforData_status, {
tip: '文员签收率',
prop: 'clerkSignforScale',
})
"
>
<div class="data mr5px underline">
{{ signforData.clerkSignforScale || 0 }}
</div>
<div class="">%</div>
@ -1053,8 +1103,18 @@
</div>
<div class="text_center">
<div class="data_box red mb10">
<div class="data mr5px">{{ signforData.clerkOverTimeSignfoNum || 0 }}</div>
<div
class="data_box red mb10"
@click="
handleShowSignDetail('签收数据 - 超时签收任务 - 个', signforData_status, {
tip: '超时签收任务',
prop: 'clerkOverTimeSignfoNum',
})
"
>
<div class="data mr5px underline">
{{ signforData.clerkOverTimeSignfoNum || 0 }}
</div>
<div class=""></div>
</div>
<div class="">
@ -1062,8 +1122,16 @@
</div>
</div>
<div class="text_center" v-if="signforData_status !== '1'">
<div class="data_box red mb10">
<div class="text_center" v-if="signforData_status !== 'daySignData'">
<div
class="data_box red mb10"
@click="
handleShowSignDetail('签收数据 - 签收超时率 - %', signforData_status, {
tip: '签收超时率',
prop: 'clerkOverTimeScale',
})
"
>
<div class="data mr5px">
{{ signforData.clerkOverTimeScale ? signforData.clerkOverTimeScale : 0 }}
</div>
@ -1202,14 +1270,20 @@
<div class="align_center">
<div
:class="{ button: true, active: billSignforData_status === '3' }"
@click="() => (billSignforData_status = '3')"
:class="{
button: true,
active: billSignforData_status === 'dayBillLadingSignData',
}"
@click="() => (billSignforData_status = 'dayBillLadingSignData')"
>
当天
</div>
<div
:class="{ button: true, active: billSignforData_status === '4' }"
@click="() => (billSignforData_status = '4')"
:class="{
button: true,
active: billSignforData_status === 'monthBillLadingSignData',
}"
@click="() => (billSignforData_status = 'monthBillLadingSignData')"
>
当月
</div>
@ -1218,8 +1292,16 @@
<div class="border pd10 flex-c-sb">
<div class="text_center">
<div class="data_box mb10">
<div class="data mr5px">{{ billSignforData.signNum || 0 }}</div>
<div
class="data_box mb10"
@click="
handleShowSignDetail('自提签收数据 - 已签收 - 件', billSignforData_status, {
tip: '已签收件数',
prop: 'totalRoadNum',
})
"
>
<div class="data mr5px underline">{{ billSignforData.signNum || 0 }}</div>
<div class=""></div>
</div>
<div class="">
@ -1228,8 +1310,16 @@
</div>
<div class="text_center">
<div class="data_box orange mb10">
<div class="data mr5px">{{ billSignforData.unSignNum || 0 }}</div>
<div
class="data_box orange mb10"
@click="
handleShowSignDetail('自提签收数据 - 未签收 - 件', billSignforData_status, {
tip: '未签收件数',
prop: 'unSignNum',
})
"
>
<div class="data mr5px underline">{{ billSignforData.unSignNum || 0 }}</div>
<div class=""></div>
</div>
<div class="">
@ -1238,8 +1328,16 @@
</div>
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">
<div
class="data_box blue mb10"
@click="
handleShowSignDetail('自提签收数据 - 签收率 - %', billSignforData_status, {
tip: '签收率',
prop: 'signScale',
})
"
>
<div class="data mr5px underline">
{{ billSignforData.signScale ? billSignforData.signScale : 0 }}
</div>
<div class="">%</div>
@ -1250,8 +1348,16 @@
</div>
<div class="text_center">
<div class="data_box purple mb10">
<div class="data mr5px">{{ billSignforData.clerkSignNum || 0 }}</div>
<div
class="data_box purple mb10"
@click="
handleShowSignDetail('自提签收数据 - 文员签收任务 - 个', billSignforData_status, {
tip: '文员签收任务',
prop: 'clerkSignNum',
})
"
>
<div class="data mr5px underline">{{ billSignforData.clerkSignNum || 0 }}</div>
<div class=""></div>
</div>
<div class="">
@ -1260,8 +1366,16 @@
</div>
<div class="text_center">
<div class="data_box purple mb10">
<div class="data mr5px">
<div
class="data_box purple mb10"
@click="
handleShowSignDetail('自提签收数据 - 文员签收率 - %', billSignforData_status, {
tip: '文员签收率',
prop: 'clerkSignforScale',
})
"
>
<div class="data mr5px underline">
{{ billSignforData.clerkSignforScale ? billSignforData.clerkSignforScale : 0 }}
</div>
<div class="">%</div>
@ -1272,8 +1386,18 @@
</div>
<div class="text_center">
<div class="data_box red mb10">
<div class="data mr5px">{{ billSignforData.clerkOverTimeSignfoNum || 0 }}</div>
<div
class="data_box red mb10"
@click="
handleShowSignDetail('自提签收数据 - 超时签收任务 - %', billSignforData_status, {
tip: '超时签收任务',
prop: 'clerkOverTimeSignfoNum',
})
"
>
<div class="data mr5px underline">
{{ billSignforData.clerkOverTimeSignfoNum || 0 }}
</div>
<div class=""></div>
</div>
<div class="">
@ -1281,9 +1405,17 @@
</div>
</div>
<div class="text_center" v-if="billSignforData_status !== '3'">
<div class="data_box red mb10">
<div class="data mr5px">
<div class="text_center" v-if="billSignforData_status !== 'dayBillLadingSignData'">
<div
class="data_box red mb10"
@click="
handleShowSignDetail('自提签收数据 - 超时签收任务 - %', billSignforData_status, {
tip: '超时签收任务',
prop: 'clerkOverTimeScale',
})
"
>
<div class="data mr5px underline">
{{ billSignforData.clerkOverTimeScale ? billSignforData.clerkOverTimeScale : 0 }}
</div>
<div class="">%</div>
@ -1370,6 +1502,7 @@ import {
postAllocationDataByWarehouseId,
postHandOrderDataByWarehouseId,
postTrunklineCarsDataByWarehouseId,
$_aftersalesData,
} from '@/api/wel/index';
import { exportExcelByDom } from '@/utils/export';
import * as echarts from 'echarts';
@ -1447,19 +1580,30 @@ const details = reactive({
},
/** 异常卸车数据 */
unloadAbnormalDataInfo: {
abnormalDayRate: '0',
abnormalMonthRate: '0',
abnormalDayRate: 0,
abnormalMonthRate: 0,
noDealDayNum: 0,
noDealMonthNum: 0,
sendDayNum: 0,
sendMonthNum: 0,
unloadDayNum: 0,
unloadMonthNum: 0,
dayData: [],
monthData: [],
},
/** 配送数据 */
deliveryDataInfo: {},
/** 签收数据 */
signforDataInfo: [],
signforDataInfo: {
/** 当日签收数据 */
daySignData: {},
/** 当月签收数据 */
monthSignData: {},
/** 当日自提签收数据 */
dayBillLadingSignData: {},
/** 当月自提签收数据 */
monthBillLadingSignData: {},
},
loadingObj: {
/** 开单数据 */
openOrderData: false,
@ -1529,10 +1673,12 @@ const delivery_status = ref<
const abnormal_status = ref<'day' | 'month'>('day');
/** 签收数据状态 */
const signforData_status = ref<'1' | '2'>('1');
const signforData_status = ref<'daySignData' | 'monthSignData'>('daySignData');
/** 自提签收数据状态 */
const billSignforData_status = ref<'3' | '4'>('3');
const billSignforData_status = ref<'dayBillLadingSignData' | 'monthBillLadingSignData'>(
'dayBillLadingSignData'
);
/** 请求开单数据 */
const initOpenOrderData = async () => {
@ -1623,15 +1769,48 @@ const initTrunklineCarsData = async () => {
details.loadingObj.trunklineCarsData = false;
}
};
function accumulateData(targetInfo, dataArray, isMonthly) {
for (let i = 0; i < dataArray.length; i++) {
const item = dataArray[i];
if (isMonthly) {
targetInfo.sendMonthNum += item.totalNum; //
targetInfo.noDealMonthNum += item.unCompleteNum; //
targetInfo.abnormalMonthRate += item.completeNum; //
} else {
targetInfo.sendDayNum += item.totalNum; //
targetInfo.noDealDayNum += item.unCompleteNum; //
targetInfo.abnormalDayRate += item.completeNum; //
}
}
}
/** 卸车异常数据 */
/**异常数据 */
const initUnloadAbnormalData = async () => {
return
try {
details.loadingObj.unloadAbnormalData = true;
const res = await postUnloadAbnormalData({});
const res = await $_aftersalesData({});
console.log('resw:>> ', res);
const { code, data } = res.data;
if (code !== 200) return;
details.unloadAbnormalDataInfo = data || {};
console.log(data, '异常数据');
// dayData
await accumulateData(details.unloadAbnormalDataInfo, data.dayData, false);
// monthData
await accumulateData(details.unloadAbnormalDataInfo, data.monthData, true);
//
details.unloadAbnormalDataInfo.abnormalMonthRate =
(details.unloadAbnormalDataInfo.abnormalMonthRate /
details.unloadAbnormalDataInfo.sendMonthNum) *
100;
details.unloadAbnormalDataInfo.abnormalDayRate =
(details.unloadAbnormalDataInfo.abnormalDayRate / details.unloadAbnormalDataInfo.sendDayNum) *
100;
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -1782,15 +1961,112 @@ const initDeliveryData = async () => {
/** 签收数据 */
const initSignforData = async () => {
const _keyArr = [
'signNum',
'unSignNum',
'signScale',
'clerkSignNum',
'clerkSignforScale',
'clerkOverTimeSignfoNum',
'clerkOverTimeScale',
];
const _obj = {
daySignData: { data: [] },
monthSignData: { data: [] },
dayBillLadingSignData: { data: [] },
monthBillLadingSignData: { data: [] },
};
try {
details.loadingObj.signforData = true;
const res = await postSignforData({});
const { code, data } = res.data;
if (code !== 200) return;
if (code !== 200 || getObjType(data) !== 'object') return;
const { monthData, dayData } = data;
//
for (let i = 0; i < _keyArr.length; i++) {
const value = _keyArr[i];
for (let key in _obj) {
const item = _obj[key];
item[value] = 0;
}
}
//
if (getObjType(monthData) === 'array') {
for (let i = 0; i < monthData.length; i++) {
const value = monthData[i];
for (let j = 0; j < _keyArr.length; j++) {
const key = _keyArr[j];
const _val = isNumber(value[key]) ? Number(value[key]) : 0;
//
if (Number(value.type) === 1) {
_obj.monthSignData[key] = computeNumber(_obj.monthSignData[key], '+', _val).result;
}
//
else {
_obj.monthBillLadingSignData[key] = computeNumber(
_obj.monthBillLadingSignData[key],
'+',
_val
).result;
}
}
//
Number(value.type) === 1
? _obj.monthSignData.data.push(value)
: //
_obj.monthBillLadingSignData.data.push(value);
}
}
//
if (getObjType(dayData) === 'array') {
for (let i = 0; i < dayData.length; i++) {
const value = dayData[i];
for (let j = 0; j < _keyArr.length; j++) {
const key = _keyArr[j];
const _val = isNumber(value[key]) ? Number(value[key]) : 0;
//
if (Number(value.type) === 1) {
_obj.daySignData[key] = computeNumber(_obj.daySignData[key], '+', _val).result;
}
//
else {
_obj.dayBillLadingSignData[key] = computeNumber(
_obj.dayBillLadingSignData[key],
'+',
_val
).result;
}
}
//
Number(value.type) === 1
? _obj.daySignData.data.push(value)
: //
_obj.dayBillLadingSignData.data.push(value);
}
}
details.signforDataInfo = data || [];
} catch (error) {
console.log('error :>> ', error);
} finally {
details.signforDataInfo = _obj;
details.loadingObj.signforData = false;
}
};
@ -1843,13 +2119,8 @@ const delivery_bill_info = computed(() => {
});
/** 签收数据 */
const signforData = computed(() => {
let _obj: any = {};
for (let i = 0; i < details.signforDataInfo.length; i++) {
const value = details.signforDataInfo[i];
if (value.type + '' === signforData_status.value) _obj = value;
}
const signforData = computed<any>(() => {
const _obj: any = details.signforDataInfo[signforData_status.value] || {};
_obj.signScaleNum ? _obj.signScaleNum : (_obj.signScaleNum = _obj.signScale || 0);
_obj.clerkSignforScaleNum
@ -1872,12 +2143,7 @@ const signforData = computed(() => {
/** 签收数据 -- 自提 */
const billSignforData = computed<any>(() => {
let _obj = {};
for (let i = 0; i < details.signforDataInfo.length; i++) {
const value = details.signforDataInfo[i];
if (value.type + '' === billSignforData_status.value) _obj = value;
}
const _obj: any = details.signforDataInfo[billSignforData_status.value] || {};
_obj.signScaleNum ? _obj.signScaleNum : (_obj.signScaleNum = _obj.signScale || 0);
_obj.clerkSignforScaleNum
@ -1898,173 +2164,53 @@ const billSignforData = computed<any>(() => {
return _obj;
});
/** 请求详情 */
const handleDetails = async (type, title, optionObj: any = {}) => {
details.popUpShow.isShow = true;
details.loadingObj.loading = true;
details.title = title;
try {
let res: any = { data: {} };
switch (type) {
//
case 'openOrderColumn':
res = await postOpenOrderDataByWarehouseId({});
break;
//
case 'allocationDataColumn':
res = await postAllocationDataByWarehouseId({});
break;
//
case 'handOrderDataColumn':
res = await postHandOrderDataByWarehouseId({});
break;
// 线
case 'trunklineCarsDataColumn':
res = await postTrunklineCarsDataByWarehouseId({});
break;
default:
break;
}
const { code, data } = res.data;
if (code !== 200 || getObjType(data) !== 'array') return;
const _arr = [];
for (let i = 0; i < data.length; i++) {
const value = data[i];
type OptionObjType = { prop: string; tip: string };
let isContinue = false;
/** 获取百分比 */
const getProportion = (value: number, total: number) => {
if (total === 0) return '0%';
if (!isNumber(value)) return '0%';
return computeNumber(Number(value), '/', total).next('*', 100).result.toFixed(2) + '%';
};
for (let j = 0; j < _arr.length; j++) {
const item = _arr[j];
if (item.value > value[optionObj.prop]) continue;
_arr.splice(j, 0, {
name: value.warehouseName + ' - ' + value[optionObj.prop],
value: value[optionObj.prop],
});
isContinue = true;
break;
}
if (isContinue) continue;
/** 显示图表 */
const handleShowEcharts = (data: any[], title: string, optionObj: OptionObjType) => {
if (getObjType(data) !== 'array') return;
_arr.push({
name: value.warehouseName + ' - ' + value[optionObj.prop],
value: value[optionObj.prop],
});
}
const _arr = [];
nextTick(() => {
// Echarts
const chartDom = document.getElementById('echartBox');
const myChart = echarts.init(chartDom);
let _total = 0;
const option = {
title: {
text: title,
// subtext: 'Fake Data',
left: 'center',
},
tooltip: {
trigger: 'item',
},
legend: {
orient: 'vertical',
left: 'left',
},
series: [
{
name: optionObj.tip,
// --
type: 'pie',
// radius: '50%',
//
data: _arr,
//
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
label: {
show: true,
fontSize: 20,
fontWeight: 'bold',
},
},
//
radius: ['30%', '70%'],
avoidLabelOverlap: false,
//
padAngle: 2,
//
minShowLabelAngle: 5,
//
left: '20%',
},
],
};
for (let i = 0; i < data.length; i++) {
const value = data[i];
option && myChart.setOption(option);
});
value[optionObj.prop] = isNumber(value[optionObj.prop]) ? Number(value[optionObj.prop]) : 0;
// details.tableData = data;
// details.renderData = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.loading = false;
_total = computeNumber(_total, '+', value[optionObj.prop]).result;
}
};
/** 显示配送详情 */
const handleShowDeliveryDetail = (
title,
type:
| 'tradeMatching'
| 'outsourceTradeMatching'
| 'municipalAllocation'
| 'outsourceMunicipalAllocation'
| 'billLading',
optionObj: any = {}
) => {
details.popUpShow.isShow = true;
details.title = title;
for (let i = 0; i < data.length; i++) {
const value = data[i];
if (getObjType(details.deliveryDataInfo[type]) !== 'object') return;
const { data } = details.deliveryDataInfo[type];
const _arr = [];
let isContinue = false;
if (getObjType(_arr) === 'array') {
for (let i = 0; i < data.length; i++) {
const value = data[i];
for (let j = 0; j < _arr.length; j++) {
const item = _arr[j];
if (item.value > value[optionObj.prop]) continue;
let isContinue = false;
for (let j = 0; j < _arr.length; j++) {
const item = _arr[j];
if (item.value > value[optionObj.prop]) continue;
_arr.splice(j, 0, {
name: value.warehouseName + ' - ' + value[optionObj.prop],
value: value[optionObj.prop],
});
isContinue = true;
break;
}
if (isContinue) continue;
_arr.push({
name: value.warehouseName + ' - ' + value[optionObj.prop],
_arr.splice(j, 0, {
name: value.warehouseName + ' - ' + getProportion(value[optionObj.prop], _total),
value: value[optionObj.prop],
});
isContinue = true;
break;
}
if (isContinue) continue;
_arr.push({
name: value.warehouseName + ' - ' + getProportion(value[optionObj.prop], _total),
value: value[optionObj.prop],
});
}
nextTick(() => {
@ -2076,7 +2222,7 @@ const handleShowDeliveryDetail = (
title: {
text: title,
// subtext: 'Fake Data',
left: 'center',
left: 'right',
},
tooltip: {
trigger: 'item',
@ -2108,11 +2254,11 @@ const handleShowDeliveryDetail = (
},
//
radius: ['30%', '70%'],
avoidLabelOverlap: false,
// avoidLabelOverlap: false,
//
padAngle: 2,
// padAngle: 2,
//
minShowLabelAngle: 5,
// minShowLabelAngle: 5,
//
left: '20%',
},
@ -2123,6 +2269,104 @@ const handleShowDeliveryDetail = (
});
};
/** 请求详情 */
const handleDetails = async (type, title, optionObj: OptionObjType) => {
details.popUpShow.isShow = true;
details.loadingObj.loading = true;
details.title = title;
try {
let res: any = { data: {} };
switch (type) {
//
case 'openOrderColumn':
res = await postOpenOrderDataByWarehouseId({});
break;
//
case 'allocationDataColumn':
res = await postAllocationDataByWarehouseId({});
break;
//
case 'handOrderDataColumn':
res = await postHandOrderDataByWarehouseId({});
break;
// 线
case 'trunklineCarsDataColumn':
res = await postTrunklineCarsDataByWarehouseId({});
break;
default:
break;
}
const { code, data } = res.data;
if (code !== 200 || getObjType(data) !== 'array') return;
handleShowEcharts(data, title, optionObj);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.loading = false;
}
};
/** 显示配送详情 */
const handleShowDeliveryDetail = (
title,
type:
| 'tradeMatching'
| 'outsourceTradeMatching'
| 'municipalAllocation'
| 'outsourceMunicipalAllocation'
| 'billLading',
optionObj: any = {}
) => {
details.popUpShow.isShow = true;
details.title = title;
if (getObjType(details.deliveryDataInfo[type]) !== 'object') return;
const { data } = details.deliveryDataInfo[type];
handleShowEcharts(data, title, optionObj);
};
/** 显示售后异常数据 */
const handleShowAbnormalData = (title, type: 'noDealNum', optionObj: any = {}) => {
details.popUpShow.isShow = true;
details.title = title;
console.log(optionObj, 'optionObj');
console.log(type, 'type');
console.log(title, 'title');
if (getObjType(details.unloadAbnormalDataInfo[type]) !== 'object') return;
const { data } = details.deliveryDataInfo[type];
handleShowEcharts(data, title, optionObj);
};
/** 显示签收详情 */
const handleShowSignDetail = (
title,
type: 'daySignData' | 'monthSignData' | 'dayBillLadingSignData' | 'monthBillLadingSignData',
optionObj: any = {}
) => {
details.popUpShow.isShow = true;
details.title = title;
if (getObjType(details.signforDataInfo[type]) !== 'object') return;
const { data } = details.signforDataInfo[type];
console.log('data :>> ', data);
handleShowEcharts(data, title, optionObj);
};
/** 导出 */
const handleExport = () => {
exportExcelByDom(exportColumnListNode.value.$el, `${details.title} - ${dateNow()}.xlsx`);

135
src/views/finance/WaybillAudit.vue

@ -5,63 +5,47 @@
<div v-h5uShow="search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search">
<!-- 收货单位 -->
<el-form-item label="收货单位"
><el-input v-model="details.query.consignee" placeholder="请输入收货单位"
/></el-form-item>
<!-- 审核状态 -->
<el-form-item label="审核状态">
<el-select v-model="details.query.checkStatus" placeholder="请选择审核状态" clearable>
<el-option
v-for="item in [
{ label: '全部', value: '' },
{ label: '已审核', value: 1 },
{ label: '待审核', value: 0 },
]"
:key="item.value"
:label="item.label"
:value="item.value"
<el-form-item
v-for="item in details.titleSearchOption"
:key="item.prop"
:label="item.label"
>
<template v-if="item.type === 'input'">
<el-input
v-model.trim="query[item.prop]"
:placeholder="`请输入${item.label}`"
clearable
></el-input>
</template>
<template v-else-if="item.type === 'select'">
<el-select v-model="query[item.prop]" :placeholder="`请选择${item.label}`" clearable>
<el-option
v-for="value in item.checkarr"
:key="value.value"
:label="value.label"
:value="value.value"
/>
</el-select>
</template>
<template v-else-if="item.type === 'time'">
<el-date-picker
v-model="query[item.prop]"
type="datetimerange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD HH:mm:ss"
clearable
/>
</el-select>
</el-form-item>
<!-- 开单时间 -->
<el-form-item label="开单时间" class="el-times">
<el-date-picker
class="w100"
v-model="details.query.createTimeArr"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
>
</el-date-picker>
</el-form-item>
<!-- 审核时间 -->
<el-form-item label="审核时间" class="el-times">
<el-date-picker
class="w100"
v-model="details.query.checkTimeArr"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
value-format="YYYY-MM-DD"
clearable
>
</el-date-picker>
</template>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item>
<el-form-item class="el-btn">
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset"> </el-button>
</el-form-item>
@ -293,6 +277,41 @@ const details = reactive<any>({
columnList: deepClone(columnList),
/** 列表数据 */
data: [],
titleSearchOption: [
{ type: 'input', label: '收货单位', prop: 'consignee' },
{
type: 'select',
label: '审核状态',
prop: 'checkStatus',
checkarr: [
{ label: '全部', value: '' },
{ label: '已审核', value: 1 },
{ label: '待审核', value: 0 },
],
},
{
type: 'select',
label: '收款状态',
prop: 'payStatus',
checkarr: [
{ label: '未收款', value: '10' },
// {label: '', value: '20'},
{ label: '已收款', value: '30' },
],
},
{
type: 'select',
label: '结算状态',
prop: 'settlementStatus',
checkarr: [
{ label: '未结算', value: '10' },
// {label: '', value: '20'},
{ label: '已结算', value: '30' },
],
},
{ type: 'time', label: '开单时间', prop: 'createTimeArr' },
{ type: 'time', label: '审核时间', prop: 'checkTimeArr' },
],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
@ -375,11 +394,11 @@ const onLoad = async () => {
if (code !== 200) return;
details.data = data.records;
for (let i = 0; i < details.data .length; i++) {
const value = details.data [i];
!value.payStatus && (value.payStatus = '10')
!value.settlementStatus && (value.settlementStatus = '10')
for (let i = 0; i < details.data.length; i++) {
const value = details.data[i];
!value.payStatus && (value.payStatus = '10');
!value.settlementStatus && (value.settlementStatus = '10');
}
details.page.total = data.total;

Loading…
Cancel
Save