|
|
@@ -43,6 +43,7 @@ export default {
|
|
|
},
|
|
|
props: {
|
|
|
customId:'',
|
|
|
+ orderid:'',
|
|
|
form: {
|
|
|
type: Object
|
|
|
}
|
|
|
@@ -57,11 +58,13 @@ export default {
|
|
|
receiveAddress: "",
|
|
|
receiveLong: "",
|
|
|
receiveLat: "",
|
|
|
- sendSide: "2",
|
|
|
+ sendSide: "",
|
|
|
sendType: "3", //1自取 2本店送 3快递送
|
|
|
sendDate: "",
|
|
|
sendTime: ""
|
|
|
},
|
|
|
+ userLong:'',
|
|
|
+ userLat:'',
|
|
|
sendSideIndex:0,
|
|
|
deliveryList: []
|
|
|
};
|
|
|
@@ -87,17 +90,19 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
initData() {
|
|
|
- // this.deliveryList
|
|
|
- let list = this.getDictionariesInfo.expressList
|
|
|
- for (let i=0;i<list.length;i++){
|
|
|
- this.deliveryList.push({name:list[i].deliveryName,value:list[i].deliveryId,id:list[i].id})
|
|
|
- }
|
|
|
for (const key in this.formData) {
|
|
|
if (Object.hasOwnProperty.call(this.formData, key)) {
|
|
|
const element = this.form[key];
|
|
|
this.formData[key] = element;
|
|
|
}
|
|
|
}
|
|
|
+ //配送方-列表
|
|
|
+ let list = this.getDictionariesInfo.expressList;
|
|
|
+ for (let i=0;i<list.length;i++){
|
|
|
+ this.deliveryList.push({name:list[i].deliveryName,value:list[i].deliveryId,id:list[i].id})
|
|
|
+ }
|
|
|
+ console.log(list);
|
|
|
+ this.formData.sendSide = list[0].id;
|
|
|
},
|
|
|
selectAdress(info) {
|
|
|
this.formData.receiveProvince = info.province;
|
|
|
@@ -106,12 +111,17 @@ export default {
|
|
|
this.formData.receiveAddress = info.address;
|
|
|
this.formData.receiveLong = info.longitude;
|
|
|
this.formData.receiveLat = info.latitude;
|
|
|
-
|
|
|
+ console.log('this.formData',this.formData)
|
|
|
this.$nextTick(() => {
|
|
|
let params = {
|
|
|
- sendSide: this.formData.sendSide,
|
|
|
- receiveLong: info.longitude,
|
|
|
- receiveLat: info.latitude
|
|
|
+ customId: this.customId,
|
|
|
+ expressId: this.formData.sendSide,
|
|
|
+ city:this.formData.receiveCity,
|
|
|
+ address:this.formData.receiveAddress,
|
|
|
+ floor:this.formData.receiveFloor,
|
|
|
+ orderId: this.orderid,
|
|
|
+ long: this.formData.receiveLong,
|
|
|
+ lat: this.formData.receiveLat,
|
|
|
};
|
|
|
this.freightCount(params);
|
|
|
});
|
|
|
@@ -123,13 +133,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
selectSideEvent(event) {
|
|
|
- console.log(event);
|
|
|
- console.log(event.detail.value);
|
|
|
- const {
|
|
|
- detail: { value }
|
|
|
- } = event;
|
|
|
+ // console.log(event);
|
|
|
+ // console.log(event.detail.value);
|
|
|
+
|
|
|
+ const {detail: { value }} = event;
|
|
|
this.sendSideIndex = value;
|
|
|
- this.formData.sendSide = this.deliveryList[value].value;
|
|
|
+ this.formData.sendSide = this.deliveryList[value].id;
|
|
|
+ console.log(this.formData.sendSide);
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -138,9 +148,9 @@ export default {
|
|
|
if (val) {
|
|
|
let info = { ...this.form, ...val };
|
|
|
if (this.formData.sendTime) {
|
|
|
- info.sendTime = `${this.formData.sendDate} ${this.formData.sendTime}`;
|
|
|
+ // info.sendTime = `${this.formData.sendDate} ${this.formData.sendTime}`;
|
|
|
+ info.sendTime = this.formData.sendTime;
|
|
|
}
|
|
|
- console.log(2222, info);
|
|
|
this.$emit("update:form", info);
|
|
|
}
|
|
|
},
|