|
@@ -0,0 +1,860 @@
|
|
|
+<template>
|
|
|
+ <div class="content">
|
|
|
+ <backindex :title="titlename"></backindex>
|
|
|
+
|
|
|
+ <!--运单号-->
|
|
|
+ <div v-show="wayShow" class="sm" style="padding-top: 10px;height: 50px;">
|
|
|
+ <div>
|
|
|
+ <van-field style="background-color: rgb(0, 196, 184);" maxlength="50" v-model="waybillNo" name="运单号" label="运单号" placeholder="运单号"/>
|
|
|
+ <img @click="wxScanCode(1)" src="../assets/images/sm.png" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 寄件地址 -->
|
|
|
+ <div class="jjinfo">
|
|
|
+ <div>
|
|
|
+ <div class="jj">
|
|
|
+ <div class="jjaddress">
|
|
|
+ <p>寄</p>
|
|
|
+ <div>
|
|
|
+ <p v-if="jjname==''||jjname==' '">寄件地址</p>
|
|
|
+ <p v-else>{{jjname}} {{jjInfo.senderMobile}}</p>
|
|
|
+ <p v-if="jjadd==''||jjadd==' '" @click="addtype(1)">填写寄件地址</p>
|
|
|
+ <p v-else @click="addtype(1)">{{jjadd}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dzb" @click="link(1)">
|
|
|
+ <img src="../assets/images/addlist.png" alt="">
|
|
|
+ <p>地址簿</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="jj" style="border-top:.01rem solid #ededed">
|
|
|
+ <div class="jjaddress">
|
|
|
+ <p style="background: #fa9c22;">收</p>
|
|
|
+ <div>
|
|
|
+ <p v-if="sjname==''||sjname==' '">收件地址</p>
|
|
|
+ <p v-else>{{sjname}} {{sjInfo.receiveMobile}}</p>
|
|
|
+ <p v-if="sjadd==''||sjadd==' '" @click="addtype(2)">填写收件地址</p>
|
|
|
+ <p v-else @click="addtype(2)">{{sjadd}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dzb" @click="link(2)">
|
|
|
+ <img src="../assets/images/addlist.png" alt="">
|
|
|
+ <p>地址簿</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 快递公司 -->
|
|
|
+ <div class="kdshow">
|
|
|
+ <van-field readonly clickable name="picker" :value="expressInfoShow" label="快递公司" placeholder="请选择快递公司" @click="showPicker = true" />
|
|
|
+ <van-popup v-model="showPicker" position="bottom">
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ :columns="columns"
|
|
|
+ @confirm="onConfirm"
|
|
|
+ @cancel="showPicker = false"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!--成本中心-->
|
|
|
+ <div class="kdshow" v-show="this.accountType == 2">
|
|
|
+ <van-field readonly clickable name="picker2" :value="costCenterInfoShow" label="成本中心" placeholder="请选择成本中心" @click="showPicker9 = true" />
|
|
|
+ <van-popup v-model="showPicker9" position="bottom">
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ :columns="costCenterList"
|
|
|
+ @confirm="onConfirm9"
|
|
|
+ @cancel="showPicker9 = false"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 寄件属性 -->
|
|
|
+ <div class="choose">
|
|
|
+ <div>
|
|
|
+ <div class="type_wp">
|
|
|
+ <div>
|
|
|
+ <p>物品类型</p>
|
|
|
+ <p v-if="wptype==''" @click="wpshow=true">请选择</p>
|
|
|
+ <p v-else @click="wpshow=true">{{wptype}}</p>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <p>
|
|
|
+ <template v-if="wptype=='产品'">重量(公斤)</template>
|
|
|
+ <template v-if="wptype=='非产品'">重量(公斤)</template>
|
|
|
+ <template v-if="wptype=='文件'">数量(件数)</template>
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ <van-field name="stepper" style="padding: 0px;">
|
|
|
+ <template #input>
|
|
|
+ <van-stepper v-model="stepper" :max="max"></van-stepper>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="type_price">
|
|
|
+ <div>
|
|
|
+ <p>付款方式</p>
|
|
|
+ <p v-if="pricetype==''" @click="priceshow=true">请选择</p>
|
|
|
+ <p v-else @click="priceshow=true">{{pricetype}}</p>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <p>声明价值</p>
|
|
|
+ <p style="display: flex;justify-content: center;"><input style="width: 1rem;border: none;text-align: center;" v-model="declaredValue" type="number" />元</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="type_price" v-show="this.accountType == 1">
|
|
|
+ <div>
|
|
|
+ <p>邮购类型</p>
|
|
|
+ <p v-if="addresstype==''" @click="addressshow=true">请选择</p>
|
|
|
+ <p v-else @click="addressshow=true">{{addresstype}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!--商品订单编号-->
|
|
|
+ <div class="sm" style="padding-bottom: 0;" v-show="this.accountType == 1">
|
|
|
+ <div>
|
|
|
+ <van-field maxlength="50" v-model="goodOrderNo" name="POS/订单号" label="POS/订单号" placeholder="请输入POS/订单号"/>
|
|
|
+ <img @click="wxScanCode(2)" src="../assets/images/sm.png" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 备注 -->
|
|
|
+ <div class="bz">
|
|
|
+ <div>
|
|
|
+ <van-field v-model="bz" name="备注" label="备注" placeholder="包装运输等要求"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 我同意 -->
|
|
|
+ <div class="check">
|
|
|
+ <van-checkbox icon-size=".24rem" v-model="check" shape="">我同意《电子运单契约条款》</van-checkbox>
|
|
|
+ </div>
|
|
|
+ <!-- 寄件 -->
|
|
|
+ <div class="btn-jj">
|
|
|
+ <van-button type="info" color="#00c4b8" @click="save()">立即寄件</van-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 弹窗物品类型 -->
|
|
|
+ <van-popup v-model="wpshow" position="bottom">
|
|
|
+ <van-picker title="物品类型" show-toolbar :columns="wplist" @confirm="onConfirm1" @cancel="wpshow=false"/>
|
|
|
+ </van-popup>
|
|
|
+ <!-- 弹窗付款方式 -->
|
|
|
+ <van-popup v-model="priceshow" position="bottom">
|
|
|
+ <van-picker title="付款方式" show-toolbar :columns="pricelist" @confirm="onConfirm2" @cancel="priceshow=false"/>
|
|
|
+ </van-popup>
|
|
|
+ <!-- 弹窗地址类型类型 -->
|
|
|
+ <van-popup v-model="addressshow" position="bottom">
|
|
|
+ <van-picker title="邮购类型" show-toolbar :columns="addlist" @confirm="onConfirm8" @cancel="addressshow=false"/>
|
|
|
+ </van-popup>
|
|
|
+ <!-- 填写地址 -->
|
|
|
+ <van-popup round v-model="addshow" class="whrite_add" closeable @closed="close" :close-on-click-overlay="false">
|
|
|
+ <div>
|
|
|
+ <p style="font-size: 16px;text-align: center;margin-bottom: 16px;">{{title}}</p>
|
|
|
+ <van-form @submit="onSubmit">
|
|
|
+ <van-field v-model="name" name="姓名" label="姓名" placeholder="请输入姓名" :rules="[{ required: false}]"/>
|
|
|
+ <van-field v-model="phone" maxlength="11" type="number" name="手机" label="手机" placeholder="请输入手机" :rules="[{ required: false}]"/>
|
|
|
+ <van-field v-model="telPhone" maxlength="20" type="text" name="座机" label="座机" placeholder="请输入座机" :rules="[{ required: false}]"/>
|
|
|
+ <van-field readonly clickable name="area" :value="city" label="省市区" placeholder="请选择省市区" @click="areashow = true" :rules="[{ required: false}]"/>
|
|
|
+ <van-field v-model="address" maxlength="50" name="详细地址" label="详细地址" placeholder="请输入详细地址" :rules="[{ required: false}]"/>
|
|
|
+ <div style="margin-top: 16px;">
|
|
|
+ <van-button color="#00c4b8" block type="info" native-type="submit">确定</van-button>
|
|
|
+ </div>
|
|
|
+ </van-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </van-popup>
|
|
|
+ <!-- 城市选择 -->
|
|
|
+ <van-popup v-model="areashow" position="bottom">
|
|
|
+ <van-area
|
|
|
+ :area-list="areaList"
|
|
|
+ @confirm="onConfirm3"
|
|
|
+ @cancel="areashow = false"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import areaList from "@/script/areas.js"
|
|
|
+ import { Stepper,Toast } from 'vant';
|
|
|
+ export default{
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ titlename:"寄件",
|
|
|
+ wptype:"产品",//物品类型
|
|
|
+ addresstype:"顾客邮购",//地址类型
|
|
|
+ youGouType:"",//邮购类型
|
|
|
+ addressshow:false,//地址类型弹窗显示
|
|
|
+ addlist:['顾客邮购','非顾客邮购'],//
|
|
|
+ wpshow:false,//物品类型弹窗显示
|
|
|
+ wplist:[],
|
|
|
+ pricetype:"月结(公司件)",//付款类型
|
|
|
+ stepper:'',
|
|
|
+ max:'',
|
|
|
+ priceshow:false,//付款类型弹窗显示
|
|
|
+ pricelist:["自费(个人件)","月结(公司件)"],
|
|
|
+ addshow:false,
|
|
|
+ name:"",
|
|
|
+ phone:"",
|
|
|
+ telPhone:'',
|
|
|
+ city:"",
|
|
|
+ address:"",
|
|
|
+ areashow:false,
|
|
|
+ index:"",
|
|
|
+ title:"",
|
|
|
+ jjname:"",
|
|
|
+ jjadd:"",
|
|
|
+ sjname:"",
|
|
|
+ sjadd:"",
|
|
|
+ bz:"",
|
|
|
+ check:false,
|
|
|
+ userId:'',
|
|
|
+ showPicker:false,//快递
|
|
|
+ expressInfoShow:"",//快递公司展示
|
|
|
+ expressPhone:"",//快递公司电话传值
|
|
|
+ expressInfo:"",//快递公司传值
|
|
|
+ columns:[],//快递公司列表
|
|
|
+ columns2:["个人件","公司件"],
|
|
|
+ jjInfo:{},
|
|
|
+ sjInfo:{},
|
|
|
+ declaredValue:'0', //声明价值
|
|
|
+ showPicker2:false,
|
|
|
+ goodOrderNo:'',//商品订单编号
|
|
|
+ waybillNo:'',//运单号
|
|
|
+ wayShow:true,
|
|
|
+ accountType:'',//账号类型
|
|
|
+ mailRoomId:'',
|
|
|
+ showPicker9:false,
|
|
|
+ costCenterList:[],//成本中心列表
|
|
|
+ costCenterInfoShow:"",
|
|
|
+ costCenterName:"",//成本中心展示
|
|
|
+ costCenterId:""//成本中心展示
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created:function(){
|
|
|
+ this.isLogin();
|
|
|
+
|
|
|
+ this.userId = localStorage.getItem("userId")
|
|
|
+ this.accountType = localStorage.getItem("accountType")
|
|
|
+ console.log("accountType:" + this.accountType)
|
|
|
+ if(this.accountType == '1'){
|
|
|
+ this.wplist = ["产品","非产品","文件","测试弹窗1"]
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.wplist = ["产品","文件","测试弹窗2"]
|
|
|
+ }
|
|
|
+ this.mailRoomId = localStorage.getItem("roomId")
|
|
|
+
|
|
|
+ //寄件地址
|
|
|
+ if(JSON.stringify(this.$store.state.jjInfo)!='{}'){
|
|
|
+ this.jjname = this.$store.state.jjInfo.jjname
|
|
|
+ this.jjadd = this.$store.state.jjInfo.jjadd
|
|
|
+ this.jjInfo = this.$store.state.jjInfo
|
|
|
+ }else{
|
|
|
+ //获取默认地址
|
|
|
+ this.getDefaultAddress()
|
|
|
+ }
|
|
|
+
|
|
|
+ //收件地址
|
|
|
+ if(JSON.stringify(this.$store.state.sjInfo)!='{}'){
|
|
|
+ this.sjname = this.$store.state.sjInfo.sjname
|
|
|
+ this.sjadd = this.$store.state.sjInfo.sjadd
|
|
|
+ this.sjInfo = this.$store.state.sjInfo
|
|
|
+ }
|
|
|
+ this.getLogisticsList()
|
|
|
+ //获取成本中心
|
|
|
+ this.getCostCenterList()
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ wxScanCode(type) {
|
|
|
+ // let purl = /(Android)/i.test(navigator.userAgent) ? window.location.href.split('#')[0] : encodeURI(window.location.href.split('#')[0]);
|
|
|
+ // let dataForm = {
|
|
|
+ // 'url': purl
|
|
|
+ // }
|
|
|
+ //alert(purl)
|
|
|
+ let wx = this.$wx;
|
|
|
+ this.$http.post(this.$store.state.host + "/weixin/getWxConfig", {
|
|
|
+ url:window.location.href.split('#')[0]
|
|
|
+ }, {
|
|
|
+ emulateJSON: true
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ //发送成功
|
|
|
+ var timestamp = res.body.wxConfig.timestamp;
|
|
|
+ var noncestr = res.body.wxConfig.nonceStr;
|
|
|
+ var signature = res.body.wxConfig.signature;
|
|
|
+ var appId = res.body.wxConfig.appId;
|
|
|
+ wx.config({
|
|
|
+ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
+ // debug : true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
+ appId: appId, // 必填,公众号的唯一标识
|
|
|
+ timestamp: timestamp, // 必填,生成签名的时间戳
|
|
|
+ nonceStr: noncestr, // 必填,生成签名的随机串
|
|
|
+ signature: signature, // 必填,签名,见附录1
|
|
|
+ jsApiList: [
|
|
|
+ "scanQRCode",
|
|
|
+ ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
|
|
+ });
|
|
|
+ wx.ready(()=> {
|
|
|
+ wx.scanQRCode({
|
|
|
+ needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
|
|
|
+ scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
|
|
|
+ success:(res)=> {
|
|
|
+ var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
|
|
|
+ if(result.indexOf(",") != -1){
|
|
|
+ let result1 = res.resultStr.split(",");
|
|
|
+ result = result1[result1.length-1];
|
|
|
+ }
|
|
|
+ if(type==1){
|
|
|
+ this.waybillNo = result;
|
|
|
+ }else{
|
|
|
+ this.goodOrderNo = result;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ error: function(res) {
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+ }, res => {
|
|
|
+ //发送失败
|
|
|
+ Toast("网络错误!")
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ // 选择快递公司
|
|
|
+ onConfirm(e){
|
|
|
+ this.expressInfoShow=e.text
|
|
|
+ this.expressInfo=e.id
|
|
|
+ this.expressPhone=e.phone
|
|
|
+ this.showPicker=false
|
|
|
+ if(this.expressInfo == 1){
|
|
|
+ this.wayShow = true
|
|
|
+ }else{
|
|
|
+ this.wayShow = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 选择成本中心
|
|
|
+ onConfirm9(e){
|
|
|
+ this.costCenterInfoShow=e.text
|
|
|
+ this.costCenterId=e.id
|
|
|
+ this.costCenterName=e.costCenterName
|
|
|
+ this.showPicker9=false
|
|
|
+ console.log("costCenterId:"+this.costCenterId)
|
|
|
+ console.log("costCenterName:"+this.costCenterName)
|
|
|
+ },
|
|
|
+
|
|
|
+ onConfirm0(e){
|
|
|
+ this.mainType=e
|
|
|
+ this.showPicker2=false
|
|
|
+ },
|
|
|
+ // 选择物品确定
|
|
|
+ onConfirm1(e){//确定
|
|
|
+ this.wptype=e
|
|
|
+ if(this.wptype == '文件'){
|
|
|
+ this.max = '10'
|
|
|
+ }else{
|
|
|
+ this.max = '1'
|
|
|
+ }
|
|
|
+ this.wpshow=false
|
|
|
+ },
|
|
|
+ // 选择付款方式确定
|
|
|
+ onConfirm2(e){//确定
|
|
|
+ this.pricetype=e
|
|
|
+ this.priceshow=false
|
|
|
+ },
|
|
|
+ // 填写地址确定
|
|
|
+ onConfirm3(e){//确定
|
|
|
+ this.city=e[0].name+' '+e[1].name+' '+e[2].name
|
|
|
+ this.areashow=false
|
|
|
+ },
|
|
|
+ // 填写地址类型确定
|
|
|
+ onConfirm8(e){//确定
|
|
|
+ this.addresstype=e
|
|
|
+ this.addressshow=false
|
|
|
+ },
|
|
|
+ // 寄件地址1与收件地址2
|
|
|
+ addtype(obj){
|
|
|
+ this.index=obj
|
|
|
+ if(obj==1){
|
|
|
+ this.title="寄件地址"
|
|
|
+ }
|
|
|
+ if(obj==2){
|
|
|
+ this.title="收件地址"
|
|
|
+ }
|
|
|
+ this.addshow=true
|
|
|
+ },
|
|
|
+ // 填写地址确定
|
|
|
+ onSubmit(){
|
|
|
+ if(this.name == '' || this.name == undefined ){
|
|
|
+ Toast('请填写姓名')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // if(this.phone == '' || this.phone == undefined ){
|
|
|
+ // Toast('请填写手机')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // let regPhone = new RegExp(this.$store.state.regPhone)
|
|
|
+ // if(!regPhone.test(this.phone)){
|
|
|
+ // Toast('手机号格式不正确')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+
|
|
|
+ if ((this.phone == '' || this.phone == undefined) && (this.telPhone == '' || this.telPhone == undefined)) {
|
|
|
+ Toast('请填写手机号或者座机号')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.phone != '' && this.phone != undefined){
|
|
|
+ let regPhone = new RegExp(this.$store.state.regPhone)
|
|
|
+ if (!regPhone.test(this.phone)) {
|
|
|
+ Toast('手机号格式不正确')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.city == '' || this.city == undefined ){
|
|
|
+ Toast('请选择省市区')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.address == '' || this.address == undefined ){
|
|
|
+ Toast('请填写详细地址')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.index==1){
|
|
|
+ this.jjname=this.name+' '+this.phone
|
|
|
+ this.jjadd=this.city+' '+this.address
|
|
|
+ this.jjInfo.jjname = this.jjname
|
|
|
+ this.jjInfo.jjadd = this.jjadd
|
|
|
+ this.jjInfo.sender = this.name
|
|
|
+ this.jjInfo.senderPhone = this.phone
|
|
|
+ this.jjInfo.senderMobile = this.telPhone
|
|
|
+ this.jjInfo.sendAddr = this.city
|
|
|
+ this.jjInfo.sendAddress = this.address
|
|
|
+ this.$store.commit("getJjInfo",this.jjInfo)
|
|
|
+ }
|
|
|
+ if(this.index==2){
|
|
|
+ this.sjname=this.name+' '+this.phone
this.sjadd=this.city+' '+this.address
|
|
|
+ this.sjInfo.sjname = this.sjname
|
|
|
+ this.sjInfo.sjadd = this.sjadd
|
|
|
+ this.sjInfo.receiver = this.name
|
|
|
+ this.sjInfo.receiverPhone = this.phone
|
|
|
+ this.sjInfo.receiveMobile = this.telPhone
|
|
|
+ this.sjInfo.receiveAddr = this.city
|
|
|
+ this.sjInfo.receiveAddress = this.address
|
|
|
+ this.$store.commit("getSjInfo",this.sjInfo)
|
|
|
+ }
|
|
|
+
|
|
|
+ this.addshow=false
|
|
|
+ this.name=""
|
|
|
+ this.phone=""
|
|
|
+ this.telPhone=""
|
|
|
+ this.city=""
|
|
|
+ this.address=""
|
|
|
+ },
|
|
|
+ close(){
|
|
|
+ this.name=""
|
|
|
+ this.phone=""
|
|
|
+ this.telPhone=""
|
|
|
+ this.city=""
|
|
|
+ this.address=""
|
|
|
+ },
|
|
|
+ // 地址簿跳转
|
|
|
+ link(obj){
|
|
|
+ this.$router.push({path:'/Addressbook',query:{active:obj}})
|
|
|
+ },
|
|
|
+ //立即寄件交互
|
|
|
+ save(){
|
|
|
+
|
|
|
+ if(this.accountType == 2){//办公室
|
|
|
+ //成本中心
|
|
|
+ if(this.costCenterName == '' || this.costCenterName == undefined ||
|
|
|
+ this.costCenterId == '' || this.costCenterId == undefined){
|
|
|
+ Toast('请选择成本中心')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if(this.accountType == 1){//柜台
|
|
|
+
|
|
|
+ //顾客邮购
|
|
|
+ if(this.addresstype == '顾客邮购'){
|
|
|
+ this.youGouType = '1'
|
|
|
+ }else if(this.addresstype == '非顾客邮购'){
|
|
|
+ this.youGouType = '2'
|
|
|
+ }
|
|
|
+
|
|
|
+ //POS/订单号
|
|
|
+ if(this.goodOrderNo == ''){
|
|
|
+ Toast('请填写订单号')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{//没有绑定账号类型
|
|
|
+ Toast('当前账号没有绑定账号类型,请联系管理员')
|
|
|
+ return
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if(this.jjname == '' || this.jjname == undefined ||
|
|
|
+ this.jjadd == '' || this.jjadd == undefined){
|
|
|
+ Toast('请填写寄件人信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.sjname == '' || this.sjname == undefined ||
|
|
|
+ this.sjadd == '' || this.sjadd == undefined){
|
|
|
+ Toast('请填写收件人信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.expressInfo == '' || this.expressInfo == undefined){
|
|
|
+ Toast('请选择快递公司')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.wptype == '' || this.wptype == undefined){
|
|
|
+ Toast('请选择物品类型')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.stepper == '' || this.stepper == undefined){
|
|
|
+ Toast('请选择重量')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.pricetype == '' || this.pricetype == undefined){
|
|
|
+ Toast('请选择付款方式')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let payWay = ''
|
|
|
+ let mainType = ''
|
|
|
+ if(this.pricetype == "自费(个人件)"){
|
|
|
+ payWay = '自费'
|
|
|
+ mainType = '个人件'
|
|
|
+ }
|
|
|
+ if(this.pricetype == "月结(公司件)"){
|
|
|
+ payWay = '月结'
|
|
|
+ mainType = '公司件'
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(this.check == false){
|
|
|
+ Toast('请点击同意《电子运单契约条款》')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ Toast.loading({
|
|
|
+ message: '保存中...',
|
|
|
+ forbidClick: true,
|
|
|
+ duration:0
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$http.post(this.$store.state.host+"/sendMail/saveMail.do",{userId:this.userId,
|
|
|
+ sender:this.jjInfo.sender,
|
|
|
+ senderPhone:this.jjInfo.senderPhone,
|
|
|
+ senderMobile:this.jjInfo.senderMobile,
|
|
|
+ sendAddr:this.jjInfo.sendAddr,
|
|
|
+ sendAddress:this.jjInfo.sendAddress,
|
|
|
+ receiver:this.sjInfo.receiver,
|
|
|
+ receiverPhone:this.sjInfo.receiverPhone,
|
|
|
+ receiveMobile:this.sjInfo.receiveMobile,
|
|
|
+ receiveAddr:this.sjInfo.receiveAddr,
|
|
|
+ receiveAddress:this.sjInfo.receiveAddress,
|
|
|
+ expressInfo:this.expressInfo,
|
|
|
+ waybillNo:this.waybillNo,
|
|
|
+ itemType:this.wptype,
|
|
|
+ mainType:mainType,
|
|
|
+ weight:this.stepper,
|
|
|
+ itemNum:this.stepper,
|
|
|
+ payWay:payWay,
|
|
|
+ expressType:'外部件',
|
|
|
+ declaredValue:this.declaredValue,
|
|
|
+ itemRemark:this.bz,
|
|
|
+ expressPhone:this.expressPhone,
|
|
|
+ goodOrderNo:this.goodOrderNo,
|
|
|
+ youGouType:this.youGouType,
|
|
|
+ costCenterName:this.costCenterName,
|
|
|
+ costCenterId:this.costCenterId,
|
|
|
+ },{emulateJSON:true})
|
|
|
+ .then(res=>{
|
|
|
+ //发送成功
|
|
|
+ if(res.body.msg=='success'){
|
|
|
+ Toast("下单成功,快递员将尽快上门取件!")
|
|
|
+ let that = this;
|
|
|
+ setTimeout(function(){
|
|
|
+ that.$router.push({path:'/'})
|
|
|
+ },1000)
|
|
|
+ }else if(res.body.msg != '' && res.body.msg != 'success'){
|
|
|
+ Toast(res.body.msg);
|
|
|
+ }else{
|
|
|
+ Toast("寄件失败");
|
|
|
+ }
|
|
|
+ },res=>{
|
|
|
+ //发送失败
|
|
|
+ Toast("网络错误");
|
|
|
+ })
|
|
|
+ Toast.clear()
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ computed:{
|
|
|
+ areaList(){
|
|
|
+ return areaList
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="less">
|
|
|
+ .content{
|
|
|
+ .sm{
|
|
|
+ display: flex;
|
|
|
+ padding: .33rem;
|
|
|
+ padding-bottom: 0;
|
|
|
+ font-size: .3rem;
|
|
|
+ justify-content: space-between;
|
|
|
+ /deep/.van-field{
|
|
|
+ width: 6.2rem;
|
|
|
+ height: .76rem;
|
|
|
+ .van-search__content{
|
|
|
+ background-color: white;
|
|
|
+ }
|
|
|
+ input{
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ img{
|
|
|
+ width:.4rem;
|
|
|
+ height: .4rem;
|
|
|
+ position: relative;
|
|
|
+ top: -.58rem;
|
|
|
+ right: -6.38rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .jjinfo{
|
|
|
+ font-size: .24rem;
|
|
|
+ color: #999999;
|
|
|
+
|
|
|
+ padding: .33rem;
|
|
|
+ padding-top: 0;
|
|
|
+ word-break: break-word;
|
|
|
+ >div{
|
|
|
+ background: white;
|
|
|
+ border-radius: .05rem;
|
|
|
+ padding: 0rem .3rem;
|
|
|
+ .jj{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: .2rem 0rem;
|
|
|
+ .jjaddress{
|
|
|
+ display: flex;
|
|
|
+ padding: .1rem 0rem;
|
|
|
+ >p{
|
|
|
+ font-size: .24rem;
|
|
|
+ font-weight: bold;
|
|
|
+ display: inline-block;
|
|
|
+ width:.5rem;
|
|
|
+ height: .5rem;
|
|
|
+ background: #00c4b8;
|
|
|
+ text-align: center;
|
|
|
+ line-height: .5rem;
|
|
|
+ color: white;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: .3rem;
|
|
|
+ }
|
|
|
+ div{
|
|
|
+ //font-weight: bold;
|
|
|
+ max-width: 4.2rem;
|
|
|
+ p:nth-of-type(1){
|
|
|
+ font-size: .24rem;
|
|
|
+ color: #333;
|
|
|
+ margin-bottom: .2rem;
|
|
|
+ }
|
|
|
+ p:nth-of-type(2){
|
|
|
+ font-size: .3rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .dzb{
|
|
|
+ text-align: center;
|
|
|
+ border-left: .01rem solid #ededed;
|
|
|
+ padding-left: .3rem;
|
|
|
+
|
|
|
+ img{
|
|
|
+ width:.39rem;
|
|
|
+ height: .42rem;
|
|
|
+ padding-top: .2rem;
|
|
|
+ }
|
|
|
+ p{
|
|
|
+ font-size: .2rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ .kdshow{
|
|
|
+ font-size: .3rem;
|
|
|
+ padding: .3rem 0px;
|
|
|
+ width: 6.84rem;
|
|
|
+ background: white;
|
|
|
+ border-radius: .05rem;
|
|
|
+ margin: 0rem auto .2rem;
|
|
|
+ /deep/.van-cell{
|
|
|
+ padding: 0px .3rem;
|
|
|
+ overflow: unset;
|
|
|
+ input{
|
|
|
+ text-align: right;
|
|
|
+ height: .5rem;
|
|
|
+ padding-right: .25rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /deep/.van-cell::after{
|
|
|
+ content: "";
|
|
|
+ display: inline-block;
|
|
|
+ border-right: .01rem solid #b0b0b0;
|
|
|
+ border-bottom: .01rem solid #b0b0b0;
|
|
|
+ transform: rotate(-45deg);
|
|
|
+ left: unset;
|
|
|
+ position: absolute;
|
|
|
+ right: .3rem;
|
|
|
+ bottom: .15rem;
|
|
|
+ width: .2rem;
|
|
|
+ height: .2rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .choose{
|
|
|
+ font-size: .3rem;
|
|
|
+ color: #999999;
|
|
|
+ font-weight: bold;
|
|
|
+ padding: 0rem .33rem;
|
|
|
+ >div{
|
|
|
+ background: white;
|
|
|
+
|
|
|
+ padding: .3rem .3rem;
|
|
|
+ border-radius: .05rem;
|
|
|
+ .type_wp{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ div{
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+ p:nth-of-type(2){
|
|
|
+ color: #333;
|
|
|
+ margin-top: .2rem;
|
|
|
+ font-size: .36rem;
|
|
|
+ //position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ div:nth-of-type(1){
|
|
|
+ border-right: .01rem solid #ededed;
|
|
|
+ p:nth-of-type(2):after{
|
|
|
+ content: "";
|
|
|
+ display: inline-block;
|
|
|
+ width: .15rem;
|
|
|
+ height: .15rem;
|
|
|
+ border-bottom: .01rem solid #999;
|
|
|
+ border-right: .01rem solid #999;
|
|
|
+ transform: rotate(45deg);
|
|
|
+ margin-left: .15rem;
|
|
|
+ position: relative;
|
|
|
+ top: -.08rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .type_price{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ border-top: .01rem solid #ededed;
|
|
|
+ margin-top: .3rem;
|
|
|
+ padding-top: .3rem;
|
|
|
+ div{
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+ p:nth-of-type(2){
|
|
|
+ color: #333;
|
|
|
+ margin-top: .2rem;
|
|
|
+ font-size: .36rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ div:nth-of-type(1){
|
|
|
+ border-right: .01rem solid #ededed;
|
|
|
+ p:nth-of-type(2):after{
|
|
|
+ content: "";
|
|
|
+ display: inline-block;
|
|
|
+ width: .15rem;
|
|
|
+ height: .15rem;
|
|
|
+ border-bottom: .01rem solid #999;
|
|
|
+ border-right: .01rem solid #999;
|
|
|
+ transform: rotate(45deg);
|
|
|
+ margin-left: .15rem;
|
|
|
+ position: relative;
|
|
|
+ top: -.08rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ .bz{
|
|
|
+ margin-top: -0.53rem;
|
|
|
+ padding: .33rem;
|
|
|
+ font-size: .3rem;
|
|
|
+ /deep/.van-field__value{
|
|
|
+ input{
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .check{
|
|
|
+ font-size: .24rem;
|
|
|
+
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ /deep/.van-checkbox{
|
|
|
+ justify-content: center;
|
|
|
+ .van-checkbox__label{
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn-jj{
|
|
|
+ padding: .33rem;
|
|
|
+ button{
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .whrite_add{
|
|
|
+ width: 6.6rem;
|
|
|
+ padding: .4rem .2rem;
|
|
|
+ /deep/.van-field__value{
|
|
|
+ input{
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ /deep/.van-popup__close-icon--top-right{
|
|
|
+ top: 5px;
|
|
|
+ right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|