新建项目

This commit is contained in:
myTest383
2024-12-25 10:37:20 +08:00
parent f40fd3759f
commit 3871e73a25
443 changed files with 76237 additions and 0 deletions

View File

@@ -0,0 +1,357 @@
<template>
<view style="display: flex;flex-direction: column;">
<view class="top">
<NavBar ref="nav" navTitle="首页" :showIcon="false" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view style="display: flex;flex-direction: column;align-items: center;">
<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>
<view
style="display: flex;flex-direction: column;background-color: #fff;height: 50vh; border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: -9.06vw;">
<z-paging ref="paging" use-page-scroll v-model="data" @query="queryList" :refresher-enabled="false">
<view
style=" display: flex;flex-direction: row;align-items: center;justify-content: center;padding-top: 5vw;">
<view style="margin-right: 8vw;" :class="(currentTab!=0)?'tab-bj2':'tab-bj1'" @click="tab(0)">提货卡
</view>
<view style="margin-left: 8vw;" :class="(currentTab!=0)?'tab-bj1':'tab-bj2'" @click="tab(1)">
福礼卡</view>
</view>
<!-- 页面内容 -->
<swiper class="tab-box" :current="currentTab" duration="300" bindchange="switchTab" @change=tabChange>
<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 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-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 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 class="_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>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: {
remarks: '',
startHeight: 0,
endHeight: 0
},
data: [],
currentTab: 0,
}
},
onLoad() {
uni.$on("order", (e) => {
// 相当与下拉刷新
this.$refs.paging.reload(true);
})
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
onUnload() {
uni.$off('order');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
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);
})
},
dialogInputConfirm(val) {
// 网络请求 绑定
},
bind() {
uni.navigateTo({
url: '/pages/card/card_bind'
})
},
detail(item) {
if (item.showBtn) {
// 正常
uni.navigateTo({
url: '/pages/card/card_detail?sid=' + item.sid
})
} else {
// 过期 已完成
uni.navigateTo({
url: '/pages/card/card_detail2?sid=' + item.sid
})
}
},
booking(item) {
if (!item.notRese) {
this.shortToast("该卡商品已全部预约。")
return
} else {
uni.navigateTo({
url: '/pages/card/card_booking?sid=' + item.sid
})
}
},
tab(index) {
this.currentTab = index
},
tabChange(event) {
console.log("eeee", event.detail.current)
this.currentTab = event.detail.current
}
}
}
</script>
<style>
._ellipsis {
overflow-wrap: break-word;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 85vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/hmoe_bj.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.btn {
/* margin-top: 97.86vw; */
margin-top: 60vw;
width: 83%;
background-color: #FFF;
border-radius: 45px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.item {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/card_item.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
width: calc(100% - 18px);
}
.item2 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/card_item2.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
width: calc(100% - 18px);
}
.showBtn {
visibility: hidden;
}
.use {
display: flex;
flex-direction: row;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
color: #FFF;
align-items: center;
background: linear-gradient(89.8deg, rgba(218, 51, 33, 1) -3.76%, rgba(237, 113, 53, 0) 300.05%);
}
.gray {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
transition: filter 0.2s;
}
.oragin {}
uni-page-body,
page {
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>

550
pages/card/card.vue Normal file
View File

@@ -0,0 +1,550 @@
<template>
<view
style="display: flex;flex-direction: column;height: 100vh;background: -webkit-linear-gradient(left,#FEA65F,#FB9440);">
<view class="top">
<NavBar ref="nav" navTitle=" " :showIcon="false" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view style="display: flex;flex-direction: row;">
<!-- <view class="btn" @click="bind">
<image src="https://supervise.yxtsoft.com/lpk/image/binding.png" style="width: 20px;height: 20px;">
</image>
<text
style="height: 45px;line-height: 45px;font-size: 17px;font-weight: 600; text-align: center;color: #FF7100;margin-left: 11px;">绑定新卡</text>
</view> -->
<view style="flex: 1;"></view>
<!-- <text style="color: #fff;margin-top: 60vw; margin-right: 25px;" @click="bind">绑定新卡</text> -->
<image @click="bind" src="https://supervise.yxtsoft.com/lpk/image/bind2.png"
style="margin-top: 50vw; margin-right: 25px;width: 30px;height: 30px;">
</image>
</view>
</view>
<!-- <view
style="display: flex;flex-direction: column;background: #f0f; height: auto; border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: -9.1vw;"> -->
<z-paging ref="paging" v-model="data" :pagingStyle='styleObject' @query="queryList" :refresher-enabled="true"
:auto="false">
<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 v-show="item.type=='1'">
<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/home_family.png" mode="aspectFill"
v-show="item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/home_notFamily.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;flex: 1;"> {{item.pname}}</text>
<text
style="margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF6000;flex-shrink: 0;">
{{item.state}}</text>
</view>
<view v-if="item.list.length>0">
<view style="height: 10px;"></view>
<view v-for="(child,pos) in item.list" :key="pos"
style="display: flex;flex-direction: row;align-items: center;width: calc(100vw - 120px);padding-top: 5px;box-sizing: border-box;">
<image src="../../static/tck_mx_icon.png" style="width: 9px;height: 9px;">
</image>
<view
style="font-size: 11px;color: #E99D42;padding-left: 5px;flex: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">
{{child.goodsName}}
</view>
<view style="font-size: 11px;color: #E99D42;flex-shrink: 0;margin-left: 23px;">
{{child.content}}
</view>
<view
style="font-size: 11px;color: #E99D42;min-width: 60px;text-align: right;padding-left: 5px;">
{{child.remarks}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 亲情卡-->
<view v-show="item.type=='2'">
<view class="item3" :class="{ item4: !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/home_affection.png"
mode="aspectFill" v-show="item.showBtn"
style="width: 50px;height: 50px;margin-right: 10px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/home_notAffection.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;flex: 1;"> {{item.pname}}</text>
<text
style="margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF6000;flex-shrink: 0;">
{{item.state}}</text>
</view>
<view v-if="item.list.length>0">
<view style="height: 10px;"></view>
<view v-for="(child,pos) in item.list" :key="pos"
style="display: flex;flex-direction: row;align-items: center;width: calc(100vw - 120px);padding-top: 5px;box-sizing: border-box;">
<image src="../../static/tck_mx_icon.png" style="width: 9px;height: 9px;">
</image>
<view
style="font-size: 11px;color: #E99D42;padding-left: 5px;flex: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">
{{child.goodsName}}
</view>
<view style="font-size: 11px;color: #E99D42;flex-shrink: 0;margin-left: 23px;">
{{child.content}}
</view>
<view
style="font-size: 11px;color: #E99D42;min-width: 60px;text-align: right;padding-left: 5px;">
{{child.remarks}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 企业卡-->
<view v-show="item.type=='3'">
<view class="item5" :class="{ item6: !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/home_enterprise.png"
mode="aspectFill" v-show="item.showBtn"
style="width: 50px;height: 50px;margin-right: 10px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/home_notEnterprise.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;flex: 1;"> {{item.pname}}</text>
<text
style="margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF6000;flex-shrink: 0;">
{{item.state}}</text>
</view>
<view v-if="item.list.length>0">
<view style="height: 10px;"></view>
<view v-for="(child,pos) in item.list" :key="pos"
style="display: flex;flex-direction: row;align-items: center;width: calc(100vw - 120px);padding-top: 5px;box-sizing: border-box;">
<image src="../../static/tck_mx_icon.png" style="width: 9px;height: 9px;">
</image>
<view
style="font-size: 11px;color: #E99D42;padding-left: 5px;flex: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">
{{child.goodsName}}
</view>
<view style="font-size: 11px;color: #E99D42;flex-shrink: 0;margin-left: 23px;">
{{child.content}}
</view>
<view
style="font-size: 11px;color: #E99D42;min-width: 60px;text-align: right;padding-left: 5px;">
{{child.remarks}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</z-paging>
<!-- </view> -->
</view>
</template>
<script>
export default {
data() {
return {
styleObject: {
'margin-top': '59vw',
'border-top-left-radius': '25px',
'border-top-right-radius': '25px',
'border-bottom-left-radius': '25px',
'border-bottom-right-radius': '25px',
'background': '#fff',
'padding-top': '10px',
},
page: {
remarks: '',
startHeight: 0,
endHeight: 0
},
data: [],
data2: [],
currentTab: 0,
}
},
created() {
this.$bus.$on('order', msg => {
console.log("aaaaaaaaaaa4", msg)
this.$refs.paging.reload(true);
});
},
onLoad() {
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
onShow() {
this.$refs.paging.reload(true);
if (typeof this.$mp.page.getTabBar === 'function' && this.$mp.page.getTabBar()) {
this.$mp.page.getTabBar().setData({
selected: 1
})
}
},
onUnload() {
uni.$off('order');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
// 分页的请求
queryList(pageNo, pageSize) {
let _this = this
_this.$api.pickUpCardList({
"current": pageNo,
"size": pageSize,
"params": {
"customerSid": getApp().globalData.sid
}
}).then((resp) => {
// 添加数据源
this.$refs.paging.complete(resp.records)
}).catch(e => {
// 出错了,点击重试
_this.$refs.paging.complete(false);
})
},
bind() {
uni.navigateTo({
url: '/pages/bind/bind_pickUpCard'
})
// uni.navigateTo({
// url: '/pages/home/myHome'
// })
},
detail(item) {
console.log("aaa", item);
if (item.showBtn) {
// 正常
if (item.type == '1') {
console.log("111", item);
// 家庭卡
uni.navigateTo({
url: '/pages/detail/detail_family?sid=' + item.sid
})
}
if (item.type == '2') {
console.log("222", item);
// 亲情卡
uni.navigateTo({
url: '/pages/detail/detail_affeection?sid=' + item.sid
})
}
if (item.type == '3') {
console.log("333", item);
// 企业卡
uni.navigateTo({
url: '/pages/detail/detail_enterprise?sid=' + item.sid
})
}
} else {
// 过期 已完成
if (item.type == '1') {
// 家庭卡
uni.navigateTo({
url: '/pages/detail/detail_family2?sid=' + item.sid
})
}
if (item.type == '2') {
// 亲情卡
uni.navigateTo({
url: '/pages/detail/detail_affeection2?sid=' + item.sid
})
}
if (item.type == '3') {
// 企业卡
uni.navigateTo({
url: '/pages/detail/detail_enterprise2?sid=' + item.sid
})
}
}
},
}
}
</script>
<style>
._ellipsis {
overflow-wrap: break-word;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 85vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/home_bj1.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.btn {
/* margin-top: 97.86vw; */
margin-top: 60vw;
width: 83%;
background-color: #FFF;
border-radius: 45px;
display: flex;
/* height: 13vw; */
flex-direction: row;
justify-content: center;
align-items: center;
/* 加载背景图 */
/* background-image: url(https://supervise.yxtsoft.com/lpk/image/bindBtn_bj1.png); */
/* 让背景图基于容器大小伸缩 */
/* background-size: 100% 100%; */
}
.item {
border-radius: 8px;
width: calc(100% - 5px);
background-color: rgba(255, 248, 248, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 2px 3px 6px 0px rgba(255, 226, 222, 0.62);
}
.item2 {
/* 加载背景图 */
/* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); */
/* 让背景图基于容器大小伸缩 */
/* background-size: 100% 100%; */
/* width: calc(100% - 5px); */
width: calc(100% - 5px);
border-radius: 8px;
background-color: rgba(255, 251, 248, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15);
}
.item3 {
/* 加载背景图 */
/* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_affection.png); */
/* 让背景图基于容器大小伸缩 */
/* background-size: 100% 100%; */
/* width: calc(100% - 5px); */
border-radius: 8px;
background-color: rgba(255, 254, 249, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 2px 3px 6px 0px rgba(224, 218, 168, 0.24);
}
.item4 {
/* 加载背景图 */
/* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); */
/* 让背景图基于容器大小伸缩 */
/* background-size: 100% 100%; */
/* width: calc(100% - 5px); */
width: calc(100% - 5px);
border-radius: 8px;
background-color: rgba(255, 251, 248, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15);
}
.item5 {
/* 加载背景图 */
/* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_enterprise.png); */
/* 让背景图基于容器大小伸缩 */
/* background-size: 100% 100%; */
/* width: calc(100% - 5px); */
width: calc(100% - 5px);
border-radius: 8px;
background-color: rgba(255, 251, 248, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15);
}
.item6 {
/* 加载背景图 */
/* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); */
/* 让背景图基于容器大小伸缩 */
/* background-size: 100% 100%; */
/* width: calc(100% - 5px); */
width: calc(100% - 5px);
border-radius: 8px;
background-color: rgba(255, 251, 248, 1);
color: rgba(16, 16, 16, 1);
box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15);
}
.showBtn {
visibility: hidden;
}
.use {
display: flex;
flex-direction: row;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
color: #FFF;
align-items: center;
background: linear-gradient(89.8deg, rgba(218, 51, 33, 1) -3.76%, rgba(237, 113, 53, 0) 300.05%);
}
.gray {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
transition: filter 0.2s;
}
.oragin {}
uni-page-body,
page {
background: #FFFFFF;
}
</style>ss

138
pages/card/card_bind.vue Normal file
View File

@@ -0,0 +1,138 @@
<template>
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view >
<image src="https://supervise.yxtsoft.com/lpk/image/card_example.png" mode="scaleToFill" style="width: 100%;height: 70vw"></image>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
<view
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;">
<input maxlength="20" placeholder="请输入/扫码 提货编码"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;margin-right: 10px;padding-left: 10px;"
type="number" :value="page.code" @input="onKeyInput1" />
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;" @click="scan" />
</view>
<view
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
</view>
</view>
<view
style="margin: 30px;background-color: #fd3655;width: calc(100% - 60px);border-radius: 100rpx;height: 80rpx;display: flex;flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;"
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定云菜窖卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
}
}
},
onLoad() {
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
uni.navigateBack()
uni.$emit('order', {})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top{
width: 100vw;
height: 70vw;
}
</style>

199
pages/card/card_bind2.vue Normal file
View File

@@ -0,0 +1,199 @@
<template>
<!-- 扫码进入 携带参数 -->
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定云菜窖卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/card_example.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
<view
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;">
<input maxlength="20" placeholder="请输入/扫码 提货编码"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;margin-right: 10px;padding-left: 10px;"
type="number" :value="page.code" @input="onKeyInput1" />
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;" @click="scan" />
</view>
<view
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
</view>
</view>
<view
style="margin: 30px;background-color: #fd3655;width: calc(100% - 60px);border-radius: 100rpx;height: 80rpx;display: flex;flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;"
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定云菜窖卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: ''
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({
success: function(res) {
uni.request({
// 组装请求地址
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
// 需要绑定手机号
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
if (options) {
console.log("options", options)
const q = decodeURIComponent(options.q) // 获取到二维码原始链接内容
console.log("二维码原始链接内容", q)
var code = q.split('=')[1]
// var code = this.getQueryString(q, 'code');// code是你二维码链接里面的参数名
console.log("提货卡编码", code)
this.page.code = code
}
},
methods: {
onKeyInput1: function(event) {
this.page.code = event.target.value
},
onKeyInput2: function(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.cardBind(this.page).then((resp) => {
uni.switchTab({
url: '/pages/card/card'
})
uni.$emit('order', {})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
</style>

138
pages/card/card_bind3.vue Normal file
View File

@@ -0,0 +1,138 @@
<template>
<view style="display: flex;flex-direction: column;background-color: #fff;">
<view class="top">
<NavBar ref="nav" navTitle="绑定企业卡" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view >
<image src="https://supervise.yxtsoft.com/lpk/image/card_example.png" mode="scaleToFill" style="width: 100%;height: 70vw"></image>
</view>
</view>
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
<view
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
<view style="margin: 15px;">绑定云菜窖卡</view>
<view
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;">
<input maxlength="20" placeholder="请输入/扫码 提货编码"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;margin-right: 10px;padding-left: 10px;"
type="number" :value="page.code" @input="onKeyInput1" />
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;" @click="scan" />
</view>
<view
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
</view>
</view>
<view
style="margin: 30px;background-color: #fd3655;width: calc(100% - 60px);border-radius: 100rpx;height: 80rpx;display: flex;flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;"
@click="save">
绑定</view> -->
<view style="display: flex;flex-direction: column;padding:20px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定企业卡</text>
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
<input maxlength="20" placeholder="请输入/扫码"
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
:value="page.code" @input="onKeyInput1" />
<view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view>
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
@click="scan" />
</view>
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
type="number" :value="page.codeKey" @input="onKeyInput2" />
</view>
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
绑定</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
}
}
},
onLoad() {
this.page.customerSid = getApp().globalData.sid
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
methods: {
onKeyInput1(event) {
this.page.code = event.target.value
},
onKeyInput2(event) {
this.page.codeKey = event.target.value
},
scan() {
// 只允许通过相机扫码
let _this = this
uni.scanCode({
onlyFromCamera: true,
success(res) {
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
}
});
},
save() {
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
this.shortToast('请输入或扫描20位提货编码')
return
}
if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
this.shortToast('请输入6位提货密码')
return
}
let _this = this
_this.$api.empcardBind(this.page).then((resp) => {
uni.navigateBack()
uni.$emit('order2', {})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top{
width: 100vw;
height: 70vw;
}
</style>

247
pages/card/card_booking.vue Normal file
View File

@@ -0,0 +1,247 @@
<template>
<!-- 不分页的时候用没有封装 auto 首次使用需要自己在onload里调用 -->
<!-- 页面的几种状态 0 loading 1 错误 2正常 -->
<loading-state ref="pageView" @request="request">
<view>
<image src="../../static/edit_bg.png" style="width: 100%;height: 40vw;z-index: 0;"></image>
<view style="display: flex;flex-direction: column;margin-top: -40vw;">
<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;">
<view style="flex: 1;display: flex;flex-direction: column;z-index: 1;margin-left: 15px;">
<view style="font-size: 17px;color: #FFFFFF;height: 8vw;line-height: 8vw;margin-top: 5vw;">
{{data.state}}
</view>
<view
style="font-size: 12px;color: white;line-height: 7vw;height: 7vw;color: #f1f2f3;box-sizing: border-box;">
{{data.name}}
</view>
<view style="font-size: 12px;color: white;line-height: 4vw;height: 4vw;color: #f1f2f3;">
{{data.time}}
</view>
</view>
<image src='../../static/gift2.png'
style="width: 40px;height: 40px;padding-right: 30px;flex-shrink: 0;">
</image>
</view>
<view
style="background: #FFFFFF;border-radius: 20rpx;z-index: 1;min-height: 14vw;margin-left: 15px;margin-right: 15px;margin-top: 4vw;">
<view style="display: flex;align-items: center;margin-top: 8px;">
<text style="flex-shrink: 0;font-size: 13px;margin-left: 10px;">提货地点</text>
<view
style="display: flex;flex-direction: row;justify-content: space-between;width: 100%;border: 1px solid #EBEEF5;border-radius: 4px;min-height: 35px;margin: 0px 10px;align-items: center;"
@click="address">
<view v-if="stringIsEmpty(data.addressName)"
style="color: #666;font-size: 12px;margin-left: 10px;">请选择提货点</view>
<view v-if="stringIsNotEmpty(data.addressName)"
style="color: #666;font-size: 12px;margin-left: 10px;">{{data.addressName}}</view>
<uni-icons type="bottom" size="14" color="#999"
style="flex-direction: 0;margin: 0px 5px;" />
</view>
</view>
<view
style="display: flex;align-items: center;padding-right: 10px;margin-top: 6px;margin-bottom: 8px;">
<text style="flex-shrink: 0;font-size: 13px;margin-left: 10px;margin-right: 10px;">提货时间</text>
<uni-datetime-picker type="date" v-model="data.reserveDate" style="flex: 1;" :start="data.start"
:end="data.end" @showing='showing' />
</view>
<view
style="display: flex;align-items: center;padding-right: 10px;margin-top: 6px;margin-bottom: 8px;">
<text style="flex-shrink: 0;font-size: 13px;margin-left: 10px;margin-right: 10px; "
decode="true">&ensp;&ensp;</text>
<input placeholder="请输入提货人"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
:value="data.userName" @input="onKeyInput1" />
</view>
<view
style="display: flex;align-items: center;padding-right: 10px;margin-top: 6px;margin-bottom: 8px;">
<text style="flex-shrink: 0;font-size: 13px;margin-left: 10px;margin-right: 10px;">联系电话</text>
<input maxlength="11" placeholder="请输入联系电话"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
type="number" :value="data.userPhone" @input="onKeyInput2" />
</view>
</view>
<view style="background: #FFFFFF;border-radius: 20rpx;padding: 15px;margin: 10px 15px;">
<view
style="display: flex;flex-direction: row;align-items: center;border-bottom: 1rpx #f1f2f3 solid;padding-bottom: 10px;">
<image src="../../static/mingxi.png" style="width: 15px;height: 15px;"></image>
<view style="margin-left: 10px;font-size: 14px;">商品明细</view>
</view>
<view v-for="(item,index) in data.goodsVos" @click="itemClick(item.goodsSid)"
style="display: flex;flex-direction: row;margin-top: 15px;">
<image :src="item.pic" style="width: 60px;height: 60px;flex-shrink: 0;"></image>
<view
style="margin-left: 10px;margin-right: 10px;flex: 1;display: flex;flex-direction: column;justify-content: space-between;align-items: flex-end;">
<text class="text" style="font-weight: 500;width: 100%;">{{item.goods}}
</text>
<text class="text"
style="width: 100%;font-size: 12px; color: #666666;margin-top: 10px;">{{item.remarks}}
</text>
<uni-number-box ref="box" style="margin-top: -25px;" :min="0" :max="item.lnum"
v-model="item.select" :showTextView="page.showTextView"></uni-number-box>
</view>
</view>
</view>
</view>
<view style="height: 60px;"></view>
<view v-if="data.showBtn||data.showRecord"
style="position: fixed;bottom: 0;height: 50px;background: #f3f4f6;border-top: 1rpx #cacaca solid;width: 100%;display: flex;flex-direction: row;box-sizing: border-box;align-items: center;padding-right: 15px;">
<view style="flex: 1;"></view>
<view v-if="data.showRecord" class="btn" style="flex-shrink: 0;color: #191919;" @click="save">
提交预约</view>
</view>
</view>
</loading-state>
</template>
<script>
export default {
data() {
return {
page: {
sid: '',
showTextView: false
},
data: {
time: "",
name: "",
pname: "",
state: "",
showBtn: false,
showRecord: false,
goodsVos: [],
value: "",
select: [],
userName: "",
userPhone: "",
}
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
uni.$on("address", (e) => {
// 相当与下拉刷新
this.data.value = e.sid;
this.data.addressName = e.name;
})
},
onUnload() {
uni.$off('address');
},
methods: {
address() {
uni.navigateTo({
url: '/pages/SelectAddressActivity'
})
},
onKeyInput1: function(event) {
this.data.userName = event.target.value
},
onKeyInput2: function(event) {
this.data.userPhone = event.target.value
},
showing(e) {
this.page.showTextView = e
},
request() {
let _this = this
_this.$api.cardBooking(this.page.sid).then((resp) => {
_this.data = resp
// 成功 2
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
// 错误 1
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
save() {
if (this.stringIsEmpty(this.data.value)) {
this.shortToast('请选择提货地点')
return
}
if (this.stringIsEmpty(this.data.reserveDate)) {
this.shortToast('请选择提货时间')
return
}
if (this.stringIsEmpty(this.data.userName)) {
this.shortToast('请输入提货人员')
return
}
if (this.stringIsEmpty(this.data.userPhone)) {
this.shortToast('请输入手机号码')
return
}
if (this.data.userPhone.length != 11) {
this.shortToast('手机号码格式不对')
return
}
let num = 0;
for (var i = 0; i < this.data.goodsVos.length; i++) {
num += Number(this.data.goodsVos[i].select);
}
if (num == 0) {
this.shortToast('您未选择任何商品')
return
}
let _this = this
_this.$api.cardBookingSave(this.data).then((resp) => {
uni.navigateBack()
uni.$emit('order', {})
uni.$emit('order2', {})
}).catch(e => {
_this.shortToast('发生异常')
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
}
}
}
</script>
<style>
.text {
white-space: normal;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
uni-page-body,
page {
background: #F1F2F3;
}
.btn {
border: 1px solid;
padding-left: 30rpx;
padding-right: 30rpx;
padding-top: 12rpx;
padding-bottom: 12rpx;
border-radius: 50rpx;
height: 15px;
margin-left: 25rpx;
font-size: 26rpx;
}
</style>

604
pages/card/card_detail.vue Normal file
View File

@@ -0,0 +1,604 @@
<template>
<view style="display: flex;flex-direction: column;">
<view class="top">
<NavBar ref="nav" navTitle="详情" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view style="display: flex;flex-direction: column;margin-top: 25vw; margin-left: 5vw;">
<view style="font-size: 17px;color: #fff;height: 8vw;line-height: 8vw;margin-top: 5vw;">
{{data.state}}
</view>
<view
style="font-size: 12px;color: white;line-height: 7vw;height: 7vw;color: #fff;box-sizing: border-box;">
卡号{{data.serialNumber}}
</view>
<view style="font-size: 12px;color: white;line-height: 7vw;height: 7vw;color: #fff;">
{{data.time}}
</view>
</view>
</view>
<view
style="display: flex;flex-direction: row;justify-content: center;
background-color: #fff;height: 25vw; border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: -9.06vw;">
<image src="https://supervise.yxtsoft.com/lpk/image/giftpack.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<text
style="color: #fff;font-size: 18px;z-index: 10;position: absolute;margin-top: 11vw;">{{data.pname}}</text>
</view>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">商品明细</text>
</view>
</view>
<view v-for="(item,index) in data.goodsVos" :key="index" @click="itemClick(item.goodsSid)"
style="display: flex;flex-direction: row;background-color: #fff;padding-left: 10px;padding-right: 10px;">
<view style="display: flex;flex-direction: row;background-color: #fff;padding: 10px 15px;
border-bottom: 1px #F1F2F3 solid; width: 100%;">
<image :src="item.pic" style="width: 60px;height: 60px;flex-shrink: 0;"></image>
<view style="margin-left: 10px;margin-right: 10px;flex: 1;">
<text class="text" style="font-weight: 500;">{{item.goods}}
</text>
<view style="font-size: 12px;color: #666666;margin-top: 5px;">{{item.remarks}}</view>
<view style="display: flex;flex-direction: row;justify-content: space-between;margin-top: 5px;">
<text
style="font-size: 12px;color: #666666;margin-right: 10px;">总数{{item.num}}{{item.unitName}}
</text>
<view style="font-size: 12px;color: #666666;">可预约{{item.lnum}}{{item.unitName}}</view>
</view>
</view>
</view>
</view>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">预约记录</text>
</view>
</view>
<view v-for="(item,index) in data.orderCardVoList" :key="index"
style="display: flex;flex-direction: row;background-color: #fff;padding-left: 10px;padding-right: 10px;">
<view style="display: flex;flex-direction: column;background-color: #fff;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 20px;padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
<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.reserveDate}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<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;">提货地点{{item.store}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<image src="https://supervise.yxtsoft.com/lpk/image/user2.png" mode="aspectFill"
style="width: 20px;height: 20px;">
</image>
<text
style="margin-left: 5px;font-size: 12px; color: #999;">&ensp;&ensp;{{item.userName}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<image src="https://supervise.yxtsoft.com/lpk/image/phone2.png" mode="aspectFill"
style="width: 20px;height: 20px;">
</image>
<text style="margin-left: 5px;font-size: 12px; color: #999;">联系电话{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
<view style="height: 50px;"></view>
<view v-if="data.notRese" style="width: 100%; background-color: #fff;height: 15vw;position: fixed;bottom: 0;overflow:hidden;
display: flex;flex-direction: row;">
<view style="flex: 1;"></view>
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #FF9D33;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog">预约提货</text>
</view>
</loading-state>
<!-- <view>
<image src="../../static/edit_bg.png" style="width: 100%;height: 40vw;z-index: 0;"></image>
<view style="display: flex;flex-direction: column;margin-top: -40vw;">
<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;">
<view style="flex: 1;display: flex;flex-direction: column;z-index: 1;margin-left: 15px;">
<view style="font-size: 17px;color: #FFFFFF;height: 8vw;line-height: 8vw;margin-top: 5vw;">
{{data.state}}
</view>
<view
style="font-size: 12px;color: white;line-height: 7vw;height: 7vw;color: #f1f2f3;box-sizing: border-box;">
{{data.name}}
</view>
<view style="font-size: 12px;color: white;line-height: 4vw;height: 4vw;color: #f1f2f3;">
{{data.time}}
</view>
</view>
<image src='../../static/gift2.png'
style="width: 40px;height: 40px;padding-right: 30px;flex-shrink: 0;">
</image>
</view>
<view
style="background: #FFFFFF;border-radius: 20rpx;z-index: 1;height: 14vw;margin-left: 15px;margin-right: 15px;margin-top: 4vw;display: flex;align-items: center;">
<image src="../../static/pName.png" style="width: 15px;height: 15px;margin-left: 15px;"></image>
<view style="margin-left: 15px;font-size: 14px;">{{data.pname}}</view>
</view>
<view style="background: #FFFFFF;border-radius: 20rpx;padding: 15px;margin: 10px 15px;">
<view
style="display: flex;flex-direction: row;align-items: center;border-bottom: 1rpx #f1f2f3 solid;padding-bottom: 10px;">
<image src="../../static/mingxi.png" style="width: 15px;height: 15px;"></image>
<view style="margin-left: 10px;font-size: 14px;">商品明细</view>
</view>
<view v-for="(item,index) in data.goodsVos" :key="index" @click="itemClick(item.goodsSid)"
style="display: flex;flex-direction: row;margin-top: 15px;">
<image :src="item.pic" style="width: 60px;height: 60px;flex-shrink: 0;"></image>
<view style="margin-left: 10px;margin-right: 10px;flex: 1;">
<text class="text" style="font-weight: 500;">{{item.goods}}
</text>
<view style="font-size: 12px;color: #666666;margin-top: 10px;">{{item.remarks}}</view>
</view>
<view style="display: flex;flex-direction: row;">
<text style="font-size: 12px;color: #666666;margin-right: 10px;">总数{{item.num}}
</text>
<view style="font-size: 12px;color: #666666;">剩余{{item.lnum}}</view>
</view>
</view>
</view>
</view>
<view style="height: 60px;"></view>
<view v-if="data.showBtn||data.showRecord"
style="position: fixed;bottom: 0;height: 50px;background: #f3f4f6;border-top: 1rpx #cacaca solid;width: 100%;display: flex;flex-direction: row;box-sizing: border-box;align-items: center;padding-right: 15px;">
<view style="flex: 1;"></view>
<view v-if="data.showRecord" class="btn" style="flex-shrink: 0;color: #191919;"
@click.stop="showRecord(page.sid)">
预约记录</view>
<view v-if="data.showBtn" class="btn" style="flex-shrink: 0;color: royalblue;"
@click.stop="booking(page.sid)">预约提货
</view>
</view>
</view> -->
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal' @click.stop="colseDialog()"></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal'>
<scroll-view scroll-y="true" style="height: 100%;width: 100%; padding: 20px; " bindscrolltoupper="upper"
bindscrolltolower="lower" bindscroll="scroll">
<view style="display: flex;flex-direction: column;margin-top: 10px;">
<text>提货地点</text>
<view
style="margin-top: 10px;background:#F5F5F5 ; display: flex;flex-direction: row;justify-content: space-between;width: 89.5%;border-radius: 4px;min-height: 35px;align-items: center;"
@click="address">
<view v-if="stringIsEmpty(data.addressName)"
style="color: #666;font-size: 12px;margin-left: 10px;">
请选择提货点</view>
<view v-if="stringIsNotEmpty(data.addressName)"
style="color: #666;font-size: 12px;margin-left: 10px;">{{data.addressName}}</view>
<uni-icons type="bottom" size="14" color="#999" style="flex-direction: 0;margin: 0px 5px;" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;">
<text>提货时间</text>
<view style="display: flex;align-items: center;margin-top: 6px;width: 89.5%;">
<uni-datetime-picker type="date" v-model="data.reserveDate" style="background: #F8F8F8;"
:start="data.start" :end="data.end" @showing='showing' :disabledDate="disabledDate" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;">
<text>提货人</text>
<view style="display: flex;align-items: center;margin-top: 6px;width: 89.5%;">
<input placeholder="请输入提货人"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
:value="data.userName" @input="onKeyInput1" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;">
<text>联系电话</text>
<view style="display: flex;align-items: center;margin-top: 6px;width: 89.5%;">
<input maxlength="11" placeholder="请输入联系电话"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
type="number" :value="data.userPhone" @input="onKeyInput2" />
</view>
</view>
<view style="background: #F5F5F5; border-radius: 5px;margin-top: 15px;width: 89.5%; ">
<view v-for="(item,index) in data.goodsVos"
style="display: flex;flex-direction: row;margin-top: 15px; margin-bottom: 10px;">
<view style="margin-left: 10px;margin-right: 10px;flex: 1;display: flex;flex-direction: column;justify-content: space-between;align-items: flex-end;
padding: 10px;">
<text class="text" style="font-weight: 500;width: 100%;font-size: 12px;">{{item.goods}}
</text>
<uni-number-box ref="box" style="margin-top: -20px;" :min="0" :max="item.lnum"
v-model="item.select" :showTextView="page.showTextView"></uni-number-box>
</view>
</view>
</view>
<view
style=" display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 100px;width: 100%;">
<text
style="border-radius:30px; font-size: 14px;color: #666;background-color: #F5F5F5; padding: 5px 30px;margin-right: 20px;"
@click.stop="colseDialog()">取消</text>
<text
style="border-radius: 30px; font-size: 14px;color: #fff; background-color: #FF9D33; padding: 5px 30px;margin-left: 20px;"
@click="save">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showModal: false,
page: {
sid: '',
showTextView: false,
startHeight: 0,
endHeight: 0
},
data: {
time: "",
name: "",
pname: "",
state: "",
notRese: false,
showBtn: false,
showRecord: false,
goodsVos: [],
value: "",
userName: "",
userPhone: "",
},
disabledDate: [
// '2023-12-16'
],
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
this.getSun()
uni.$on("order2", (e) => {
this.$nextTick(() => {
this.$refs.pageView.setLoadState(0)
})
this.request();
})
uni.$on("address", (e) => {
// 相当与下拉刷新
this.data.value = e.sid;
this.data.addressName = e.name;
})
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
onUnload() {
uni.$off('order');
uni.$off('address');
},
methods: {
showDialog() {
this.showModal = true
},
colseDialog() {
this.showModal = false
},
address() {
uni.navigateTo({
url: '/pages/SelectAddressActivity'
})
},
onKeyInput1: function(event) {
this.data.userName = event.target.value
},
onKeyInput2: function(event) {
this.data.userPhone = event.target.value
},
showing(e) {
this.page.showTextView = e
},
save() {
if (this.stringIsEmpty(this.data.value)) {
this.shortToast('请选择提货地点')
return
}
if (this.stringIsEmpty(this.data.reserveDate)) {
this.shortToast('请选择提货时间')
return
}
if (this.stringIsEmpty(this.data.userName)) {
this.shortToast('请输入提货人员')
return
}
if (this.stringIsEmpty(this.data.userPhone)) {
this.shortToast('请输入手机号码')
return
}
if (this.data.userPhone.length != 11) {
this.shortToast('手机号码格式不对')
return
}
let num = 0;
for (var i = 0; i < this.data.goodsVos.length; i++) {
num += Number(this.data.goodsVos[i].select);
}
if (num == 0) {
this.shortToast('您未选择任何商品')
return
}
let _this = this
_this.$api.cardBookingSave(this.data).then((resp) => {
uni.navigateBack()
uni.$emit('order', {})
}).catch(e => {
_this.shortToast(e.msg)
})
},
request() {
let _this = this
_this.$api.cardDetail(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
getSun() {
let _this = this
_this.$api.isSaturAndSun(this.page.sid).then((resp) => {
// console.log("aaa",resp)
this.disabledDate = resp
}).catch(e => {
})
},
showRecord(sid) {
uni.navigateTo({
url: '/pages/card/card_record?sid=' + sid
})
},
booking(sid) {
uni.navigateTo({
url: '/pages/card/card_booking?sid=' + sid
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
}
}
}
</script>
<style>
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/normal.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.text {
white-space: normal;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
uni-page-body,
page {
background: #F1F2F3;
}
.btn {
border: 1px solid;
padding-left: 30rpx;
padding-right: 30rpx;
padding-top: 12rpx;
padding-bottom: 12rpx;
border-radius: 50rpx;
height: 15px;
margin-left: 25rpx;
font-size: 26rpx;
}
/* 弹窗样式 */
.model {
position: absolute;
width: 100%;
height: 100%;
background: #000;
z-index: 999;
opacity: 0.5;
top: 0;
left: 0;
}
.modalDlg {
/* 设置超出滚动 */
overflow: auto;
width: 100%;
position: fixed;
top: 50vw;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
background-color: #fff;
border-top-right-radius: 20px;
border-top-left-radius: 20px;
display: flex;
flex-direction: column;
}
.windowRow {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding-bottom: 15rpx;
width: 100%;
}
.userTitle {
font-size: 42rpx;
}
.back {
text-align: center;
color: #f0a500;
font-size: 30rpx;
}
.wishName {
width: 100%;
justify-content: center;
flex-direction: row;
display: flex;
margin: 40rpx 0rpx;
}
.wish_put {
width: 100%;
border: #ededef 1rpx solid;
background-color: #f6f7fb;
border-radius: 12rpx;
padding: 30rpx 20rpx;
margin: 20rpx 0rpx;
}
.holder_cls {
color: #909399;
}
.wishbnt {
background-color: #fec600;
text-align: center;
border-radius: 50rpx;
padding: 25rpx;
color: white;
}
/*弹窗样式结束*/
/* 下面的姓名样式,不要也没什么影响 */
.jiantou {
width: 35rpx;
height: 35rpx;
margin-left: 10rpx;
}
.fenge {
margin-bottom: 30rpx;
}
.xian {
border-bottom: #e5e5e5 1rpx solid;
}
.yellow {
color: #f0a500;
font-weight: 700;
}
.box {
background-color: white;
padding: 0rpx 25rpx;
display: flex;
flex-direction: column;
}
.row {
height: 120rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.you {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.zhushi {
font-size: 28rpx;
color: #808080;
}
/* 下面的姓名样式结束 */
</style>

353
pages/card/card_detail2.vue Normal file
View File

@@ -0,0 +1,353 @@
<template>
<view style="display: flex;flex-direction: column;">
<view class="top">
<NavBar ref="nav" navTitle="详情" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<view style="display: flex;flex-direction: column;margin-top: 25vw; margin-left: 5vw;">
<view style="font-size: 17px;color: #fff;height: 8vw;line-height: 8vw;margin-top: 5vw;">
{{data.state}}
</view>
<view
style="font-size: 12px;color: white;line-height: 7vw;height: 7vw;color: #fff;box-sizing: border-box;">
卡号{{data.serialNumber}}
</view>
<view style="font-size: 12px;color: white;line-height: 7vw;height: 7vw;color: #fff;">
{{data.time}}
</view>
</view>
</view>
<view
style="display: flex;flex-direction: row;justify-content: center;
background-color: #fff;height: 25vw; border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: -9.06vw;">
<image src="https://supervise.yxtsoft.com/lpk/image/giftpack.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<text style="color: #fff;font-size: 18px;z-index: 10;position: absolute;margin-top: 11vw;">{{data.pname}}</text>
</view>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">商品明细</text>
</view>
</view>
<view v-for="(item,index) in data.goodsVos" :key="index" @click="itemClick(item.goodsSid)"
style="display: flex;flex-direction: row;background-color: #fff;padding-left: 10px;padding-right: 10px;">
<view style="display: flex;flex-direction: row;background-color: #fff;padding: 10px 15px;
border-bottom: 1px #F1F2F3 solid; width: 100%;">
<image :src="item.pic" style="width: 60px;height: 60px;flex-shrink: 0;"></image>
<view style="margin-left: 10px;margin-right: 10px;flex: 1;">
<text class="text" style="font-weight: 500;">{{item.goods}}
</text>
<view style="font-size: 12px;color: #666666;margin-top: 5px;">{{item.remarks}}</view>
<view style="display: flex;flex-direction: row;justify-content: space-between;margin-top: 5px;">
<text
style="font-size: 12px;color: #666666;margin-right: 10px;">总数{{item.num}}{{item.unitName}}
</text>
<view style="font-size: 12px;color: #666666;">可预约{{item.lnum}}{{item.unitName}}</view>
</view>
</view>
</view>
</view>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">预约记录</text>
</view>
</view>
<view v-for="(item,index) in data.orderCardVoList" :key="index" @click="itemClick(item.goodsSid)"
style="display: flex;flex-direction: row;background-color: #fff;padding-left: 10px;padding-right: 10px;">
<view style="display: flex;flex-direction: column;background-color: #fff;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 20px;padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
<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.reserveDate}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<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;">提货地点{{item.store}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<image src="https://supervise.yxtsoft.com/lpk/image/user2.png" mode="aspectFill"
style="width: 20px;height: 20px;">
</image>
<text
style="margin-left: 5px;font-size: 12px; color: #999;">&ensp;&ensp;{{item.userName}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<image src="https://supervise.yxtsoft.com/lpk/image/phone2.png" mode="aspectFill"
style="width: 20px;height: 20px;">
</image>
<text style="margin-left: 5px;font-size: 12px; color: #999;">联系电话{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
<view style="height: 50px;"></view>
</loading-state>
</view>
</template>
<script>
export default {
data() {
return {
page: {
sid: '',
startHeight: 0,
endHeight: 0
},
data: {
time: "",
name: "",
pname: "",
state: "",
notRese:false,
showBtn: false,
showRecord: false,
goodsVos: [],
value: "",
userName: "",
userPhone: "",
}
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
uni.$on("order2", (e) => {
this.$nextTick(() => {
this.$refs.pageView.setLoadState(0)
})
this.request();
})
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
onUnload() {
uni.$off('order2');
},
methods: {
request() {
let _this = this
_this.$api.cardDetail(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
}
}
</script>
<style>
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/abnormal.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.text {
white-space: normal;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
uni-page-body,
page {
background: #F1F2F3;
}
.btn {
border: 1px solid;
padding-left: 30rpx;
padding-right: 30rpx;
padding-top: 12rpx;
padding-bottom: 12rpx;
border-radius: 50rpx;
height: 15px;
margin-left: 25rpx;
font-size: 26rpx;
}
/* 弹窗样式 */
.model {
position: absolute;
width: 100%;
height: 100%;
background: #000;
z-index: 999;
opacity: 0.5;
top: 0;
left: 0;
}
.modalDlg {
/* 设置超出滚动 */
overflow: auto;
width: 90%;
position: fixed;
top: 50vw;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
margin: 0 auto;
padding: 35rpx;
background-color: #fff;
border-radius: 20rpx;
display: flex;
flex-direction: column;
}
.windowRow {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding-bottom: 15rpx;
width: 100%;
}
.userTitle {
font-size: 42rpx;
}
.back {
text-align: center;
color: #f0a500;
font-size: 30rpx;
}
.wishName {
width: 100%;
justify-content: center;
flex-direction: row;
display: flex;
margin: 40rpx 0rpx;
}
.wish_put {
width: 100%;
border: #ededef 1rpx solid;
background-color: #f6f7fb;
border-radius: 12rpx;
padding: 30rpx 20rpx;
margin: 20rpx 0rpx;
}
.holder_cls {
color: #909399;
}
.wishbnt {
background-color: #fec600;
text-align: center;
border-radius: 50rpx;
padding: 25rpx;
color: white;
}
/*弹窗样式结束*/
/* 下面的姓名样式,不要也没什么影响 */
.jiantou {
width: 35rpx;
height: 35rpx;
margin-left: 10rpx;
}
.fenge {
margin-bottom: 30rpx;
}
.xian {
border-bottom: #e5e5e5 1rpx solid;
}
.yellow {
color: #f0a500;
font-weight: 700;
}
.box {
background-color: white;
padding: 0rpx 25rpx;
display: flex;
flex-direction: column;
}
.row {
height: 120rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.you {
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.zhushi {
font-size: 28rpx;
color: #808080;
}
/* 下面的姓名样式结束 */
</style>

101
pages/card/card_record.vue Normal file
View File

@@ -0,0 +1,101 @@
<template>
<loading-state ref="pageView" @request="request">
<view v-for="(item,index) in data" style="display: flex;flex-direction: column;margin-top: 15px; margin-left: 15px; margin-right: 15px;">
<view
style="display: flex;flex-direction: column;border: 1px solid #e29a68;width: 100%;border-radius: 20rpx;margin-top: 8px;"
@click="detail(item.orderSid)">
<view class="use">
<image style="width: 70rpx;height: 70rpx;position: absolute;right: 40px;"
src="../../static/card_line.png"></image>
<image src="../../static/gift.png" style="width: 30px;height: 30px;padding-left: 6px;"></image>
<view style="flex: 1;display: flex;flex-direction: column;z-index: 1;">
<view style="font-size: 14px;padding: 2px;padding-left: 5px;padding-top: 7px;">{{item.code}}
</view>
</view>
<view
style="flex-shrink: 0;padding: 9px;font-size: 13px;z-index: 1;font-weight: 600;">{{item.reserveDate}}
</view>
</view>
<view
style="display: flex;flex-direction: column; padding: 10px;border-bottom-left-radius: 20rpx;border-bottom-right-radius: 20rpx;background-color: #fdf0ee;">
<view style="width: 100%;display: flex;flex-direction: row;align-items: center;">
<text>礼包类型</text>
<text>{{item.bagName}}</text>
</view>
<view style="width: 100%;display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text>提货门店</text>
<text>{{item.store}}</text>
</view>
</view>
</view>
</view>
</loading-state>
</template>
<script>
export default {
data() {
return {
page: {
sid: '',
},
data: [
]
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
},
methods: {
request() {
let _this = this
_this.$api.orderByCardSid(this.page.sid).then((resp) => {
_this.data = resp
// 成功 2
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
// 无数据
if(_this.data.length==0){
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(100)
})
}
}).catch(e => {
// 错误 1
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
detail(sid) {
uni.navigateTo({
url: '/pages/card/card_record_detail?sid=' + sid
})
},
}
}
</script>
<style>
.use {
display: flex;
flex-direction: row;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
color: #FFF;
align-items: center;
background: linear-gradient(89.8deg, rgba(218, 51, 33, 1) -3.76%, rgba(237, 113, 53, 0) 300.05%);
}
</style>

View File

@@ -0,0 +1,138 @@
<template>
<loading-state ref="pageView" @request="request">
<view>
<image src="../../static/edit_bg.png" style="width: 100%;height: 40vw;z-index: 0;"></image>
<view style="display: flex;flex-direction: column;margin-top: -40vw;">
<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;">
<view style="flex: 1;display: flex;flex-direction: column;z-index: 1;margin-left: 15px;">
<view style="font-size: 17px;color: #FFFFFF;height: 8vw;line-height: 8vw;margin-top: 5vw;">
{{data.state}}
</view>
<view
style="font-size: 12px;color: white;line-height: 7vw;height: 7vw;color: #f1f2f3;box-sizing: border-box;">
{{data.name}}
</view>
<view style="font-size: 12px;color: white;line-height: 4vw;height: 4vw;color: #f1f2f3;">
{{data.time}}
</view>
</view>
<image src='../../static/gift2.png'
style="width: 40px;height: 40px;padding-right: 30px;flex-shrink: 0;">
</image>
</view>
<view
style="background: #FFFFFF;border-radius: 20rpx;z-index: 1;height: 20vw;margin-left: 15px;margin-right: 15px;margin-top: 4vw;display: flex;
flex-direction: column; ">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<image src="../../static/pName.png" style="width: 15px;height: 15px;margin-left: 15px;"></image>
<view style="margin-left: 15px;font-size: 14px;">{{data.pname}}</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<image src="../../static/pName.png" style="width: 15px;height: 15px;margin-left: 15px;"></image>
<view style="margin-left: 15px;font-size: 14px;">{{data.reserveDate}}</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<image src="../../static/pName.png" style="width: 15px;height: 15px;margin-left: 15px;"></image>
<view style="margin-left: 15px;font-size: 14px;">{{data.store}}</view>
</view>
</view>
<view style="background: #FFFFFF;border-radius: 20rpx;padding: 15px;margin: 10px 15px;">
<view
style="display: flex;flex-direction: row;align-items: center;border-bottom: 1rpx #f1f2f3 solid;padding-bottom: 10px;">
<image src="../../static/mingxi.png" style="width: 15px;height: 15px;"></image>
<view style="margin-left: 10px;font-size: 14px;">商品明细</view>
</view>
<view v-for="(item,index) in data.goodsVos"
style="display: flex;flex-direction: row;margin-top: 15px;">
<image :src="item.pic" style="width: 60px;height: 60px;flex-shrink: 0;"></image>
<view style="margin-left: 10px;margin-right: 10px;flex: 1;">
<text class="text" style="font-weight: 500;">{{item.goods}}
</text>
<view style="font-size: 12px;color: #666666;">提货数量{{item.orderNum}}</view>
</view>
</view>
</view>
</view>
<view style="height: 60px;"></view>
</view>
</loading-state>
</template>
<script>
export default {
data() {
return {
page: {
sid: ''
},
data: {
time: "",
name: "",
pname: "",
state: "",
showBtn: false,
showRecord: false,
goodsVos: []
}
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
},
methods: {
request() {
let _this = this
_this.$api.orderDetails(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
}
}
</script>
<style>
.text {
white-space: normal;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
uni-page-body,
page {
background: #F1F2F3;
}
.btn {
border: 1px solid;
padding-left: 30rpx;
padding-right: 30rpx;
padding-top: 12rpx;
padding-bottom: 12rpx;
border-radius: 50rpx;
height: 15px;
margin-left: 25rpx;
font-size: 26rpx;
}
</style>