|
@@ -1,69 +1,13 @@
|
|
|
<template>
|
|
|
<div class="content">
|
|
|
<backindex :title="titlename"></backindex>
|
|
|
- <!-- 寄件地址 -->
|
|
|
- <!-- <div class="jjinfo">
|
|
|
- <div>
|
|
|
- <div class="jj">
|
|
|
- <div class="jjaddress">
|
|
|
- <p>寄</p>
|
|
|
- <div>
|
|
|
-
|
|
|
- <p>{{ user.name }} {{ user.organization }} {{ user.phone }} {{ user.telephone }}</p>
|
|
|
- <p>{{ jjaddress }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="dzb">
|
|
|
- <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(3)">填写收件地址</p>
|
|
|
- <p v-else @click="addtype(3)">{{ sjadd }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="dzb" @click="link(3)">
|
|
|
- <img src="../assets/images/addlist.png" alt="">
|
|
|
- <p>地址簿</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div> -->
|
|
|
-
|
|
|
- <!-- -->
|
|
|
<div class="jjinfo">
|
|
|
<van-field :value="recipientsName" @focus="onFocus" name="phone" label="收件人姓名" placeholder="请输入收件人姓名"
|
|
|
:rules="[{ required: true }]" />
|
|
|
<van-field :value="groupValue.departmentName" readonly name="phone" label="收件人部门" placeholder="占位" />
|
|
|
<van-field :value="groupValue.seatNo" readonly name="phone" label="收件人座位" placeholder="占位" />
|
|
|
</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">
|
|
|
- <van-field readonly clickable name="picker" :value="mainType" label="主体类型" placeholder="请选择主体类型" @click="showPicker2 = true" />
|
|
|
- <van-popup v-model="showPicker2" position="bottom">
|
|
|
- <van-picker
|
|
|
- show-toolbar
|
|
|
- :columns="columns2"
|
|
|
- @confirm="onConfirm0"
|
|
|
- @cancel="showPicker2 = false"
|
|
|
- />
|
|
|
- </van-popup>
|
|
|
- </div> -->
|
|
|
+
|
|
|
<!-- 寄件属性 -->
|
|
|
<div class="choose">
|
|
|
<div>
|
|
@@ -101,27 +45,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 内部调拨 -->
|
|
|
- <!-- <div class="choose">
|
|
|
- <div>
|
|
|
- <div class="type_inner">
|
|
|
- <div>
|
|
|
- <p>地址类型</p>
|
|
|
- <p v-if="addresstype == ''" @click="addressshow = true">请选择</p>
|
|
|
- <p v-else @click="addressshow = true">{{ addresstype }}</p>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <p>
|
|
|
- <template v-if="wptype == '产品'">选择产品</template>
|
|
|
- <template v-if="wptype == '非产品'">选择标签</template>
|
|
|
- <template v-if="wptype == '文件'">选择标签</template>
|
|
|
- </p>
|
|
|
- <p v-if="innerType == ''" @click="wpshow2 = true">请选择</p>
|
|
|
- <p v-else @click="wpshow2 = true">{{ innerType }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
|
|
|
<!--商品订单编号-->
|
|
|
<div class="bz" style="padding-bottom: 0;" v-show="this.accountType == 1">
|
|
@@ -153,76 +76,36 @@
|
|
|
<van-picker title="选择" show-toolbar :columns="innerlist" @confirm="onConfirm11" @cancel="wpshow2 = 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 v-model="priceshow" position="bottom">
|
|
|
<van-picker title="付款方式" show-toolbar :columns="pricelist" @confirm="onConfirm2"
|
|
|
@cancel="priceshow = 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">
|
|
|
- <form action="/">
|
|
|
- <van-search shape="round" v-model="dsname" show-action placeholder="请输入搜索关键词" @search="onSearch"
|
|
|
- @cancel="onCancel" />
|
|
|
- </form>
|
|
|
- <van-list>
|
|
|
- <van-cell v-for="(item, index) in dsList" @click="onSubmit(index)" :key="item.name"
|
|
|
- :title="item.name + ' ' + item.phone + ' ' + item.telephone" />
|
|
|
- </van-list>
|
|
|
- <!-- <van-field v-model="name" readonly name="姓名" label="姓名" placeholder="请输入姓名" @click="dsnameshow = true" :rules="[{ required: false}]"/>
|
|
|
- <van-field v-model="phone" readonly maxlength="11" type="number" name="手机" label="手机" placeholder="请输入手机" @click="dsnameshow = true" :rules="[{ required: false}]"/>
|
|
|
- <van-field v-model="telPhone" readonly maxlength="20" type="text" name="座机" label="座机" placeholder="请输入座机" @click="dsnameshow = true" :rules="[{ required: false}]"/>
|
|
|
- <van-field readonly clickable name="area" :value="city" label="省市区" placeholder="请选择省市区" @click="areashow = true" :rules="[{ required: false}]"/>
|
|
|
- <van-field v-model="address" readonly maxlength="50" name="详细地址" label="详细地址" placeholder="请输入详细地址" @click="dsnameshow = true" :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="dsnameshow" position="bottom">
|
|
|
- <van-picker title="内部收件人" show-toolbar :columns="dsList" value-key="text" @confirm="onConfirmDs"
|
|
|
- @cancel="dsnameshow = false" />
|
|
|
- </van-popup>
|
|
|
+
|
|
|
<!-- 城市选择 -->
|
|
|
<van-popup v-model="areashow" position="bottom">
|
|
|
<van-area :area-list="areaList" @confirm="onConfirm3" @cancel="areashow = false" />
|
|
|
</van-popup>
|
|
|
<!-- 输入后弹出 -->
|
|
|
<van-popup v-model="nameShowA" :style="{ height: '100%', width: '100%', }">
|
|
|
- <div style="overflow: scroll; height: 100%; width: 100%;">
|
|
|
- <div style="display: flex; justify-content: space-between;">
|
|
|
- <van-search style="width: 100%;" v-model="searchKey" placeholder="请输入搜索关键词" />
|
|
|
- <van-icon style="margin-top: 15px; margin-right: 10px" @click="searchCrux" name="search"
|
|
|
- color="#1989fa" size="20" />
|
|
|
- </div>
|
|
|
-
|
|
|
+ <div style="display: flex; justify-content: space-between;">
|
|
|
+ <van-search style="width: 100%;" v-model="searchKey" placeholder="请输入搜索关键词" />
|
|
|
+ <van-icon style="margin-top: 15px; margin-right: 10px" @click="searchCrux" name="search" color="#1989fa"
|
|
|
+ size="20" />
|
|
|
+ </div>
|
|
|
+ <div style="height: calc(100vh - 105px); overflow-y: auto; padding: 0 20px;">
|
|
|
<van-cell-group class="vanPopup" @click="onGroup(item)" v-for="(item, index) in searchNameList"
|
|
|
:key="index" inset>
|
|
|
+ <!-- <van-cell :value="item.phone" /> -->
|
|
|
<van-cell :value="item.name" />
|
|
|
<van-cell :value="item.departmentName" />
|
|
|
<van-cell :value="item.seatNo" />
|
|
|
<van-cell title="收件人userID" :value="item.userId" style="display: none;" />
|
|
|
- <!-- <div style="height: 1px; color: #1f1f1f; width: 100%; background-color: #ccc;"></div> -->
|
|
|
</van-cell-group>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <div style="height: 60px; width: 100%; background-color: #fff;"></div>
|
|
|
-
|
|
|
- <van-button class="goback" @click="nameShowA = false" type="info">
|
|
|
- 退出
|
|
|
- </van-button>
|
|
|
</div>
|
|
|
+ <van-button class="goback" @click="nameShowA = false" type="info">
|
|
|
+ 退出
|
|
|
+ </van-button>
|
|
|
</van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -300,22 +183,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
|
- this.isLogin();
|
|
|
this.userId = localStorage.getItem("userId");
|
|
|
this.getUser();
|
|
|
- this.getPersonalAddress()
|
|
|
this.accountType = localStorage.getItem("accountType")
|
|
|
- //代收人列表
|
|
|
- //this.findCollectAgentList()
|
|
|
- //收件地址
|
|
|
- if (JSON.stringify(this.$store.state.sjInfo3) != '{}') {
|
|
|
- this.sjname = this.$store.state.sjInfo3.sjname
|
|
|
- this.sjadd = this.$store.state.sjInfo3.sjadd
|
|
|
- this.sjInfo = this.$store.state.sjInfo3
|
|
|
- } else {
|
|
|
- //收件人记忆
|
|
|
- this.getLastRecvUserInfo()
|
|
|
- }
|
|
|
+
|
|
|
//获取快递信息
|
|
|
this.getLogisticsList()
|
|
|
},
|
|
@@ -341,100 +212,6 @@ export default {
|
|
|
this.nameShowA = false
|
|
|
},
|
|
|
|
|
|
- //代收人搜索
|
|
|
- onSearch() {
|
|
|
- this.$http.post(this.$store.state.host + "/sendMail/searchInnerContactsList.do", {
|
|
|
- userId: this.userId, name: this.dsname
|
|
|
- }, { emulateJSON: true })
|
|
|
- .then(res => {
|
|
|
- //发送成功
|
|
|
- if (res.body.msg == 'success') {
|
|
|
- this.dsList = res.body.list
|
|
|
- for (var i = 0; i < this.dsList.length; i++) {
|
|
|
- this.dsList[i].text = this.dsList[i].name + ' ' + this.dsList[i].phone + ' ' + this.dsList[i].telephone
|
|
|
- }
|
|
|
- //this.dsnameshow=true
|
|
|
- }
|
|
|
- }, res => {
|
|
|
- //发送失败
|
|
|
- Toast("网络错误!")
|
|
|
- })
|
|
|
- },
|
|
|
- //搜索取消
|
|
|
- onCancel() {
|
|
|
- this.onSearch()
|
|
|
- },
|
|
|
- // 填写地址类型确定
|
|
|
- onConfirm8(e) {//确定
|
|
|
-
|
|
|
- this.addresstype = e
|
|
|
- this.addressshow = false
|
|
|
- },
|
|
|
- onConfirmDs(e) {//确定
|
|
|
- if (e != undefined) {
|
|
|
- this.name = e.name
|
|
|
- this.phone = e.phone
|
|
|
- this.telPhone = e.telephone
|
|
|
- this.address = e.address
|
|
|
- this.city = e.province + ' ' + e.area + ' ' + e.city
|
|
|
- }
|
|
|
- //this.getPersonalAddressById(e.user_id)
|
|
|
- this.dsnameshow = false
|
|
|
- },
|
|
|
- //收件人记忆
|
|
|
- getLastRecvUserInfo() {
|
|
|
- Toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- });
|
|
|
- this.$http.post(this.$store.state.host + "/sendMail/getLastRecvUserInfo.do", { userId: this.userId }, { emulateJSON: true })
|
|
|
- .then(res => {
|
|
|
- //发送成功
|
|
|
- if (res.body.msg == 'success') {
|
|
|
- if (JSON.stringify(res.body.result) != '{}') {
|
|
|
- this.sjname = res.body.result.name + ' ' + res.body.result.phone
|
|
|
- this.sjadd = res.body.result.area + ' ' + res.body.result.address
|
|
|
- this.sjInfo = {}
|
|
|
- this.sjInfo.sjname = this.sjname
|
|
|
- this.sjInfo.sjadd = this.sjadd
|
|
|
- this.sjInfo.receiver = res.body.result.name
|
|
|
- this.sjInfo.receiverPhone = res.body.result.phone
|
|
|
- this.sjInfo.receiveMobile = res.body.result.telPhone
|
|
|
- this.sjInfo.receiveAddr = res.body.result.area
|
|
|
- this.sjInfo.receiveAddress = res.body.result.address
|
|
|
- this.$store.commit("getSjInfo3", this.sjInfo)
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- }, res => {
|
|
|
- //发送失败
|
|
|
- Toast("网络错误!")
|
|
|
- })
|
|
|
- Toast.clear()
|
|
|
- },
|
|
|
- //收件
|
|
|
- getPersonalAddress() {
|
|
|
- Toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- });
|
|
|
- this.$http.post(this.$store.state.host + "/personal/getPersonalAddress.do", { userId: this.userId }, { emulateJSON: true })
|
|
|
- .then(res => {
|
|
|
- //发送成功
|
|
|
- if (res.body.msg == 'success') {
|
|
|
- this.jjaddress = res.body.address
|
|
|
- this.jjadd = res.body.provinceAndCity
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- }, res => {
|
|
|
- //发送失败
|
|
|
- Toast("网络错误!")
|
|
|
- })
|
|
|
- Toast.clear()
|
|
|
- },
|
|
|
// 选择快递公司
|
|
|
onConfirm(e) {
|
|
|
this.expressInfoShow = e.text
|
|
@@ -456,12 +233,6 @@ export default {
|
|
|
this.innerType = '小样'
|
|
|
}
|
|
|
|
|
|
- // if (e == '文件') {
|
|
|
- // this.max = '10'
|
|
|
- // } else {
|
|
|
- // this.max = '10'
|
|
|
- // }
|
|
|
-
|
|
|
this.wptype = e
|
|
|
this.wpshow = false
|
|
|
},
|
|
@@ -469,8 +240,6 @@ export default {
|
|
|
onConfirm11(e) {//确定
|
|
|
this.innerType = e
|
|
|
this.wpshow2 = false
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
// 选择付款方式确定
|
|
|
onConfirm2(e) {//确定
|
|
@@ -494,41 +263,6 @@ export default {
|
|
|
this.addshow = true
|
|
|
this.onSearch()
|
|
|
},
|
|
|
- // 填写地址确定
|
|
|
- onSubmit(index) {
|
|
|
- this.name = this.dsList[index].name
|
|
|
- this.phone = this.dsList[index].phone
|
|
|
- this.city = this.dsList[index].province + ' ' + this.dsList[index].city + ' ' + this.dsList[index].area
|
|
|
- this.address = this.dsList[index].address
|
|
|
- this.telPhone = this.dsList[index].telPhone
|
|
|
- if (this.index == 3) {
|
|
|
- this.sjname = this.name + ' ' + this.phone
|
|
|
- this.sjadd = this.city + ' ' + this.address
|
|
|
- this.sjInfo = {}
|
|
|
- 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("getSjInfo3", 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: '/Inaddressbook', query: { active: obj } })
|
|
@@ -536,25 +270,10 @@ export default {
|
|
|
//立即寄件交互
|
|
|
async save() {
|
|
|
|
|
|
- // if (this.user.name == '' || this.user.name == undefined) {
|
|
|
- // Toast('请填写寄件人信息')
|
|
|
- // return
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.sjname == '' || this.sjname == undefined ||
|
|
|
- // this.sjadd == '' || this.sjadd == undefined) {
|
|
|
- // Toast('请填写收件人信息')
|
|
|
- // return
|
|
|
- // }
|
|
|
if (this.recipientsName == '' || this.recipientsName == undefined) {
|
|
|
return Toast('请输入收件人姓名')
|
|
|
}
|
|
|
|
|
|
- // if (this.expressInfo == '' || this.expressInfo == undefined) {
|
|
|
- // Toast('请选择快递公司')
|
|
|
- // return
|
|
|
- // }
|
|
|
-
|
|
|
if (this.wptype == '' || this.wptype == undefined) {
|
|
|
Toast('请选择物品类型')
|
|
|
return
|
|
@@ -565,28 +284,6 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- // if (this.accountType == 1) {//柜台
|
|
|
- // if (this.goodOrderNo == '') {
|
|
|
- // Toast('请填写调拨单号')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // } else {//没有绑定账号类型
|
|
|
- // Toast('当前账号没有绑定账号类型,请联系管理员')
|
|
|
- // return
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
- // if (this.addresstype == '店铺调拨') {
|
|
|
- // this.addressTypeSend = '3'
|
|
|
- // } else if (this.addresstype == '仓库') {
|
|
|
- // this.addressTypeSend = '2'
|
|
|
- // } else if (this.addresstype == '办公室') {
|
|
|
- // this.addressTypeSend = '1'
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if (this.check == false) {
|
|
|
Toast('请点击同意《电子运单契约条款》')
|
|
|
return
|
|
@@ -624,51 +321,6 @@ export default {
|
|
|
console.log(res, 'res')
|
|
|
Toast.clear()
|
|
|
|
|
|
- // this.$http.post(this.$store.state.host + "/sendMail/saveMail.do", {
|
|
|
- // userId: this.userId,
|
|
|
- // sender: this.user.name,
|
|
|
- // senderPhone: this.user.phone,
|
|
|
- // senderMobile: this.user.telephone,
|
|
|
- // sendAddr: this.jjadd,
|
|
|
- // sendAddress: this.jjaddress,
|
|
|
- // receiver: this.sjInfo.receiver,
|
|
|
- // receiverPhone: this.sjInfo.receiverPhone,
|
|
|
- // receiveMobile: this.sjInfo.receiveMobile,
|
|
|
- // receiveAddr: this.sjInfo.receiveAddr,
|
|
|
- // receiveAddress: this.sjInfo.receiveAddress,
|
|
|
- // expressInfo: this.expressInfo,
|
|
|
- // itemType: this.wptype,
|
|
|
- // mainType: this.mainType,
|
|
|
- // weight: this.stepper,
|
|
|
- // itemNum: this.stepper,
|
|
|
- // payWay: this.pricetype,
|
|
|
- // mainType: '公司件',
|
|
|
- // expressType: '内部件',
|
|
|
- // declaredValue: this.declaredValue,
|
|
|
- // itemRemark: this.bz,
|
|
|
- // expressPhone: this.expressPhone,
|
|
|
- // innerType: this.innerType,
|
|
|
- // goodOrderNo: this.goodOrderNo,
|
|
|
- // addressType: this.addressTypeSend
|
|
|
- // }, { 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("网络错误");
|
|
|
- // })
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -943,6 +595,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.goback {
|
|
|
+ position: fixed;
|
|
|
+ height: 50px;
|
|
|
+ width: 100%;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
.whrite_add {
|
|
|
width: 6.6rem;
|
|
|
padding: .4rem .2rem;
|