|
@@ -3,6 +3,8 @@
|
|
|
<div class="jjinfo">
|
|
|
<van-field :value="recipientsName" @focus="onFocus" name="phone" label="收件人姓名" placeholder="请输入收件人姓名"
|
|
|
:rules="[{ required: true }]" />
|
|
|
+ <van-field :value="recipientsPhone" @focus="onFocusPhone" 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>
|
|
@@ -70,42 +72,42 @@
|
|
|
<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="wpshow2" position="bottom">
|
|
|
- <van-picker title="选择" show-toolbar :columns="innerlist" @confirm="onConfirm11" @cancel="wpshow2 = 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="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="display: flex; justify-content: space-between;">
|
|
|
<van-search style="width: 100%;" @search="searchCrux" 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;" />
|
|
|
+ <van-cell :value="item.departmentName">{{ item.name }}- {{ item.departmentName }} - {{ item.seatNo
|
|
|
+ }}</van-cell>
|
|
|
</van-cell-group>
|
|
|
</div>
|
|
|
<van-button class="goback" @click="nameShowA = false" type="info">
|
|
|
退出
|
|
|
</van-button>
|
|
|
</van-popup>
|
|
|
+ <!-- 手机号输入后弹出 -->
|
|
|
+ <van-popup v-model="nameShowB" :style="{ height: '100%', width: '100%', }">
|
|
|
+ <div style="display: flex; justify-content: space-between;">
|
|
|
+ <van-search style="width: 100%;" @search="searchCruxPhone" v-model="searchKeyPhone"
|
|
|
+ placeholder="请输入手机后四位" />
|
|
|
+ </div>
|
|
|
+ <div style="height: calc(100vh - 105px); overflow-y: auto; padding: 0 20px;">
|
|
|
+ <van-cell-group class="vanPopup" @click="onGroupPhone(item)"
|
|
|
+ v-for="(item, index) in searchNameListPhone" :key="index" inset>
|
|
|
+ <van-cell :value="item.departmentName">{{ item.name }}- {{ item.departmentName }} - {{ item.seatNo
|
|
|
+ }}</van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </div>
|
|
|
+ <van-button class="goback" @click="nameShowB = false" type="info">
|
|
|
+ 退出
|
|
|
+ </van-button>
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -124,18 +126,9 @@ export default {
|
|
|
stepper: '',//件数
|
|
|
Kilogram: '',//重量
|
|
|
max: '',
|
|
|
- priceshow: false,//付款类型弹窗显示
|
|
|
- pricelist: ["自费", "月结"],
|
|
|
- addshow: false,
|
|
|
name: "",
|
|
|
phone: "",
|
|
|
- telPhone: "",
|
|
|
- city: "",
|
|
|
- address: "",
|
|
|
- areashow: false,
|
|
|
index: "",
|
|
|
- title: "",
|
|
|
- jjname: "",
|
|
|
jjadd: "",
|
|
|
sjname: "",
|
|
|
sjadd: "",
|
|
@@ -153,8 +146,6 @@ export default {
|
|
|
mainType: '',
|
|
|
jjaddress: '',//寄件个人地址
|
|
|
dsList: [],//代收人列表
|
|
|
- dsnameshow: false,
|
|
|
- dsname: '',
|
|
|
userId: "",
|
|
|
sjInfo: {},
|
|
|
declaredValue: '',
|
|
@@ -172,12 +163,16 @@ export default {
|
|
|
// vanListLoading: false,
|
|
|
// finished: false,
|
|
|
// searchResults: [],
|
|
|
- searchKey: '',//搜索结果
|
|
|
+ searchKey: '',//姓名搜索结果
|
|
|
+ searchKeyPhone: '',//手机搜索结果
|
|
|
recipientsName: '',//收件人姓名
|
|
|
+ recipientsPhone: '',//收件人手机号
|
|
|
recipientsDoor: '',//部门
|
|
|
recipientsSet: '',//座位
|
|
|
- nameShowA: false, // 手机号点击聚焦
|
|
|
+ nameShowA: false, // 姓名点击聚焦
|
|
|
+ nameShowB: false, // 手机号点击聚焦
|
|
|
searchNameList: [],//搜索后的数据
|
|
|
+ searchNameListPhone: [],//手机号搜索后的数据
|
|
|
groupValue: {},//点击后的数据
|
|
|
}
|
|
|
},
|
|
@@ -187,25 +182,55 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
- // 手机号点击聚焦
|
|
|
+ //姓名点击聚焦
|
|
|
onFocus() {
|
|
|
this.nameShowA = true
|
|
|
},
|
|
|
+ // 手机号点击聚焦
|
|
|
+ onFocusPhone() {
|
|
|
+ this.nameShowB = true
|
|
|
+ },
|
|
|
// 搜索关键
|
|
|
async searchCrux() {
|
|
|
const res = await getUserByName({ NAME: this.searchKey })
|
|
|
- if (res.msg == 'success') {
|
|
|
- this.searchNameList = res.userByName
|
|
|
+ if (res.userByName != '' && res.userByName != undefined && res.userByName != null) {
|
|
|
+ if (res.msg == 'success') {
|
|
|
+ this.searchNameList = res.userByName
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Toast('没有此数据')
|
|
|
}
|
|
|
},
|
|
|
+ // 手机号搜索关键
|
|
|
+ async searchCruxPhone() {
|
|
|
+ if (!/^\d{4}$/.test(this.searchKeyPhone)) {
|
|
|
+ return Toast('请输入手机号后四位')
|
|
|
+ }
|
|
|
+ const res = await getUserByName({ PHONE: this.searchKeyPhone })
|
|
|
+ if (res.userByName != '' && res.userByName != undefined && res.userByName != null) {
|
|
|
+ if (res.msg == 'success') {
|
|
|
+ this.searchNameListPhone = res.userByName
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Toast('没有此数据')
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
// 点击回显
|
|
|
onGroup(value) {
|
|
|
this.groupValue = value
|
|
|
this.recipientsName = value.name
|
|
|
- // this.maney
|
|
|
+ this.recipientsPhone = value.phone
|
|
|
this.nameShowA = false
|
|
|
},
|
|
|
+ // 手机号点击回显
|
|
|
+ onGroupPhone(value) {
|
|
|
+ this.groupValue = value
|
|
|
+ this.recipientsName = value.name
|
|
|
+ this.recipientsPhone = value.phone
|
|
|
+ this.nameShowB = false
|
|
|
+ },
|
|
|
|
|
|
// 选择快递公司
|
|
|
onConfirm(e) {
|
|
@@ -236,28 +261,8 @@ export default {
|
|
|
this.innerType = e
|
|
|
this.wpshow2 = 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
|
|
|
- },
|
|
|
- // 寄件地址1与收件地址2
|
|
|
- addtype(obj) {
|
|
|
- this.index = obj
|
|
|
- if (obj == 1) {
|
|
|
- this.title = "寄件地址"
|
|
|
- }
|
|
|
- if (obj == 3) {
|
|
|
- this.title = "内部收件地址"
|
|
|
- }
|
|
|
- this.addshow = true
|
|
|
- this.onSearch()
|
|
|
- },
|
|
|
+
|
|
|
+
|
|
|
// 地址簿跳转
|
|
|
link(obj) {
|
|
|
this.$router.push({ path: '/Inaddressbook', query: { active: obj } })
|