This commit is contained in:
parent
d6e1c83f88
commit
7f97467f82
|
|
@ -3,11 +3,9 @@
|
|||
<view class="page-wrapper" style="overflow: visible; height: auto">
|
||||
<!-- 背景图片view -->
|
||||
<view class="bg-img-view">
|
||||
|
||||
<!-- 背景颜色view -->
|
||||
<view class="bg-color-view" style="position: absolute;top: 0;left: 0;right: 0;height: 550rpx;border-radius:0 0 32rpx 32rpx;background-color: #318AFE!important;">
|
||||
<view class="bgbottomStyle">
|
||||
</view>
|
||||
<view class="bg-color-view" style="position: absolute; top: 0; left: 0; right: 0; height: 550rpx; border-radius: 0 0 32rpx 32rpx; background-color: #318afe !important">
|
||||
<view class="bgbottomStyle"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 解决定位层级问题 -->
|
||||
|
|
@ -22,13 +20,11 @@
|
|||
<view class="u-flex u-row-center u-relative">
|
||||
<view class="u-flex u-col-center">
|
||||
<view class="u-m-r-12">总收入</view>
|
||||
<up-icon name="/static/indexImg/icon-help.svg" color="#fff" :size="12"
|
||||
@click="toggleTips"></up-icon>
|
||||
<up-icon name="/static/indexImg/icon-help.svg" color="#fff" :size="12" @click="toggleTips"></up-icon>
|
||||
</view>
|
||||
<view class="tips u-absolute color-666 u-font-20 u-text-left " :class="{'showTips':showTips}">
|
||||
<view class="tips u-absolute color-666 u-font-20 u-text-left" :class="{ showTips: showTips }">
|
||||
<view class="sanjiao u-flex"><up-icon name="play-left-fill" size="12" color="#fff"></up-icon></view>
|
||||
总收入为除会员余额
|
||||
支付外所有收入
|
||||
总收入为除会员余额 支付外所有收入
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-center">
|
||||
|
|
@ -43,7 +39,6 @@
|
|||
<JeepayNavigation :navList="navList" type="grid" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
@ -52,24 +47,24 @@
|
|||
|
||||
import go from '@/commons/utils/go.js';
|
||||
import Stats from './components/Stats.vue';
|
||||
import statistics from './components/statistics.vue'
|
||||
import statistics from './components/statistics.vue';
|
||||
import storageManage from '@/commons/utils/storageManage.js';
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
|
||||
uni.hideTabBar()
|
||||
let shopName = ref()
|
||||
let totalRevenuedata = ref()
|
||||
uni.hideTabBar();
|
||||
let shopName = ref();
|
||||
let totalRevenuedata = ref();
|
||||
let totalRevenue = (d) => {
|
||||
totalRevenuedata.value = d
|
||||
}
|
||||
totalRevenuedata.value = d;
|
||||
};
|
||||
|
||||
let showTips = ref(false)
|
||||
let showTips = ref(false);
|
||||
function toggleTips() {
|
||||
showTips.value = !showTips.value
|
||||
showTips.value = !showTips.value;
|
||||
}
|
||||
|
||||
function toSetting() {
|
||||
go.to('PAGES_SHOP_SETUP')
|
||||
go.to('PAGES_SHOP_SETUP');
|
||||
}
|
||||
// 导航列表
|
||||
const navList = [
|
||||
|
|
@ -83,11 +78,11 @@
|
|||
icon: '/static/indexImg/icon-substitute-ordering.svg',
|
||||
pageUrl: 'PAGES_CREATE_ORDER',
|
||||
clickFunc: () => {
|
||||
hasPermission('允许下单').then(res => {
|
||||
hasPermission('允许下单').then((res) => {
|
||||
if (res) {
|
||||
go.to('PAGES_CREATE_ORDER')
|
||||
go.to('PAGES_CREATE_ORDER');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -98,23 +93,24 @@
|
|||
{
|
||||
title: '商品管理',
|
||||
icon: '/static/indexImg/icon-product-control.svg',
|
||||
pageUrl: 'PAGES_PRODUCT',
|
||||
pageUrl: 'PAGES_PRODUCT'
|
||||
},
|
||||
{
|
||||
title: '分组管理',
|
||||
icon: '/static/indexImg/goods-group.svg',
|
||||
pageUrl: 'PAGES_GOODS_GROUP',
|
||||
pageUrl: 'PAGES_GOODS_GROUP'
|
||||
},
|
||||
{
|
||||
title: '分类管理',
|
||||
icon: '/static/indexImg/icon-category.svg',
|
||||
pageUrl: 'PAGES_CATEGORY',
|
||||
pageUrl: 'PAGES_CATEGORY'
|
||||
},
|
||||
{
|
||||
title: '会员管理',
|
||||
icon: '/static/indexImg/icon-user.svg',
|
||||
pageUrl: 'PAGES_USER_CONTROL',
|
||||
}, {
|
||||
pageUrl: 'PAGES_USER_CONTROL'
|
||||
},
|
||||
{
|
||||
title: '员工管理',
|
||||
icon: '/static/indexImg/icon-staff.svg',
|
||||
pageUrl: 'PAGES_STAFF'
|
||||
|
|
@ -127,17 +123,17 @@
|
|||
{
|
||||
title: '订单管理',
|
||||
icon: '/static/indexImg/icon-order.svg',
|
||||
pageUrl: 'PAGES_ORDER_INDEX',
|
||||
pageUrl: 'PAGES_ORDER_INDEX'
|
||||
},
|
||||
{
|
||||
title: '设备管理',
|
||||
icon: '/static/indexImg/icon-printer.svg',
|
||||
pageUrl: 'PAGES_PRINTER_INDEX',
|
||||
pageUrl: 'PAGES_PRINTER_INDEX'
|
||||
},
|
||||
{
|
||||
title: '交班',
|
||||
icon: '/static/indexImg/icon-work.svg',
|
||||
pageUrl: 'PAGES_WORK_INDEX',
|
||||
pageUrl: 'PAGES_WORK_INDEX'
|
||||
},
|
||||
{
|
||||
title: '排队',
|
||||
|
|
@ -152,17 +148,17 @@
|
|||
{
|
||||
title: '优惠券',
|
||||
icon: '/static/coupon/icon_coupon.svg',
|
||||
pageUrl: 'PAGES_COUPON_INDEX',
|
||||
pageUrl: 'PAGES_COUPON_INDEX'
|
||||
},
|
||||
{
|
||||
title: '订阅通知',
|
||||
icon: '/static/indexImg/icon-notification.svg',
|
||||
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
||||
pageUrl: 'PAGES_NOTIFICATION_INDEX'
|
||||
},
|
||||
{
|
||||
title: '挂账管理',
|
||||
icon: '/static/indexImg/icon_credit.svg',
|
||||
pageUrl: 'PAGES_CREDIT_BUYER_INDEX',
|
||||
pageUrl: 'PAGES_CREDIT_BUYER_INDEX'
|
||||
},
|
||||
{
|
||||
title: '核销管理',
|
||||
|
|
@ -174,8 +170,8 @@
|
|||
icon: '/static/indexImg/icon-login-out.svg',
|
||||
pageUrl: 'PAGES_LOGIN',
|
||||
clickFunc: () => {
|
||||
storageManage.cleanByLogout()
|
||||
go.to('PAGES_LOGIN', {}, 'redirect')
|
||||
storageManage.cleanByLogout();
|
||||
go.to('PAGES_LOGIN', {}, 'redirect');
|
||||
}
|
||||
}
|
||||
// {
|
||||
|
|
@ -257,8 +253,6 @@
|
|||
// pageUrl: 'PAGES_AD_LIST',
|
||||
// entId: 'ENT_ADVERT_CONTROL'
|
||||
// },
|
||||
|
||||
|
||||
];
|
||||
|
||||
const vdata = reactive({
|
||||
|
|
@ -331,7 +325,7 @@
|
|||
|
||||
width: 750rpx;
|
||||
height: 74rpx;
|
||||
background: linear-gradient( 180deg, rgba(195,215,235,0) 0%, #F9F9F9 100%);
|
||||
background: linear-gradient(180deg, rgba(195, 215, 235, 0) 0%, #f9f9f9 100%);
|
||||
}
|
||||
.income {
|
||||
/* #ifdef H5 */
|
||||
|
|
@ -343,7 +337,7 @@
|
|||
/* #endif */
|
||||
> view {
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
|
||||
|
|
@ -369,8 +363,8 @@
|
|||
.tips {
|
||||
opacity: 0;
|
||||
right: 28rpx;
|
||||
transition: opacity .3s;
|
||||
background: #FFFFFF;
|
||||
transition: opacity 0.3s;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 14rpx;
|
||||
width: 211rpx;
|
||||
box-sizing: border-box;
|
||||
|
|
|
|||
|
|
@ -10,11 +10,17 @@
|
|||
<!-- <view class="page-cell m" @tap="updateValue('商户名称','shopName',vdata.shopInfo.shopName)"> -->
|
||||
<view class="page-cell m" @tap="go.to('PAGES_SHOP_EDITVAL', { name: 'shopName', value: vdata.shopInfo.shopName })">
|
||||
<view class="label">商户名称</view>
|
||||
<view class="right"><view>{{ vdata.shopInfo.shopName }}</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon></view>
|
||||
<view class="right">
|
||||
<view>{{ vdata.shopInfo.shopName }}</view>
|
||||
<up-icon name="arrow-right" color="#999999" size="15"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell m" @tap="go.to('PAGES_SHOP_EDITVAL', { name: 'phone', value: vdata.shopInfo.phone })">
|
||||
<view class="label">商户电话</view>
|
||||
<view class="right"><view>{{ vdata.shopInfo.phone }}</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon></view>
|
||||
<view class="right">
|
||||
<view>{{ vdata.shopInfo.phone }}</view>
|
||||
<up-icon name="arrow-right" color="#999999" size="15"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="page-cell m" >
|
||||
<view class="label">到期时间</view>
|
||||
|
|
@ -22,11 +28,16 @@
|
|||
</view> -->
|
||||
<view class="page-cell m">
|
||||
<view class="label">营业状态</view>
|
||||
<view class="right"><up-switch v-model="vdata.shopInfo.status" size="20" :inactiveValue="2" :activeValue="1" activeColor="#0FC161" @change="switchChange('status')"></up-switch></view>
|
||||
<view class="right">
|
||||
<up-switch v-model="vdata.shopInfo.status" size="20" :inactiveValue="2" :activeValue="1" activeColor="#0FC161" @change="switchChange('status')"></up-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell m" @tap="showMap">
|
||||
<view class="label">门店详细地址</view>
|
||||
<view class="right"><view>{{ vdata.shopInfo.address }}</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon></view>
|
||||
<view class="right">
|
||||
<view>{{ vdata.shopInfo.address }}</view>
|
||||
<up-icon name="arrow-right" color="#999999" size="15"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="page-cell">
|
||||
<view class="label">堂食功能</view>
|
||||
|
|
@ -38,27 +49,66 @@
|
|||
</view>
|
||||
<view class="page-cell m">
|
||||
<view class="label">是否开启会员余额支付</view>
|
||||
<view class="right"><up-switch v-model="vdata.shopInfo.isAccountPay" size="20" :inactiveValue="0" :activeValue="1" activeColor="#0FC161" @change="switchChange('isAccountPay')"></up-switch></view>
|
||||
<view class="right">
|
||||
<up-switch
|
||||
v-model="vdata.shopInfo.isAccountPay"
|
||||
size="20"
|
||||
:inactiveValue="0"
|
||||
:activeValue="1"
|
||||
activeColor="#0FC161"
|
||||
@change="switchChange('isAccountPay')"
|
||||
></up-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell m">
|
||||
<view class="label">是否开启会员价支付</view>
|
||||
<view class="right"><up-switch v-model="vdata.shopInfo.isMemberPrice" size="20" :inactiveValue="0" :activeValue="1" activeColor="#0FC161" @change="switchChange('isMemberPrice')"></up-switch></view>
|
||||
<view class="right">
|
||||
<up-switch
|
||||
v-model="vdata.shopInfo.isMemberPrice"
|
||||
size="20"
|
||||
:inactiveValue="0"
|
||||
:activeValue="1"
|
||||
activeColor="#0FC161"
|
||||
@change="switchChange('isMemberPrice')"
|
||||
></up-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell">
|
||||
<view class="label">桌位费<view v-if="!vdata.isTableFee" class="tableFee" @tap="go.to('PAGES_SHOP_EDITVAL',{name:'tableFee',value: vdata.shopInfo.tableFee})">{{vdata.shopInfo.tableFee}}</view></view>
|
||||
<view class="label">
|
||||
桌位费
|
||||
<view v-if="!vdata.isTableFee" class="tableFee" @tap="go.to('PAGES_SHOP_EDITVAL', { name: 'tableFee', value: vdata.shopInfo.tableFee })">
|
||||
{{ vdata.shopInfo.tableFee }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view>
|
||||
<up-checkbox-group><up-checkbox label="免桌位费" v-model:checked="vdata.isTableFee" activeColor="#0FC161" shape="circle" @change="isTableFeeChange"> </up-checkbox></up-checkbox-group>
|
||||
<up-checkbox-group>
|
||||
<up-checkbox label="免桌位费" v-model:checked="vdata.isTableFee" activeColor="#0FC161" shape="circle" @change="isTableFeeChange"></up-checkbox>
|
||||
</up-checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="page-cell">
|
||||
<view class="label">台桌清理类型</view>
|
||||
<view class="right">
|
||||
<up-radio-group v-model="vdata.shopInfo.tableClearType" placement="row" @change="tableClearChange">
|
||||
<up-radio label="自动" name="auto" :customStyle="{ marginRight: '10px' }" activeColor="#0FC161"></up-radio>
|
||||
<up-radio label="手动" name="hand" :customStyle="{ marginRight: '10px' }" activeColor="#0FC161"></up-radio>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell">
|
||||
<view class="label">
|
||||
自动清台时间
|
||||
</view>
|
||||
<view class="right">
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="page-cell m">
|
||||
<view class="label">付费模式</view>
|
||||
<view class="right">
|
||||
<up-radio-group
|
||||
v-model="vdata.shopInfo.registerType"
|
||||
placement="row"
|
||||
>
|
||||
<up-radio-group v-model="vdata.shopInfo.registerType" placement="row">
|
||||
<up-radio
|
||||
:customStyle="{ marginRight: '10px' }"
|
||||
v-for="(item, index) in vdata.registerTypeList"
|
||||
|
|
@ -67,10 +117,8 @@
|
|||
:name="item.value"
|
||||
activeColor="#0FC161"
|
||||
@change="radioChange"
|
||||
>
|
||||
</up-radio>
|
||||
></up-radio>
|
||||
</up-radio-group>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell" @tap="go.to('PAGES_SHOP_QRCODE', { paymentQrcode: vdata.shopInfo.paymentQrcode })">
|
||||
|
|
@ -81,24 +129,37 @@
|
|||
<view class="label">店铺图片</view>
|
||||
<view class="extendList">
|
||||
<view class="extendTab">
|
||||
<view class="extendTab_item"
|
||||
v-for="(item,index) in vdata.extendList" :key="index"
|
||||
:class="{'active':vdata.extendIndex==index}"
|
||||
<view
|
||||
class="extendTab_item"
|
||||
v-for="(item, index) in vdata.extendList"
|
||||
:key="index"
|
||||
:class="{ active: vdata.extendIndex == index }"
|
||||
@click="extendTabClick(item, index)"
|
||||
>{{item.name}}</view>
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="extend_content">
|
||||
<view class="preview" v-if="vdata.extendInfo.autoKey != 'ticket_logo'">
|
||||
<view class="index_bg"><up-image v-if="'index_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="my_bg"><up-image v-if="'my_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="bg"><up-image v-if="'member_bg' == vdata.extendInfo.autoKey" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
|
||||
<view class="bg">
|
||||
<up-image
|
||||
v-if="'member_bg' == vdata.extendInfo.autoKey"
|
||||
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/' + vdata.extendInfo.autoKey + '.png'"
|
||||
></up-image>
|
||||
</view>
|
||||
<view class="member_bg"><up-image v-if="'member_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="shopinfo_bg"><up-image v-if="'shopinfo_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="shopinfo_bg_f" v-if="'shopinfo_bg' == vdata.extendInfo.autoKey"></view>
|
||||
<view class="bg" v-if="vdata.extendInfo.autoKey" ><up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
|
||||
<view class="bg" v-if="vdata.extendInfo.autoKey">
|
||||
<up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/' + vdata.extendInfo.autoKey + '.png'"></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preview" v-else style="width: 359rpx; height: 232rpx">
|
||||
<view class="bg ticket_logo" v-if="vdata.extendInfo.autoKey == 'ticket_logo'" ><up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
|
||||
<view class="bg ticket_logo" v-if="vdata.extendInfo.autoKey == 'ticket_logo'">
|
||||
<up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/' + vdata.extendInfo.autoKey + '.png'"></up-image>
|
||||
</view>
|
||||
<view class="ticket_logo img"><up-image v-if="'ticket_logo' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
</view>
|
||||
<view class="extend_img">
|
||||
|
|
@ -113,41 +174,38 @@
|
|||
</view>
|
||||
<!-- <view class="cutShop" @tap="go.to('PAGES_SHOP_LIST')">切换门店</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { uploadFile } from '@/http/api/index.js'
|
||||
import { getShopInfo, editShopInfo, getShopExtend, editShopExtend } from '@/http/api/shop.js'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { uploadFile } from '@/http/api/index.js';
|
||||
import { getShopInfo, editShopInfo, getShopExtend, editShopExtend } from '@/http/api/shop.js';
|
||||
|
||||
const vdata = reactive({
|
||||
shopInfo: {
|
||||
status: 2,
|
||||
isAccountPay: 0,
|
||||
isMemberPrice: 0,
|
||||
isMemberPrice: 0
|
||||
},
|
||||
extendList: [],
|
||||
registerTypeList: [
|
||||
{name: "先付费", value: "before"},
|
||||
{name: "后付费", value: "after"}
|
||||
{ name: '先付费', value: 'before' },
|
||||
{ name: '后付费', value: 'after' }
|
||||
],
|
||||
extendIndex: 0,
|
||||
extendInfo: {},
|
||||
dineIn: false,
|
||||
takeout: false,
|
||||
isTableFee: false,
|
||||
label: "",
|
||||
type: "",
|
||||
inputValue: "",
|
||||
|
||||
})
|
||||
label: '',
|
||||
type: '',
|
||||
inputValue: ''
|
||||
});
|
||||
onMounted(() => {
|
||||
shopExtend();
|
||||
})
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
shopInfo();
|
||||
|
|
@ -155,21 +213,20 @@ onShow(() => {
|
|||
// 这里执行刷新数据的操作,例如重新调用API获取数据
|
||||
refreshData(params);
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 输入内容修改
|
||||
*/
|
||||
let refreshData = (e) => {
|
||||
let params = {
|
||||
id : vdata.shopInfo.id,
|
||||
}
|
||||
params[e.name] = e.value
|
||||
id: vdata.shopInfo.id
|
||||
};
|
||||
params[e.name] = e.value;
|
||||
vdata.type = e.name;
|
||||
vdata.inputValue = e.value;
|
||||
updateShopInfo(params,'input')
|
||||
}
|
||||
updateShopInfo(params, 'input');
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取店铺信息
|
||||
|
|
@ -177,15 +234,15 @@ let refreshData = (e) => {
|
|||
const shopInfo = () => {
|
||||
getShopInfo({ id: uni.getStorageSync('shopInfo').id }).then((res) => {
|
||||
vdata.isTableFee = res.isTableFee == 1 ? true : false;
|
||||
if (res.eatModel.split(",").indexOf("dine-in") != -1) {
|
||||
vdata.dineIn = true
|
||||
if (res.eatModel.split(',').indexOf('dine-in') != -1) {
|
||||
vdata.dineIn = true;
|
||||
}
|
||||
if (res.eatModel.split(",").indexOf("take-out") != -1) {
|
||||
vdata.takeout = true
|
||||
if (res.eatModel.split(',').indexOf('take-out') != -1) {
|
||||
vdata.takeout = true;
|
||||
}
|
||||
vdata.shopInfo = res;
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取店铺图片
|
||||
|
|
@ -197,7 +254,16 @@ let shopExtend = () => {
|
|||
vdata.extendIndex = 0;
|
||||
vdata.extendInfo = res[0];
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
// 台桌清理模式修改
|
||||
function tableClearChange(n) {
|
||||
let params = {
|
||||
id: vdata.shopInfo.id,
|
||||
tableClearType: n
|
||||
};
|
||||
updateShopInfo(params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -206,9 +272,9 @@ let shopExtend = () => {
|
|||
let radioChange = (n) => {
|
||||
let params = {
|
||||
id: vdata.shopInfo.id,
|
||||
registerType : n,
|
||||
}
|
||||
updateShopInfo(params)
|
||||
registerType: n
|
||||
};
|
||||
updateShopInfo(params);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -216,11 +282,11 @@ let radioChange = (n) => {
|
|||
*/
|
||||
let updateShopInfo = (params, type) => {
|
||||
editShopInfo(params).then((res) => {
|
||||
if (type && type == "input") {
|
||||
if (type && type == 'input') {
|
||||
vdata.shopInfo[vdata.type] = vdata.inputValue;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改店铺图片
|
||||
|
|
@ -228,11 +294,9 @@ let updateShopInfo = (params,type) => {
|
|||
let updateShopExtend = () => {
|
||||
editShopExtend({
|
||||
autokey: vdata.extendInfo.autoKey,
|
||||
value: vdata.extendInfo.value,
|
||||
}).then((res) => {})
|
||||
}
|
||||
|
||||
|
||||
value: vdata.extendInfo.value
|
||||
}).then((res) => {});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传头像
|
||||
|
|
@ -245,36 +309,36 @@ let chooseAndUploadAvatar = ( type ) => {
|
|||
sourceType: ['album', 'camera'], // 图片来源,相册或相机
|
||||
success: (res) => {
|
||||
let file = res.tempFiles[0];
|
||||
uploadFile(file).then(res => {
|
||||
if ( type == "coverImg") {
|
||||
uploadFile(file)
|
||||
.then((res) => {
|
||||
if (type == 'coverImg') {
|
||||
vdata.shopInfo.coverImg = res;
|
||||
let params = {
|
||||
id: vdata.shopInfo.id,
|
||||
coverImg : vdata.shopInfo.coverImg,
|
||||
coverImg: vdata.shopInfo.coverImg
|
||||
};
|
||||
updateShopInfo(params);
|
||||
}
|
||||
updateShopInfo(params)
|
||||
}
|
||||
if ( type == "extendUp") {
|
||||
if (type == 'extendUp') {
|
||||
vdata.extendInfo.value = res;
|
||||
updateShopExtend()
|
||||
updateShopExtend();
|
||||
}
|
||||
|
||||
}).catch(res=>{
|
||||
})
|
||||
.catch((res) => {
|
||||
if (res.errMsg) {
|
||||
uni.showToast({
|
||||
title: '图片大小超出限制',
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
fail: chooseImageError => {
|
||||
fail: (chooseImageError) => {
|
||||
// 选择图片失败处理逻辑
|
||||
console.log('choose image fail:', chooseImageError);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 店铺图片TAB切换
|
||||
|
|
@ -282,7 +346,7 @@ let chooseAndUploadAvatar = ( type ) => {
|
|||
let extendTabClick = (item, index) => {
|
||||
vdata.extendInfo = item;
|
||||
vdata.extendIndex = index;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 是否免桌位费
|
||||
|
|
@ -293,26 +357,26 @@ let isTableFeeChange = (e) => {
|
|||
} else {
|
||||
vdata.isTableFee = false;
|
||||
}
|
||||
switchChange('isTableFee')
|
||||
}
|
||||
switchChange('isTableFee');
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
let switchChange = (type) => {
|
||||
let params = {
|
||||
id : vdata.shopInfo.id,
|
||||
}
|
||||
id: vdata.shopInfo.id
|
||||
};
|
||||
switch (type) {
|
||||
case "address":
|
||||
case 'address':
|
||||
params.lng = vdata.shopInfo.lng;
|
||||
params.lat = vdata.shopInfo.lat;
|
||||
params.address = vdata.shopInfo.address;
|
||||
break;
|
||||
case "status":
|
||||
case 'status':
|
||||
params.status = vdata.shopInfo.status;
|
||||
break;
|
||||
case "eatModel":
|
||||
case 'eatModel':
|
||||
params.eatModel = [];
|
||||
if (vdata.dineIn) {
|
||||
params.eatModel.push('dine-in');
|
||||
|
|
@ -320,15 +384,15 @@ let switchChange = ( type ) => {
|
|||
if (vdata.takeout) {
|
||||
params.eatModel.push('take-out');
|
||||
}
|
||||
params.eatModel = params.eatModel.join(',')
|
||||
params.eatModel = params.eatModel.join(',');
|
||||
break;
|
||||
case "isAccountPay":
|
||||
case 'isAccountPay':
|
||||
params.isAccountPay = vdata.shopInfo.isAccountPay;
|
||||
break;
|
||||
case "isMemberPrice":
|
||||
case 'isMemberPrice':
|
||||
params.isMemberPrice = vdata.shopInfo.isMemberPrice;
|
||||
break;
|
||||
case "isTableFee":
|
||||
case 'isTableFee':
|
||||
if (vdata.isTableFee) {
|
||||
params.isTableFee = 1;
|
||||
} else {
|
||||
|
|
@ -337,7 +401,7 @@ let switchChange = ( type ) => {
|
|||
break;
|
||||
}
|
||||
updateShopInfo(params);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 选择地图
|
||||
|
|
@ -349,11 +413,10 @@ let showMap = () => {
|
|||
uni.chooseLocation({
|
||||
// type: 'wgs84',
|
||||
success: function (res) {
|
||||
|
||||
vdata.shopInfo.lng = res.longitude.toFixed(6); // IOS 小程序中: 经纬度12位。
|
||||
vdata.shopInfo.lat = res.latitude.toFixed(6);
|
||||
vdata.shopInfo.address = res.name;
|
||||
switchChange('address')
|
||||
switchChange('address');
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log(err);
|
||||
|
|
@ -362,17 +425,13 @@ let showMap = () => {
|
|||
// icon:'error'
|
||||
// })
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-wrapper {
|
||||
background-color: #F8F8F8;
|
||||
background-color: #f8f8f8;
|
||||
padding-bottom: 32rpx;
|
||||
.page-cell {
|
||||
display: flex;
|
||||
|
|
@ -397,7 +456,7 @@ let showMap = () => {
|
|||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
text-align: left;
|
||||
padding: 0 18rpx;
|
||||
box-sizing: border-box;
|
||||
|
|
@ -416,12 +475,12 @@ let showMap = () => {
|
|||
font-weight: 400;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 4rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.active {
|
||||
background: #318AFE;
|
||||
border: 2rpx solid #318AFE;
|
||||
background: #318afe;
|
||||
border: 2rpx solid #318afe;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
|
@ -434,28 +493,33 @@ let showMap = () => {
|
|||
position: relative;
|
||||
margin-right: 32rpx;
|
||||
background-color: #f7f7f7;
|
||||
::v-deep .bg,::v-deep .bg .u-image,::v-deep .bg .u-image__image{
|
||||
::v-deep .bg,
|
||||
::v-deep .bg .u-image,
|
||||
::v-deep .bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 342rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
::v-deep .index_bg .u-image,::v-deep .index_bg .u-image__image{
|
||||
::v-deep .index_bg .u-image,
|
||||
::v-deep .index_bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 242rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
::v-deep .my_bg .u-image,::v-deep .my_bg .u-image__image{
|
||||
::v-deep .my_bg .u-image,
|
||||
::v-deep .my_bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 90rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
::v-deep .member_bg .u-image,::v-deep .member_bg .u-image__image{
|
||||
::v-deep .member_bg .u-image,
|
||||
::v-deep .member_bg .u-image__image {
|
||||
width: 34rpx !important;
|
||||
height: 63rpx !important;
|
||||
position: absolute;
|
||||
|
|
@ -466,19 +530,23 @@ let showMap = () => {
|
|||
border-radius: 5rpx !important;
|
||||
}
|
||||
|
||||
::v-deep .shopinfo_bg .u-image,::v-deep .shopinfo_bg .u-image__image{
|
||||
::v-deep .shopinfo_bg .u-image,
|
||||
::v-deep .shopinfo_bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 50rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
::v-deep .bg.ticket_logo,::v-deep .bg.ticket_logo .u-image,::v-deep .bg.ticket_logo .u-image__image{
|
||||
::v-deep .bg.ticket_logo,
|
||||
::v-deep .bg.ticket_logo .u-image,
|
||||
::v-deep .bg.ticket_logo .u-image__image {
|
||||
width: 359rpx !important;
|
||||
height: 232rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
::v-deep .ticket_logo.img .u-image,::v-deep .ticket_logo.img .u-image__image{
|
||||
::v-deep .ticket_logo.img .u-image,
|
||||
::v-deep .ticket_logo.img .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 50rpx !important;
|
||||
position: absolute;
|
||||
|
|
@ -493,7 +561,6 @@ let showMap = () => {
|
|||
bottom: 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
.extend_img {
|
||||
display: flex;
|
||||
|
|
@ -515,14 +582,14 @@ let showMap = () => {
|
|||
top: 0;
|
||||
}
|
||||
}
|
||||
::v-deep .u-image,::v-deep .u-image__image{
|
||||
::v-deep .u-image,
|
||||
::v-deep .u-image__image {
|
||||
width: 148rpx !important;
|
||||
height: 148rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.column {
|
||||
flex-direction: column;
|
||||
|
|
@ -537,11 +604,11 @@ let showMap = () => {
|
|||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background: #318AFE;
|
||||
background: #318afe;
|
||||
border-radius: 56rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
margin: 48rpx auto 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -574,9 +641,5 @@ let showMap = () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue