Browse Source

修复开单页面样式以及重置以及页面内换单

fix_bug_pro20231227
qb 1 year ago
parent
commit
afb290c0cc
  1. 12
      src/api/distribution/BookingNote.js
  2. 12
      src/api/distribution/CreateOrder.js
  3. 19
      src/api/waybill/WaybillOrderList.js
  4. 14
      src/components/SelectBox/SelectBox.vue
  5. 186
      src/option/waybill/WaybillOrderList.js
  6. 40
      src/utils/util.js
  7. 723
      src/views/distribution/inventory/BookingNote.vue
  8. 1029
      src/views/distribution/inventory/CreateOrder.vue
  9. 1723
      src/views/waybill/CreateZeroOrder.vue
  10. 46
      src/views/waybill/WaybillOrderList.vue

12
src/api/distribution/BookingNote.js

@ -0,0 +1,12 @@
import request from '@/axios';
/**
* 暂存单转运单信息查询
*/
export const postWarehouseFindWaybillInfo = data => {
return request({
url: '/api/logpm-warehouse/warehouseWaybill/findWaybillInfo',
method: 'post',
data,
});
};

12
src/api/distribution/CreateOrder.js

@ -65,3 +65,15 @@ export const getOpenOrderAdvanceToWaybillInfo = data => {
data,
});
};
/**
* 暂存单转运单信息查询
*/
export const getOpenOrderAdvanceFindWarehouseList = data => {
return request({
url: '/api/logpm-trunkline/openOrder/findWarehouseList',
method: 'post',
data,
});
};

19
src/api/waybill/WaybillOrderList.js

@ -0,0 +1,19 @@
import request from '@/axios';
/**
* 获取运单列表
* @param {number} current
* @param {number} size
* @param {*} params
* @returns
*/
export const postWarehouseWaybillPageWaybillList = (page, params) => {
return request({
url: '/api/logpm-warehouse/warehouseWaybill/pageWaybillList',
method: 'post',
data: {
...params,
...page,
},
});
};

14
src/components/SelectBox/SelectBox.vue

@ -3,12 +3,16 @@
<el-input
@focus="handleFocus"
v-model="_computed"
@input="handleInput"
:placeholder="props.placeholder"
@blur="handleBlur"
@change="handleChange"
></el-input>
<div class="selectContainer" v-if="isShowBox">
<!-- <el-scrollbar>
<p v-for="item in 20" :key="item" class="scrollbar-demo-item">{{ item }}</p>
</el-scrollbar> -->
<div class="content">
<SelectComponent
:className="props.className"
@ -49,7 +53,6 @@ const _computed = computed({
},
set(val) {
$emit('update:modelValue', val);
props.input && props.input();
},
});
@ -83,7 +86,11 @@ const handleChange = (value: any) => {
props.change && props.change(value);
};
defineExpose({ handleShow });
const handleInput = () => {
props.input && props.input();
};
defineExpose({ handleShow, handleClose });
</script>
<style lang="scss" scoped>
@ -93,6 +100,7 @@ defineExpose({ handleShow });
text-align: center;
.selectContainer {
overflow: scroll;
position: absolute;
width: 100%;
box-sizing: border-box;
@ -123,7 +131,7 @@ defineExpose({ handleShow });
}
.content {
overflow: auto;
overflow-y: scroll;
}
}
}

186
src/option/waybill/WaybillOrderList.js

