|
@@ -50,6 +50,7 @@ import DeliveryGoodsInfo from "./deliveryGoodsInfo.vue";
|
|
|
import DeliveryPrice from "./deliveryPrice.vue";
|
|
|
import { add,multiply,subtract,divide } from '@/benyun/utils/accuracy'
|
|
|
import { queryPricePackage,addmultiple,getInventoryByStoreHouseIdAndSkuids } from '@/api/delivery'
|
|
|
+import api from '@/api/currency'
|
|
|
import Format from '@/benyun/utils/dateFormat'
|
|
|
|
|
|
@Component({components:{DeliveryGoodsInfo,DeliveryPrice}})
|
|
@@ -65,6 +66,7 @@ export default class BatchbyOneModal extends Vue {
|
|
|
load = false;
|
|
|
priceObj:any={};
|
|
|
currentPrice:any={};
|
|
|
+ warehouseData:Array<any>=[];
|
|
|
setShow(v:boolean){
|
|
|
this.drawer=v;
|
|
|
this.priceObj={};
|
|
@@ -112,8 +114,8 @@ export default class BatchbyOneModal extends Vue {
|
|
|
const requestId = new Date().getTime() + this.getUuid()
|
|
|
let obj:any={
|
|
|
tmsTransportMethod:'零担',
|
|
|
- // tmsBusinessMan: (this as any).$store.getters.userInfo.userName,
|
|
|
- // tmsBusinessPhone: (this as any).$store.getters.userInfo.phonenumber,
|
|
|
+ tmsBusinessMan: (this as any).$store.getters.userInfo.userName,
|
|
|
+ tmsBusinessPhone: (this as any).$store.getters.userInfo.phonenumber,
|
|
|
requestId:requestId,
|
|
|
omsOrderIds:item.id,
|
|
|
weight:item.weight,
|
|
@@ -127,7 +129,10 @@ export default class BatchbyOneModal extends Vue {
|
|
|
tmsUnloadingStreetNo:item.receiverTownCode,
|
|
|
tmsUnloadingAddress:item.receiverAddress,
|
|
|
tmsUnloadingConsignor:item.receiverName,
|
|
|
- tmsUnloadingContacts:item.receiverMobile
|
|
|
+ tmsUnloadingContacts:item.receiverMobile,
|
|
|
+ wmsSendType: 'B2BCK',
|
|
|
+ tmsArrivalDate: this.getTime(3600 * 1000 * 24 * 2),
|
|
|
+ tmsDeliveryDate: this.getTime(3600 * 1000 * (24 * 2 + 2)),
|
|
|
};
|
|
|
|
|
|
obj.subItem=[];
|
|
@@ -157,6 +162,7 @@ export default class BatchbyOneModal extends Vue {
|
|
|
}
|
|
|
this.data.push(obj)
|
|
|
}
|
|
|
+ this.loadWarehouse()
|
|
|
}else{
|
|
|
this.data = []
|
|
|
}
|
|
@@ -166,6 +172,35 @@ export default class BatchbyOneModal extends Vue {
|
|
|
(this.$refs.info as any).showModal = true;
|
|
|
})
|
|
|
}
|
|
|
+ loadWarehouse() {
|
|
|
+ api.pageList({
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 1000
|
|
|
+ }, 'maindataStorehouse').then((res: any) => {
|
|
|
+ this.warehouseData = res.data.records;
|
|
|
+ if(this.warehouseData.length > 0){
|
|
|
+ this.data[0].tmsShipmentConsignor=this.warehouseData[0].shipper;
|
|
|
+ this.data[0].tmsShipmentContacts=this.warehouseData[0].shipperPhone;
|
|
|
+ this.data[0].tmsShipmentProvince= this.warehouseData[0].province;
|
|
|
+ this.data[0].tmsShipmentProvinceNo=this.warehouseData[0].provinceCode;
|
|
|
+ this.data[0].tmsShipmentCity= this.warehouseData[0].city;
|
|
|
+ this.data[0].tmsShipmentCityNo= this.warehouseData[0].cityCode;
|
|
|
+ this.data[0].tmsShipmentRegion= this.warehouseData[0].region;
|
|
|
+ this.data[0].tmsShipmentRegionNo= this.warehouseData[0].regionCode;
|
|
|
+ this.data[0].tmsShipmentStreetNo= this.warehouseData[0].streetCode;
|
|
|
+ this.data[0].tmsShipmentStreet= this.warehouseData[0].street;
|
|
|
+ this.data[0].tmsShipmentAddress=this.warehouseData[0].address;
|
|
|
+ this.data[0].storeHouseId= this.warehouseData[0].id;
|
|
|
+ this.data[0].storeHouseName= this.warehouseData[0].name;
|
|
|
+ }
|
|
|
+ }).catch(() => {})
|
|
|
+ }
|
|
|
+ getTime(n:number) {
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() + n);
|
|
|
+ const t = Format(new Date(start),'yyyy-MM-dd HH:mm:ss');
|
|
|
+ return t
|
|
|
+ }
|
|
|
getUuid(){
|
|
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
|
}
|