Browse Source

修复部分问题

dev
qb 10 months ago
parent
commit
cd82c12e25
  1. 4
      src/option/basicdata/basicdataTray.js
  2. 10
      src/option/distribution/zeroAdditionalRecording.js
  3. 10
      src/utils/util.js
  4. 102
      src/views/distribution/artery/zeroAdditionalRecording.vue
  5. 32
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue
  6. 13
      src/views/distribution/reservation/reservation.vue
  7. 53
      src/views/distribution/reservation/reservationAddFrom.vue
  8. 78
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  9. 30
      src/views/warehouse/parcelList/distributionParcelList.vue

4
src/option/basicdata/basicdataTray.js

@ -30,7 +30,7 @@ export default {
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
viewDisplay: true,
hide: true,
width: '130',
},
@ -40,7 +40,7 @@ export default {
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
viewDisplay: true,
hide: true,
width: '130',
},

10
src/option/distribution/zeroAdditionalRecording.js

@ -287,6 +287,16 @@ export const newColumnList = [
fixed: false,
sortable: true,
},
{
prop: 'loadingNum',
label: '装车件数',
type: 6,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'price',
label: '单价',

10
src/utils/util.js

@ -335,13 +335,12 @@ export const getTopUrl = () => {
return window.location.href.split('/#/')[0];
};
/**
* @param {string} value 要移除的地址
*/
export function AddressClosed(url){
export function AddressClosed(url) {
console.log(url, store);
const index = store.getters.tagList.findIndex((item) => item.path == url);
const index = store.getters.tagList.findIndex(item => item.path == url);
if (index != -1) {
store.getters.tagList.splice(index, 1);
}
@ -623,4 +622,7 @@ export function debounce(func, delay) {
})();
}
/** 去除零宽字符 */
export const removeZeroWidth = str => {
return str.replace(/[\u200B-\u200D\uFEFF]/g, '');
};

102
src/views/distribution/artery/zeroAdditionalRecording.vue

@ -171,6 +171,18 @@
@selectCheck="newSelectsc"
@selection="newSelectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '装车件数'">
<el-input-number
v-model="slotProps.scope.row.loadingNum"
controls-position="right"
:precision="0"
:min="0"
:max="slotProps.scope.row.stockNum"
:step="1"
/>
</template>
</template>
</tablecmt>
<div class="statistics_row">
<!-- <div>合计: 选择数: {{ addInfo.oldSelectionList.length }}</div>
@ -192,6 +204,31 @@
> </el-button
>
<el-dialog
v-model="details.showPopUpObj.editNodeIdDialogVisible"
title="选择添加零担节点"
width="30%"
:align-center="true"
>
<el-form-item label-width="100px" label="选择节点">
<el-select v-model="details.chooseNodeId" class="m-2" placeholder="Select">
<el-option
v-for="item in details.finalNodeIdArr"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</el-form-item>
<template #footer>
<div class="flex-c-c">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitClient"> 确定(修改客户) </el-button>
</div>
</template>
</el-dialog>
<!-- 列表配置显示 -->
<edittablehead
@setcolum="setnewcolum"
@ -219,6 +256,10 @@ import {
import { downloadXls } from '@/utils/util';
import { oldColumnList, newColumnList } from '@/option/distribution/zeroAdditionalRecording';
import { ElMessage } from 'element-plus';
import { useRoute } from 'vue-router';
//
const $route = useRoute();
const details = reactive<any>({
/** 是否开启搜索 */
@ -308,6 +349,15 @@ const details = reactive<any>({
form: {},
/** 被选中的零担订单 */
orderCodeList: [],
/** 后续节点Id列表 */
finalNodeIdArr: [],
/** 运单Id */
loadId: '',
showPopUpObj: {
editNodeIdDialogVisible: true,
},
/** 选择的Id */
chooseNodeId: '',
});
const {
@ -338,6 +388,18 @@ onMounted(() => {
}, 100);
});
/** 获取最终节点ID */
const initFinalNodeId = async () => {
details.loadId = $route.query.loadId;
const res = await postFindNextNodeList({ loadId: details.loadId });
const { code, data } = res.data;
if (code !== 200) return;
details.finalNodeIdArr = data;
};
initFinalNodeId();
/** 请求页面数据 */
const onLoad = async (params = {}) => {
try {
@ -526,8 +588,8 @@ const handleAddWaybill = () => {
if (details.oldSelectionList.length === 0) return ElMessage.error('最少选择一条数据');
for (let item of details.oldSelectionList) {
item.planNum = item.stockNum;
item.loadingNum = 0;
console.log('item.stockNum :>> ', item.stockNum);
item.loadingNum = Number(item.stockNum || 0);
details.newData.push(item);
}
@ -556,10 +618,35 @@ const handleRemoveWaybill = () => {
}
return _flag;
});
details.page.pageNum = 1;
onLoad();
};
/** 零担补录提交 */
const handleEditZeroSubmit = () => {};
const handleEditZeroSubmit = () => {
if (details.newData.length === 0) return ElMessage.error('请选择运单');
// const _data = details.newData.filter(val => {
// return val.loadingNum > 0;
// });
const submitData = {
loadId: details.loadId,
zeroSuppleList: [],
};
for (const iterator of details.newData) {
submitData.zeroSuppleList.push({
orderCode: iterator.orderCode,
waybillNo: iterator.waybillNo,
enterNum: iterator.stockNum,
finalNodeId: iterator.nodeId,
});
}
console.log('_data :>> ', _data);
};
</script>
<style scoped lang="scss">
@ -647,4 +734,13 @@ const handleEditZeroSubmit = () => {};
left: 50%;
transform: translateX(-50%);
}
//
:deep(.el-input-number__decrease) {
zoom: 0.8;
}
:deep(.el-input-number__increase) {
zoom: 0.8;
}
</style>

32
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -131,6 +131,7 @@
<el-tabs type="border-card" v-model="activeTab" @tab-click="handleTabClick">
<el-tab-pane label="客 户 列 表" name="tab1">
<tablecmt
class="tableNode"
:columnList="columnList"
:tableData="data"
:loading="loading"
@ -194,6 +195,7 @@
<el-tab-pane label="订 单 列 表" name="tab2">
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="ordoptioncolumn"
:tableData="orddata"
:loading="loading"
@ -205,6 +207,7 @@
<el-tab-pane label="包 件 列 表" name="tab3">
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="wrapoptioncolumn"
:tableData="packdata"
:loading="loading"
@ -265,6 +268,7 @@
<el-tab-pane label="库 存 品 列 表" name="tab4">
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="inventoryoptioncolumn"
:tableData="inventorydata"
:loading="loading"
@ -310,6 +314,7 @@
<!-- </el-pagination>-->
</div>
</el-row>
<el-dialog v-model="dialogFormCustomer" title="修改客户信息">
<el-form :model="formCustomer" ref="formCustomer" :rules="formCustomerRolus">
<el-row>
@ -388,6 +393,7 @@
</span>
</template>
</el-dialog>
<!-- 表单模块 -->
<el-dialog
:title="title"
@ -2587,6 +2593,16 @@ export default {
fixed: false,
sortable: true,
},
{
label: '装车时间',
prop: 'loadingTime',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
// {
// label: '',
// prop: 'orderPackageDeliveryStatus',
@ -2933,6 +2949,8 @@ export default {
this.windowHeight = window.innerHeight * 0.8;
console.log(`浏览器窗口的高度为:${this.windowHeight}px`);
this.setTableHeight();
},
created() {
// //
@ -2957,6 +2975,13 @@ export default {
},
},
methods: {
async setTableHeight() {
await this.$nextTick();
const tableNode = document.querySelectorAll('.tableNode');
setNodeHeight(tableNode, '600px');
},
callFordelivery(formName) {
console.log(formName, 'formName');
this.$refs[formName].validate(valid => {
@ -3763,4 +3788,11 @@ export default {
.el_foot {
overflow: scroll;
}
//
:deep(.el-divider__text.is-center) {
font-size: 20px;
font-weight: bold;
color: var(--el-color-primary);
}
</style>

13
src/views/distribution/reservation/reservation.vue

@ -1340,13 +1340,22 @@ export default {
}
});
ids = ids.join(',');
this.$router.push({
path: '/distribution/reservation/atlas',
path: '/distribution/turndelivery/deliveryMarket',
query: {
id: ids,
type: '1',
name: '市配计划',
},
});
// this.$router.push({
// path: '/distribution/reservation/atlas',
// query: {
// id: ids,
// type: '1',
// },
// });
// console.log(">>>>>>>>>>",ids);
},
//

53
src/views/distribution/reservation/reservationAddFrom.vue

@ -128,6 +128,7 @@
<el-tab-pane label="订单">
<el-button class="el-btn-xz" type="primary" link @click="handleAddOrder"> </el-button>
<tablecmt
class="tablesc"
:columnList="columnList"
:tableData="orderData"
:loading="loading"
@ -176,6 +177,7 @@
<el-tab-pane label="库存品">
<el-button class="el-btn-xz" link @click="handleAddInventory"> </el-button>
<tablecmt
class="tablesc"
:columnList="stockcolumnList"
:tableData="inventoryData"
:loading="loading"
@ -563,7 +565,7 @@ import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { entryNum, updateEntryNum } from '@/api/distribution/distributionParcelNumber';
import { setNodeHeight } from '@/utils/util.js';
import { setNodeHeight, removeZeroWidth } from '@/utils/util.js';
export default {
data() {
@ -2020,6 +2022,8 @@ export default {
this.onLoad(this.page);
this.getDictionary();
this.setTableHeight();
},
watch: {
'$route.query.reservationId': {
@ -2043,6 +2047,12 @@ export default {
},
},
methods: {
/** 设置表格高度 */
async setTableHeight() {
await this.$nextTick();
const _node = document.querySelectorAll('.tablesc');
setNodeHeight(_node, '600px');
},
handleToggleAllSelection() {
this.$refs.selecttable.toggleAllSelection();
},
@ -2063,6 +2073,7 @@ export default {
tableAllSelection() {},
handleClick(tab, event) {
this.query = {};
this.setTableHeight();
},
//
async handleAddOrder() {
@ -2077,6 +2088,8 @@ export default {
console.log('_node :>> ', _node);
_node.style.transition = 'all 0.3s';
setNodeHeight(_node, '500px');
this.setTableHeight();
});
},
checkOrder(row, index) {
@ -2128,6 +2141,8 @@ export default {
const _node = document.querySelector('.stockListShow .maboxhi');
_node.style.transition = 'all 0.3s';
setNodeHeight(_node, '500px');
this.setTableHeight();
});
}
);
@ -2571,7 +2586,7 @@ export default {
if (item.id === row.id) {
this.orderData.splice(index, 1);
}
console.log(this.orderData,'当前存在的数据');
console.log(this.orderData, '当前存在的数据');
});
// ,
if (this.inventoryData.length === 0 && this.orderData.length === 0) this.marketName = '';
@ -2819,17 +2834,22 @@ export default {
// }
// return true;
// });
console.log('this.inventoryList :>> ', this.inventoryList);
const stockArr = [...this.inventoryData, ...this.inventoryList];
//
const _isUnifyMarketName = stockArr.every(value => {
//
if (this.marketName === '') this.marketName = value.marketName;
if (this.marketName === '') this.marketName = removeZeroWidth(value.marketName);
if (this.marketName !== value.marketName) {
this.$message.warning('请选择统一商场!!!');
return false;
} else if (value.reservationNum > value.applyNum) {
} else if (Number(value.reservationNum) > Number(value.applyNum)) {
console.log('value >>>>>>>>', value);
console.log('Number(value.reservationNum) :>> ', Number(value.reservationNum));
console.log('Number(value.applyNum) :>> ', Number(value.applyNum), value.applyNum);
this.$message.warning('该库存品数量输入有误!!!');
return false;
}
@ -2840,7 +2860,6 @@ export default {
return;
}
console.log('this.inventoryList :>> ', this.inventoryList);
this.inventoryData = stockArr;
this.stockListShow = false;
@ -2852,10 +2871,10 @@ export default {
console.log('orderList-------------》', this.orderList);
if (this.orderList.length === 0) return this.$message.warning('最少选择一条数据!!!');
const list = [...this.orderData, ...this.orderList];
let _name = list[0].customerName.trim();
let _address = list[0].customerAddress.trim();
let _phone = list[0].customerTelephone.trim();
if (this.marketName === '') this.marketName = list[0].mallName.trim();
let _name = removeZeroWidth(list[0].customerName.trim());
let _address = removeZeroWidth(list[0].customerAddress.trim());
let _phone = removeZeroWidth(list[0].customerTelephone.trim());
if (this.marketName === '') this.marketName = removeZeroWidth(list[0].mallName.trim());
//
if (this.marketName === '') this.marketName = this.marketName;
@ -2867,10 +2886,20 @@ export default {
return false;
}
if (
item.customerName.trim() !== _name ||
item.customerAddress.trim() !== _address ||
console.log(' item.customerName.trim() !== _name :>> ', item.customerName.trim() !== _name);
console.log(
' item.customerName.trim() !== _name :>> ',
item.customerAddress.trim() !== _address
);
console.log(
' item.customerName.trim() !== _name :>> ',
item.customerTelephone.trim() !== _phone
);
if (
removeZeroWidth(item.customerName.trim()) !== _name ||
removeZeroWidth(item.customerAddress.trim()) !== _address ||
removeZeroWidth(item.customerTelephone.trim()) !== _phone
) {
console.log('123');
this.$message.warning('请选择统一顾客订单!!!');

78
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -381,7 +381,6 @@
</template>
</el-table-column>
</template>
</template>
</el-table>
<div class="el-Cart-button-btn">
@ -441,7 +440,14 @@
</el-form-item>
<el-form-item label="运单收货人:">
<el-input
v-model="parameter.customerName"
v-model="parameter.consigneePerson"
clearable
placeholder="请输入运单收货人"
/>
</el-form-item>
<el-form-item label="运单收货单位:">
<el-input
v-model="parameter.consigneeUnit"
clearable
placeholder="请输入运单收货人"
/>
@ -453,9 +459,7 @@
placeholder="请输入顾客地址"
/>
</el-form-item>
<el-form-item >
</el-form-item>
<el-form-item> </el-form-item>
</el-form>
<!-- <div class="SoBtn">
搜索菜单预留按钮
@ -852,7 +856,7 @@ const isZeroTable = ref([]); //零担表格
const comprehensive = ref(false); //,
const QuantityEntryStatus = ref(false); //
const TCzj = ref(); //
const statisticsList=ref([]);//
const statisticsList = ref([]); //
const inputValue = ref('number'); //
//
//
@ -1300,7 +1304,7 @@ const menuData = ref([
fixed: false,
sortable: true,
head: true,
statistics:true,//
statistics: true, //
},
{
prop: 'handQuantity',
@ -1312,7 +1316,7 @@ const menuData = ref([
fixed: false,
sortable: true,
head: true,
statistics:true,//
statistics: true, //
},
{
prop: 'completeSetName',
@ -1347,6 +1351,39 @@ const menuData = ref([
sortable: true,
head: true,
},
{
prop: 'consigneePerson',
label: '运单收货人',
type: 1,
values: '',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'consigneeMobile',
label: '运单收货人电话',
type: 1,
values: '',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'consigneeUnit',
label: '运单收货单位',
type: 1,
values: '',
width: '280',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'customerName',
label: '顾客名字',
@ -1576,8 +1613,8 @@ function onLoad() {
loading.value = true; //
}
statisticsList.value= menuData.value.filter(item=>item.statistics);//
console.log(statisticsList.value,'需要统计的字段');
statisticsList.value = menuData.value.filter(item => item.statistics); //
console.log(statisticsList.value, '需要统计的字段');
const TabHeig = () => {
TabHeight.value = TabHeight.value.offsetHeight; //
@ -1756,20 +1793,16 @@ const selectChange = (selection, row) => {
});
}
} else {
//
if(wrapLoading.value){
wrapTemp.value = selection
//
if (wrapLoading.value) {
wrapTemp.value = selection;
//
}else{
selection.forEach(item => {
item.checked = true; //
dataTmp.value.push(item);
});
} else {
selection.forEach(item => {
item.checked = true; //
dataTmp.value.push(item);
});
}
}
};
@ -1798,7 +1831,6 @@ const submit = () => {
//
//
if (wrapLoading.value) {
dataInfo.value[dataId.value].packageListInfo = wrapTemp.value; //
console.log(wrapTemp.value, '包件订单被缓存');
//

30
src/views/warehouse/parcelList/distributionParcelList.vue

@ -417,7 +417,28 @@ export default {
// fixed: false,
// sortable: true,
// },
{
prop: 'loadingTime',
label: '装车时间',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'signingTime',
label: '签收时间',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'goodsAllocation',
label: '货位信息',
@ -647,7 +668,7 @@ export default {
btnsc() {},
//
selectsc(value, row) {
// this.query[row.prop] = value;
this.query[row.prop] = value;
//
if (row.prop === 'conditionsType') {
this.query.conditions = value;
@ -655,7 +676,10 @@ export default {
}
this.query[row.prop.replace(/Name/, '')] = value;
if (value === '') delete this.query[row.prop.replace(/Name/, '')];
if (value === '') {
delete this.query[row.prop.replace(/Name/, '')];
delete this.query[row.prop];
}
// //
// if (row.prop === 'orderPackageGroundingStatusName') {

Loading…
Cancel
Save