Browse Source

配送计划地图呈现、市配配送编辑数据回显

dev-warehouse
kilo 2 years ago
parent
commit
a07d107b8c
  1. 2
      src/views/distribution/deliverylist/distributionDeliveryList.vue
  2. 2
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  3. 4
      src/views/distribution/deliverylist/distributionDeliveryListmar.vue
  4. 1
      src/views/distribution/reservation/atlas.vue
  5. 142
      src/views/distribution/reservation/atlas1.vue
  6. 2
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  7. 286
      src/views/distribution/turndelivery/deliveryMarket.vue

2
src/views/distribution/deliverylist/distributionDeliveryList.vue

@ -52,7 +52,7 @@
<template #default="slotProps"> <template #default="slotProps">
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button> <el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="editmap(slotProps.scope)"> </el-button> <el-button size="small" @click="editmap(slotProps.scope)"> </el-button>
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>-->
</template> </template>
</tablecmt> </tablecmt>
<!-- <el-table ref="table" v-loading="loading"--> <!-- <el-table ref="table" v-loading="loading"-->

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

@ -43,7 +43,7 @@
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button> <el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="editmap(slotProps.scope)"> </el-button> <el-button size="small" @click="editmap(slotProps.scope)"> </el-button>
<el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button> <el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>-->
</template> </template>
</tablecmt> </tablecmt>
<!-- <el-table ref="table" v-loading="loading"--> <!-- <el-table ref="table" v-loading="loading"-->

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

@ -40,8 +40,8 @@
<template #default="slotProps"> <template #default="slotProps">
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button> <el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="editmap(slotProps.scope)"> </el-button> <el-button size="small" @click="editmap(slotProps.scope)"> </el-button>
<el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>-->
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button> <!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>-->
</template> </template>
</tablecmt> </tablecmt>
<!-- <el-table ref="table" v-loading="loading"--> <!-- <el-table ref="table" v-loading="loading"-->

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

