Browse Source

修复地图,已知bug,添加字段,取消计划

dev-xx
马远东 1 year ago
parent
commit
a06ba7498c
  1. 11
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  2. 155
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue
  3. 14
      src/views/distribution/deliverylist/distributionDeliveryListmar.vue
  4. 164
      src/views/distribution/inventory/distributionStockListDetails.vue
  5. 162
      src/views/distribution/reservation/atlas.vue
  6. 12
      src/views/distribution/reservation/reservation.vue
  7. 2
      vite.config.js

11
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -408,6 +408,17 @@ export default {
sortable: true,
hide: true,
},
{
prop: 'orderCode',
label: '订单自编号',
type: 2,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
hide: true,
},
{
prop: 'kindName',
label: '配送种类',

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

@ -128,11 +128,9 @@
<!-- </div>-->
<!-- </div>-->
<!-- </el-row>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="handleExport">
</el-button>
<el-button type="warning" plain icon="el-icon-download" @click="handleExport"
>
</el-button>
<el-tabs
v-model="activeTab"
@tab-click="handleTabClick"
@ -607,9 +605,9 @@
<el-button @click="LdBatchsigning" style="margin-bottom: 4px" type="primary"
>批量签收</el-button
>
<el-button @click="LdBatchcancellation" style="margin-bottom: 4px" type="primary"
<!-- <el-button @click="LdBatchcancellation" style="margin-bottom: 4px" type="primary"
>批量计划取消</el-button
>
> -->
<tablecmt
:columnList="wrapoption.LessThantruckloadListData"
:tableData="LessThantruckloadListData"
@ -1782,17 +1780,17 @@ export default {
fixed: false,
sortable: true,
},
// {
// prop: 'fahuoTime',
// label: '',
// type: 1,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// head: false,
// },
// {
// prop: 'fahuoTime',
// label: '',
// type: 1,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// head: false,
// },
{
prop: 'warehouseEntryTimeEnd',
label: '入库时间',
@ -3131,6 +3129,21 @@ export default {
},
],
reservationInventoryoptioncolumn: [
{
prop: '',
label: '复选框',
type: 0,
width: 55,
fixed: true,
},
{
prop: '',
label: '序号',
type: 12,
values: '',
width: 55,
fixed: true,
},
{
prop: 'incomingBatch',
label: '入库批次号',
@ -4043,7 +4056,7 @@ export default {
this.website.tokenHeader
}=${getToken()}`;
let values = {
deliveryId:this.deliveryId
deliveryId: this.deliveryId,
};
this.$confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
@ -4304,24 +4317,30 @@ export default {
});
},
cancelReservationInventoryPackage(row) {
console.log('row', row);
console.log('deliveryId', this.deliveryId);
console.log('reservationId', this.wid);
this.$message.warning('功能维护中...');
return;
// let data = {
// deliveryId:this.deliveryId,
// reservationId:this.wid,
// type:1,
// packageIds:row.id
// }
// cancelReservationPackage(data).then(res=>{
// if (res.data.code === 200){
// this.$message.success(res.data.msg);
// this.getWrapdetails(this.page);
// }
// })
this.$confirm('是否计划取消?')
.then(() => {
this.loading = true; //
let data = {
deliveryId: this.deliveryId,
reservationId: this.wid,
type: 2,
packageIds: row.id,
};
this.loading = true;
cancelReservationPackage(data)
.then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.getReservationInventoryPackageListInfo(this.page);
}
})
.catch(res => {
}).finally(()=>{
this.loading = false;
});
})
.catch(() => {});
},
signingReservationPackage(row) {
console.log('row', row);
@ -4486,26 +4505,50 @@ export default {
},
//
Batchcancellation() {
let data = {
deliveryId: this.deliveryId,
reservationId: this.wid,
type: 1,
packageIds: this.selectionList.map(item => item.id).join(','),
};
this.loading = true;
cancelReservationPackage(data)
.then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.getWrapdetails(this.page);
}
this.selectionList = []; //
this.loading = false;
})
.catch(res => {
this.selectionList = []; //
this.loading = false;
if (!this.selectionList.length) {
ElMessage({
message: '请勾选需要计划取消的数据',
type: 'warning',
});
return;
}
let result = this.selectionList.every(item => item.stockSignfoStatus == 10 && item.stockLockingStatus==10);
if(!result){
ElMessage({
message: '有已经存在签收的订单,不满足批量签收条件',
type: 'warning',
});
return
}
this.$confirm('是否进行批量计划取消?')
.then(() => {
this.loading = true; //
let data = {
deliveryId: this.deliveryId,
reservationId: this.wid,
type: 2,
packageIds: this.selectionList.map(item => item.id).join(','),
};
this.loading = true;
cancelReservationPackage(data)
.then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.msg);
this.getReservationInventoryPackageListInfo(this.page);
}
this.selectionList = []; //
this.loading = false;
})
.catch(res => {
this.selectionList = []; //
this.loading = false;
});
})
.catch(() => {});
},
/**printTemplate
* 打印

14
src/views/distribution/deliverylist/distributionDeliveryListmar.vue

@ -8,7 +8,7 @@
<el-input v-model="query.trainNumber" placeholder="请输入配送车次"></el-input>
</el-form-item>
<el-form-item label="客户名称:">
<el-input v-model="query.clineName" placeholder="请客户名称"></el-input>
<el-input v-model="query.clineName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item label="配送日期:" class="el-times">
<el-date-picker v-model="query.taskTime" type="date" placeholder="选择日期">
@ -318,7 +318,17 @@ export default {
fixed: false,
sortable: true,
},
{
prop: 'orderCode',
label: '订单自编号',
type: 2,
type: 2,
values: '',
width: '140',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'kindName',
label: '配送种类',

164
src/views/distribution/inventory/distributionStockListDetails.vue

@ -1,32 +1,66 @@
<template>
<basic-container v-loading="loadingObj.pageLoading">
<basic-container>
<div class="avue-crud">
<el-divider>{{ $route.query.name }}</el-divider>
<!-- <el-row v-if="!search" style="padding:6px 18px">-->
<!-- 查询模块 -->
<el-form :model="queryOwn" label-width="80px">
<el-row>
<el-col :span="10">
<el-form-item label="货物名称:">
<span>{{ queryOwn.descriptionGoods }}</span>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="货物编码:">
<span>{{ queryOwn.cargoNumber }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="所在仓库:">
<span>{{ queryOwn.warehouseName }}</span>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="商场/客户:">
<span>{{ queryOwn.marketName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="货物单位:">
<span>{{ queryOwn.cargoUnit || '无' }}</span>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="门店地址:">
<!-- <span>{{ queryOwn?:!queryOwn.storeName ? !queryOwn: '无' : queryOwn.storeName }}</span> -->
<span>{{ queryOwn.storeNam || '无' }}</span>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="10">
<el-form-item label="库位信息:">
<span>{{query.orderCode}}</span>
</el-form-item>
<div class="flex header_info">
<el-form-item label="货物名称:">
<span>{{ queryOwn.descriptionGoods }}</span>
</el-form-item>
<el-form-item label="货物编码:">
<span>{{ queryOwn.cargoNumber }}</span>
</el-form-item>
<el-form-item label="所在仓库:">
<span>{{ queryOwn.warehouseName }}</span>
</el-form-item>
<el-form-item label="商场/客户:">
<span>{{ queryOwn.marketName }}</span>
</el-form-item>
<el-form-item label="货物单位:">
<span>{{ queryOwn.cargoUnit }}</span>
</el-form-item>
<el-form-item label="门店地址:">
<span>{{ queryOwn.storeNam }}</span>
</el-form-item>
<el-form-item label="在库数:">
<span>{{ queryOwn.quantityStock }}</span>
</el-form-item>
</div>
</el-col>
<el-col :span="10">
<el-form-item label="商城名称:">
<el-input v-model="query.mallName" placeholder="请输入商城名称"></el-input>
</el-form-item>
</el-col>
</el-row>-->
<!-- 查询按钮 -->
<!-- <el-form-item>-->
<!-- <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>-->
</el-form>
<el-row>
<!-- 列表模块 -->
<el-tabs
@ -194,7 +228,7 @@
</el-row>-->
</div>
<el-dialog title="二维码" :visible.sync="dialogVisibleF" width="780px" v-model="dialogVisibleF">
<div class="printNode">
<div>
<div v-html="html"></div>
</div>
<span slot="footer" class="dialog-footer">
@ -226,7 +260,6 @@ import { getListStock } from '@/api/distribution/distributionStock';
import { getStockListInfoList } from '@/api/distribution/distributionStockListInfo';
import { downloadXls } from '@/utils/util';
import { ElMessage, ElMessageBox } from 'element-plus';
import print from '@/utils/print';
export default {
data() {
return {
@ -398,17 +431,17 @@ export default {
sortable: true,
head: false,
},
// {
// prop: 'quantityStock',
// label: '',
// type: 2,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// head: false,
// },
{
prop: 'quantityStock',
label: '在库数',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'num',
label: '货位数',
@ -584,9 +617,6 @@ export default {
data2: [],
data3: [],
leibiao: '',
loadingObj: {
pageLoading: false,
},
};
},
mounted() {
@ -614,23 +644,22 @@ export default {
},
methods: {
//
async handleInventoryQRCode({ row }) {
try {
this.loadingObj.pageLoading = true;
this.html = '';
const res = await showInventorySourcePackageCode(row.incomingBatch, row.parcelListId);
const { code, data } = res.data;
if (code !== 200) retrun;
handleInventoryQRCode(scope) {
const { row } = scope;
console.log('执行查看二维码------------>row:', row);
this.html = this.getHtmls(data.dataList, data.templateHtml);
this.dialogVisibleF = true;
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
this.materialQRCode = row;
console.log('---------------->', row);
let qr = {
ids: row.id,
};
this.html = '';
showInventorySourcePackageCode(row.incomingBatch, row.parcelListId).then(res => {
// this.orderPackageCode = res.data
console.log(res.data);
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
this.dialogVisibleF = true;
},
revokeFn(val) {
ElMessageBox.confirm('撤销物料会产生库存数量扣减,是否继续?', 'Warning', {
@ -950,11 +979,6 @@ export default {
await this.getOnKu(page, (params = { pid: this.queryOwn.pid }));
}
},
/** 打印 */
printTemplate() {
const nodeArr = document.querySelectorAll('.printNode>div>div');
print(nodeArr);
},
},
};
</script>
@ -971,20 +995,4 @@ el-select {
.el-form-item__label {
justify-content: flex-start;
}
.header_info {
flex-wrap: wrap;
> div {
width: 33%;
box-sizing: border-box;
margin: 0;
padding: 0 20px 20px 0;
font-size: 0.9rem;
}
}
:deep(.el-divider__text.is-center) {
font-size: 1.5rem;
color: var(--el-color-primary);
}
</style>

162
src/views/distribution/reservation/atlas.vue

@ -19,7 +19,7 @@
/>
</div>
</el-scrollbar>
<span class="txbxSpan">当前总条数:{{datalists.length}}&emsp;&emsp;当前勾选条数:{{Checkthebox.length}}</span>
<span class="txbxSpan">总条数:{{CheckthMax.length}}&emsp;&emsp;地址正确总条数:{{datalists.length}}&emsp;&emsp;<span v-if="Checkthebox.length"> 当前勾选条数:{{Checkthebox.length}} </span></span>
</div>
</div>
<div style="display: flex; align-items: center; justify-content: center">
@ -57,6 +57,7 @@ let details = reactive({
// datalist:[]
});
const Checkthebox=ref([]);
const CheckthMax=ref([]);
onMounted(() => {
initmap();
});
@ -65,8 +66,10 @@ watchEffect(() => {
details.item = router.currentRoute.value.query.id;
if (!details.item) return;
getReservationAddr(details.item).then(res => {
console.log(res.data.data,'参数接受的');
Checkthebox.value = res.data.data;//
CheckthMax.value = res.data.data;//
const data = res.data.data;
details.reservationData = res.data.data;
details.mapLoc.remove(details.markersarr);
@ -78,7 +81,7 @@ watchEffect(() => {
details.drivingarrs = [];
// details.datalists = [];
init(res.data.data);
Dtloading.value=false
});
});
function initmap() {
@ -87,10 +90,12 @@ function initmap() {
viewMode: '2D', // 使 2D
zoom: 9, //
center: [104.293242, 30.582939], //
zooms:[3,16], // 3-20
});
});
}
function checkgoto() {
let ids = [];
details.datalists.map(item => {
console.log('item>>>>>>>>>>>>>>', item);
@ -112,57 +117,129 @@ function checkgoto() {
});
useStores.commit('DEL_TAG_CURRENT');
}
// async function init(data) {
// if (details.mapLoc) {
// await details.mapLoc.clearMap(); //
// // maplabel()
// let geocodess = [];
// var geocoder = new AMap.Geocoder({});
// data.map(async (item, index) => {
// if (!item.jingdu || !item.weidu) {
// return ElMessage.warning('');
// }
// var marker = new AMap.Marker({
// map: details.mapLoc,
// position: [item.jingdu, item.weidu],
// icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
// anchor: 'bottom-center',
// offset: new AMap.Pixel(0, 0),
// });
// await marker.setMap(details.mapLoc);
// await marker.setLabel({
// offset: new AMap.Pixel(0, -5), //
// content: `<div class='info'>${item.warehouseName}</div>`, //
// direction: 'top', //
// });
// // details.markersarr=[]//
// details.markersarr.push(marker);
// await geocoder.getLocation(item.deliveryAddress, (status, result) => {
// console.log(status,'status');
// console.log(result,'result');
// if (status == 'complete' && result.info == 'OK') {
// // result
// details.mapLoc.setCenter([
// result.geocodes[0].location.lng,
// result.geocodes[0].location.lat,
// ]);
// geocodess.push({
// pontion: result.geocodes[0].location,
// content: item.consignee + '--' + item.deliveryAddress + '' + '--' + item.deliveryPhone,
// items: item,
// });
// // if (index + 1 == data.length) {
// // console.log(geocodess,'geocodess');
// // maker(geocodess);
// // Driving(geocodess);
// // }
// //
// console.log(geocodess,'geocodess');
// maker(geocodess);
// Driving(geocodess);
// }
// });
// });
// }
// }
async function init(data) {
await details.mapLoc.clearMap(); //
// maplabel()
console.log(details.mapLoc);
if (!details.mapLoc) {
return; //
}
await details.mapLoc.clearMap(); //
let geocodess = [];
var geocoder = new AMap.Geocoder({});
data.map(async (item, index) => {
const geocoder = new AMap.Geocoder({});
details.markersarr = []; //
// 使 for...of map
for (let item of data) {
if (!item.jingdu || !item.weidu) {
console.log(item.jingdu);
return ElMessage.warning('地址有问题');
ElMessage.warning('地址有问题');
continue; //
}
var marker = new AMap.Marker({
const marker = new AMap.Marker({
map: details.mapLoc,
position: [item.jingdu, item.weidu],
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
anchor: 'bottom-center',
offset: new AMap.Pixel(0, 0),
});
await marker.setMap(details.mapLoc);
await marker.setLabel({
offset: new AMap.Pixel(0, -5), //
content: `<div class='info'>${item.warehouseName}</div>`, //
direction: 'top', //
marker.setLabel({
offset: new AMap.Pixel(0,0), //
content: `<div class='info'>${item.warehouseName}</div>`, //
direction: 'top', //
});
// details.markersarr=[]//
details.markersarr.push(marker);
await geocoder.getLocation(item.deliveryAddress, (status, result) => {
console.log(status,'status');
console.log(result,'result');
if (status === 'complete' && result.info === 'OK') {
// result
details.mapLoc.setCenter([
result.geocodes[0].location.lng,
result.geocodes[0].location.lat,
]);
geocodess.push({
pontion: result.geocodes[0].location,
content: item.consignee + '--' + item.deliveryAddress + '' + '--' + item.deliveryPhone,
items: item,
});
if (index + 1 == data.length) {
maker(geocodess);
Driving(geocodess);
details.markersarr.push(marker); //
// geocoder.getLocation 使 await
const result = await new Promise((resolve) => {
geocoder.getLocation(item.deliveryAddress, (status, response) => {
if (status === 'complete' && response.info === 'OK') {
resolve(response);
} else {
resolve(null); // null
}
}
});
});
});
if (result) {
details.mapLoc.setCenter([
result.geocodes[0].location.lng,
result.geocodes[0].location.lat,
]);
geocodess.push({
pontion: result.geocodes[0].location,
content: `${item.consignee}--${item.deliveryAddress}--${item.deliveryPhone}`,
items: item,
});
}
}
if (geocodess.length > 0) {
maker(geocodess);
Driving(geocodess);
}else{
Dtloading.value=false
}
}
//
function maker(geocodess) {
geocodess.map(item => {
async function maker (geocodess) {
await geocodess.map(item => {
if (item.pontion) {
console.log(item, 'item=====');
var marker = new AMap.Marker({
@ -181,6 +258,8 @@ function maker(geocodess) {
details.markersarr.push(marker);
}
});
Dtloading.value=false
}
//
// seenIds
@ -196,6 +275,7 @@ function Driving(geocodess) {
new AMap.LngLat(item.items.jingdu, item.items.weidu),
new AMap.LngLat(item.pontion.lng, item.pontion.lat),
function (status, result) {
console.log(status);
if (status === 'complete') {
// console.log(result.routes[0]);
item.time = formatSeconds(result.routes[0].time);
@ -237,13 +317,15 @@ function back() {
}
const { datalists } = toRefs(details);
const ListChange = val => {
console.log(val,'val====');
Dtloading.value=true
console.log(details.datalists, '最新的数据');
let data = details.datalists.filter(item => item.isck === true).map(item => item.items);
let data = details.datalists.filter(item => item.isck === true).map(item => item.items);
init(data);
Checkthebox.value = data;//
console.log(details.datalists, '数据');
};
</script>
<style lang="scss" scoped>

12
src/views/distribution/reservation/reservation.vue

@ -1002,8 +1002,6 @@ export default {
},
editsolt(scope) {
const { row } = scope;
this.$store.commit('DEL_ONCE_TAG', '/distribution/reservation/reservationAddFrom');
this.$router.push({
path: '/distribution/reservation/reservationAddFrom',
query: {
@ -1288,11 +1286,19 @@ export default {
});
},
handleAdd() {
this.$store.commit('DEL_ONCE_TAG', '/distribution/reservation/reservationAddFrom');
this.$router.push({
path: '/distribution/reservation/reservationAddFrom',
});
},
handleEdit(row) {
console.log(row);
this.$router.push({
path: '/distribution/reservation/reservationAddFrom',
query: {
reservationId: row.id,
},
});
},
aaa() {
this.queryA.reservationStatus = '1';
this.onLoad(this.page);

2
vite.config.js

@ -16,7 +16,7 @@ export default ({ mode, command }) => {
// hy
// target: 'http://192.168.3.12:13000',
// xiaohei
// target: 'http://192.168.3.18:13000',
// target: 'http://192.168.3.18:13000',
// lmy
// target: 'http://192.168.10.123:8889',
// target: 'http://192.168.10.101:8888',

Loading…
Cancel
Save