Browse Source

Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

fix_bug_pro20231227
qb 1 year ago
parent
commit
f007ba55bf
  1. 8
      src/api/distribution/distributionReservation.js
  2. 13
      src/api/work/work.js
  3. 24
      src/page/index/index.vue
  4. 38
      src/page/index/top/index.vue
  5. 55
      src/views/distribution/signfor/distributionSignfortreat.vue
  6. 381
      src/views/distribution/turndelivery/devtmp.vue
  7. 8
      vite.config.js

8
src/api/distribution/distributionReservation.js

@ -234,7 +234,13 @@ export const getDeliveryZeroOrderDetail = (deliveryId,orderId) => {
params: { deliveryId,orderId }
});
}
export const $_getDeliveryZeroOrderDetail = params => {
return request({
url: '/api/logpm-distribution/deliveryList/getDeliveryZeroOrderDetail',
method: 'get',
params,
});
};
/**
* 查询预约计划零担详情
* @param ids

13
src/api/work/work.js

@ -86,6 +86,19 @@ export const getMyWarehouseList = data => {
});
};
;
export const getMyCurrentWarehouse = data => {
return request({
url: '/api/logpm-basicdata/warehouse/client/getMyCurrentWarehouse',
method: 'get',
data,
});
};
export const preserveCurrentWarehouse = data => {
return request({
url: '/api/logpm-basicdata/warehouse/preserveCurrentWarehouse',

24
src/page/index/index.vue

@ -8,7 +8,7 @@
</div>
<div class="avue-main">
<!-- 顶部导航栏 -->
<top ref="top" />
<top ref="top" />
<!-- 顶部标签卡 -->
<tags />
<search class="avue-view" v-show="isSearch"></search>
@ -38,7 +38,7 @@ import search from './search.vue';
import logo from './logo.vue';
import top from './top/index.vue';
import sidebar from './sidebar/index.vue';
import { getMyCurrentWarehouse } from '@/api/work/work';
export default {
mixins: [index],
components: {
@ -53,6 +53,7 @@ export default {
provide() {
return {
index: this,
};
},
computed: {
@ -73,6 +74,18 @@ export default {
},
},
data(){
return{
TabName:null,
}
},
created() {
getMyCurrentWarehouse().then(res=>{
console.log(res,'初始化请求参数');
console.log(res.data.name,'仓库名称');
localStorage.setItem('WarehouseName', res.data.name);
})
},
mounted() {
if (this.userInfo.tenant_id == '000000') {
let obj = JSON.parse(JSON.stringify(this.setting));
@ -89,6 +102,7 @@ export default {
},
props: [],
methods: {
//
openMenu(item = {}) {
this.$store.dispatch('GetMenu', item.id).then(data => {
@ -122,8 +136,8 @@ export default {
};
</script>
<style lang='scss'>
.el-card__body{
padding:10px !important;
<style lang="scss">
.el-card__body {
padding: 10px !important;
}
</style>

38
src/page/index/top/index.vue

@ -29,9 +29,12 @@
<div class="top-bar__item" v-if="setting.debug">
<top-logs></top-logs>
</div>
<!-- 仓库名称 -->
<div class="top-bar__item">
<view>{{ datalist[checkwarehousevalue]?.name||'' }}</view>
<view>{{ datalist[checkwarehousevalue]?.name || '' }}</view>
</div>
<div class="top-user">
<img class="top-bar__img" :src="userInfo.avatar" />
<el-dropdown>
@ -112,20 +115,33 @@ export default {
isshow: false,
datalist: [],
warehousevalue: '',
checkwarehousevalue:0,
checkwarehousevalue: 0,
dataName: null,
};
},
mounted() {
getMyWarehouseList().then(res => {
console.log(res.data.data, 'getMyWarehouseList');
let arr = [{ name: '全部', id: '0' }];
this.datalist = arr.concat(res.data.data);
});
this.checkwarehousevalue=Number(localStorage.getItem('checkwarehousevalue'))
console.log(this.checkwarehousevalue)
console.log(res.data.data, 'getMyWarehouseList');
let arr = [{ name: this.dataName?this.dataName:'', id: '0' }];
this.datalist = arr.concat(res.data.data);
});
this.checkwarehousevalue = Number(localStorage.getItem('checkwarehousevalue'));
},
filters: {},
created() {},
created() {
this.dataName=null
let warehouseName = localStorage.getItem('WarehouseName');
let modifiedName = warehouseName.replace(/"/g, '');
if (modifiedName == 'undefined') {
this.dataName = '';
console.log('当前暂时没有参数',this.dataName);
} else {
this.dataName = modifiedName;
console.log(this.dataName,'当前参数存在值');
}
},
computed: {
...mapGetters([
'setting',
@ -152,7 +168,7 @@ export default {
let res = await getclearWarehouseCache({});
if (res.data.code == 200) {
this.$message({ message: '切换成功', type: 'success' });
localStorage.setItem('checkwarehousevalue',this.warehousevalue)
localStorage.setItem('checkwarehousevalue', this.warehousevalue);
this.$router.push({
path: '/',
});
@ -166,7 +182,7 @@ export default {
let res = await preserveCurrentWarehouse(this.datalist[this.warehousevalue]);
if (res.data.code == 200) {
this.$message({ message: '切换成功', type: 'success' });
localStorage.setItem('checkwarehousevalue',this.warehousevalue)
localStorage.setItem('checkwarehousevalue', this.warehousevalue);
this.$router.push({
path: '/',
});

55
src/views/distribution/signfor/distributionSignfortreat.vue

@ -82,14 +82,17 @@
<!-- </el-form>-->
<!-- </el-row>-->
<div class='el-zy-top'>
<el-row :gutter="24" class="rows">
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span>司机待签收数{{ statistics.driverNub }}</span>
</el-col>
<el-col :xl="10" :lg="7" :md="8" :sm="24">
<span>文员待审核数{{ statistics.clerkNub }}</span>
</el-col>
</el-row>
<div class="order-info">
<ul>
<li>
<img src="../../../../public/img/bg/Delivery.png" /> <span>司机待签收数{{ statistics.driverNub }}</span>
</li>
<li>
<img src="../../../../public/img/bg/package.png" /> <span>文员待审核数{{ statistics.clerkNub }}</span>
</li>
</ul>
</div>
<el-row >
<div class="avue-crud__header">
@ -1610,4 +1613,40 @@ export default {
align-items: flex-end
}
}
.order-info {
margin-right: 3%;
ul {
list-style: none;
display: flex;
padding: 0;
li {
color: #172e60;
position: relative;
padding: 0 20px;
display: flex;
align-items: center;
font-weight: 500;
img {
margin-right: 4px;
}
}
li::after {
content: '';
display: block;
width: 0.10417vw;
height: 18px;
background-color: #dddbdb;
position: absolute;
top: 2px;
left: 0px;
}
}
li:first-child::after {
content: none;
}
li:first-child {
padding-left: 0;
}
}
</style>

381
src/views/distribution/turndelivery/devtmp.vue

@ -274,7 +274,6 @@
<!-- 表格列开始 -->
<el-table
:data="dataInfo"
:row-key="name"
border
:height="TabHeight + 'px'"
style="width: 100%"
@ -329,7 +328,7 @@
</el-table-column>
</template>
<template v-if="item.type === 3">
<template v-if="item.type === 3 || item.isZero == '1'">
<el-table-column
v-if="item.head"
fixed="right"
@ -337,7 +336,7 @@
width="280"
align="center "
>
<template #default="scope">
<template #default="props">
<div :class="ElBtnClass">
<el-button
:link="ElButtonS[0].link"
@ -345,26 +344,38 @@
:auto-insert-space="ElButtonS[0].space"
:size="ElButtonS[0].size"
:icon="ElButtonS[0].icon"
@click="DeleteEvent(scope.row)"
>删除</el-button
@click="ViewEvent(props.row)"
>查看包件</el-button
>
<!-- <el-button
:link="ElButtonS[1].link"
:class="ElButtonS[1].class"
:auto-insert-space="ElButtonS[1].space"
:size="ElButtonS[1].size"
:icon="ElButtonS[1].icon"
@click="EditEvent(scope.row)"
>编辑</el-button
> -->
<el-button
v-if="props.row.isZero == '1'"
:link="ElButtonS[1].link"
:class="ElButtonS[1].class"
:auto-insert-space="ElButtonS[1].space"
:size="ElButtonS[1].size"
:icon="ElButtonS[1].icon"
@click="Entering(props.row)"
>在库录入</el-button
>
<el-button
v-if="props.row.isZero == '1'"
:link="ElButtonS[2].link"
:class="ElButtonS[2].class"
:auto-insert-space="ElButtonS[2].space"
:size="ElButtonS[2].size"
:icon="ElButtonS[2].icon"
@click="ViewEvent(scope.row)"
>查看</el-button
@click="QuantityEntry(props.row)"
>数量录入</el-button
>
<el-button
:link="ElButtonS[4].link"
:class="ElButtonS[4].class"
:auto-insert-space="ElButtonS[4].space"
:size="ElButtonS[4].size"
:icon="ElButtonS[4].icon"
@click="DeleteEvent(props.row)"
>删除</el-button
>
</div>
</template>
@ -681,8 +692,10 @@
</el-tabs>
<!-- 弹窗组件 -->
<div class="addlalog addlalogS">
<el-dialog v-model="SjTc" title="司机信息配置">
<el-table :data="DvInfoData" border style="width: 100%">
<!-- <el-dialog v-model="SjTc" title="司机信息配置"> -->
<el-dialog v-model="comprehensive" title="零担品类信息">
<!-- 司机信息弹窗 -->
<el-table v-if="SjTc" :data="DvInfoData" border style="width: 100%">
<el-table-column prop="driverName" label="司机信息" />
<el-table-column prop="vehicleNub" label="车辆信息" />
<el-table-column label="操作">
@ -691,17 +704,61 @@
</template>
</el-table-column>
</el-table>
<!-- EnteringLibrary在库录入 -->
<div Class="iszer">
<!-- <span style="font-weight: bold; display: block; padding-bottom: 10px"
>在库总数:{{ dataInfo[dataId].handQuantity }}</span
> -->
<el-table v-if="EnteringLibrary" :data="isZeroTable" border style="width: 100%">
<el-table-column fixed prop="firsts" label="名称" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="handQuantity" label="在库数量" />
<el-table-column prop="deliveryQuantity" label="冻结数量" />
<el-table-column prop="outboundQuantity" label="出库数量" />
<el-table-column label="可用数量">
<template #default="props">
<span>
{{
props.row.handQuantity - props.row.deliveryQuantity - props.row.outboundQuantity
}}</span
>
</template>
</el-table-column>
<!-- 在库=冻结-出库 -->
<el-table-column fixed="right" label="数量操作">
<template #default="scope">
<el-input-number
size="small"
v-model="scope.row.number"
:min="0"
:max="scope.row.quantity"
@change="isZeroNumber(scope.row)"
/>
</template>
</el-table-column>
</el-table>
<div class="isZel-btn">
<el-button v-if="!QuantityEntryStatus" color="#172e60" type="success" @click="ModifyLCL"
>修改(零担订单)</el-button
>
<el-button color="#172e60" type="success" @click="SubmitLoad">提交(零担订单)</el-button>
</div>
</div>
</el-dialog>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, onMounted, computed, watch, watchEffect } from 'vue';
import { ref, reactive, onMounted, computed, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import {
$_selectStockArticleInfoList,
$_getPackageListByStockArticleId,
getZeroOrderDetail,
$_getDeliveryZeroOrderDetail,
} from '@/api/distribution/distributionStockArticle'; //API
import { getVehicleList } from '@/api/basicdata/basicdataVehicle'; //
import { getDriverList } from '@/api/basicdata/basicdataDriverArtery'; //
@ -717,6 +774,7 @@ import {
} from '@/api/distribution/distributionDeliveryList'; //
import { getDictionaryBiz } from '@/api/system/dict'; //
import type { FormProps } from 'element-plus';
import { updateEntryNum, entryNum } from '@/api/distribution/distributionParcelNumber';
const route = useRoute();
const router = useRouter();
//
@ -730,6 +788,7 @@ const numTab = ref([
name: '1',
},
]);
const num = ref(null); //
const kind = ref(true); //
const currentPage = ref(1); //
const pageSize = ref(20); //
@ -775,6 +834,12 @@ const RouteId = ref(null); //编辑页面的ID参数
const labelPosition = ref<FormProps['labelPosition']>('right');
const SoInfoData = ref(); //
const parameter = ref({}); //
const wrapTemp = ref([]); //
const EnteringLibrary = ref(true); //
const QuantityEntryS = ref(false); //
const isZeroTable = ref([]); //
const comprehensive = ref(false); //,
const QuantityEntryStatus = ref(false); //
//
//
//
@ -819,7 +884,8 @@ const StockInfo = ref({
});
const selectable = (row, index) => {
if (row.orderPackageReservationStatusName == '已预约') {
// row.orderPackageReservationStatusName == '' ||
if (row.checked) {
return false; //
} else {
return true; //
@ -975,12 +1041,27 @@ const ElButtonS = ref([
// 3.size ('large'| 'default'| 'small')
// 4.icon
// 5.table
{
class: 'el-btn-danger',
class: 'el-btn-view',
space: true,
size: 'small',
icon: 'el-icon-delete',
table: '删除',
icon: 'el-icon-view',
table: '查看',
},
{
class: 'el-btn-view',
space: true,
size: 'small',
icon: 'el-icon-view',
table: '在库录入',
},
{
class: 'el-btn-view',
space: true,
size: 'small',
icon: 'DataLine',
table: '数量录入',
},
{
class: 'el-btn-success',
@ -990,11 +1071,11 @@ const ElButtonS = ref([
table: '编辑',
},
{
class: 'el-btn-view',
class: 'el-btn-danger',
space: true,
size: 'small',
icon: 'el-icon-view',
table: '查看',
icon: 'el-icon-delete',
table: '删除',
},
]);
//
@ -1288,7 +1369,7 @@ const menuData = ref([
label: '操作',
type: 3,
values: '',
width: '280',
width: '680',
checkarr: [],
fixed: false,
sortable: true,
@ -1534,22 +1615,23 @@ async function OrderSelection(id, DataParameter) {
genre: 1, //
current: currentPage.value, //
size: pageSize.value, //
...DataParameter,
...DataParameter, //
}).then(res => {
loading.value = false; //
data.value = res.data.data.records;
//
console.log(kind.value, 'kind.value');
let setIn = setTimeout(() => {
dataInfo.value.forEach(val => {
tableRefs.value[id].toggleRowSelection(
data.value[data.value.findIndex(item => item.id === val.id)],
true
);
const index = data.value.findIndex(item => item.id === val.id);
if (index > -1) {
const item = data.value[index];
item.checked = true;
tableRefs.value[id].toggleRowSelection(item);
}
});
clearTimeout(setIn); //
}, 0);
clearTimeout(setIn); //
}, 1);
//
// toggleSelection(false, dataId, data.value);
console.log(
@ -1571,7 +1653,9 @@ function dataTabInfo() {
}
//
const AddInfo = () => {
// dataTmp.value = []; //
dataTmp.value = [];
console.log('提交前的参数', dataInfo.value);
console.log('提交前前临时存储', dataTmp.value);
AddLalog.value = true; //
wrapLoading.value = false; //
dataTabInfo(); //
@ -1605,41 +1689,80 @@ const selectAll = val => {
};
//
const selectChange = (selection, row) => {
// 1.selection
// 2.row
//
selection.forEach(item => {
dataTmp.value.push(item);
dataTmp.value = [...new Set(dataTmp.value)];
});
console.log(dataTmp.value, '存储好的值');
//
//
if (RouteId.value) {
console.log(selection, 'selection信息');
let tmp = selection;
tmp = dataTmp.value;
dataTmp.value = tmp;
console.log(dataTmp.value, '存储好的值');
console.log(dataTmp, '当前选中的包件信息');
// wrapLoading
if (wrapLoading.value) {
let packageListInfo = [];
packageListInfo = dataTmp.value;
console.log(dataId.value, 'dataId.value');
console.log(dataInfo.value[dataId.value], 'dataInfo.value[dataId.value]');
dataInfo.value[dataId.value].packageListInfo = dataTmp.value;
let packageListInfo = []; //
// packageListInfo = dataTmp.value;//
dataTmp.value = selection; //
// dataTmp.value = dataInfo.value;
console.log(dataInfo.value, '包件信息选中');
dataTmp.value = dataInfo.value;
console.log(dataId.value, '当前选中的订单ID下标');
console.log(dataInfo.value[dataId.value], '当前操作的订单');
} else {
console.log('在库订单信息');
console.log('当前为在库订单信息');
// dataTmp.value = selection; //
selection.forEach(item => {
item.checked = true; //
dataTmp.value.push(item);
});
}
} else {
//
selection.forEach(item => {
item.checked = true; //
dataTmp.value.push(item);
});
}
};
// wrapLoading
//
//
const submit = () => {
//
if (RouteId.value) {
if (!wrapLoading.value) {
dataTmp.value.forEach(item => {
dataInfo.value.push(item);
});
console.log(dataInfo.value, '要展示的值');
console.log('触发1');
} else {
//
let packageListInfo = [];
console.log('触发2');
dataInfo.value[dataId.value].packageListInfo = dataTmp.value; //
// dataInfo.value[dataId.value].packageListInfo = wrapData.value;
wrapTemp.value[dataId.value] = dataTmp.value;
console.log(wrapTemp.value, '包件订单被缓存');
console.log(dataInfo.value[dataId.value].packageListInfo, '被添加到当前订单下面');
console.log(dataInfo.value, '所有订单信息');
}
} else {
//
//
dataTmp.value.forEach(item => {
dataInfo.value.push(item);
});
console.log(dataTmp.value, '暂存数据');
console.log(selection, '当前选中的信息');
console.log('提交后的参数', dataInfo.value);
console.log('提交后的临时存储', dataTmp.value);
}
//
dataInfo.value = removeDuplicates(dataInfo.value);
//
dataTmp.value = removeDuplicates(dataTmp.value);
AddLalog.value = false; //
};
//
function removeDuplicates(arr) {
const ids = arr.map(obj => obj.id);
return arr.filter((item, index) => ids.indexOf(item.id) === index);
}
//
const DeleteEvent = val => {
//
@ -1721,27 +1844,21 @@ const ViewEvent = val => {
console.log(res, '订单包件信息');
if (res.data.code == 200) {
wrapData.value = res.data.data.data.packageList;
console.log(res, 'res,修改下的包件信息');
console.log(res.data.data.data, 'res.data.data.data.packageList');
if (res.data.data.data.packageListIds) {
if (kind.value) {
toggleSelection({
val: false,
data: res.data.data.data.packageListIds.split(','),
index: 0,
}); //
} else {
toggleSelection({
val: false,
data: res.data.data.data.packageListIds.split(','),
index: 1,
}); //
}
let IdTmp = []; //ID
dataInfo.value[dataId.value].packageListInfo = wrapTemp.value[dataId.value];
//,,,使API
if (dataInfo.value[dataId.value].packageListInfo) {
dataInfo.value[dataId.value].packageListInfo.forEach(item => {
IdTmp.push(item.id);
});
}
toggleSelection({
val: false,
data: IdTmp.length ? IdTmp : res.data.data.data.packageListIds.split(','),
index: kind.value ? 0 : 1,
}); //
}
// AddLalog.value = false; //
editLoading.value = false; //
console.log(wrapData.value, '包件表格信息');
console.log(res);
});
@ -1759,19 +1876,73 @@ const ViewEvent = val => {
toggleSelection({ index: 1 }); //
}
console.log(tableRefs, 'tableRefs');
console.log(res.data.data.records, '查看下面的包件');
});
//
console.log('当前为新增状态');
console.log(val, val.id, '查看包件事件');
//
console.log(dataId.value, 'dataId.value下标');
console.log(wrapDataInfo.value[dataId.value], '当前订单下面的包件信息');
console.log(wrapDataInfo, '订单');
editLoading.value = false; //
}
editLoading.value = false; //
};
//
const Entering = val => {
dataId.value = findIndexById(val.id); //
comprehensive.value = true; //
EnteringLibrary.value = true; //
QuantityEntryStatus.value = false; //
console.log('在库录入', val);
getZeroOrderDetail(val.id).then(res => {
console.log(res, '在库录入返回信息');
isZeroTable.value = res.data.data;
});
};
//
const QuantityEntry = val => {
dataId.value = findIndexById(val.id); //
comprehensive.value = true; //
QuantityEntryStatus.value = true; //
EnteringLibrary.value = true; //
getZeroOrderDetail(val.id).then(res => {
console.log(res, '数量录入返回信息');
isZeroTable.value = res.data.data;
});
};
//
const ModifyLCL = () => {
updateEntryNum(isZeroTable.value).then(res => {
console.log(res, '修改零担');
console.log(isZeroTable.value, '修改零担的值');
});
comprehensive.value = false; //
QuantityEntryStatus.value = false; //
EnteringLibrary.value = false; //
};
//
const SubmitLoad = () => {
//
// QuantityEntryStatus
if (QuantityEntryStatus.value) {
dataInfo.value[dataId.value].parcelListVOS = isZeroTable.value;
console.log(dataInfo.value[dataId.value], '当前零担信息');
}
entryNum(isZeroTable.value).then(res => {
console.log(res, '提交零担');
console.log(isZeroTable.value, '提交零担的值');
});
comprehensive.value = false; //
EnteringLibrary.value = false; //
QuantityEntryStatus.value = false; //
};
//
const isZeroNumber = val => {
console.log(val, '当前操作数据');
val.number = val.number;
};
//
const refresh = () => {
@ -2002,6 +2173,7 @@ const merge = (val, kindS) => {
if (val == 'submit') {
return;
}
comprehensive.value = true; //
SjTc.value = true;
};
@ -2034,26 +2206,7 @@ const moveUpVehictle = row => {
DataSubmit.value.masterDriverName = DvInfoData.value[0].driverName; //
DataSubmit.value.masterVehicleNub = DvInfoData.value[0].vehicleNub; //
};
//
const submit = () => {
//
if (RouteId.value) {
if (!wrapLoading.value) {
dataInfo.value = dataTmp.value; //
console.log(data.value, '准备好的值');
} else {
//
let packageListInfo = [];
dataInfo.value[dataId.value].packageListInfo = wrapData.value;
console.log(dataInfo.value[dataId.value].packageListInfo, '被添加到当前订单下面');
}
} else {
//
dataInfo.value = dataTmp.value; //
}
AddLalog.value = false; //
};
//
const SubmitCommercial = () => {
// kind
@ -2067,9 +2220,15 @@ const SubmitCommercial = () => {
if (!state.value) {
return;
}
// packageListInfo
dataInfo.value.forEach(item => {
if (!item.packageListInfo) {
item.packageListInfo = [];
}
});
DataSubmit.value.stockArticle = dataInfo.value; //
//
//
//
if (RouteId.value) {
if (!kind.value) {
delete DataSubmit.value.allocationInfo; //
@ -2297,9 +2456,11 @@ const SubmitCommercial = () => {
}
}
}
//
:deep(.addlalog) {
//
.el-dialog__header {
border-bottom: 1px solid #172e607d;
margin-right: 0;
@ -2313,6 +2474,7 @@ const SubmitCommercial = () => {
transition: transform 1s;
}
}
.el-dialog__header button:hover {
i {
transform: rotate(360deg);
@ -2611,4 +2773,17 @@ const SubmitCommercial = () => {
margin-top: 18px;
}
}
.iszer {
:deep(.cell) {
display: flex;
padding: 0;
align-items: center;
justify-content: center;
}
.isZel-btn {
display: flex;
justify-content: flex-end;
margin-top: 26px;
}
}
</style>

8
vite.config.js

@ -16,14 +16,18 @@ export default ({ mode, command }) => {
// hy
// target: 'http://192.168.10.48:8888',
// lmy
// target: 'http://192.168.10.123:8889',
// target: 'http://192.168.10.123:8889',
// caoge
// target: 'http://192.168.10.101:8888',
// cyz
// target: 'http://192.168.10.75:8777',
target: 'http://192.168.10.75:8777',
// tjj
// target: 'http://192.168.10.29:13000',
<<<<<<< HEAD
// target: 'http://test.api.huitongys.com',
=======
target: 'http://test.api.huitongys.com',
>>>>>>> b03d088923c558e796ad872d1c718c34ccd5d8be
// target: 'http://h5uapi.huitongys.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),

Loading…
Cancel
Save