|
@@ -19,7 +19,31 @@
|
|
|
transform: 'scale(1.05)'
|
|
transform: 'scale(1.05)'
|
|
|
}" @click="clickPeriodDateList"></u-tabs>
|
|
}" @click="clickPeriodDateList"></u-tabs>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="store-wrap">
|
|
|
|
|
+ <view class="store-info">
|
|
|
|
|
+ <view class="logo">
|
|
|
|
|
+ <image src="../../static/index/u55.png" mode=""></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view @click="gotoStoreChoose()" class="store-content">
|
|
|
|
|
+ <view class="h-row">
|
|
|
|
|
+ <view class="store-desc">
|
|
|
|
|
+ <view class="store-name">
|
|
|
|
|
+ <view class="">{{ storeInfo.storeName }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="arrow-right">
|
|
|
|
|
+ <view class="change-store">更换门店</view>
|
|
|
|
|
+ <u-icon name="arrow-right" color="#333" size="16"></u-icon>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="h-row">
|
|
|
|
|
+ <text class="address">地址:{{ storeInfo.address }}</text>
|
|
|
|
|
+ <!-- <text class="address">距你1.8km</text> -->
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
+ </view>
|
|
|
<view class="flex-col group">
|
|
<view class="flex-col group">
|
|
|
<view class="serob"><text>服务对象</text></view>
|
|
<view class="serob"><text>服务对象</text></view>
|
|
|
<u-grid :border="false" col="4">
|
|
<u-grid :border="false" col="4">
|
|
@@ -197,14 +221,13 @@
|
|
|
dictType:'tomorrow_make_rule'
|
|
dictType:'tomorrow_make_rule'
|
|
|
},
|
|
},
|
|
|
takeNumberRules:[],
|
|
takeNumberRules:[],
|
|
|
|
|
+ storeInfo: {},
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
this.store = uni.getStorageSync('storeInfo')
|
|
this.store = uni.getStorageSync('storeInfo')
|
|
|
this.orderParam.serviceStoreId = this.store.storeId
|
|
this.orderParam.serviceStoreId = this.store.storeId
|
|
|
- //获取排班日期
|
|
|
|
|
- this.selectDate()
|
|
|
|
|
- this.getTemplateList()
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
this.timeoutId = setTimeout(()=>{
|
|
this.timeoutId = setTimeout(()=>{
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -222,13 +245,72 @@
|
|
|
},1000*60*5)
|
|
},1000*60*5)
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+
|
|
|
this.userInfo = uni.getStorageSync('userInfo')
|
|
this.userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
+ // 查询门店信息
|
|
|
|
|
+ const data = uni.getStorageSync('storeInfo');
|
|
|
|
|
+ this.store = uni.getStorageSync('storeInfo')
|
|
|
|
|
+ if (!data) {
|
|
|
|
|
+ // 获取位置信息查询门店列表数据
|
|
|
|
|
+ this.getLocation();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.storeInfo = data;
|
|
|
|
|
+ }
|
|
|
|
|
+ //获取排班日期
|
|
|
|
|
+ this.selectDate()
|
|
|
|
|
+ this.getTemplateList()
|
|
|
this.getSelectionRules(this.takeNumberData)
|
|
this.getSelectionRules(this.takeNumberData)
|
|
|
},
|
|
},
|
|
|
onUnload(){
|
|
onUnload(){
|
|
|
clearTimeout(this.timeoutId);
|
|
clearTimeout(this.timeoutId);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+// 获取门店列表数据
|
|
|
|
|
+ getStoreListData(data) {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ // 用户绑定门店
|
|
|
|
|
+ this.$api.storeList(data).then((res) => {
|
|
|
|
|
+ console.log(res.data.data[0])
|
|
|
|
|
+ that.storeInfo = res.data.data[0]
|
|
|
|
|
+ // 更新用户选择的门店信息
|
|
|
|
|
+ uni.setStorageSync('storeInfo', res.data.data[0])
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取经纬度信息
|
|
|
|
|
+ getLocation() {
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ console.log('+++++++++++++开始获取位置信息++++++++++++++++')
|
|
|
|
|
+ uni.getLocation({
|
|
|
|
|
+ type: 'gcj02',
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ let latitude = res.latitude; // 纬度
|
|
|
|
|
+ let longitude = res.longitude; // 经度
|
|
|
|
|
+ let speed = res.speed; // 速度
|
|
|
|
|
+ let accuracy = res.accuracy; // 精确度
|
|
|
|
|
+ // 在这里可以对位置信息进行处理
|
|
|
|
|
+ console.log("纬度:" + latitude + ";经度" + longitude)
|
|
|
|
|
+ that.reqParm.latitude = latitude
|
|
|
|
|
+ that.reqParm.longitude = longitude
|
|
|
|
|
+ uni.setStorageSync('location', that.reqParm)
|
|
|
|
|
+ that.getStoreListData(that.reqParm)
|
|
|
|
|
+ },
|
|
|
|
|
+ fail:function (fail) {
|
|
|
|
|
+ console.log('获取用户地址失败==》',fail)
|
|
|
|
|
+ that.getStoreListData(that.reqParm)
|
|
|
|
|
+ },
|
|
|
|
|
+ complete:function (complete) {
|
|
|
|
|
+ console.log('获取用户地址失败or成功==》',complete)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 去选择门店
|
|
|
|
|
+ gotoStoreChoose() {
|
|
|
|
|
+ uni.setStorageSync('router','1')
|
|
|
|
|
+ uni.redirectTo({
|
|
|
|
|
+ url: '/storePages/store/store-choose?type=1',
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
back(){
|
|
back(){
|
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
@@ -720,4 +802,82 @@
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
@import './index.rpx.scss';
|
|
@import './index.rpx.scss';
|
|
|
|
|
+ .store-wrap {
|
|
|
|
|
+ margin-top: 10rpx;
|
|
|
|
|
+ background-color: white;
|
|
|
|
|
+ .store-info {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+
|
|
|
|
|
+ .logo {
|
|
|
|
|
+ width: 10%;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+
|
|
|
|
|
+ image {
|
|
|
|
|
+ width: 30px;
|
|
|
|
|
+ height: 30px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .store-content {
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+ padding-bottom: 13px;
|
|
|
|
|
+
|
|
|
|
|
+ .h-row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+
|
|
|
|
|
+ .store-desc {
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+
|
|
|
|
|
+ .store-name {
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .arrow-right {
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ padding-top: 3px;
|
|
|
|
|
+ width: 100px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+
|
|
|
|
|
+ .change-store {
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ image {
|
|
|
|
|
+ width: 18px;
|
|
|
|
|
+ height: 18px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .address {
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ padding-right: 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .adress {
|
|
|
|
|
+ font-size: 22rpx;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ padding-left: 80rpx;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|