@ -15,7 +15,7 @@ export const columnList = [
fixed: true,
},
{
prop: 'billladingCode',
prop: 'waybillNo',
label: '运单号',
type: 13,
values: '',
@ -26,7 +26,7 @@ export const columnList = [
head: false,
},
{
prop: 'carNumber',
prop: 'orderNo',
label: '订单自编号',
type: 2,
values: '',
@ -36,7 +36,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'driverName',
prop: 'destinationWarehouseName',
label: '目的仓',
type: 3,
values: '',
@ -46,7 +46,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'driverPhone',
prop: 'departureWarehouseName',
label: '发站仓',
type: 3,
values: '',
@ -56,7 +56,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'warehouseName',
prop: 'customerTrain',
label: '客户车次',
type: 2,
values: '',
@ -66,17 +66,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'lineNameTitle',
label: '状态',
type: 3,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'nodeNub',
prop: 'brand',
label: '品牌',
type: 2,
values: '',
@ -86,7 +76,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'startTime',
prop: 'shipper',
label: '发货单位',
type: 2,
values: '',
@ -96,7 +86,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'endTime',
prop: 'shipperName',
label: '发货人',
type: 2,
values: '',
@ -106,7 +96,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'planVolume',
prop: 'shipperMobile',
label: '发货方手机号',
type: 2,
values: '',
@ -116,7 +106,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'billladingStatus',
prop: 'shipperAddress',
label: '发货方地址',
type: 2,
values: '',
@ -126,7 +116,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'chargeType',
prop: 'consignee',
label: '收货单位',
type: 2,
values: '',
@ -136,7 +126,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'totalFee',
prop: 'consigneeName',
label: '收货人',
type: 1,
values: '',
@ -146,7 +136,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'remark',
prop: 'consigneeMobile',
label: '收货方手机号',
type: 2,
values: '',
@ -156,7 +146,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'consigneeAddress',
label: '收货方地址',
type: 2,
values: '',
@ -166,7 +156,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'destination',
label: '到站',
type: 2,
values: '',
@ -176,7 +166,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'goodsName',
label: '货物名称',
type: 2,
values: '',
@ -185,17 +175,7 @@ export const columnList = [
fixed: false,
sortable: true,
},
{
prop: 'carrierName',
label: '参考一口价',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
/* {
prop: 'carrierName',
label: '单价',
type: 1,
@ -214,9 +194,9 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
},
}, */
{
prop: 'carrierName',
prop: 'totalCount',
label: '总数',
type: 2,
values: '',
@ -227,7 +207,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'totalWeight',
label: '总重量',
type: 1,
values: '',
@ -238,7 +218,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'totalVolume',
label: '总体积',
type: 1,
values: '',
@ -249,7 +229,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'totalFreight',
label: '运费',
type: 1,
values: '',
@ -260,7 +240,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'deliveryFee',
label: '送货费',
type: 1,
values: '',
@ -271,7 +251,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'pickupFee',
label: '提货费',
type: 1,
values: '',
@ -282,7 +262,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'warehouseManagementFee',
label: '仓库管理费',
type: 1,
values: '',
@ -293,7 +273,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'storageFee',
label: '仓储费',
type: 1,
values: '',
@ -304,7 +284,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'remark',
prop: 'handlingFee',
label: '装卸费',
type: 1,
values: '',
@ -314,7 +294,7 @@ export const columnList = [
isshowSummary: true,
sortable: true,
},
{
/* {
prop: 'carrierName',
label: '其它费用',
type: 1,
@ -324,8 +304,8 @@ export const columnList = [
fixed: false,
isshowSummary: true,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '报价费',
type: 1,
@ -335,8 +315,8 @@ export const columnList = [
fixed: false,
isshowSummary: true,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '总费用',
type: 1,
@ -346,9 +326,9 @@ export const columnList = [
fixed: false,
isshowSummary: true,
sortable: true,
},
}, */
{
prop: 'carrierName',
prop: 'claimingValue',
label: '申明价值',
type: 1,
values: '',
@ -359,7 +339,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'remark',
prop: 'rebate',
label: '回扣',
type: 1,
values: '',
@ -370,7 +350,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'payWay',
label: '付款方式',
type: 3,
values: '',
@ -380,7 +360,7 @@ export const columnList = [
sortable: false,
},
{
prop: 'carrierName',
prop: 'xPay',
label: '现付',
type: 1,
values: '',
@ -391,7 +371,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'dPay',
label: '到付',
type: 1,
values: '',
@ -402,7 +382,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'yPay',
label: '月付',
type: 1,
values: '',
@ -413,7 +393,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'remark',
prop: 'hPay',
label: '回付',
type: 1,
values: '',
@ -424,7 +404,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'deliveryWay',
label: '送货方式',
type: 3,
values: '',
@ -434,7 +414,7 @@ export const columnList = [
sortable: false,
},
{
prop: 'carrierName',
prop: 'urgency',
label: '紧急度',
type: 3,
values: '',
@ -445,7 +425,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'receiptNum',
label: '回单数',
type: 1,
values: '',
@ -456,7 +436,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'receipt',
label: '回单要求',
type: 1,
values: '',
@ -467,7 +447,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'remark',
prop: 'transportType',
label: '运输方式',
type: 3,
values: '',
@ -476,7 +456,7 @@ export const columnList = [
fixed: false,
sortable: true,
},
{
/* {
prop: 'carrierName',
label: '运单标识',
type: 3,
@ -485,9 +465,9 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
},
}, */
{
prop: 'carrierName',
prop: 'thirdOperationFee',
label: '三方操作费',
type: 1,
values: '',
@ -498,7 +478,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'carrierName',
prop: 'agent',
label: '经办人',
type: 2,
values: '',
@ -520,7 +500,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'remark',
prop: 'documentMakingTime',
label: '创建时间',
type: 1,
values: '',
@ -529,7 +509,7 @@ export const columnList = [
fixed: false,
sortable: true,
},
{
/* {
prop: 'carrierName',
label: '审核状态',
type: 3,
@ -538,8 +518,8 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '结算状态',
type: 3,
@ -549,9 +529,9 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
}, */
{
prop: 'carrierName',
prop: 'remark',
label: '备注',
type: 2,
values: '',
@ -561,7 +541,7 @@ export const columnList = [
isshowSummary: false,
sortable: true,
},
{
/* {
prop: 'carrierName',
label: '批次号',
type: 2,
@ -571,8 +551,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'remark',
label: '送货司机',
type: 2,
@ -581,8 +561,8 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '送货时间',
type: 1,
@ -591,8 +571,8 @@ export const columnList = [
checkarr: [],
fixed: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '送货件数',
type: 1,
@ -602,8 +582,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '签收时间',
type: 1,
@ -613,8 +593,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '文员确认签收时间',
type: 1,
@ -624,8 +604,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '服务类型',
type: 1,
@ -635,8 +615,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '服务号',
type: 2,
@ -646,8 +626,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '冻结状态',
type: 3,
@ -657,8 +637,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '审核人',
type: 2,
@ -668,8 +648,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '审核时间',
type: 1,
@ -679,8 +659,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '承运单号',
type: 2,
@ -690,8 +670,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '中转物流',
type: 2,
@ -701,8 +681,8 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
{
}, */
/* {
prop: 'carrierName',
label: '运单中转费用',
type: 1,
@ -712,7 +692,7 @@ export const columnList = [
fixed: false,
isshowSummary: false,
sortable: true,
},
}, */
{
prop: 'createUserName',
label: '操作',

40
src/utils/util.js

@ -490,11 +490,11 @@ export const setNodeHeight = (_node, _height = '') => {
/**
* 下拉框搜索公共函数processRowProperty(index, row, details);
* @param {string} index index参数
* @param {object} row row (表头参数)
* @param {object} details details (搜索参数)
* @param {string} index index参数
* @param {object} row row (表头参数)
* @param {object} details details (搜索参数)
*/
//
//
const updateDetailQuery = (index, propName, obj) => {
// 更新或删除查询参数
if (index) {
@ -503,10 +503,10 @@ const updateDetailQuery = (index, propName, obj) => {
delete obj[propName];
}
};
export const processRowProperty = (index, row, details) => {
export const processRowProperty = (index, row, details) => {
const nameRegex = /(\w+)Name$/; // 捕获以'Name'结尾的属性名
const match = row.prop.match(nameRegex);
// 如果属性以'Name'结尾,则更新相应的查询参数
if (match) {
const basePropName = match[1]; // 获取不包含'Name'的属性名
@ -520,14 +520,13 @@ export const processRowProperty = (index, row, details) => {
}
};
/**
* 数字运算主要用于小数点精度问题
* [see](https://juejin.im/post/6844904066418491406#heading-12)
* @param {number} a 前面的值
* @param {"+"|"-"|"*"|"/"} type 计算方式
* @param {number} b 后面的值
* @example
* @example
* ```js
* // 可链式调用
* const res = computeNumber(1.3, "-", 1.2).next("+", 1.5).next("*", 2.3).next("/", 0.2).result;
@ -540,7 +539,7 @@ export function computeNumber(a, type, b) {
* @param {number} n 数字
*/
function getDecimalLength(n) {
const decimal = n.toString().split(".")[1];
const decimal = n.toString().split('.')[1];
return decimal ? decimal.length : 0;
}
/**
@ -556,16 +555,16 @@ export function computeNumber(a, type, b) {
b = amend(b * power);
switch (type) {
case "+":
case '+':
result = (a + b) / power;
break;
case "-":
case '-':
result = (a - b) / power;
break;
case "*":
case '*':
result = (a * b) / (power * power);
break;
case "/":
case '/':
result = a / b;
break;
}
@ -582,6 +581,15 @@ export function computeNumber(a, type, b) {
*/
next(nextType, nextValue) {
return computeNumber(result, nextType, nextValue);
}
}
}
},
};
}
/**
* @param {any} value 传入值, 判断该值是否为数字
*/
export const isNumer = value => {
const _value = Number(value);
if (_value !== _value) return false;
return true;
};

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

1723
src/views/waybill/CreateZeroOrder.vue

File diff suppressed because it is too large Load Diff

46
src/views/waybill/WaybillOrderList.vue

@ -111,9 +111,9 @@
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '运单号'">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)">
查看
</el-button>
<el-text @click="handleGoWaybillDetails(slotProps.scope)">
{{ slotProps.scope.row.waybillNo }}
</el-text>
</template>
<template v-else-if="slotProps.scope.column.label === '操作'">
@ -205,7 +205,7 @@ import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { getopenOrderAdvancePageList } from '@/api/waybill/ChangeOrder';
import { postWarehouseWaybillPageWaybillList } from '@/api/waybill/WaybillOrderList.js';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls } from '@/utils/util';
import { columnList, viewColumnList } from '@/option/waybill/WaybillOrderList';
@ -271,7 +271,7 @@ const details = reactive<any>({
drawerShow: false,
/** 分页参数 */
page: {
currentPage: 1,
pageNum: 1,
pageSize: 30,
total: 0,
},
@ -319,11 +319,27 @@ onMounted(() => {
/** 请求页面数据 */
const onLoad = async (page: any, params = {}) => {
//
// details.data = await getopenOrderAdvancePageList(page, { ...details.query, ...params });
try {
details.loadingObj.list = true;
let _page = details.page;
if (page) _page = page;
//
const res = await postWarehouseWaybillPageWaybillList(details.page, {
...details.query,
...params,
});
console.log('res :>> ', res);
const { code, data } = res.data;
if (code !== 200) return;
details.data = data.records;
details.page.total = data.total;
} catch (error) {
} finally {
details.loadingObj.list = false;
}
};
onLoad(details.page);
onLoad();
/** 搜索 */
const searchChange = () => {
@ -409,7 +425,10 @@ const sizeChange = (pageSize: number) => {
};
/** 页码改变执行的回调 */
const currentChange = () => {};
const currentChange = current => {
details.page.pageNum = current;
onLoad();
};
/**
* 设置列表 -- 固定函数
@ -518,6 +537,15 @@ const handleBatchRecover = () => {
});
}
};
/** 查看运单 */
const handleGoWaybillDetails = ({ row }) => {
console.log('row :>> ', row);
$router.push({
path: '/distribution/inventory/BookingNote',
query: { name: `查看 -- 【${row.waybillNo}`, waybillNo: row.waybillNo },
});
};
</script>
<style scoped lang="scss">

Loading…
Cancel
Save