@ -41,6 +41,7 @@ export default {
type:true, type:true,
} }
}, },
mounted() { mounted() {
let router = useRouter(); let router = useRouter();
let type =router.currentRoute.value.query.type let type =router.currentRoute.value.query.type

142
src/views/distribution/reservation/atlas1.vue

@ -1,64 +1,84 @@
<template> <template>
<div class="bmap" id="container" style="float: left"></div> <div class="bmap" id="container" ></div>
<div <!-- <div-->
style=" <!-- style="-->
border: 1px solid pink; <!-- border: 1px solid pink;-->
margin-left: 5px; <!-- margin-left: 5px;-->
height: 600px; <!-- height: 600px;-->
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); <!-- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);-->
" <!-- "-->
> <!-- >-->
<!-- @change="handleCheckedCitiesChange"--> <!-- &lt;!&ndash; @change="handleCheckedCitiesChange"&ndash;&gt;-->
<el-checkbox-group v-model="reservationIds"> <!-- <el-checkbox-group v-model="reservationIds">-->
<el-col v-for="(item, index) in reservationData"> <!-- <el-col v-for="(item, index) in reservationData">-->
<el-checkbox :label="item.id" :key="item.id" <!-- <el-checkbox :label="item.id" :key="item.id"-->
>{{ item.consignee }}&emsp;{{ item.deliveryAddress }}&emsp;{{ <!-- >{{ item.consignee }}&emsp;{{ item.deliveryAddress }}&emsp;{{-->
item.deliveryPhone <!-- item.deliveryPhone-->
}}</el-checkbox <!-- }}-->
> <!-- </el-checkbox-->
</el-col> <!-- >-->
</el-checkbox-group> <!-- </el-col>-->
</div> <!-- </el-checkbox-group>-->
<!-- </div>-->
<div style="margin-left: 40%; margin-top: 5%; float: bottom"> <div style="margin-left: 50%; margin-top: 5%; float: bottom">
<el-button icon="el-icon-circle-close" @click="back"> </el-button> <el-button icon="el-icon-circle-close" @click="back"> </el-button>
</div> </div>
</template> </template>
<script setup> <script setup>
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { getReservationAddr } from '@/api/distribution/distributionReservation'; import { getReservationAddr } from '@/api/distribution/distributionReservation';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { selectStockArticleAtlasInfo} from '@/api/distribution/distributionDeliveryList' import { selectStockArticleAtlasInfo } from '@/api/distribution/distributionDeliveryList';
import { onMounted, reactive, toRefs, watchEffect } from 'vue'; import { onMounted, reactive, toRefs, createApp } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
let router = useRouter(); import { ref, watch } from "vue"
let details = reactive({
let router = useRouter();
let details = reactive({
name: 'BmapDemo', name: 'BmapDemo',
item: null, item: null,
error: null, error: null,
addressList: [], addressList: [],
reservationData: [], reservationData: [],
reservationIds: [], reservationIds: [],
mapLoc: null, mapLoc: null
}); });
onMounted(() => {
onMounted(() => {
details.item = JSON.parse(router.currentRoute.value.query.item); details.item = JSON.parse(router.currentRoute.value.query.item);
console.log("details.item.id------------->",details.item.id);
selectStockArticleAtlasInfo(details.item.id).then(res=>{ console.log('details.item.id------------->', details.item.id);
console.log("-------------->",res);
}) watch(details.item.id, (newValue, oldValue) => {
console.log("------------->",details.item); console.log("item变了", newValue, oldValue);
setTimeout(() => { a(details.item);
init(); },{immediate:true});
}, 1500); console.log('------------->', details.item);
// setTimeout(()=>{ // setTimeout(()=>{
// details.mapLoc.clearOverlays(); // details.mapLoc.clearOverlays();
// },9500) // },9500)
}); });
function a(data) {
selectStockArticleAtlasInfo(data.id).then(res => {
const data = res.data.data;
console.log('res------------->', data);
setTimeout(() => {
init(data);
}, 1500);
});
}
function init() {
function init(data) {
details.mapLoc = new BMapGL.Map('container'); // details.mapLoc = new BMapGL.Map('container'); //
let point = new BMapGL.Point(116.404, 39.915); // let point = new BMapGL.Point(116.404, 39.915); //
details.mapLoc.centerAndZoom(point, 12); details.mapLoc.centerAndZoom(point, 12);
@ -67,11 +87,19 @@ function init() {
if (details.mapLoc) { if (details.mapLoc) {
details.mapLoc.clearOverlays(); //label details.mapLoc.clearOverlays(); //label
} }
maplabel('四川成都龙泉驿区','展示的内容', 0); let a = data;
} a.forEach((item,index)=>{
function maplabel(address,contents, index) { console.log('item------------->', item);
maplabel(item.customerAddress, item.customerName+"--"+item.customerAddress+"--"+item.customerTelephone, index);
// maplabel('-1-26-154', '', 0);
})
}
function maplabel(address, contents, index) {
let myGeo = new BMapGL.Geocoder(); let myGeo = new BMapGL.Geocoder();
myGeo.getPoint(address, function (point) { myGeo.getPoint(address, function(point) {
if (point) { if (point) {
console.log(point, '---------------'); console.log(point, '---------------');
if (index == 0) { if (index == 0) {
@ -81,7 +109,7 @@ function maplabel(address,contents, index) {
let label = new BMapGL.Label(content, { let label = new BMapGL.Label(content, {
// //
position: point, position: point,
offset: new BMapGL.Size(10, 20), offset: new BMapGL.Size(10, 20)
}); });
details.mapLoc.addOverlay(label); // details.mapLoc.addOverlay(label); //
label.setStyle({ label.setStyle({
@ -90,7 +118,7 @@ function maplabel(address,contents, index) {
fontSize: '10px', fontSize: '10px',
border: '1px solid #1E90FF', border: '1px solid #1E90FF',
borderRadius: '20px', borderRadius: '20px',
padding: '5px 10px', padding: '5px 10px'
}); });
console.log(label, '---------------'); console.log(label, '---------------');
} else { } else {
@ -99,17 +127,21 @@ function maplabel(address,contents, index) {
console.log('您选择的地址没有解析到结果!'); console.log('您选择的地址没有解析到结果!');
} }
}); });
} }
function back() {
function back() {
router.back(-1); router.back(-1);
} }
const { reservationIds }=toRefs(details)
const { reservationIds } = toRefs(details);
</script> </script>
<style scoped> <style scoped>
.bmap { .bmap {
width: 800px; margin-top: 2%;
width: 1800px;
height: 600px; height: 600px;
border: 1px solid pink; border: 1px solid pink;
} }
</style> </style>

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

@ -1479,7 +1479,7 @@
let data = res.data.data; let data = res.data.data;
Object.assign(this.stockUpForm,data.reservationInfo) Object.assign(this.stockUpForm,data.reservationInfo)
Object.assign(this.stockUpForm,data.stockupInfo) Object.assign(this.stockUpForm,data.stockupInfo)
this.stockUpForm.deliveryType = '10'; this.stockUpForm.deliveryType = '1';
this.stockUpForm.deliveryWay = data.reservationInfo.deliveryWay; this.stockUpForm.deliveryWay = data.reservationInfo.deliveryWay;
this.serveType = data.reservationInfo.serveType.split(","); this.serveType = data.reservationInfo.serveType.split(",");
if (data.stockupInfo){ if (data.stockupInfo){

286
src/views/distribution/turndelivery/deliveryMarket.vue

@ -155,7 +155,7 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="配送类型:" prop="goodsAreaId"> <el-form-item label="配送类型:" prop="goodsAreaId">
<el-radio-group v-model="stockUpForm.deliveryType"> <el-radio-group v-model="stockUpForm.deliveryType">
<el-radio :label="'2'" :value="'2'">市配&emsp; </el-radio> <el-radio :label="'2'" :value="'2'">市配&emsp;</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -177,7 +177,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="备货时间:" prop="goodsShelfId"> <el-form-item label="备货时间:" prop="goodsShelfId">
<el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间" :disabled="isDisable"> <el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间"
:disabled="isDisable">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -211,7 +212,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="其他费用:" prop="collectFee" label-width="100px"> <el-form-item label="其他费用:" prop="collectFee" label-width="100px">
<el-input v-model="stockUpForm.otherFee" placeholder="请输入其他费用" /> <el-input v-model="stockUpForm.otherFee" placeholder="请输入其他费用"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -224,7 +225,7 @@
</el-form> </el-form>
</div> </div>
<h3>预约列表</h3> <h3>预约列表</h3>
<div > <div>
<el-row> <el-row>
<el-table ref="table" v-loading="loading" <el-table ref="table" v-loading="loading"
:data="data" :data="data"
@ -243,6 +244,13 @@
:key="index"> :key="index">
</el-table-column> </el-table-column>
</template> </template>
<el-table-column prop="menu" label="操作" :width="220" align="center" v-if="isoperation">
<template #="{row}">
<el-button type="primary" link icon="el-icon-edit" @click="removeStockArticle(row)">移除
</el-button>
</template>
</el-table-column>
<!-- 操作栏模块 --> <!-- 操作栏模块 -->
</el-table> </el-table>
</el-row> </el-row>
@ -353,9 +361,9 @@
loading: false, loading: false,
error: null, error: null,
form: {}, form: {},
driverForm:{}, driverForm: {},
stockUpForm:{}, stockUpForm: {},
waixieForm:{}, waixieForm: {},
data: [], data: [],
// //
page: { page: {
@ -364,7 +372,7 @@
total: 40 total: 40
}, },
query:{}, query: {},
aaa: true, aaa: true,
bbb: false, bbb: false,
option: option, option: option,
@ -418,48 +426,49 @@
// //
multipleTable: {}, multipleTable: {},
stockArticleTable: [], stockArticleTable: [],
stockArticleList:[], stockArticleList: [],
driverList: [], driverList: [],
vehticleList: [], vehticleList: [],
packageList:[], packageList: [],
// //
orderData:[], orderData: [],
// //
inventoryData:[], inventoryData: [],
// //
selectionList:[], selectionList: [],
addvalue: {}, addvalue: {},
// //
orderShow:false, orderShow: false,
// //
stockListShow:false, stockListShow: false,
// //
stockArticleInfo:[], stockArticleInfo: [],
// //
inventoryInfo:[], inventoryInfo: [],
// //
isShowPackage:false, isShowPackage: false,
// //
packageData:[], packageData: [],
// //
loadAndUnload:[], loadAndUnload: [],
// //
serveType:[], serveType: [],
// //
tripartiteSourceData:[], tripartiteSourceData: [],
deliveryListId:'', deliveryListId: '',
isDisable:false, isDisable: false,
checked:true, checked: true,
reservationIds:'', reservationIds: '',
obj:{ obj: {
type:Object, type: Object,
default:()=>({}) default: () => ({})
}, },
isInitialized:false, isInitialized: false,
isUpdate:false, isUpdate: false,
isoperation: false
}; };
}, },
watch:{ watch: {
// obj:{ // obj:{
// deep:true, // deep:true,
// handler(newVal,oldVal){ // handler(newVal,oldVal){
@ -546,9 +555,9 @@
// //
async getTeam() { async getTeam() {
let params = this.deptId; let params = this.deptId;
console.log("%%%%%%%%%",params); console.log('%%%%%%%%%', params);
getListTeamInfo(params).then(res => { getListTeamInfo(params).then(res => {
console.log("aaaaaaaaa",res.data.data); console.log('aaaaaaaaa', res.data.data);
let fo = []; let fo = [];
res.data.data.forEach(i => { res.data.data.forEach(i => {
let a = { let a = {
@ -562,10 +571,10 @@
}, },
// //
async getStorageArea() { async getStorageArea() {
let params = this.deptId ; let params = this.deptId;
console.log("^^^^^^^^^^^^^",params); console.log('^^^^^^^^^^^^^', params);
stockUpInfo(params).then(res => { stockUpInfo(params).then(res => {
console.log("=========================》",res); console.log('=========================》', res);
let fo = []; let fo = [];
res.data.data.forEach(i => { res.data.data.forEach(i => {
let v = { let v = {
@ -579,23 +588,23 @@
}, },
// //
getMasterDriverData() { getMasterDriverData() {
return new Promise((rv,rev)=>{ return new Promise((rv, rev) => {
getDriverList(1, 10, '').then(res => { getDriverList(1, 10, '').then(res => {
this.driverData = res.data.data.records; this.driverData = res.data.data.records;
console.log("===============>",res.data.data); console.log('===============>', res.data.data);
rv(res.data.data.records) rv(res.data.data.records);
});
}); });
})
}, },
selectionChange(list) { selectionChange(list) {
// //
this.selectionList = list; this.selectionList = list;
console.log(" this.selectionList = list", this.selectionList); console.log(' this.selectionList = list', this.selectionList);
this.orderData.forEach(item=>{ this.orderData.forEach(item => {
if (item.id===this.obj.id){ if (item.id === this.obj.id) {
item.isUpdate = true; item.isUpdate = true;
} }
}) });
// //
// this.obj. // this.obj.
}, },
@ -606,18 +615,18 @@
// //
getvehicleData() { getvehicleData() {
return new Promise((rv,rev)=>{ return new Promise((rv, rev) => {
getVehicleList(1, 10, '').then(res => { getVehicleList(1, 10, '').then(res => {
this.vehicleData = res.data.data.records; this.vehicleData = res.data.data.records;
console.log("^^^^^^^^^^^^^^^^",res.data.data); console.log('^^^^^^^^^^^^^^^^', res.data.data);
rv(res.data.data.records) rv(res.data.data.records);
});
}); });
})
}, },
fetchData() { fetchData() {
this.error = this.post = null; this.error = this.post = null;
this.loading = true; this.loading = true;
console.log("this.$route.query",this.$route.query); console.log('this.$route.query', this.$route.query);
if (this.$route.query.id) { if (this.$route.query.id) {
this.reservationIds = this.$route.query.id; this.reservationIds = this.$route.query.id;
} }
@ -626,6 +635,17 @@
} }
}, },
removeStockArticle(row){
if (this.data.length===1){
this.$message({
message: '无法进行预约任务取消!!!',
type: 'warning'
});
return;
}
console.log("row------------->",row);
},
viewDriverInfo() { viewDriverInfo() {
console.log(this.driverInfo.length); console.log(this.driverInfo.length);
console.log(this.vehticleInfo.length); console.log(this.vehticleInfo.length);
@ -651,7 +671,7 @@
let tripartite = {}; let tripartite = {};
let data = {}; let data = {};
let allocationInfo = []; let allocationInfo = [];
if (this.driverForm){ if (this.driverForm) {
// //
// //
if (this.driverList.length !== this.vehticleList.length) { if (this.driverList.length !== this.vehticleList.length) {
@ -666,7 +686,7 @@
let obj = {}; let obj = {};
obj.driver = this.driverInfo[i].name; obj.driver = this.driverInfo[i].name;
obj.driverId = this.driverInfo[i].id; obj.driverId = this.driverInfo[i].id;
obj.driverPhone=this.driverInfo[i].phone; obj.driverPhone = this.driverInfo[i].phone;
obj.vehicleNub = this.vehticleInfo[i].vehicleNub; obj.vehicleNub = this.vehticleInfo[i].vehicleNub;
obj.vehicleId = this.vehticleInfo[i].id; obj.vehicleId = this.vehticleInfo[i].id;
info.push(obj); info.push(obj);
@ -678,7 +698,7 @@
data.masterDriverName = this.driverForm.masterDriverName; data.masterDriverName = this.driverForm.masterDriverName;
data.masterVehicleNub = this.driverForm.masterVehicleNub; data.masterVehicleNub = this.driverForm.masterVehicleNub;
} }
if (this.waixieForm.tripartiteSource){ if (this.waixieForm.tripartiteSource) {
tripartite = this.waixieForm; tripartite = this.waixieForm;
data.tripartite = tripartite; data.tripartite = tripartite;
} }
@ -707,7 +727,7 @@
}); });
} }
data.tripartite = tripartite; data.tripartite = tripartite;
}else { } else {
// //
if (params.loader) { if (params.loader) {
this.loaderData.forEach(a => { this.loaderData.forEach(a => {
@ -717,7 +737,7 @@
} }
}); });
} }
if (params.forklift){ if (params.forklift) {
this.forkliftData.forEach(b => { this.forkliftData.forEach(b => {
if (params.forklift === b.dictKey) { if (params.forklift === b.dictKey) {
stockup.forkliftName = b.dictValue; stockup.forkliftName = b.dictValue;
@ -725,7 +745,7 @@
} }
}); });
} }
if (params.goodsAreaId){ if (params.goodsAreaId) {
this.goodsAreaData.forEach(c => { this.goodsAreaData.forEach(c => {
if (params.goodsAreaId === c.dictKey) { if (params.goodsAreaId === c.dictKey) {
stockup.goodsAreaId = c.dictKey; stockup.goodsAreaId = c.dictKey;
@ -739,27 +759,34 @@
if (params.remarks) { if (params.remarks) {
stockup.remarks = params.remarks; stockup.remarks = params.remarks;
} }
if (this.loadAndUnload.length>0){ if (this.loadAndUnload.length > 0) {
stockup.loadAndUnload = this.loadAndUnload.join(','); stockup.loadAndUnload = this.loadAndUnload.join(',');
} }
if (params.outboundDate){ if (params.outboundDate) {
stockup.outboundDate = params.outboundDate; stockup.outboundDate = params.outboundDate;
} }
data.stockup = stockup; data.stockup = stockup;
} }
if (this.form.taskTime){ if (this.form.taskTime) {
data.taskTime = this.form.taskTime; data.taskTime = this.form.taskTime;
} }
} }
console.log('this.data------------>', this.data);
if (!this.deliveryListId) {
data.reservationIds = this.reservationIds; data.reservationIds = this.reservationIds;
console.log("this.data------------>",this.data); console.log('>>>>>>>>>>>>', data);
console.log(">>>>>>>>>>>>",data);
deliveryTask(data).then((res) => { deliveryTask(data).then((res) => {
this.$router.push({ this.$router.push({
path: '/distribution/deliverylist/distributionDeliveryListmar', path: '/distribution/deliverylist/distributionDeliveryListmar',
name:'配送市配列表' name: '配送市配列表'
}); });
}); });
} else {
data.reservationInfos =this.data ;
console.log('>>>>>>>>>>>>', data);
console.log('-------------》', '修改提交');
}
}, },
changeVehicle(params) { changeVehicle(params) {
console.log(params); console.log(params);
@ -814,7 +841,7 @@
} else { } else {
this.$message({ this.$message({
message: '已经是第一条,上移失败', message: '已经是第一条,上移失败',
type: 'warning', type: 'warning'
}); });
} }
console.log(this.vehticleInfo); console.log(this.vehticleInfo);
@ -874,67 +901,67 @@
}, },
ccc() { ccc() {
if (this.deliveryListId){ if (this.deliveryListId) {
// //
this.driverForm.tripartiteSource = ''; this.driverForm.tripartiteSource = '';
this.driverForm.driverName = ''; this.driverForm.driverName = '';
this.driverForm.driverPhone = ''; this.driverForm.driverPhone = '';
this.driverForm.vehicleNum = ''; this.driverForm.vehicleNum = '';
this.driverForm.deliveryFee = ''; this.driverForm.deliveryFee = '';
}else { } else {
this.loadAndUnload = []; this.loadAndUnload = [];
this.serveType=[]; this.serveType = [];
this.driverForm = {}; this.driverForm = {};
this.waixieForm = {}; this.waixieForm = {};
} }
this.aaa = true; this.aaa = true;
this.bbb = false; this.bbb = false;
this.stockUpForm.deliveryType="2"; this.stockUpForm.deliveryType = '2';
this.stockUpForm.deliveryWay="2"; this.stockUpForm.deliveryWay = '2';
this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
}, },
ddd() { ddd() {
if (this.deliveryListId){ if (this.deliveryListId) {
this.vehicleIds=[]; this.vehicleIds = [];
this.deliveryDriver=[]; this.deliveryDriver = [];
this.driverForm.masterDriverName = ''; this.driverForm.masterDriverName = '';
this.driverForm.masterVehicleNub = ''; this.driverForm.masterVehicleNub = '';
}else { } else {
this.loadAndUnload = []; this.loadAndUnload = [];
this.serveType=[]; this.serveType = [];
this.driverForm={}; this.driverForm = {};
this.waixieForm={}; this.waixieForm = {};
} }
this.aaa = false; this.aaa = false;
this.bbb = true; this.bbb = true;
this.stockUpForm.deliveryType="2"; this.stockUpForm.deliveryType = '2';
this.stockUpForm.deliveryWay="2"; this.stockUpForm.deliveryWay = '2';
this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
}, },
selectionClear() { selectionClear() {
this.selectionList = []; this.selectionList = [];
this.query={}; this.query = {};
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
// //
this.stockUpForm.deliveryType="2"; this.stockUpForm.deliveryType = '2';
this.stockUpForm.deliveryWay="2"; this.stockUpForm.deliveryWay = '2';
this.stockUpForm.stockupDate = new Date(); this.stockUpForm.stockupDate = new Date();
this.form.taskTime = new Date(); this.form.taskTime = new Date();
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
this.stockUpForm.otherFee = 0 ; this.stockUpForm.otherFee = 0;
this.loadAndUnload = ["1","2"] ; this.loadAndUnload = ['1', '2'];
if (this.reservationIds){ if (this.reservationIds) {
console.log("》》》》》》》》》》》》》》》",this.reservationIds); this.isoperation = false;
let ids =this.reservationIds; console.log('》》》》》》》》》》》》》》》', this.reservationIds);
let ids = this.reservationIds;
getReservationAddr(ids).then(res => { getReservationAddr(ids).then(res => {
console.log("------------->",res); console.log('------------->', res);
const reservationData = res.data.data; const reservationData = res.data.data;
this.page.total = reservationData.total; this.page.total = reservationData.total;
this.data = reservationData.records; this.data = reservationData.records;
@ -942,22 +969,74 @@
this.loading = false; this.loading = false;
}); });
} }
if (this.deliveryListId){ if (this.deliveryListId) {
console.log("<<<<<<<<<<",this.deliveryListId); this.isoperation = true;
console.log('<<<<<<<<<<', this.deliveryListId);
// //
getMarketDeliveryList(this.deliveryListId).then(res=>{ getMarketDeliveryList(this.deliveryListId).then(async res => {
console.log(res.data.data); console.log('--------------->', res.data.data);
}) const deliveryData = res.data.data;
this.stockUpForm.outboundDate = deliveryData.stockupInfo.outboundDate;
this.stockUpForm.taskTime = deliveryData.stockupInfo.taskTime;
this.stockUpForm.goodsAreaId = deliveryData.stockupInfo.goodsAreaId;
this.stockUpForm.forklift = deliveryData.stockupInfo.forkliftId;
this.stockUpForm.loader = deliveryData.stockupInfo.loaderId;
this.stockUpForm.taskTime = deliveryData.taskTime;
console.log('reservationInfo--------------->', res.data.data.reservationInfo);
this.data = res.data.data.reservationInfos;
if (deliveryData.kind === '1') {
//
let self = deliveryData.deliverySelfVO;
let vehicle = await this.getvehicleData();
console.log('___________________-->', vehicle);
let driver = await this.getMasterDriverData();
let a = [];
let b = [];
let vehicleInfo = [];
vehicle.forEach(item => {
self.forEach(s => {
if (item.id === s.vehicleId) {
a.push(s.vehicleId);
vehicleInfo.push(item);
}
if (s.isMaster === 2) {
this.driverForm.masterVehicleNub = s.vehicleNub;
}
});
});
this.vehticleList = a;
this.vehicleIds = a;
console.log(' this.vehicleIds', this.vehicleIds);
this.vehticleInfo = vehicleInfo;
let driverInfo = [];
driver.forEach(item => {
self.forEach(s => {
if (item.id === s.driverId) {
b.push(s.driverId);
driverInfo.push(item);
}
if (s.isMaster === 2) {
this.driverForm.masterDriverName = s.driverName;
}
});
});
this.deliveryDriver = b;
this.driverList = b;
this.driverInfo = driverInfo;
} else {
}
});
} }
this.loading = false; this.loading = false;
}, }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.head_top { .head_top {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -965,7 +1044,7 @@
// border-bottom: 1px solid rgb(228, 228, 228); // border-bottom: 1px solid rgb(228, 228, 228);
padding-left: 10px; padding-left: 10px;
>.buts{ > .buts {
padding: 10px 20px; padding: 10px 20px;
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
@ -973,18 +1052,21 @@
border-bottom: 4px solid #ffffff; border-bottom: 4px solid #ffffff;
// background-color: #ffffff; // background-color: #ffffff;
} }
.check{
.check {
color: #D3832A; color: #D3832A;
border-bottom: 4px solid #D3832A; border-bottom: 4px solid #D3832A;
} }
} }
.minaxbox{
.minaxbox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.tophed{
.tophed {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
} }
</style> </style>

Loading…
Cancel
Save