2023-12-11
@@ -6,8 +6,8 @@
|
|||||||
* loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面
|
* loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面
|
||||||
*/
|
*/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// baseUrl: 'http://192.168.2.113:7201',
|
baseUrl: 'http://192.168.2.106:7201',
|
||||||
baseUrl: 'https://supervise.yxtsoft.com/lpkapi',
|
// baseUrl: 'https://supervise.yxtsoft.com/lpkapi',
|
||||||
// baseUrl: 'http://jianguan.yyundong.com/api',
|
// baseUrl: 'http://jianguan.yyundong.com/api',
|
||||||
tokenName: "Authorization", // 请求头中token的名字,与服务器端对应
|
tokenName: "Authorization", // 请求头中token的名字,与服务器端对应
|
||||||
loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码
|
loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ export default {
|
|||||||
cardList: (params = {}) => request.post("/lpkgiftcard/gifCardByCustomerSid", params, {}, {}, true),
|
cardList: (params = {}) => request.post("/lpkgiftcard/gifCardByCustomerSid", params, {}, {}, true),
|
||||||
// 提货卡详情
|
// 提货卡详情
|
||||||
cardDetail: (params = {}) => request.get("/lpkgiftcard/getGifCardBySid/" + params, params, {}, {}, true),
|
cardDetail: (params = {}) => request.get("/lpkgiftcard/getGifCardBySid/" + params, params, {}, {}, true),
|
||||||
|
// 提货日期 周六日的日期组合
|
||||||
|
isSaturAndSun: (params = {}) => request.get("/lpkgiftcard/isSaturAndSun/" + params, params, {}, {}, true),
|
||||||
// 提货卡预约初始化
|
// 提货卡预约初始化
|
||||||
cardBooking: (params = {}) => request.get("/lpkgiftcard/getReservationBySid/" + params, params, {}, {}, true),
|
cardBooking: (params = {}) => request.get("/lpkgiftcard/getReservationBySid/" + params, params, {}, {}, true),
|
||||||
// 提货卡预约保存
|
// 提货卡预约保存
|
||||||
|
|||||||
126
pages - 副本.json
@@ -1,126 +0,0 @@
|
|||||||
{
|
|
||||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
|
||||||
{
|
|
||||||
"path": "pages/login/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/card/card_detail",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/card/card_detail2",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/card/card",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/card/card_booking",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "预约提货",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/card/card_record",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "预约记录"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/card/card_bind",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 扫码进入
|
|
||||||
{
|
|
||||||
"path": "pages/card/card_bind2",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
"path": "pages/index/BindPhone",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "绑定账号",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"app-plus": {
|
|
||||||
"scrollIndicator": false //禁用原生导航栏,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/home/UserFragment",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "绑定账号",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"app-plus": {
|
|
||||||
"scrollIndicator": false //禁用原生导航栏,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/card/card_record_detail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "预约详情",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/record/recordList",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "预约记录"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/good/goodsDetail",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商品详情",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/SelectAddressActivity",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "提货点列表",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"globalStyle": {
|
|
||||||
"navigationBarTextStyle": "white",
|
|
||||||
"navigationBarTitleText": "uni-app",
|
|
||||||
"navigationBarBackgroundColor": "#FE9039",
|
|
||||||
"backgroundColor": "#FE9039"
|
|
||||||
},
|
|
||||||
"tabBar": {
|
|
||||||
"color": "#7A7E83",
|
|
||||||
"selectedColor": "#191919",
|
|
||||||
"borderStyle": "black",
|
|
||||||
"backgroundColor": "#ffffff",
|
|
||||||
"list": [{
|
|
||||||
"pagePath": "pages/card/card",
|
|
||||||
"text": "礼包",
|
|
||||||
"iconPath": "static/bomicon/bom_notPack.png",
|
|
||||||
"selectedIconPath": "static/bomicon/bom_pack.png"
|
|
||||||
}, {
|
|
||||||
"pagePath": "pages/record/recordList",
|
|
||||||
"text": "预约记录",
|
|
||||||
"iconPath": "static/bomicon/bom_notRecord.png",
|
|
||||||
"selectedIconPath": "static/bomicon/bom_record.png"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"uniIdRouter": {}
|
|
||||||
}
|
|
||||||
17
pages.json
@@ -97,6 +97,14 @@
|
|||||||
"navigationBarTitleText": "提货点列表",
|
"navigationBarTitleText": "提货点列表",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/enterprise/corporateCard",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "企业卡",
|
||||||
|
"enablePullDownRefresh" : true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
@@ -120,7 +128,14 @@
|
|||||||
"text": "预约记录",
|
"text": "预约记录",
|
||||||
"iconPath": "static/bomicon/bom_notRecord.png",
|
"iconPath": "static/bomicon/bom_notRecord.png",
|
||||||
"selectedIconPath": "static/bomicon/bom_record.png"
|
"selectedIconPath": "static/bomicon/bom_record.png"
|
||||||
}]
|
}
|
||||||
|
, {
|
||||||
|
"pagePath": "pages/enterprise/corporateCard",
|
||||||
|
"text": "企业卡",
|
||||||
|
"iconPath": "static/bomicon/bom_notCard.png",
|
||||||
|
"selectedIconPath": "static/bomicon/bom_card.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"uniIdRouter": {}
|
"uniIdRouter": {}
|
||||||
}
|
}
|
||||||
@@ -1,244 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<view style="position: sticky;top: 0;background-color: #FE9039;">
|
|
||||||
<view class="search-container">
|
|
||||||
<!-- 搜索框 -->
|
|
||||||
<view class="search-container-bar">
|
|
||||||
<!-- :cancelText="keyBoardPopup ? '取消' : '搜索'" -->
|
|
||||||
<uni-search-bar ref="searchBar" style="flex:1;margin-left: 20rpx;" radius="100"
|
|
||||||
v-model="associativeText" :focus="focus" :placeholder="hotWorld" clearButton="auto"
|
|
||||||
cancelButton="none" @clear="clear" />
|
|
||||||
<view v-if="stringIsNotEmpty(associativeText) && associativeText!=page.key" @click="search"
|
|
||||||
style="margin-right: 10px;font-size: 13px; color: #FED6B5;">搜索</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="search-body">
|
|
||||||
<view
|
|
||||||
style="font-size: 26rpx;padding-left: 50rpx;padding-right: 40rpx;padding-top: 10rpx;padding-bottom: 20rpx;color: #FED6B5;">
|
|
||||||
输入关键字筛选提货点
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<loading-state ref="pageView" @request="request">
|
|
||||||
<!-- 搜索联想 -->
|
|
||||||
<view style="display: flex;flex-direction: column;background: #FFFFFF;
|
|
||||||
border-top-left-radius: 30px;border-top-right-radius: 30px; padding:10px 20px;margin-top: 10px;box-sizing: border-box;padding-bottom: 0px;"
|
|
||||||
v-for="(item,index) in dataList" :key="index">
|
|
||||||
<!--
|
|
||||||
<view
|
|
||||||
style="display: flex;flex-direction: row;width: 100%;box-sizing: border-box;width: 100%;margin-top:10rpx ;align-items: center;">
|
|
||||||
<image src="../static/address_name.png" style="width: 50rpx;height: 50rpx;flex-shrink: 0;">
|
|
||||||
</image>
|
|
||||||
<text
|
|
||||||
style="font-size: 31.5rpx;margin-left: 18rpx;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{item.name}}
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<text
|
|
||||||
style="font-size: 24rpx;color: #999999;margin-top: 6rpx;box-sizing: border-box;width: 100%;display:inline-block;white-space: pre-wrap; word-wrap: break-word;height: auto;">营业时间:{{item.businessHours}}</text>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;margin-top: 22rpx;">
|
|
||||||
<image v-if="false"
|
|
||||||
style="width: 120rpx;height: 120rpx;border-radius: 20rpx;flex-shrink: 0;background-color: #fafafa;">
|
|
||||||
</image>
|
|
||||||
<view style="display: flex;flex: 1;flex-direction: column;margin-left: 20rpx;margin-top: 10rpx;">
|
|
||||||
<view style="display: flex;flex-direction: row;">
|
|
||||||
<image src="../static/address_location.png"
|
|
||||||
style="width: 16px;height: 16px;flex-shrink: 0;margin-right: 3px;">
|
|
||||||
</image>
|
|
||||||
<view style="color: #666666;font-size: 29.5rpx;">{{item.address}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="display: flex;flex-direction: row;margin-top: 22rpx;">
|
|
||||||
<image src="../static/address_phone.png"
|
|
||||||
style="width: 16px;height: 16px;margin-right: 3px;flex-shrink: 0;">
|
|
||||||
</image>
|
|
||||||
<view style="color: #5259D7;font-size: 29.5rpx;">{{item.phone}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;margin-top: 38rpx;border-top: 1rpx #f1f2f3 solid;">
|
|
||||||
<view style="flex: 1;"></view>
|
|
||||||
|
|
||||||
<view class="btn" style="flex-shrink: 0;font-size: 30rpx;color: #191919;"
|
|
||||||
@click.stop="phone(item.phone)">
|
|
||||||
<image src="../static/address_phone2.png" style="width: 18px;height: 18px;"></image>
|
|
||||||
<view style="font-size: 13px;margin-left: 6px;">电话</view>
|
|
||||||
</view>
|
|
||||||
<view class="btn" style="flex-shrink: 0;font-size: 30rpx;color: #191919;"
|
|
||||||
@click.stop="confirm(item)">
|
|
||||||
<image src="../static/address_confirm.png" style="width: 18px;height: 18px;"></image>
|
|
||||||
<view style="font-size: 13px;margin-left: 6px;">确定</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<text style="font-size: 18px;font-weight: 600;font-family: sans-serif;color: 333;">{{item.name}}</text>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/date.png" style="width: 20px;height: 20px;">
|
|
||||||
</image>
|
|
||||||
<text style="margin-left: 5px;font-size: 12px; color: #999;">营业时间:{{item.businessHours}}</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/location.png" style="width: 20px;height: 20px;">
|
|
||||||
</image>
|
|
||||||
<text style="margin-left: 5px;font-size: 12px; color: #999;flex: 1;">门店地址:{{item.address}}</text>
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/navigation.png"
|
|
||||||
style="width: 20px;height: 20px; margin-right: 20px;"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;margin-top: 38rpx;border-top: 1rpx #f1f2f3 solid; justify-content: space-between;
|
|
||||||
padding-left: 30px;padding-right:30px;">
|
|
||||||
|
|
||||||
<view class="btn" @click.stop="phone(item.phone)">
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/phone.png" style="width: 20px;height: 20px;">
|
|
||||||
</image>
|
|
||||||
<text style="margin-left: 5px;font-size: 14px; color: #666;">电话咨询</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="btn" @click.stop="confirm(item)">
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/user.png" style="width: 20px;height: 20px;">
|
|
||||||
</image>
|
|
||||||
<text style="margin-left: 5px;font-size: 14px; color: #666;">预约自提</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</loading-state>
|
|
||||||
<view style="height: 20px;"></view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
page: {
|
|
||||||
key: ''
|
|
||||||
},
|
|
||||||
associativeText: '',
|
|
||||||
hotWorld: '输入关键字搜索提货点', // 搜索热词,如果没有输入即回车,则搜索热词,但是不会加入搜索记录
|
|
||||||
focus: true, // 是否自动聚焦
|
|
||||||
dataList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// 首次请求
|
|
||||||
this.request()
|
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
uni.onKeyboardHeightChange((res) => {
|
|
||||||
this.keyBoardPopup = res.height !== 0;
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
search() {
|
|
||||||
this.page.key = this.associativeText
|
|
||||||
this.request()
|
|
||||||
},
|
|
||||||
phone(num) {
|
|
||||||
uni.makePhoneCall({
|
|
||||||
phoneNumber: num
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm(item) {
|
|
||||||
uni.$emit('address', item)
|
|
||||||
uni.navigateBack()
|
|
||||||
},
|
|
||||||
request() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.pageView.setLoadState(0)
|
|
||||||
})
|
|
||||||
let _this = this
|
|
||||||
_this.$api.address({
|
|
||||||
'name': this.page.key
|
|
||||||
}).then((resp) => {
|
|
||||||
_this.dataList = resp
|
|
||||||
if (resp.length == 0) {
|
|
||||||
_this.$nextTick(() => {
|
|
||||||
_this.$refs.pageView.setLoadState(100)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
_this.$nextTick(() => {
|
|
||||||
_this.$refs.pageView.setLoadState(2)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
_this.$nextTick(() => {
|
|
||||||
_this.$refs.pageView.setLoadState(1)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clear(res) {
|
|
||||||
this.page.key = ''
|
|
||||||
this.request()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
uni-page-body,
|
|
||||||
page {
|
|
||||||
background: #f3f4f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
margin-top: 10px;
|
|
||||||
border: 1px solid #FEA561;
|
|
||||||
border-radius: 20px;
|
|
||||||
display: flex;flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 5px 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-body {
|
|
||||||
background-color: #FE9039;
|
|
||||||
border-bottom-right-radius: 10px;
|
|
||||||
border-bottom-left-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin uni-flex {
|
|
||||||
/* #ifndef APP-NVUE */
|
|
||||||
display: flex;
|
|
||||||
/* #endif */
|
|
||||||
}
|
|
||||||
|
|
||||||
$search-bar-height: 52px;
|
|
||||||
$word-container_header-height: 72rpx;
|
|
||||||
|
|
||||||
.search-container {
|
|
||||||
height: $search-bar-height;
|
|
||||||
@include uni-flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
background: white;
|
|
||||||
|
|
||||||
@at-root {
|
|
||||||
#{&}-bar {
|
|
||||||
@include uni-flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
background: #FE9039;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -22,68 +22,55 @@
|
|||||||
<z-paging ref="paging" use-page-scroll v-model="data" @query="queryList" :refresher-enabled="false">
|
<z-paging ref="paging" use-page-scroll v-model="data" @query="queryList" :refresher-enabled="false">
|
||||||
|
|
||||||
<view v-for="(item,index) in data" :key="index"
|
<view v-for="(item,index) in data" :key="index"
|
||||||
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px; "
|
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px;"
|
||||||
:class="item.showBtn==true?'oragin':'gray'" @click="detail(item)">
|
:class="item.showBtn==true?'oragin':'gray'" @click="detail(item)">
|
||||||
|
|
||||||
<view class="item" :class="{ item2: !item.showBtn }"
|
<view class="item" :class="{ item2: !item.showBtn }">
|
||||||
style="display: flex;flex-direction: row; width: 80%; padding: 16px;margin-left: 9px;margin-right: 9px;">
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row; align-items: center; flex: 1;">
|
<!-- 外边 18px 内边 32px = 50px -->
|
||||||
|
<view
|
||||||
|
style="padding: 16px;display: flex;flex-direction: row;width: 100%;box-sizing: border-box;">
|
||||||
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/pack.png" mode="aspectFill"
|
<!-- 礼包图标 总60px -->
|
||||||
v-show="item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
|
<view style="flex-shrink: 0;">
|
||||||
|
<image src="https://supervise.yxtsoft.com/lpk/image/pack.png" mode="aspectFill"
|
||||||
|
v-show="item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
|
||||||
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/pack2.png" mode="aspectFill"
|
<image src="https://supervise.yxtsoft.com/lpk/image/pack2.png" mode="aspectFill"
|
||||||
v-show="!item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
|
v-show="!item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;box-sizing: border-box;flex-wrap: nowrap;">
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: column; flex: 1;">
|
<view style="width: 100%;display: flex;flex-direction: row;">
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;padding-right: 10px;">
|
<view style="flex: 1;display: flex;flex-direction: column;">
|
||||||
|
<text class="_ellipsis"
|
||||||
<view style="display: flex;flex-direction: column; flex: 1;">
|
style="font-size: 13px;color: #333;width: calc(100vw - 190px);">卡号: {{item.serialNumber}}</text>
|
||||||
<text style="font-size: 13px;color: #333;">卡号: {{item.serialNumber}}</text>
|
<text lass="_ellipsis"
|
||||||
<text style="font-size: 12px;color: #999;margin-top: 5px;"> {{item.time}}</text>
|
style="font-size: 12px;color: #999;margin-top: 5px;width: calc(100vw - 182px);">
|
||||||
|
{{item.time}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 按钮 24 + 48 = 72px-->
|
||||||
<view :class="{ showBtn: !item.showBtn }" style="font-size: 12px;color:#fff;flex-shrink: 0;
|
<view :class="{ showBtn: !item.showBtn }" style="font-size: 12px;color:#fff;flex-shrink: 0;
|
||||||
border-radius: 15px; height: 30px;padding: 0px 12px;line-height: 30px;
|
border-radius: 15px; height: 30px;padding: 0px 12px;line-height: 30px;box-sizing: border-box;
|
||||||
background: -webkit-linear-gradient(left,#FF7405,#FFAD6D);">预约提货</view>
|
background: -webkit-linear-gradient(left,#FF7405,#FFAD6D);">预约提货</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 蔬菜礼包经典款+状态 -->
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px; width: 100%;justify-content: space-between;">
|
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
|
||||||
<text style="font-size: 15px;color: #FF7100;text-overflow: -o-ellipsis-lastline;padding-right: 10px; flex: 1;
|
<text style="font-size: 15px;color: #FF7100;"> {{item.pname}}</text>
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 1;
|
|
||||||
-webkit-box-orient: vertical;"> {{item.pname}}</text>
|
|
||||||
<text
|
<text
|
||||||
style="border: 1px #FED4B3 solid;margin-left: 10px;border-radius: 15px;padding: 3px 8px; font-size: 12px; color: #FF6000;">
|
style="border: 1px #FED4B3 solid;margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF6000;flex-shrink: 0;">
|
||||||
{{item.state}}</text>
|
{{item.state}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view style="display: flex;flex-direction: column;padding-right: 10px;">
|
|
||||||
|
|
||||||
<text style="font-size: 13px;color: #333;"> {{item.name}}</text>
|
|
||||||
<text style="font-size: 12px;color: #999;margin-top: 5px;"> {{item.time}}</text>
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
|
|
||||||
<text style="font-size: 13px;color: #FF7100;"> {{item.pname}}</text>
|
|
||||||
<text
|
|
||||||
style="border: 1px #FED4B3 solid;margin-left: 10px;border-radius: 15px;padding: 3px 6px; font-size: 12px; color: #FF6000;">
|
|
||||||
{{item.state}}</text>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view :class="{ showBtn: !item.showBtn }" style="font-size: 12px;color:#fff;flex-shrink: 0;
|
|
||||||
border-radius: 15px; height: 30px;padding: 0px 12px;line-height: 30px;
|
|
||||||
background: -webkit-linear-gradient(left,#FF7405,#FFAD6D);">预约提货</view> -->
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -151,17 +138,16 @@
|
|||||||
},
|
},
|
||||||
detail(item) {
|
detail(item) {
|
||||||
|
|
||||||
if (!item.showBtn) {
|
if (item.showBtn) {
|
||||||
// 失效 不正常
|
// 正常
|
||||||
// 详情2
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/card/card_detail2?sid=' + item.sid
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 详情
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/card/card_detail?sid=' + item.sid
|
url: '/pages/card/card_detail?sid=' + item.sid
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
// 过期 已完成
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/card/card_detail2?sid=' + item.sid
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -182,6 +168,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
._ellipsis {
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
/* height: 126.66vw; */
|
/* height: 126.66vw; */
|
||||||
@@ -209,6 +199,7 @@
|
|||||||
background-image: url(https://supervise.yxtsoft.com/lpk/image/card_item.png);
|
background-image: url(https://supervise.yxtsoft.com/lpk/image/card_item.png);
|
||||||
/* 让背景图基于容器大小伸缩 */
|
/* 让背景图基于容器大小伸缩 */
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
width: calc(100% - 18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.item2 {
|
.item2 {
|
||||||
@@ -216,6 +207,7 @@
|
|||||||
background-image: url(https://supervise.yxtsoft.com/lpk/image/card_item2.png);
|
background-image: url(https://supervise.yxtsoft.com/lpk/image/card_item2.png);
|
||||||
/* 让背景图基于容器大小伸缩 */
|
/* 让背景图基于容器大小伸缩 */
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
width: calc(100% - 18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.showBtn {
|
.showBtn {
|
||||||
|
|||||||
@@ -21,59 +21,139 @@
|
|||||||
|
|
||||||
<z-paging ref="paging" use-page-scroll v-model="data" @query="queryList" :refresher-enabled="false">
|
<z-paging ref="paging" use-page-scroll v-model="data" @query="queryList" :refresher-enabled="false">
|
||||||
|
|
||||||
<view v-for="(item,index) in data" :key="index"
|
<view
|
||||||
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px;"
|
style=" display: flex;flex-direction: row;align-items: center;justify-content: center;padding-top: 5vw;">
|
||||||
:class="item.showBtn==true?'oragin':'gray'" @click="detail(item)">
|
|
||||||
|
|
||||||
<view class="item" :class="{ item2: !item.showBtn }">
|
<view style="margin-right: 8vw;" :class="(currentTab!=0)?'tab-bj2':'tab-bj1'" @click="tab(0)">提货卡
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 外边 18px 内边 32px = 50px -->
|
<view style="margin-left: 8vw;" :class="(currentTab!=0)?'tab-bj1':'tab-bj2'" @click="tab(1)">
|
||||||
<view
|
福礼卡</view>
|
||||||
style="padding: 16px;display: flex;flex-direction: row;width: 100%;box-sizing: border-box;">
|
|
||||||
|
|
||||||
<!-- 礼包图标 总60px -->
|
</view>
|
||||||
<view style="flex-shrink: 0;">
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/pack.png" mode="aspectFill"
|
|
||||||
v-show="item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
|
|
||||||
|
|
||||||
<image src="https://supervise.yxtsoft.com/lpk/image/pack2.png" mode="aspectFill"
|
<!-- 页面内容 -->
|
||||||
v-show="!item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
|
<swiper class="tab-box" :current="currentTab" duration="300" bindchange="switchTab" @change=tabChange>
|
||||||
</view>
|
<swiper-item class="tab-content">
|
||||||
|
<view v-for="(item,index) in data" :key="index"
|
||||||
|
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px;"
|
||||||
|
:class="item.showBtn==true?'oragin':'gray'" @click="detail(item)">
|
||||||
|
|
||||||
<view
|
<view class="item" :class="{ item2: !item.showBtn }">
|
||||||
style="flex: 1;display: flex;flex-direction: column;box-sizing: border-box;flex-wrap: nowrap;">
|
|
||||||
|
|
||||||
<view style="width: 100%;display: flex;flex-direction: row;">
|
<!-- 外边 18px 内边 32px = 50px -->
|
||||||
|
<view
|
||||||
|
style="padding: 16px;display: flex;flex-direction: row;width: 100%;box-sizing: border-box;">
|
||||||
|
|
||||||
<view style="flex: 1;display: flex;flex-direction: column;">
|
<!-- 礼包图标 总60px -->
|
||||||
<text class="_ellipsis"
|
<view style="flex-shrink: 0;">
|
||||||
style="font-size: 13px;color: #333;width: calc(100vw - 190px);">卡号: {{item.serialNumber}}</text>
|
<image src="https://supervise.yxtsoft.com/lpk/image/pack.png" mode="aspectFill"
|
||||||
<text lass="_ellipsis"
|
v-show="item.showBtn"
|
||||||
style="font-size: 12px;color: #999;margin-top: 5px;width: calc(100vw - 182px);">
|
style="width: 50px;height: 50px;margin-right: 10px;" />
|
||||||
{{item.time}}</text>
|
|
||||||
|
<image src="https://supervise.yxtsoft.com/lpk/image/pack2.png" mode="aspectFill"
|
||||||
|
v-show="!item.showBtn"
|
||||||
|
style="width: 50px;height: 50px;margin-right: 10px;" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 按钮 24 + 48 = 72px-->
|
<view
|
||||||
<view :class="{ showBtn: !item.showBtn }" style="font-size: 12px;color:#fff;flex-shrink: 0;
|
style="flex: 1;display: flex;flex-direction: column;box-sizing: border-box;flex-wrap: nowrap;">
|
||||||
border-radius: 15px; height: 30px;padding: 0px 12px;line-height: 30px;box-sizing: border-box;
|
|
||||||
background: -webkit-linear-gradient(left,#FF7405,#FFAD6D);">预约提货</view>
|
<view style="width: 100%;display: flex;flex-direction: row;">
|
||||||
</view>
|
|
||||||
|
<view style="flex: 1;display: flex;flex-direction: column;">
|
||||||
|
<text class="_ellipsis"
|
||||||
|
style="font-size: 13px;color: #333;width: calc(100vw - 190px);">卡号:
|
||||||
|
{{item.serialNumber}}</text>
|
||||||
|
<text lass="_ellipsis"
|
||||||
|
style="font-size: 12px;color: #999;margin-top: 5px;width: calc(100vw - 182px);">
|
||||||
|
{{item.time}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 按钮 24 + 48 = 72px-->
|
||||||
|
<view :class="{ showBtn: !item.showBtn }" style="font-size: 12px;color:#fff;flex-shrink: 0;
|
||||||
|
border-radius: 15px; height: 30px;padding: 0px 12px;line-height: 30px;box-sizing: border-box;
|
||||||
|
background: -webkit-linear-gradient(left,#FF7405,#FFAD6D);">预约提货</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 蔬菜礼包经典款+状态 -->
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
|
||||||
|
<text style="font-size: 15px;color: #FF7100;"> {{item.pname}}</text>
|
||||||
|
<text
|
||||||
|
style="border: 1px #FED4B3 solid;margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF6000;flex-shrink: 0;">
|
||||||
|
{{item.state}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 蔬菜礼包经典款+状态 -->
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
|
|
||||||
<text style="font-size: 15px;color: #FF7100;"> {{item.pname}}</text>
|
|
||||||
<text
|
|
||||||
style="border: 1px #FED4B3 solid;margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF6000;flex-shrink: 0;">
|
|
||||||
{{item.state}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
|
||||||
</view>
|
<swiper-item class="tab-content">
|
||||||
|
<view v-for="(item,index) in data" :key="index"
|
||||||
|
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px;"
|
||||||
|
:class="item.showBtn==true?'oragin':'gray'" @click="detail(item)">
|
||||||
|
|
||||||
</view>
|
<view class="item" :class="{ item2: !item.showBtn }">
|
||||||
|
|
||||||
|
<!-- 外边 18px 内边 32px = 50px -->
|
||||||
|
<view
|
||||||
|
style="padding: 16px;display: flex;flex-direction: row;width: 100%;box-sizing: border-box;">
|
||||||
|
|
||||||
|
<!-- 礼包图标 总60px -->
|
||||||
|
<view style="flex-shrink: 0;">
|
||||||
|
<image src="https://supervise.yxtsoft.com/lpk/image/pack.png" mode="aspectFill"
|
||||||
|
v-show="item.showBtn"
|
||||||
|
style="width: 50px;height: 50px;margin-right: 10px;" />
|
||||||
|
|
||||||
|
<image src="https://supervise.yxtsoft.com/lpk/image/pack2.png" mode="aspectFill"
|
||||||
|
v-show="!item.showBtn"
|
||||||
|
style="width: 50px;height: 50px;margin-right: 10px;" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex: 1;display: flex;flex-direction: column;box-sizing: border-box;flex-wrap: nowrap;">
|
||||||
|
|
||||||
|
<view style="width: 100%;display: flex;flex-direction: row;">
|
||||||
|
|
||||||
|
<view style="flex: 1;display: flex;flex-direction: column;">
|
||||||
|
<text class="_ellipsis"
|
||||||
|
style="font-size: 13px;color: #333;width: calc(100vw - 190px);">卡号:
|
||||||
|
{{item.serialNumber}}</text>
|
||||||
|
<text lass="_ellipsis"
|
||||||
|
style="font-size: 12px;color: #999;margin-top: 5px;width: calc(100vw - 182px);">
|
||||||
|
{{item.time}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 按钮 24 + 48 = 72px-->
|
||||||
|
<view :class="{ showBtn: !item.showBtn }" style="font-size: 12px;color:#fff;flex-shrink: 0;
|
||||||
|
border-radius: 15px; height: 30px;padding: 0px 12px;line-height: 30px;box-sizing: border-box;
|
||||||
|
background: -webkit-linear-gradient(left,#FF7405,#FFAD6D);">预约提货</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 蔬菜礼包经典款+状态 -->
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
|
||||||
|
<text style="font-size: 15px;color: #FF7100;"> {{item.pname}}</text>
|
||||||
|
<text
|
||||||
|
style="border: 1px #FED4B3 solid;margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF6000;flex-shrink: 0;">
|
||||||
|
{{item.state}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
|
||||||
</z-paging>
|
</z-paging>
|
||||||
</view>
|
</view>
|
||||||
@@ -91,6 +171,7 @@
|
|||||||
endHeight: 0
|
endHeight: 0
|
||||||
},
|
},
|
||||||
data: [],
|
data: [],
|
||||||
|
currentTab: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -162,6 +243,14 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
tab(index) {
|
||||||
|
this.currentTab = index
|
||||||
|
|
||||||
|
},
|
||||||
|
tabChange(event) {
|
||||||
|
console.log("eeee", event.detail.current)
|
||||||
|
this.currentTab = event.detail.current
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,4 +327,31 @@
|
|||||||
page {
|
page {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-box {
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content {
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-bj1 {
|
||||||
|
background: #FFF6EF;
|
||||||
|
color: #FF7200;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 25px;
|
||||||
|
border: 1px solid #FF7200;
|
||||||
|
padding: 5px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-bj2 {
|
||||||
|
background: #E7E7E7;
|
||||||
|
color: #9D9D9D;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 25px;
|
||||||
|
padding: 5px 30px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
<text>提货时间</text>
|
<text>提货时间</text>
|
||||||
<view style="display: flex;align-items: center;margin-top: 6px;">
|
<view style="display: flex;align-items: center;margin-top: 6px;">
|
||||||
<uni-datetime-picker type="date" v-model="data.reserveDate" style="flex: 1;background: #F8F8F8;"
|
<uni-datetime-picker type="date" v-model="data.reserveDate" style="flex: 1;background: #F8F8F8;"
|
||||||
:start="data.start" :end="data.end" @showing='showing' />
|
:start="data.start" :end="data.end" @showing='showing' :disabledDate="disabledDate" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -280,12 +280,16 @@
|
|||||||
value: "",
|
value: "",
|
||||||
userName: "",
|
userName: "",
|
||||||
userPhone: "",
|
userPhone: "",
|
||||||
}
|
},
|
||||||
|
disabledDate:[
|
||||||
|
// '2023-12-16'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.page.sid = options.sid
|
this.page.sid = options.sid
|
||||||
this.request()
|
this.request()
|
||||||
|
this.getSun()
|
||||||
uni.$on("order2", (e) => {
|
uni.$on("order2", (e) => {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.pageView.setLoadState(0)
|
this.$refs.pageView.setLoadState(0)
|
||||||
@@ -367,7 +371,7 @@
|
|||||||
uni.$emit('order', {})
|
uni.$emit('order', {})
|
||||||
uni.$emit('order2', {})
|
uni.$emit('order2', {})
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
_this.shortToast('发生异常')
|
_this.shortToast(e.msg)
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -385,6 +389,20 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getSun(){
|
||||||
|
let _this = this
|
||||||
|
_this.$api.isSaturAndSun(this.page.sid).then((resp) => {
|
||||||
|
|
||||||
|
// console.log("aaa",resp)
|
||||||
|
|
||||||
|
this.disabledDate = resp
|
||||||
|
|
||||||
|
}).catch(e => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
showRecord(sid) {
|
showRecord(sid) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/card/card_record?sid=' + sid
|
url: '/pages/card/card_record?sid=' + sid
|
||||||
|
|||||||
54
pages/enterprise/corporateCard.vue
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<template>
|
||||||
|
<view style="background-color: #FE9039;padding-top: 5vw;">
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: column;background: #fff; border-radius: 25px; align-items: center; margin-left: 5vw;margin-right: 5vw;">
|
||||||
|
<view class="btn" @click="bind">
|
||||||
|
<image src="https://supervise.yxtsoft.com/lpk/image/binding.png" style="width: 15px;height: 15px;">
|
||||||
|
</image>
|
||||||
|
<text
|
||||||
|
style="height: 45px;line-height: 45px;font-size: 17px; text-align: center;color: #FE6B00;margin-left: 11px;">绑定新卡</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column;background-color: #fff; border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: 5vw;">
|
||||||
|
|
||||||
|
<z-paging ref="paging" use-page-scroll v-model="data" @query="queryList" :refresher-enabled="false">
|
||||||
|
|
||||||
|
</z-paging>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 分页的请求
|
||||||
|
queryList(pageNo, pageSize) {
|
||||||
|
let _this = this
|
||||||
|
_this.$api.cardList({
|
||||||
|
"current": pageNo,
|
||||||
|
"size": pageSize,
|
||||||
|
"params": {
|
||||||
|
"customerSid": getApp().globalData.sid
|
||||||
|
}
|
||||||
|
}).then((resp) => {
|
||||||
|
// 添加数据源
|
||||||
|
this.$refs.paging.complete(resp.records)
|
||||||
|
}).catch(e => {
|
||||||
|
// 出错了,点击重试
|
||||||
|
_this.$refs.paging.complete(false);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
BIN
static/bomicon/bom_card.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
static/bomicon/bom_notCard.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
BIN
static/gift.png
|
Before Width: | Height: | Size: 9.0 KiB |
BIN
static/gift2.png
|
Before Width: | Height: | Size: 3.3 KiB |
BIN
static/gift3.png
|
Before Width: | Height: | Size: 17 KiB |
BIN
static/guige.png
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -6,16 +6,19 @@
|
|||||||
'uni-calendar-item--after-checked-x':weeks.afterMultiple,
|
'uni-calendar-item--after-checked-x':weeks.afterMultiple,
|
||||||
}" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
|
}" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
|
||||||
<view class="uni-calendar-item__weeks-box-item" :class="{
|
<view class="uni-calendar-item__weeks-box-item" :class="{
|
||||||
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
|
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover)
|
||||||
|
&& !disabledDate.includes(weeks.fullDate),
|
||||||
'uni-calendar-item--checked-range-text': checkHover,
|
'uni-calendar-item--checked-range-text': checkHover,
|
||||||
'uni-calendar-item--before-checked':weeks.beforeMultiple,
|
'uni-calendar-item--before-checked':weeks.beforeMultiple,
|
||||||
'uni-calendar-item--multiple': weeks.multiple,
|
'uni-calendar-item--multiple': weeks.multiple,
|
||||||
'uni-calendar-item--after-checked':weeks.afterMultiple,
|
'uni-calendar-item--after-checked':weeks.afterMultiple,
|
||||||
'uni-calendar-item--disable':weeks.disable,
|
'uni-calendar-item--disable':weeks.disable,
|
||||||
|
'uni-calendar-item--disable':disabledDate.includes(weeks.fullDate),
|
||||||
}">
|
}">
|
||||||
<text v-if="selected && weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
|
<text v-if="selected && weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
|
||||||
<text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text"
|
<text
|
||||||
v-if="weeks.year!=null">{{weeks.date}}</text>
|
class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text"
|
||||||
|
v-if="weeks.year!=null">{{weeks.date}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view :class="{'uni-calendar-item--today': weeks.isToday}"></view>
|
<view :class="{'uni-calendar-item--today': weeks.isToday}"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -24,6 +27,11 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
// 禁用日期
|
||||||
|
disabledDate: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
weeks: {
|
weeks: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default () {
|
default () {
|
||||||
@@ -58,7 +66,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" >
|
<style lang="scss">
|
||||||
$uni-primary: #007aff !default;
|
$uni-primary: #007aff !default;
|
||||||
|
|
||||||
.uni-calendar-item__weeks-box {
|
.uni-calendar-item__weeks-box {
|
||||||
@@ -120,7 +128,7 @@
|
|||||||
top: 10px;
|
top: 10px;
|
||||||
right: 17%;
|
right: 17%;
|
||||||
background-color: #dd524d;
|
background-color: #dd524d;
|
||||||
width:6px;
|
width: 6px;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
@@ -146,7 +154,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.uni-calendar-item--multiple {
|
.uni-calendar-item--multiple {
|
||||||
background-color: #F6F7FC;
|
background-color: #F6F7FC;
|
||||||
// color: #fff;
|
// color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,4 +183,4 @@
|
|||||||
border-bottom-right-radius: 50px;
|
border-bottom-right-radius: 50px;
|
||||||
background-color: #F6F7FC;
|
background-color: #F6F7FC;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -59,8 +59,7 @@
|
|||||||
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
|
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
|
||||||
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
|
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
|
||||||
<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
|
<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
|
||||||
:selected="selected" :checkHover="range" @change="choiceDate"
|
:selected="selected" :checkHover="range" @change="choiceDate" @handleMouse="handleMouse" :disabledDate="disabledDate">
|
||||||
@handleMouse="handleMouse">
|
|
||||||
</calendar-item>
|
</calendar-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -101,13 +100,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Calendar, getDate, getTime } from './util.js';
|
import {
|
||||||
|
Calendar,
|
||||||
|
getDate,
|
||||||
|
getTime
|
||||||
|
} from './util.js';
|
||||||
import calendarItem from './calendar-item.vue'
|
import calendarItem from './calendar-item.vue'
|
||||||
import timePicker from './time-picker.vue'
|
import timePicker from './time-picker.vue'
|
||||||
|
|
||||||
import { initVueI18n } from '@dcloudio/uni-i18n'
|
import {
|
||||||
|
initVueI18n
|
||||||
|
} from '@dcloudio/uni-i18n'
|
||||||
import i18nMessages from './i18n/index.js'
|
import i18nMessages from './i18n/index.js'
|
||||||
const { t } = initVueI18n(i18nMessages)
|
const {
|
||||||
|
t
|
||||||
|
} = initVueI18n(i18nMessages)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calendar 日历
|
* Calendar 日历
|
||||||
@@ -135,6 +142,11 @@
|
|||||||
timePicker
|
timePicker
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
// 禁用日期
|
||||||
|
disabledDate: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
date: {
|
date: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
@@ -163,8 +175,8 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
startPlaceholder: {
|
startPlaceholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
endPlaceholder: {
|
endPlaceholder: {
|
||||||
@@ -210,10 +222,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
defaultValue: {
|
defaultValue: {
|
||||||
type: [String, Object, Array],
|
type: [String, Object, Array],
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -260,32 +272,32 @@
|
|||||||
},
|
},
|
||||||
startDate(val) {
|
startDate(val) {
|
||||||
// 字节小程序 watch 早于 created
|
// 字节小程序 watch 早于 created
|
||||||
if(!this.cale){
|
if (!this.cale) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.cale.setStartDate(val)
|
this.cale.setStartDate(val)
|
||||||
this.cale.setDate(this.nowDate.fullDate)
|
this.cale.setDate(this.nowDate.fullDate)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks11 ",this.weeks )
|
console.log("this.weeks11 ", this.weeks)
|
||||||
},
|
},
|
||||||
endDate(val) {
|
endDate(val) {
|
||||||
// 字节小程序 watch 早于 created
|
// 字节小程序 watch 早于 created
|
||||||
if(!this.cale){
|
if (!this.cale) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.cale.setEndDate(val)
|
this.cale.setEndDate(val)
|
||||||
this.cale.setDate(this.nowDate.fullDate)
|
this.cale.setDate(this.nowDate.fullDate)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks22 ",this.weeks )
|
console.log("this.weeks22 ", this.weeks)
|
||||||
},
|
},
|
||||||
selected(newVal) {
|
selected(newVal) {
|
||||||
// 字节小程序 watch 早于 created
|
// 字节小程序 watch 早于 created
|
||||||
if(!this.cale){
|
if (!this.cale) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
|
this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks33 ",this.weeks )
|
console.log("this.weeks33 ", this.weeks)
|
||||||
},
|
},
|
||||||
pleStatus: {
|
pleStatus: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
@@ -312,20 +324,20 @@
|
|||||||
this.cale.lastHover = false
|
this.cale.lastHover = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 字节小程序 watch 早于 created
|
// 字节小程序 watch 早于 created
|
||||||
if(!this.cale){
|
if (!this.cale) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cale.setDefaultMultiple(before, after)
|
this.cale.setDefaultMultiple(before, after)
|
||||||
if (which === 'left' && before) {
|
if (which === 'left' && before) {
|
||||||
this.setDate(before)
|
this.setDate(before)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks44 ",this.weeks )
|
console.log("this.weeks44 ", this.weeks)
|
||||||
} else if(after) {
|
} else if (after) {
|
||||||
this.setDate(after)
|
this.setDate(after)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks55 ",this.weeks )
|
console.log("this.weeks55 ", this.weeks)
|
||||||
}
|
}
|
||||||
this.cale.lastHover = true
|
this.cale.lastHover = true
|
||||||
}
|
}
|
||||||
@@ -415,7 +427,7 @@
|
|||||||
// 设置范围选
|
// 设置范围选
|
||||||
this.cale.setHoverMultiple(this.calendar.fullDate)
|
this.cale.setHoverMultiple(this.calendar.fullDate)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks66 ",this.weeks )
|
console.log("this.weeks66 ", this.weeks)
|
||||||
// hover时,进入一个日历,更新另一个
|
// hover时,进入一个日历,更新另一个
|
||||||
if (this.firstEnter) {
|
if (this.firstEnter) {
|
||||||
this.$emit('firstEnterCale', this.cale.multipleStatus)
|
this.$emit('firstEnterCale', this.cale.multipleStatus)
|
||||||
@@ -429,7 +441,7 @@
|
|||||||
},
|
},
|
||||||
// 蒙版点击事件
|
// 蒙版点击事件
|
||||||
maskClick() {
|
maskClick() {
|
||||||
this.close()
|
this.close()
|
||||||
this.$emit('maskClose')
|
this.$emit('maskClose')
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -460,36 +472,38 @@
|
|||||||
* @param {Object} date
|
* @param {Object} date
|
||||||
*/
|
*/
|
||||||
init(date) {
|
init(date) {
|
||||||
// 字节小程序 watch 早于 created
|
// 字节小程序 watch 早于 created
|
||||||
if(!this.cale){
|
if (!this.cale) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.cale.setDate(date || new Date())
|
this.cale.setDate(date || new Date())
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
this.nowDate = this.cale.getInfo(date)
|
this.nowDate = this.cale.getInfo(date)
|
||||||
this.calendar = {...this.nowDate}
|
this.calendar = {
|
||||||
if(!date){
|
...this.nowDate
|
||||||
// 优化date为空默认不选中今天
|
}
|
||||||
this.calendar.fullDate = ''
|
if (!date) {
|
||||||
if(this.defaultValue && !this.range){
|
// 优化date为空默认不选中今天
|
||||||
// 暂时只支持移动端非范围选择
|
this.calendar.fullDate = ''
|
||||||
const defaultDate = new Date(this.defaultValue)
|
if (this.defaultValue && !this.range) {
|
||||||
const fullDate = getDate(defaultDate)
|
// 暂时只支持移动端非范围选择
|
||||||
const year = defaultDate.getFullYear()
|
const defaultDate = new Date(this.defaultValue)
|
||||||
const month = defaultDate.getMonth()+1
|
const fullDate = getDate(defaultDate)
|
||||||
const date = defaultDate.getDate()
|
const year = defaultDate.getFullYear()
|
||||||
const day = defaultDate.getDay()
|
const month = defaultDate.getMonth() + 1
|
||||||
this.calendar = {
|
const date = defaultDate.getDate()
|
||||||
fullDate,
|
const day = defaultDate.getDay()
|
||||||
year,
|
this.calendar = {
|
||||||
month,
|
fullDate,
|
||||||
date,
|
year,
|
||||||
day
|
month,
|
||||||
},
|
date,
|
||||||
this.tempSingleDate = fullDate
|
day
|
||||||
this.time = getTime(defaultDate, this.hideSecond)
|
},
|
||||||
}
|
this.tempSingleDate = fullDate
|
||||||
}
|
this.time = getTime(defaultDate, this.hideSecond)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 打开日历弹窗
|
* 打开日历弹窗
|
||||||
@@ -551,13 +565,13 @@
|
|||||||
* @param {Object} name
|
* @param {Object} name
|
||||||
*/
|
*/
|
||||||
setEmit(name) {
|
setEmit(name) {
|
||||||
if(!this.range){
|
if (!this.range) {
|
||||||
if(!this.calendar.fullDate){
|
if (!this.calendar.fullDate) {
|
||||||
this.calendar = this.cale.getInfo(new Date())
|
this.calendar = this.cale.getInfo(new Date())
|
||||||
this.tempSingleDate = this.calendar.fullDate
|
this.tempSingleDate = this.calendar.fullDate
|
||||||
}
|
}
|
||||||
if(this.hasTime && !this.time) {
|
if (this.hasTime && !this.time) {
|
||||||
this.time = getTime(new Date(), this.hideSecond)
|
this.time = getTime(new Date(), this.hideSecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let {
|
let {
|
||||||
@@ -583,13 +597,18 @@
|
|||||||
* @param {Object} weeks
|
* @param {Object} weeks
|
||||||
*/
|
*/
|
||||||
choiceDate(weeks) {
|
choiceDate(weeks) {
|
||||||
if (weeks.disable) return
|
if (weeks.disable)
|
||||||
|
return
|
||||||
|
if(this.disabledDate.includes(weeks.fullDate)){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.calendar = weeks
|
this.calendar = weeks
|
||||||
this.calendar.userChecked = true
|
this.calendar.userChecked = true
|
||||||
// 设置多选
|
// 设置多选
|
||||||
this.cale.setMultiple(this.calendar.fullDate, true)
|
this.cale.setMultiple(this.calendar.fullDate, true)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks77 ",this.weeks )
|
console.log("this.weeks77 ", this.weeks)
|
||||||
this.tempSingleDate = this.calendar.fullDate
|
this.tempSingleDate = this.calendar.fullDate
|
||||||
const beforeDate = new Date(this.cale.multipleStatus.before).getTime()
|
const beforeDate = new Date(this.cale.multipleStatus.before).getTime()
|
||||||
const afterDate = new Date(this.cale.multipleStatus.after).getTime()
|
const afterDate = new Date(this.cale.multipleStatus.after).getTime()
|
||||||
@@ -602,34 +621,34 @@
|
|||||||
}
|
}
|
||||||
this.change()
|
this.change()
|
||||||
},
|
},
|
||||||
changeMonth(type) {
|
changeMonth(type) {
|
||||||
let newDate
|
let newDate
|
||||||
if(type === 'pre') {
|
if (type === 'pre') {
|
||||||
newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate
|
newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate
|
||||||
} else if(type === 'next') {
|
} else if (type === 'next') {
|
||||||
newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate
|
newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setDate(newDate)
|
this.setDate(newDate)
|
||||||
this.monthSwitch()
|
this.monthSwitch()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 设置日期
|
* 设置日期
|
||||||
* @param {Object} date
|
* @param {Object} date
|
||||||
*/
|
*/
|
||||||
setDate(date) {
|
setDate(date) {
|
||||||
console.log("this.weeks88 ",date )
|
console.log("this.weeks88 ", date)
|
||||||
this.cale.setDate(date)
|
this.cale.setDate(date)
|
||||||
console.log("this.weeks88 ",this.cale )
|
console.log("this.weeks88 ", this.cale)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks88 ",this.weeks )
|
console.log("this.weeks88 ", this.weeks)
|
||||||
this.nowDate = this.cale.getInfo(date)
|
this.nowDate = this.cale.getInfo(date)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" >
|
<style lang="scss">
|
||||||
$uni-primary: #007aff !default;
|
$uni-primary: #007aff !default;
|
||||||
|
|
||||||
.uni-calendar {
|
.uni-calendar {
|
||||||
@@ -865,17 +884,17 @@
|
|||||||
|
|
||||||
.uni-date-changed--time-end {
|
.uni-date-changed--time-end {
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
display: flex;
|
display: flex;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-date-changed--time-date {
|
.uni-date-changed--time-date {
|
||||||
color: #999;
|
color: #999;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
/* #ifdef MP-TOUTIAO */
|
/* #ifdef MP-TOUTIAO */
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
// opacity: 0.6;
|
// opacity: 0.6;
|
||||||
}
|
}
|
||||||
@@ -934,5 +953,6 @@
|
|||||||
.uni-datetime-picker--btn:active {
|
.uni-datetime-picker--btn:active {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #endif */
|
/* #endif */
|
||||||
</style>
|
</style>
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
:start-date="calendarRange.startDate" :end-date="calendarRange.endDate" :selectableTimes="mobSelectableTime"
|
:start-date="calendarRange.startDate" :end-date="calendarRange.endDate" :selectableTimes="mobSelectableTime"
|
||||||
:startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :default-value="defaultValue"
|
:startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :default-value="defaultValue"
|
||||||
:pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false"
|
:pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false"
|
||||||
:hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" />
|
:hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" :disabledDate="disabledDate" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -205,6 +205,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
// 禁用日期
|
||||||
|
disabledDate: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'datetime'
|
default: 'datetime'
|
||||||
|
|||||||