预约提货商城小程序

This commit is contained in:
liupopo
2024-01-15 13:52:54 +08:00
commit 5a66559820
466 changed files with 78084 additions and 0 deletions

View File

@@ -0,0 +1,244 @@
<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>

View File

@@ -0,0 +1,142 @@
<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/bind_bj3.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: #5C9EFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #89DAFB; 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,#89DAFB,#5C9EFD); 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>
//引入bus
import bus from '@/common/bus';
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) => {
bus.$emit('order3', "监听回调");
uni.navigateBack()
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -0,0 +1,205 @@
<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/bind_bj3.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: #5C9EFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #89DAFB; 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,#89DAFB,#5C9EFD); 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>
//引入bus
import bus from '@/common/bus';
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
getApp().globalData.token = res.data.data.token
uni.setStorageSync("satoken",res.data.data.token)
console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token);
_this.page.customerSid = 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.empcardBind(this.page).then((resp) => {
bus.$emit('order3', "监听回调");
uni.switchTab({
url: '/pages/home/corporateCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,157 @@
<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/bind_bj2.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: #FF3F22; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF8585; 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,#FF8585,#FF3F22); 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>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
this.page.code = options.code
this.page.codeKey = options.codeKey
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) => {
bus.$emit('order2', "监听回调");
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/giftCard'
})
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -0,0 +1,202 @@
<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/bind_bj2.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: #FF3F22; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF8585; 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,#FF8585,#FF3F22); 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>
//引入bus
import bus from '@/common/bus';
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) => {
bus.$emit('order2', "监听回调");
uni.switchTab({
url: '/pages/home/giftCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,160 @@
<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/bind_bj1.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>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
this.page.code = options.code
this.page.codeKey = options.codeKey
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) => {
bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/personCard'
})
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -0,0 +1,202 @@
<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/bind_bj1.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>
//引入bus
import bus from '@/common/bus';
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) => {
bus.$emit('order', "监听回调");
uni.switchTab({
url: '/pages/home/personCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,160 @@
<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/bind_bj.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>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
code: '',
codeKey: '',
customerSid: '',
startHeight: 0,
endHeight: 0
},
}
},
onLoad(options) {
this.page.code = options.code
this.page.codeKey = options.codeKey
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.pickUpCardBind(this.page).then((resp) => {
bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
} else {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
.top {
width: 100vw;
height: 70vw;
}
</style>

View File

@@ -0,0 +1,202 @@
<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/bind_bj.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>
//引入bus
import bus from '@/common/bus';
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.pickUpCardBind(this.page).then((resp) => {
bus.$emit('order', "监听回调");
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}).catch(e => {
_this.longToast(e.msg)
})
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,241 @@
<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 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>
</z-paging>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: {
remarks: '',
startHeight: 0,
endHeight: 0
},
data: [],
}
},
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
})
}
}
}
}
</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;
}
</style>

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

@@ -0,0 +1,249 @@
<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>
//引入bus
import bus from '@/common/bus';
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) => {
bus.$emit('order', "监听回调");
uni.navigateBack()
}).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>

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

@@ -0,0 +1,673 @@
<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 style="margin-bottom: 10px;">
<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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">转赠信息</text>
</view>
</view>
<view style="margin-bottom: 50px;">
<view v-if="data.empCardGift!=null" style="display: flex;flex-direction: row;background-color: #fff;
border-bottom: 1px #F1F2F3 solid; padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/giftNormal.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text
style="font-size: 12px; color: #333;margin-top: 5px;">福礼卡编码{{data.empCardGift.code}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{data.empCardGift.codeKey}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{data.empCardGift.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">{{data.empCardGift.goods}}</text>
<button v-show="data.empCardGift.isShare=='1'" class='sharebtn'
:data-info="data.empCardGift" open-type="share">分享</button>
<button v-show="data.empCardGift.isShare=='2'" class='sharebtn2'
:data-info="data.empCardGift" open-type="share">已分享</button>
<button v-show="data.empCardGift.isShare=='3'" class='sharebtn3'>已绑定</button>
</view>
</view>
</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;">
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #FF9D33;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog2">转赠卡券</text>
<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 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="flex: 1;background: #F8F8F8;"
:start="data.start" :end="data.end" :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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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 class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click.stop="colseDialog2()"></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal2'>
<scroll-view scroll-y="true" style="height: 100%; width: 100%; box-sizing: border-box;
" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>备注说明</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<textarea placeholder="请输入" :disable-default-padding='true' :fixed="true" style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;min-height: 50px;line-height: 20px;padding: 10px;
white-space: pre-wrap;
word-wrap: break-word;" :value="info.remarks" @input="onKeyInput3" />
</view>
</view>
<view style="background: #F5F5F5; border-radius: 5px;;margin: 20px;">
<view v-for="(item,index) in data.goodsVos"
style="display: flex;flex-direction: row;margin-top: 15px; margin-bottom: 10px;width: 100%;">
<view style="margin-left: 10px;margin-right: 10px;flex: 1;
display: flex;flex-direction: row; align-items: center;
padding: 10px;width: 100%; justify-content: space-between;">
<text style="font-weight: 500;font-size: 14px; ">{{item.goods}}
</text>
<text
style="font-weight: 500;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<!-- <uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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="colseDialog2()">取消</text>
<text
style="border-radius: 30px; font-size: 14px;color: #fff; background-color: #FF9D33; padding: 5px 30px;margin-left: 20px;"
@click="save2()">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
showModal: false,
showModal2: false,
page: {
sid: '',
startHeight: 0,
endHeight: 0
},
data: {
time: "",
name: "",
pname: "",
state: "",
notRese: false,
showBtn: false,
showRecord: false,
goodsVos: [],
value: "",
userName: "",
userPhone: "",
},
disabledDate: [
// '2023-12-16'
],
info: {
empCardSid: "",
remarks: "",
goodsVoList: []
}
}
},
mounted() {
uni.$on("order", (e) => {
this.$nextTick(() => {
this.$refs.pageView.setLoadState(0)
})
this.request();
})
uni.$on("address", (e) => {
// 相当与下拉刷新
this.data.value = e.sid;
this.data.addressName = e.name;
})
},
onLoad(options) {
this.page.sid = options.sid
this.request()
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
},
showDialog2() {
this.showModal2 = true
},
colseDialog() {
this.showModal = false
},
colseDialog2() {
this.showModal2 = 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
},
onKeyInput3: function(event) {
this.info.remarks = event.target.value
},
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) => {
bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
save2() {
let _this = this
this.info.empCardSid = this.page.sid,
this.info.goodsVoList = this.data.goodsVos,
console.log("info>>", this.info);
_this.$api.generateEmpCard(this.info).then((resp) => {
bus.$emit('order', "监听回调");
uni.navigateBack()
}).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)
})
this.getSun()
}).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
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
return {
title: '汇融惠享-云菜窖',
path: '/pages/bind/bind_giftCard?code=' + data.code + '&codeKey=' + data.codeKey,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareGift.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 20vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj1.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;
}
</style>

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

@@ -0,0 +1,487 @@
<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 style="margin-bottom: 10px;">
<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>
<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 style="margin-bottom: 50px;">
<view v-if="data.empCardGift!=null" style="display: flex;flex-direction: row;background-color: #fff;
border-bottom: 1px #F1F2F3 solid;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/welfare_Card.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text
style="font-size: 12px; color: #333;margin-top: 5px;">福礼卡编码{{data.empCardGift.code}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{data.empCardGift.codeKey}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{data.empCardGift.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">{{data.empCardGift.goods}}</text>
<button v-show="data.empCardGift.isShare=='1'" class='sharebtn'
:data-info="data.empCardGift" open-type="share">分享</button>
<button v-show="data.empCardGift.isShare=='2'" class='sharebtn2'
:data-info="data.empCardGift" open-type="share">已分享</button>
<button v-show="data.empCardGift.isShare=='3'" class='sharebtn3'>已绑定</button>
</view>
</view>
</view>
</view>
</view>
<view style="height: 50px;"></view>
</loading-state>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
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("order", (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('order');
},
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)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
return {
title: '汇融惠享-云菜窖',
path: '/pages/bind/bind_giftCard?code=' + data.code + '&codeKey=' + data.codeKey,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareGift.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 20vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj4.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>

View File

@@ -0,0 +1,284 @@
1<template>
<view style="display: flex;flex-direction: column; height: 100vh;box-sizing: border-box ; background-color: #fff;" id="page">
<view class="top">
<NavBar ref="nav" navTitle="详情" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
</view>
<view
style="margin-top: -15vh; background-color: #fff;height: 20vh;border-top-left-radius: 25px;border-top-right-radius: 25px;">
<loading-state ref="pageView" @request="request">
<view style="display: flex;flex-direction: row;
margin:20px 20px 0px 20px;padding-bottom: 10px; border-bottom: 2px #EFEFEF solid; justify-content: space-between;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9900; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFCC7F; border-radius: 50%;width: 12px;height: 12px;"></view>
<text
style="margin-left: 8px;font-size: 16px;color: #FF9900;font-weight: 600;font-family: sans-serif;">{{page.name}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-right: 10px;">
<view style="color: #888;font-size: 12px;">定制</view>
<input type="number" @input="numbers" v-model="page.number" maxlength="3"
style="font-size: 12px; border: 1px #AEAEAE solid;border-radius: 5px;text-align: center; width: 25px;margin-left: 5px;margin-right: 5px;padding-left: 3px;padding-right: 3px;" />
<view style="color: #888;font-size: 12px;">个菜窖</view>
</view>
</view>
<view v-for="(item,index) in data.goods" :key="index" @click="itemClick(item.goodsSid)"
style="display: flex;flex-direction: column;margin-top: 14px; ">
<view :style="{'border-bottom':(index===data.goods.length-1 ? 'none':'1px #EFEFEF solid')}" style="display: flex;flex-direction: column;
margin-left: 20px;margin-right: 20px;padding-bottom: 10px;">
<view
style=" display: flex;flex-direction: row;align-items: center; margin-right: 10px;margin-top: 5px; margin-left: 10px;">
<image :src='item.iconUrl' style="width: 70px;height: 70px;" mode="aspectFit"></image>
<view style="display: flex;flex-direction: column;margin-left: 20px;width: 100%;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text
style="flex: 1;margin-right: 10px;color: #000;font-size: 16px;">{{item.name}}</text>
<text style="color: #888;font-size: 14px;">{{item.goodsNumber}}</text>
</view>
<text style="color: #AEAEAE;font-size: 12px;margin-top: 5px;line-height: 20px;">{{item.remark}}</text>
<view
style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;align-items: center;">
<view style="display: flex;flex-direction: row;height: 20px;align-items: center;">
<text style="border: 1px #EE752F solid; border-radius: 10px; color:#EE752F ; font-size: 10px;
margin-right: 20px;padding: 0px 5px;">{{convertPrice(item.jprice)}}/{{item.specificationUnit}}</text>
<text
style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 10px;;padding: 0px 5px;">{{item.weight}}/{{item.unitName}}</text>
</view>
<text style="color: #FF5006;font-size: 15px;">{{convertPrice(item.totalValue)}}</text>
</view>
</view>
</view>
</view>
</view>
<view style="height: 100px;background: #fff; "></view>
<view style="background-color: #fff; padding: 10px 20px;position: fixed;bottom: 0;overflow:hidden;
display: flex;flex-direction: row; width: 100%;flex-shrink: 1; border-top: 1px #F0F0F0 solid;">
<view style="flex: 1; display: flex;flex-direction: row;align-items: center; margin-right: 30px;
justify-content: space-between;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="color: #888;font-size: 14px;">合计</text>
<text style="color: #F0752F;font-size: 18px;">{{convertPrice(page.price)}}</text>
</view>
</view>
<text
style="background: #EE752F; text-align: center; color: #fff; border-radius: 5px;padding: 5px 20px; margin-right: 40px; "
@click="settlement()">结算入窖</text>
</view>
</loading-state>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
sid: '',
name: "",
startHeight: 0,
endHeight: 0,
number: "1",
price: ""
},
data: {
goods: []
}
}
},
onLoad(options) {
this.page.sid = options.sid
this.page.name = options.name
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
this.request()
uni.$on("pay", (e) => {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
})
},
onUnload() {
uni.$off('pay');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
request() {
let _this = this
_this.$api.getGiftBagBySid(this.page.sid).then((resp) => {
_this.data = resp
this.getPrice()
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
numbers(event) {
this.page.number = event.target.value
this.getPrice()
},
getPrice() {
if (this.data.price && this.page.number)
this.page.price = Number(this.data.price * this.page.number).toFixed(2)
else
this.page.price = "0.00"
},
settlement() {
// 支付
if (!Number(this.page.number) > 0) {
this.shortToast('请输入要定制几份云菜窖')
return
}
let list = []
for (var i = 0; i < this.data.goods.length; i++) {
var item = this.data.goods[i]
if (item.goodsNumber > 0)
list.push({
goodsSid: item.goodsSid,
goodsName: item.name,
partNumber: item.goodsNumber,
numofPart: item.weight,
priceUnit: item.jprice,
pricePart: item.price,
})
}
// console.log("ddd", list);
if(list.length==0){
this.shortToast('请添加商品')
return
}
var params = {
customerSid: getApp().globalData.sid,
cardNumber: this.page.number,
totalTee: this.page.price,
ordOrderDetailsVoList: list
}
// console.log("params", params);
let _this = this
_this.$api.createOrder(params).then((resp) => {
// console.log("resp", resp);
this.$pay(resp)
}).catch(e => {
})
// var data = {
// "price": "0.01",
// "trade_no_url": {
// "url": "http://192.168.2.110:7777/order/orderQuery",
// "params": {
// "mainSid": "954fbec1-b12e-4f29-87c1-4d9ff6332e7c"
// }
// },
// "pay_url": {
// "url": "http://192.168.2.110:7777/order/pay ",
// "params": {
// "mainSid": "954fbec1-b12e-4f29-87c1-4d9ff6332e7c"
// }
// },
// "order_url": {
// "page": "/pages/index2/index2",
// "params": {}
// },
// "orderId": "288320940398",
// "remainder": 96,
// "goods": "无骨鸡柳等3件商品",
// "bus": [
// "pay"
// ]
// }
}
}
}
</script>
<style>
.top {
width: 100vw;
/* height: 126.66vw; */
height: 95vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/home_bj1.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
</style>

View File

@@ -0,0 +1,305 @@
<template>
<view style="display: flex;flex-direction: column; height: 100vh;box-sizing: border-box; background-color: #fff;"
id="page">
<view class="top">
<NavBar ref="nav" navTitle="详情" :showIcon="true" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
</view>
<view
style="margin-top: -15vh; background-color: #fff;height: 20vh;border-top-left-radius: 25px;border-top-right-radius: 25px;">
<loading-state ref="pageView" @request="request">
<view style="display: flex;flex-direction: column;
margin:20px 10px 0px 20px;padding-bottom:10px; border-bottom: 2px #EFEFEF solid;">
<view
style="display: flex;flex-direction: row;align-items: center; justify-content: space-between;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9900; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFCC7F; border-radius: 50%;width: 12px;height: 12px;"></view>
<text
style="margin-left: 8px;font-size: 16px;color: #FF9900;font-weight: 600;font-family: sans-serif;">自选组合</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-right: 10px;">
<view style="color: #888;font-size: 12px;">定制</view>
<input type="number" @input="numbers" v-model="page.number" maxlength="3"
style="font-size: 12px; border: 1px #AEAEAE solid;border-radius: 5px;text-align: center; width: 25px;margin-left: 5px;margin-right: 5px;padding-left: 3px;padding-right: 3px;" />
<view style="color: #888;font-size: 12px;">个菜窖</view>
</view>
</view>
</view>
<view v-for="(item,index) in data" :key="index" @click="itemClick(item.goodsSid)"
style="display: flex;flex-direction: column;margin-top: 14px;">
<view :style="{'border-bottom':(index===data.length-1 ? 'none':'1px #EFEFEF solid')}" style="display: flex;flex-direction: column;
margin-left: 20px;margin-right: 20px;padding-bottom: 10px;">
<view
style=" display: flex;flex-direction: row;align-items: center; margin-right: 10px;margin-top: 5px; margin-left: 10px;">
<image :src='item.iconUrl' style="width: 70px;height: 70px;" mode="aspectFit"></image>
<view style="display: flex;flex-direction: column;margin-left: 20px;width: 100%;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text
style="flex: 1;margin-right: 10px;color: #000;font-size: 14px;">{{item.name}}</text>
<uni-number-box ref="box" :showTextView="true" background="#fff"
v-model="item.goodsNumber" @change="numberChange($event,item)"></uni-number-box>
</view>
<text
style="color: #AEAEAE;font-size: 14px;margin-top: 5px;line-height: 20px;">{{item.remark}}</text>
<view
style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;">
<view style="display: flex;flex-direction: row;height: 20px;align-items: center;">
<text style="border: 1px #EE752F solid; border-radius: 10px; color:#EE752F ; font-size: 10px;
margin-right: 20px;padding: 0px 5px;">{{convertPrice(item.jprice)}}/{{item.specificationUnit}}</text>
<text
style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 10px;;padding: 0px 5px;">{{item.weight}}/{{item.unitName}}</text>
</view>
<text style="color: #FF5006;font-size: 15px;">{{convertPrice(item.price)}}</text>
</view>
</view>
</view>
</view>
</view>
<view style="height: 200px;background: #fff; "></view>
<view style="background-color: #fff;position: fixed;bottom: 0;overflow:hidden;
display: flex;flex-direction: column; width: 100%;flex-shrink: 1;">
<view
style="display: flex;flex-direction: row;align-items: center; border-bottom: 1px #F0F0F0 solid;padding-top: 5px; padding-bottom: 5px;padding-left: 20px;">
<view style="color: #888;font-size: 10px;">温馨提示已定制了</view>
<view style="color: #FF5006;font-size: 15px;">{{page.weight}}</view>
<view style="color: #888;font-size: 10px;">满200斤可定制云菜窖</view>
</view>
<view
style="display: flex;flex-direction: row;align-items: center; margin-top: 5px; padding: 10px 20px; width: 100%;">
<view style="flex: 1; display: flex;flex-direction: row;align-items: center; ;
justify-content: space-between;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="color: #888;font-size: 14px;">合计</text>
<text style="color: #F0752F;font-size: 18px;">{{convertPrice(page.price)}}</text>
</view>
</view>
<text
style="background: #EE752F; text-align: center; color: #fff; border-radius: 5px;padding: 5px 20px; margin-right: 40px; "
@click="settlement()">结算入窖</text>
</view>
</view>
</loading-state>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
page: {
sid: '',
name: "",
price: "",
startHeight: 0,
endHeight: 0,
number: "1",
weight: "--",
},
data: []
}
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
onLoad(options) {
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
this.request()
uni.$on("pay", (e) => {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
})
},
onUnload() {
uni.$off('pay');
},
methods: {
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
numberChange(event, item) {
console.log("event", event)
console.log("item", item)
this.getallPrice()
this.getweight()
this.getPrice(item)
},
request() {
let _this = this
_this.$api.getAllGiftBag().then((resp) => {
_this.data = resp
this.getallPrice()
this.getweight()
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
numbers(event) {
this.page.number = event.target.value
this.getallPrice()
this.getweight()
},
getallPrice() {
let num = 0;
for (var i = 0; i < this.data.length; i++) {
num += Number(this.data[i].jprice) * Number(this.data[i].goodsNumber) * Number(this.data[i].weight);
}
console.log("num", num)
this.page.price = Number(num * this.page.number).toFixed(2)
},
getPrice(item) {
if (item.goodsNumber > 0)
item.price = Number(item.goodsNumber * item.jprice * item.weight).toFixed(2)
else
item.price = "0"
},
getweight() {
let num = 0;
for (var i = 0; i < this.data.length; i++) {
num += Number(this.data[i].weight) * Number(this.data[i].goodsNumber);
}
this.page.weight = num
},
settlement() {
// 支付
if (this.page.weight < 200) {
this.shortToast('满200斤才可定制云菜窖哦请继续选菜吧。')
return
}
if (!Number(this.page.number) > 0) {
this.shortToast('请输入要定制几份云菜窖')
return
}
let list = []
for (var i = 0; i < this.data.length; i++) {
var item = this.data[i]
if (item.goodsNumber > 0)
list.push({
goodsSid: item.goodsSid,
goodsName: item.name,
partNumber: item.goodsNumber,
numofPart: item.weight,
priceUnit: item.jprice,
pricePart: item.price,
})
}
// console.log("ddd", list);
if (list.length == 0) {
this.shortToast('请添加商品')
return
}
var params = {
customerSid: getApp().globalData.sid,
cardNumber: this.page.number,
totalTee: this.page.price,
ordOrderDetailsVoList: list
}
// console.log("params", params);
let _this = this
_this.$api.createOrder(params).then((resp) => {
// console.log("resp", resp);
this.$pay(resp)
}).catch(e => {})
}
}
}
</script>
<style>
.top {
width: 100vw;
/* height: 126.66vw; */
height: 95vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/home_bj1.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
</style>

View File

@@ -0,0 +1,750 @@
<template>
<view style="display: flex;flex-direction: column;" id="page">
<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/detail_affeection.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<view style="width: 50%; margin-left: 20vw;
display: flex;flex-direction: row;margin-top: 9vw;position: absolute;z-index: 10;align-items: center;
justify-content: space-between;">
<text style="color: #fff;font-size: 18px;font-weight: 600;">{{data.pname}}</text>
<text v-if="data.notRese"
style="background: #fff ; border-radius: 25px;color: #FF7201;padding: 3px 10px;"
@click="showDialog2">转赠亲友</text>
<text v-if="!data.notRese"
style="background: #F1F2F3 ; border-radius: 25px;color: #ccc;padding: 3px 10px;">转赠亲友</text>
</view>
</view>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;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 style="margin-bottom: 10px;">
<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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;" id='the-id'>
<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 style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGifts" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_affection.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">亲情窖编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}}</text>
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view>
</view>
</view>
</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;">
<!-- <text
style="flex: 1;color: #B3B3B3; padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;">
可选择就近网点进行预约提货 >
</text> -->
<view style="flex: 1;"></view>
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #FFC104;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog">预约提货</text>
</view>
</loading-state>
<!-- 弹窗蒙版 -->
<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;width: 89.5%;">
<text>提货时间</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<uni-datetime-picker type="date" v-model="data.reserveDate" style="flex: 1;background: #F8F8F8;"
:start="data.start" :end="data.end" @showing='showing' :disabledDate="disabledDate" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;width: 89.5%;">
<text>提货人</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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;width: 89.5%;">
<text>联系电话</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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: #FFC104; padding: 5px 30px;margin-left: 20px;"
@click="save">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click.stop="colseDialog2()"></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal2'>
<scroll-view scroll-y="true" style="height: 100%; width: 100%; box-sizing: border-box;
" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>菜窖数量</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<input placeholder="请输入菜窖数量"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
type="number" :value="info.count" @input="onKeyInput3" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>商品列表</text>
<view style="background: #F5F5F5; border-radius: 5px;margin-top: 6px;">
<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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></uni-number-box>
</view>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>备注说明</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<input placeholder="请输入"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
:value="info.remarks" @input="onKeyInput4" />
<!-- <textarea placeholder="请输入" :disable-default-padding='true' :fixed="true" style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;
line-height: 20px;padding: 10px;
white-space: pre-wrap;
height: auto;min-height: 30px;
word-wrap: break-word;" :value="info.remarks" @input="onKeyInput2" /> -->
</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="colseDialog2()">取消</text>
<text
style="border-radius: 30px; font-size: 14px;color: #fff; background-color: #FF9D33; padding: 5px 30px;margin-left: 20px;"
@click="save2()">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
showModal: false,
showModal2: 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'
],
info: {
count: "1",
empCardSid: "",
remarks: "",
goodsVoList: []
}
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
this.getSun()
this.$bus.$on('order', msg => {
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');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
showDialog() {
this.showModal = true
},
colseDialog() {
this.showModal = false
},
showDialog2() {
this.showModal2 = true
},
colseDialog2() {
this.showModal2 = 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
},
onKeyInput3: function(event) {
this.info.count = event.target.value
},
onKeyInput4: function(event) {
this.info.remarks = 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.gifcardBookingSave(this.data).then((resp) => {
bus.$emit('order', "监听回调");
uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
save2() {
this.pageScroll()
this.colseDialog2()
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.info.empCardSid = this.page.sid,
this.info.goodsVoList = this.data.goodsVos,
console.log("info>>", this.info);
_this.$api.generateEmpCardGift(this.info).then((resp) => {
bus.$emit('order', "监听回调");
// uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
pageScroll() {
//获取容器高度,使页面滚动到容器底部 #xxx就是view的id名
wx.createSelectorQuery().select('#page').boundingClientRect(function(rect) {
console.log('rect', rect);
console.log('rectheight', rect.height);
/* 将页面移动到最底部用xxx的height定位 */
wx.pageScrollTo({
scrollTop: rect.height
})
}).exec()
},
request() {
let _this = this
_this.$api.gifcardDetail(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.isSaturAndSun2(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
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
// ①
let shareData = JSON.stringify({
params: {
code: data.code,
codeKey: data.codeKey,
customerSid: ''
},
functionName: 'bindCard',
url: '/pages/detail/detail_affeection?sid=' + data.sid
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
// FunctionName:'share!
})
// 转码传输
let value = encodeURIComponent(shareData)
return {
title: '汇融惠享-云菜窖',
// ②
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 30vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj1.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;
}
</style>

View File

@@ -0,0 +1,516 @@
<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/detail_affeection.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<view style="width: 55%; margin-left: 20vw;
display: flex;flex-direction: row;margin-top: 9vw;position: absolute;z-index: 10;align-items: center;
justify-content: space-between;">
<text style="color: #fff;font-size: 18px;font-weight: 600;">{{data.pname}}</text>
<text
style="background: #F1F2F3 ; border-radius: 25px;color: #ccc;padding: 3px 10px;">转赠亲友</text>
</view>
</view>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;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 style="margin-bottom: 10px;">
<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>
<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 style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGifts" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_affection.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">亲情窖编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}}</text>
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view>
</view>
</view>
</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()
this.$bus.$on('order', msg => {
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('order');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
request() {
let _this = this
_this.$api.gifcardDetail(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
// ①
let shareData = JSON.stringify({
params: {
code: data.code,
codeKey: data.codeKey,
customerSid: ''
},
functionName: 'bindCard',
url: '/pages/detail/detail_affeection?sid=' + data.sid
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
// FunctionName:'share!
})
// 转码传输
let value = encodeURIComponent(shareData)
return {
title: '汇融惠享-云菜窖',
// ②
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 30vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj4.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>

View File

@@ -0,0 +1,770 @@
<template>
<view style="display: flex;flex-direction: column;" id="page">
<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/detail_enterprise.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<view style="width: 55%; margin-left: 20vw;
display: flex;flex-direction: row;margin-top: 9vw;position: absolute;z-index: 10;align-items: center;
justify-content: space-between;">
<text style="color: #fff;font-size: 18px;font-weight: 600;">{{data.pname}}</text>
<text v-if="data.notRese"
style="background: #fff ; border-radius: 25px;color: #FF7201;padding: 3px 10px;"
@click="showDialog">转赠亲友</text>
<text v-if="!data.notRese"
style="background: #F1F2F3 ; border-radius: 25px;color: #ccc;padding: 3px 10px;">转赠亲友</text>
</view>
</view>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;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 style="margin-bottom: 10px;">
<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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;" id='the-id'>
<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 style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGiftVos" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_affection.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">亲情窖编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">-
{{item.goods}}</text>
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view>
</view>
</view>
</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;">
<!-- <text
style="flex: 1;color: #B3B3B3; padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;">
可选择就近网点进行预约提货 >
</text> -->
<view style="flex: 1;"></view>
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #FE3F00;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog2">预约提货</text>
</view>
</loading-state>
<!-- 弹窗蒙版 -->
<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%; box-sizing: border-box;
" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<!-- <view
style="display: flex;flex-direction: column;justify-content: center;align-items: center;margin-top: 20px;">
<view style="width: 43vw; height: 43vw;margin-top: 10px;padding: 5px;
display: flex;justify-content: center;align-items: center;" class="boeder">
<canvas class="canvas-code" canvas-id="canvas" style="width: 39vw; height: 39vw;" />
</view>
<text
style="font-size: 16px;color: #333; width: 100%;text-align: center;margin-top: 20px;">福礼卡编码{{data.giftCode}}</text>
<text
style="font-size: 16px; color: #333;width: 100%;text-align: center;margin-top: 5px;">提货密码{{data.giftCodeKey}}</text>
</view> -->
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>菜窖数量</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<input placeholder="请输入菜窖数量"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
type="number" :value="info.count" @input="onKeyInput1" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>商品列表</text>
<view style="background: #F5F5F5; border-radius: 5px;margin-top: 6px;">
<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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></uni-number-box>
</view>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>备注说明</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<input placeholder="请输入"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
:value="info.remarks" @input="onKeyInput2" />
<!-- <textarea placeholder="请输入" :disable-default-padding='true' :fixed="true" style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;
line-height: 20px;padding: 10px;
white-space: pre-wrap;
height: auto;min-height: 30px;
word-wrap: break-word;" :value="info.remarks" @input="onKeyInput2" /> -->
</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: #FE3F00; padding: 5px 30px;margin-left: 20px;"
@click="save">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click.stop="colseDialog2()"></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal2'>
<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;width: 89.5%;">
<text>提货时间</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<uni-datetime-picker type="date" v-model="data.reserveDate" style="flex: 1;background: #F8F8F8;"
:start="data.start" :end="data.end" :disabledDate="disabledDate" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;width: 89.5%;">
<text>提货人</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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="onKeyInput3" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;width: 89.5%;">
<text>联系电话</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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="onKeyInput4" />
</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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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="colseDialog2()">取消</text>
<text
style="border-radius: 30px; font-size: 14px;color: #fff; background-color: #FE3F00; padding: 5px 30px;margin-left: 20px;"
@click="save2">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
</view>
</template>
<script>
// import QRCode from '@/utils/weapp-qrcode.js'
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
showModal: false,
showModal2: false,
page: {
sid: '',
startHeight: 0,
endHeight: 0
},
data: {},
info: {
count: "1",
empCardSid: "",
remarks: "",
goodsVoList: []
},
disabledDate: [
// '2023-12-16'
],
// qrcode: null,
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
this.getSun()
this.$bus.$on('order', msg => {
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
// let long = info.windowWidth*0.39;
// this.qrcode = new QRCode('canvas', {
// usingIn: this,
// text: "https://github.com/tomfriwel/weapp-qrcode",
// width: long,
// height: long,
// colorDark: "#000000",
// colorLight: "#ffffff",
// correctLevel: QRCode.CorrectLevel.H,
// })
},
onUnload() {
uni.$off('order');
uni.$off('address');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
showDialog() {
// this.qrcode.makeCode(this.data.qrCode)
this.showModal = true
},
colseDialog() {
this.showModal = false
},
showDialog2() {
// this.qrcode.makeCode(this.data.qrCode)
this.showModal2 = true
},
colseDialog2() {
this.showModal2 = false
},
address() {
uni.navigateTo({
url: '/pages/SelectAddressActivity'
})
},
onKeyInput1: function(event) {
this.info.count = event.target.value
},
onKeyInput2: function(event) {
this.info.remarks = event.target.value
},
onKeyInput3: function(event) {
this.data.userName = event.target.value
},
onKeyInput4: function(event) {
this.data.userPhone = event.target.value
},
getSun() {
let _this = this
_this.$api.isSaturAndSun3(this.page.sid).then((resp) => {
// console.log("aaa",resp)
this.disabledDate = resp
}).catch(e => {
})
},
pageScroll() {
//获取容器高度,使页面滚动到容器底部 #xxx就是view的id名
wx.createSelectorQuery().select('#page').boundingClientRect(function(rect) {
console.log('rect', rect);
console.log('rectheight', rect.height);
/* 将页面移动到最底部用xxx的height定位 */
wx.pageScrollTo({
scrollTop: rect.height
})
}).exec()
},
save() {
this.pageScroll()
this.colseDialog2()
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.info.empCardSid = this.page.sid,
this.info.goodsVoList = this.data.goodsVos,
console.log("info>>", this.info);
_this.$api.empcardSave(this.info).then((resp) => {
bus.$emit('order', "监听回调");
// uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
save2() {
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.empcardBookingSave(this.data).then((resp) => {
bus.$emit('order', "监听回调");
// uni.navigateBack()
_this.$refs.nav.clickIcon()
}).catch(e => {
_this.shortToast(e.msg)
})
},
request() {
let _this = this
_this.$api.empCardDetail(this.page.sid).then((resp) => {
_this.data = resp
// _this.qrcode.makeCode(_this.data.qrCode)
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
// ①
let shareData = JSON.stringify({
// 直接绑定 进入详情
params: {
code: data.code,
codeKey: data.codeKey,
customerSid: ''
},
functionName: 'bindCard',
url: '/pages/detail/detail_affeection?sid=' + data.sid
// 分享 绑卡
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
// FunctionName:'share!
})
// 转码传输
let value = encodeURIComponent(shareData)
return {
title: '汇融惠享-云菜窖',
// ②
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 30vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.boeder {
/* 加载背景图 */
background-image: url(../../static/border.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj1.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;
margin: 0 auto;
background-color: #fff;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
display: flex;
flex-direction: column;
box-sizing: content-box;
}
</style>

View File

@@ -0,0 +1,510 @@
<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/detail_enterprise.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<view style="width: 55%; margin-left: 20vw;
display: flex;flex-direction: row;margin-top:9vw;position: absolute;z-index: 10;align-items: center;
justify-content: space-between;">
<text style="color: #fff;font-size: 18px;font-weight: 600;">{{data.pname}}</text>
<text
style="background: #F1F2F3 ; border-radius: 25px;color: #ccc;padding: 3px 10px;">转赠亲友</text>
</view>
</view>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;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 style="margin-bottom: 10px;">
<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>
<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 style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGiftVos" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_affection.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">亲情窖编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}}</text>
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view>
</view>
</view>
</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()
this.$bus.$on('order', msg => {
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('order');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
request() {
let _this = this
_this.$api.empCardDetail(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
tapName(event) {
console.log("event", event)
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
// ①
let shareData = JSON.stringify({
params: {
code: data.code,
codeKey: data.codeKey,
customerSid: ''
},
functionName: 'bindCard',
url: '/pages/detail/detail_affeection?sid=' + data.sid
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
// FunctionName:'share!
})
// 转码传输
let value = encodeURIComponent(shareData)
return {
title: '汇融惠享-云菜窖',
// ②
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid){
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item=>item.sid===sid)
console.log("item",item);
item.share='2'
}).catch(e => {
})
}
}
}
</script>
<style>
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 30vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj4.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>

View File

@@ -0,0 +1,752 @@
<template>
<view style="display: flex;flex-direction: column;" id="page">
<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/detail_family.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<view style="width: 55%; margin-left: 20vw;
display: flex;flex-direction: row;margin-top: 9vw;position: absolute;z-index: 10;align-items: center;
justify-content: space-between;">
<text style="color: #fff;font-size: 18px;font-weight: 600;">{{data.pname}}</text>
<text v-if="data.notRese"
style="background: #fff ; border-radius: 25px;color: #FF7201;padding: 3px 10px;"
@click="showDialog2">转赠亲友</text>
<text v-if="!data.notRese"
style="background: #F1F2F3 ; border-radius: 25px;color: #ccc;padding: 3px 10px;">转赠亲友</text>
</view>
</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 style="margin-bottom: 10px;">
<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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;" id='the-id'>
<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 style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGifts" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_affection.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">亲情窖编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}}</text>
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view>
</view>
</view>
</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;">
<!-- <text
style="flex: 1;color: #B3B3B3; padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;">
可选择就近网点进行预约提货 >
</text> -->
<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 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="flex: 1;background: #F8F8F8;"
:start="data.start" :end="data.end" :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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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 class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click.stop="colseDialog2()"></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal2'>
<scroll-view scroll-y="true" style="height: 100%; width: 100%; box-sizing: border-box;
" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>菜窖数量</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<input placeholder="请输入菜窖数量"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
type="number" :value="info.count" @input="onKeyInput3" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>商品列表</text>
<view style="background: #F5F5F5; border-radius: 5px;margin-top: 6px;">
<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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></uni-number-box>
</view>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>备注说明</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<input placeholder="请输入"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
:value="info.remarks" @input="onKeyInput4" />
<!-- <textarea placeholder="请输入" :disable-default-padding='true' :fixed="true" style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;
line-height: 20px;padding: 10px;
white-space: pre-wrap;
height: auto;min-height: 30px;
word-wrap: break-word;" :value="info.remarks" @input="onKeyInput2" /> -->
</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="colseDialog2()">取消</text>
<text
style="border-radius: 30px; font-size: 14px;color: #fff; background-color: #FF9D33; padding: 5px 30px;margin-left: 20px;"
@click="save2()">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
showModal: false,
showModal2: false,
page: {
sid: '',
startHeight: 0,
endHeight: 0
},
data: {
time: "",
name: "",
pname: "",
state: "",
notRese: false,
showBtn: false,
showRecord: false,
goodsVos: [],
value: "",
userName: "",
userPhone: "",
},
disabledDate: [
// '2023-12-16'
],
info: {
count: "1",
empCardSid: "",
remarks: "",
goodsVoList: []
},
}
},
mounted() {
this.$bus.$on('order', msg => {
this.request();
this.$nextTick(() => {
this.$refs.pageView.setLoadState(0)
})
})
uni.$on("address", (e) => {
// 相当与下拉刷新
this.data.value = e.sid;
this.data.addressName = e.name;
})
},
onLoad(options) {
this.page.sid = options.sid
this.request()
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');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
showDialog() {
this.showModal = true
},
showDialog2() {
this.showModal2 = true
},
colseDialog() {
this.showModal = false
},
colseDialog2() {
this.showModal2 = 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
},
onKeyInput3: function(event) {
this.info.count = event.target.value
},
onKeyInput4: function(event) {
this.info.remarks = event.target.value
},
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) => {
bus.$emit('order', "监听回调");
// setTimeout(() => {
// uni.$emit('order', "监听回调")
// }, 500)
uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
save2() {
this.colseDialog2()
this.pageScroll()
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.info.empCardSid = this.page.sid,
this.info.goodsVoList = this.data.goodsVos,
console.log("info>>", this.info);
_this.$api.generateEmpCard(this.info).then((resp) => {
bus.$emit('order', "监听回调");
// uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
pageScroll() {
//获取容器高度,使页面滚动到容器底部 #xxx就是view的id名
wx.createSelectorQuery().select('#page').boundingClientRect(function(rect) {
console.log('rect', rect);
console.log('rectheight', rect.height);
/* 将页面移动到最底部用xxx的height定位 */
wx.pageScrollTo({
scrollTop: rect.height
})
}).exec()
},
request() {
let _this = this
_this.$api.cardDetail(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
_this.getSun()
}).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
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
// ①
let shareData = JSON.stringify({
params: {
code: data.code,
codeKey: data.codeKey,
customerSid: ''
},
functionName: 'bindCard',
url: '/pages/detail/detail_affeection?sid=' + data.sid
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
// FunctionName:'share!
})
// 转码传输
let value = encodeURIComponent(shareData)
return {
title: '汇融惠享-云菜窖',
// ②
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 30vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj1.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;
}
</style>

View File

@@ -0,0 +1,518 @@
<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/detail_family.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<view style="width: 50%; margin-left: 20vw;
display: flex;flex-direction: row;margin-top: 9vw;position: absolute;z-index: 10;align-items: center;
justify-content: space-between;">
<text
style="color: #fff;font-size: 18px;font-weight: 600;">{{data.pname}}</text>
<text
style="background: #F1F2F3 ; border-radius: 25px;color: #ccc;padding: 3px 10px;">转赠亲友</text>
</view>
</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 style="margin-bottom: 10px;">
<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>
<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 style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGifts" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_affection.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">亲情窖编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}}</text>
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="height: 50px;"></view>
</loading-state>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
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()
this.$bus.$on('order', msg => {
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('order');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
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)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
// ①
let shareData = JSON.stringify({
params: {
code: data.code,
codeKey: data.codeKey,
customerSid: ''
},
functionName: 'bindCard',
url: '/pages/detail/detail_affeection?sid=' + data.sid
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
// FunctionName:'share!
})
// 转码传输
let value = encodeURIComponent(shareData)
return {
title: '汇融惠享-云菜窖',
// ②
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 30vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj4.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>

View File

@@ -0,0 +1,698 @@
<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>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #4F9AFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #7DCEFB; 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: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">预约记录</text>
</view>
</view>
<view style="margin-bottom: 10px;">
<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/gift_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/gift_loction.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/gift_user.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/gift_phone.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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">已生成福礼卡</text>
</view>
</view>
<view style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGiftVos" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/giftNormal.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">福礼卡编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">{{item.goods}}</text>
<button v-show="item.share=='1'" class='sharebtn' :data-info="item"
open-type="share">分享</button>
<button v-show="item.share=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.share=='3'" class='sharebtn3'>已绑定</button>
</view>
</view>
</view>
</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;">
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #54A0FD;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog">生成卡券</text>
<view style="flex: 1;"></view>
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #54A0FD;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog2">预约提货</text>
</view>
</loading-state>
<!-- 弹窗蒙版 -->
<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%; box-sizing: border-box;
" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<!-- <view
style="display: flex;flex-direction: column;justify-content: center;align-items: center;margin-top: 20px;">
<view style="width: 43vw; height: 43vw;margin-top: 10px;padding: 5px;
display: flex;justify-content: center;align-items: center;" class="boeder">
<canvas class="canvas-code" canvas-id="canvas" style="width: 39vw; height: 39vw;" />
</view>
<text
style="font-size: 16px;color: #333; width: 100%;text-align: center;margin-top: 20px;">福礼卡编码{{data.giftCode}}</text>
<text
style="font-size: 16px; color: #333;width: 100%;text-align: center;margin-top: 5px;">提货密码{{data.giftCodeKey}}</text>
</view> -->
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>卡券数量</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<input placeholder="请输入卡券数量"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
type="number" :value="info.count" @input="onKeyInput1" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>备注说明</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<textarea placeholder="请输入" :disable-default-padding='true' :fixed="true" style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;
min-height: 50px;line-height: 20px;padding: 10px;
white-space: pre-wrap;
word-wrap: break-word;" :value="info.remarks" @input="onKeyInput2" />
</view>
</view>
<view style="background: #F5F5F5; border-radius: 5px;;margin: 20px;">
<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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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: #54A0FD; padding: 5px 30px;margin-left: 20px;"
@click="save">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click.stop="colseDialog2()"></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal2'>
<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;width: 89.5%;">
<text>提货时间</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<uni-datetime-picker type="date" v-model="data.reserveDate" style="flex: 1;background: #F8F8F8;"
:start="data.start" :end="data.end" :disabledDate="disabledDate" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;width: 89.5%;">
<text>提货人</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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="onKeyInput3" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;width: 89.5%;">
<text>联系电话</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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="onKeyInput4" />
</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: 14px;">{{item.goods}}
</text>
<text class="text"
style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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="colseDialog2()">取消</text>
<text
style="border-radius: 30px; font-size: 14px;color: #fff; background-color: #54A0FD; padding: 5px 30px;margin-left: 20px;"
@click="save2">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
</view>
</template>
<script>
// import QRCode from '@/utils/weapp-qrcode.js'
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
showModal: false,
showModal2: false,
page: {
sid: '',
startHeight: 0,
endHeight: 0
},
data: {},
info: {
count: "1",
empCardSid: "",
remarks: "",
goodsVoList: []
},
disabledDate: [
// '2023-12-16'
],
// qrcode: null,
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
this.getSun()
uni.$on("order3", (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
// let long = info.windowWidth*0.39;
// this.qrcode = new QRCode('canvas', {
// usingIn: this,
// text: "https://github.com/tomfriwel/weapp-qrcode",
// width: long,
// height: long,
// colorDark: "#000000",
// colorLight: "#ffffff",
// correctLevel: QRCode.CorrectLevel.H,
// })
},
onUnload() {
uni.$off('order3');
uni.$off('address');
},
methods: {
showDialog() {
// this.qrcode.makeCode(this.data.qrCode)
this.showModal = true
},
colseDialog() {
this.showModal = false
},
showDialog2() {
// this.qrcode.makeCode(this.data.qrCode)
this.showModal2 = true
},
colseDialog2() {
this.showModal2 = false
},
address() {
uni.navigateTo({
url: '/pages/SelectAddressActivity'
})
},
onKeyInput1: function(event) {
this.info.count = event.target.value
},
onKeyInput2: function(event) {
this.info.remarks = event.target.value
},
onKeyInput3: function(event) {
this.data.userName = event.target.value
},
onKeyInput4: function(event) {
this.data.userPhone = event.target.value
},
getSun() {
let _this = this
_this.$api.isSaturAndSun3(this.page.sid).then((resp) => {
// console.log("aaa",resp)
this.disabledDate = resp
}).catch(e => {
})
},
save() {
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.info.empCardSid = this.page.sid,
this.info.goodsVoList = this.data.goodsVos,
console.log("info>>", this.info);
_this.$api.empcardSave(this.info).then((resp) => {
bus.$emit('order3', "监听回调");
uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
save2(){
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.empcardBookingSave(this.data).then((resp) => {
bus.$emit('order3', "监听回调");
uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
request() {
let _this = this
_this.$api.empCardDetail(this.page.sid).then((resp) => {
_this.data = resp
// _this.qrcode.makeCode(_this.data.qrCode)
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
return {
title: '汇融惠享-云菜窖',
path: '/pages/bind/bind_giftCard?code=' + data.code + '&codeKey=' + data.codeKey,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/share.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 20vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.boeder {
/* 加载背景图 */
background-image: url(../../static/border.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj3.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;
margin: 0 auto;
background-color: #fff;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
display: flex;
flex-direction: column;
box-sizing: content-box;
}
</style>

View File

@@ -0,0 +1,469 @@
<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>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #4F9AFD; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #7DCEFB; 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: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">预约记录</text>
</view>
</view>
<view style="margin-bottom: 10px;">
<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/gift_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/gift_loction.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/gift_user.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/gift_phone.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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">已生成福礼卡</text>
</view>
</view>
<view style="margin-bottom: 50px;">
<view v-for="(item,index) in data.empCardGiftVos" :key="index"
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;
border-bottom: 1px #F1F2F3 solid; width: 100%;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 15px;">
<image src="https://supervise.yxtsoft.com/lpk/image/giftNormal.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text style="font-size: 12px; color: #333;margin-top: 5px;">福礼卡编码{{item.code}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{item.codeKey}}</text>
<text style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{item.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">{{item.goods}}</text>
<button v-show="item.share=='1'" class='sharebtn' :data-info="item" open-type="share">分享</button>
<button v-show="item.share=='2'" class='sharebtn2' :data-info="item" open-type="share">已分享</button>
<button v-show="item.share=='3'" class='sharebtn3' >已绑定</button>
</view>
</view>
</view>
</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("order3", (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('order3');
},
methods: {
request() {
let _this = this
_this.$api.empCardDetail(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
tapName(event) {
console.log("event", event)
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
return {
title: '汇融惠享-云菜窖',
path: '/pages/bind/bind_giftCard?code=' + data.code + '&codeKey=' + data.codeKey,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/share.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa',"分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa',"用户点击了取消")
}
}
},
shareCard(sid){
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item=>item.sid===sid)
console.log("item",item);
item.share='2'
}).catch(e => {
})
}
}
}
</script>
<style>
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 20vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj6.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>

View File

@@ -0,0 +1,658 @@
<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>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; 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: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">预约记录</text>
</view>
</view>
<view style="margin-bottom: 10px;">
<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/gift_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/gift_loction.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/gift_user.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/gift_phone.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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">转赠信息</text>
</view>
</view>
<view style="margin-bottom: 50px;">
<view v-if="data.empCardGift!=null" style="display: flex;flex-direction: row;background-color: #fff;
border-bottom: 1px #F1F2F3 solid;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/giftNormal.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text
style="font-size: 12px; color: #333;margin-top: 5px;">福礼卡编码{{data.empCardGift.code}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{data.empCardGift.codeKey}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{data.empCardGift.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">{{data.empCardGift.goods}}</text>
<button v-show="data.empCardGift.isShare=='1'" class='sharebtn'
:data-info="data.empCardGift" open-type="share">分享</button>
<button v-show="data.empCardGift.isShare=='2'" class='sharebtn2'
:data-info="data.empCardGift" open-type="share">已分享</button>
<button v-show="data.empCardGift.isShare=='3'" class='sharebtn3'>已绑定</button>
</view>
</view>
</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;">
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #FF523D;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog2">转赠卡券</text>
<view style="flex: 1;"></view>
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #FF523D;
padding: 10px 20px; display:marginauto;text-align: center;line-height: 10vw;" @click="showDialog">预约提货</text>
</view>
</loading-state>
<!-- 弹窗蒙版 -->
<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;width: 89.5%;">
<text>提货时间</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<uni-datetime-picker type="date" v-model="data.reserveDate" style="flex: 1;background: #F8F8F8;"
:start="data.start" :end="data.end" @showing='showing' :disabledDate="disabledDate" />
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 10px;width: 89.5%;">
<text>提货人</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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;width: 89.5%;">
<text>联系电话</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<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: 14px;">{{item.goods}}
</text>
<text class="text" style="font-weight: 500;width: 100%;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0" :max="item.lnum"
v-model="item.select" ></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: #FF523D; padding: 5px 30px;margin-left: 20px;"
@click="save">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click.stop="colseDialog2()"></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal2'>
<scroll-view scroll-y="true" style="height: 100%; width: 100%; box-sizing: border-box;
" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view style="display: flex;flex-direction: column;margin: 20px;">
<text>备注说明</text>
<view style="display: flex;align-items: center;margin-top: 6px;">
<textarea placeholder="请输入" :disable-default-padding='true' :fixed="true"
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;min-height: 50px;line-height: 20px;padding: 10px;
white-space: pre-wrap;
word-wrap: break-word;" :value="info.remarks" @input="onKeyInput3" />
</view>
</view>
<view style="background: #F5F5F5; border-radius: 5px;;margin: 20px;">
<view v-for="(item,index) in data.goodsVos"
style="display: flex;flex-direction: row;margin-top: 15px; margin-bottom: 10px;width: 100%;">
<view style="margin-left: 10px;margin-right: 10px;flex: 1;
display: flex;flex-direction: row; align-items: center;
padding: 10px;width: 100%; justify-content: space-between;">
<text style="font-weight: 500;font-size: 14px; ">{{item.goods}}
</text>
<text
style="font-weight: 500;color: #919191; font-size: 12px;">剩余{{item.lnum}}{{item.unitName}}
</text>
<!-- <uni-number-box ref="box" style="margin-top: -30px;" :showTextView="true" :min="0"
:max="item.lnum" v-model="item.select"></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="colseDialog2()">取消</text>
<text
style="border-radius: 30px; font-size: 14px;color: #fff; background-color: #FF523D; padding: 5px 30px;margin-left: 20px;"
@click="save2()">确认</text>
</view>
<view style="height: 50px;">
</view>
</scroll-view>
</view>
</view>
</template>
<script>
//引入bus
import bus from '@/common/bus';
export default {
data() {
return {
showModal: false,
showModal2: 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'
],
info: {
empCardSid: "",
remarks: "",
goodsVoList: []
}
}
},
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('order2');
uni.$off('address');
},
methods: {
showDialog() {
this.showModal = true
},
colseDialog() {
this.showModal = false
},
showDialog2() {
this.showModal2 = true
},
colseDialog2() {
this.showModal2 = 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
},
onKeyInput3: function(event) {
this.info.remarks = 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.gifcardBookingSave(this.data).then((resp) => {
bus.$emit('order2', "监听回调");
uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
save2() {
let _this = this
this.info.empCardSid = this.page.sid,
this.info.goodsVoList = this.data.goodsVos,
console.log("info>>", this.info);
_this.$api.generateEmpCardGift(this.info).then((resp) => {
bus.$emit('order2', "监听回调");
uni.navigateBack()
}).catch(e => {
_this.shortToast(e.msg)
})
},
request() {
let _this = this
_this.$api.gifcardDetail(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.isSaturAndSun2(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
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
return {
title: '汇融惠享-云菜窖',
path: '/pages/bind/bind_giftCard?code=' + data.code + '&codeKey=' + data.codeKey,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareGift.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 20vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj2.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;
}
</style>

View File

@@ -0,0 +1,475 @@
<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>
<loading-state ref="pageView" @request="request">
<view style="background-color: #fff;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; 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: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">预约记录</text>
</view>
</view>
<view style="margin-bottom: 10px;">
<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/gift_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/gift_loction.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/gift_user.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/gift_phone.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>
<view style="background-color: #fff;margin-top: 10px;padding: 10px 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF472B; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FF7268; border-radius: 50%;width: 12px;height: 12px;"></view>
<text style="margin-left: 8px;font-size: 14px;color: #333;">转赠信息</text>
</view>
</view>
<view style="margin-bottom: 50px;">
<view v-if="data.empCardGift!=null" style="display: flex;flex-direction: row;background-color: #fff;
border-bottom: 1px #F1F2F3 solid;padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
<view style="display: flex;flex-direction: row;width: 100%;margin-top: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/welfare_Card.png"
style="width: 50px;height: 50px;margin-right: 10px;flex-shrink: 0;"></image>
<view style="display: flex;flex-direction: column;width: 100%;">
<text
style="font-size: 12px; color: #333;margin-top: 5px;">福礼卡编码{{data.empCardGift.code}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">提货密码{{data.empCardGift.codeKey}}</text>
<text
style="font-size: 12px; color: #333;margin-top: 5px;">备注说明{{data.empCardGift.remarks}}</text>
<view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;">
<text
style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">{{data.empCardGift.goods}}</text>
<button v-show="data.empCardGift.isShare=='1'" class='sharebtn'
:data-info="data.empCardGift" open-type="share">分享</button>
<button v-show="data.empCardGift.isShare=='2'" class='sharebtn2'
:data-info="data.empCardGift" open-type="share">已分享</button>
<button v-show="data.empCardGift.isShare=='3'" class='sharebtn3'>已绑定</button>
</view>
</view>
</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.gifcardDetail(this.page.sid).then((resp) => {
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
})
},
onShareAppMessage: function(res) {
console.log("res", res)
console.log("data", res.target.dataset)
var data = res.target.dataset.info
this.shareCard(data.sid)
return {
title: '汇融惠享-云菜窖',
path: '/pages/bind/bind_giftCard?code=' + data.code + '&codeKey=' + data.codeKey,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareGift.png', //自定义图片路径,显示图片长宽比是 5:4。
success: function(res) {
console.log('aaaa', "分享成功")
},
fail: function(res) {
// 转发失败
console.log('aaaa', "用户点击了取消")
}
}
},
shareCard(sid) {
let _this = this
_this.$api.shareEmpCard(sid).then((resp) => {
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
console.log("item", item);
item.share = '2'
}).catch(e => {})
}
}
}
</script>
<style>
.canvas-code {
width: 39vw !important;
height: 39vw !important;
}
.sharebtn {
background: #FF4727;
font-size: 12px;
color: #fff;
width: 20vw;
border-radius: 20px;
}
.sharebtn::after {
border: none;
}
.sharebtn2 {
background: #FF7165;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF;
width: 20vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn3::after {
border: none;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 65vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/detail_bj5.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>

146
pages/good/goodsDetail.vue Normal file
View File

@@ -0,0 +1,146 @@
<template>
<loading-state ref="pageView" @request="request">
<view>
<image :src="data.picUrl" style="width: 100vw;height: 80vw;"></image>
<!-- <view
style="margin-top: 9px;margin-left: 9px;margin-right: 9px;border-top-left-radius: 13px;border-top-right-radius: 13px;display: flex;flex-direction: column;align-items: center;background-color: #FFFFFF;padding-top: 11px;">
<image src="../../static/goods_price_bg.png"
style="width: 90vw;height: 16vw;border-radius: 10px;position: absolute;"></image>
<view
style="display: flex;flex-direction: row;justify-content: space-between;width: 80vw;position: relative;height: 16vw;align-items: center;color: white;">
<view>
<text style="font-size: 14px;font-weight: 600;"></text>
<text style="font-size: 24px;margin-left: 7px;font-weight: 500;">{{data.price}}</text>
</view>
<view>价值</view>
</view>
<view
style="left: 25px;font-size: 18px;width: 90vw;margin: 10px 0px;font-weight: 600;margin-left: 18px;">
{{data.name}}
</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;margin-left: 9px;margin-right: 9px;">
<view
style="border-bottom-left-radius: 13px;border-bottom-right-radius: 13px;background-color: #f9f9f9;width: 100%;display: flex;flex-direction: row;">
<image src="../../static/guige.png"
style="width: 21px;height: 21px;margin-left: 12px;margin-top: 9px;margin-bottom: 12px;"></image>
<view
style="height: 21px;line-height: 21px;margin-top: 9px;font-size: 13px;color: #666666;margin-left: 5px;">
规格
{{data.remarks}}
</view>
</view>
</view> -->
<view style="display: flex;flex-direction: column;background: #fff;padding: 20px;margin-top: 10px;
border-top-left-radius: 20px;border-top-right-radius: 20px;height: 100%;">
<text style="font-size: 18px;font-weight: 600;font-family: sans-serif;color: #333;">{{data.name}}</text>
<view style="display: flex;flex-direction: row;justify-content: space-between;margin-top: 10px;">
<text style="font-size: 13px;color: #666;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 13px;color: #999;">{{data.remarks}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20px;">
<view style="width: 2px;height: 15px;background: #FF7A11;margin-right: 10px;"></view>
<text style="font-size: 14px;font-weight: 600;font-family: sans-serif;color: #333;">商品详情</text>
</view>
<view style="margin-top: 10px;" v-show="!data.appContent==''">
<rich-text :nodes="data.appContent | formatRichText" ></rich-text>
</view>
</view>
</view>
</loading-state>
</template>
<script>
export default {
data() {
return {
page: {
sid: ''
},
data: {
picUrl: '',
name: '',
price: '',
remarks: '',
appContent: ""
}
}
},
onLoad(options) {
this.page.sid = options.sid
this.request()
},
filters: {
/**
* 处理富文本里的图片宽度自适应
* 1.去掉img标签里的style、width、height属性
* 2.img标签添加style属性max-width:100%;height:auto
* 3.修改所有style里的width属性为max-width:100%
* 4.去掉<br/>标签
* @param html
* @returns {void|string|*}
*/
formatRichText(html) {
//控制小程序中图片大小
if (html) {
let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
return match;
});
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi,
'max-width:100%;');
return match;
});
newContent = newContent.replace(/<br[^>]*\/>/gi, '');
newContent = newContent.replace(/\<img/gi,
'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;"');
return newContent;
} else {
return '暂无商品详情';
}
},
},
methods: {
request() {
let _this = this
_this.$api.goodsDetail(this.page.sid).then((resp) => {
console.log(resp);
_this.data = resp
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
}
}
}
</script>
<style>
uni-page-body,
page {
background: #f3f4f6;
}
</style>

291
pages/home/cloudCard.vue Normal file
View File

@@ -0,0 +1,291 @@
<template>
<view style="display: flex;flex-direction: column;height: 100#;">
<view class="top">
<NavBar ref="nav" navTitle=" " :showIcon="false" :start-change-height="page.startHeight"
:end-change-height="page.endHeight">
</NavBar>
<!-- <view class="topText">
冬储文化是中国传统文化的一部分是古人顺应自然因时而食的智慧体现是刻在老一辈骨子里的温暖记忆!
</view> -->
</view>
<!-- <view
style="display: flex;flex-direction: column; height: 30vw; width: 100vw;background: #ff0;z-index: 1000; position: fixed; top:61vw ">
-->
<z-paging ref="paging" v-model="data" :pagingStyle='styleObject' @query="queryList" :refresher-enabled="true" >
<view style="display: flex;flex-direction: row;justify-content: space-between;
margin:5px 20px 0px 20px;padding-bottom: 10px; border-bottom: 2px #EFEFEF solid;">
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="background: #FF9900; border-radius: 50%;width: 12px;height: 12px;"></view>
<view style="background: #FFCC7F; border-radius: 50%;width: 12px;height: 12px;"></view>
<text
style="margin-left: 8px;font-size: 16px;color: #FF9900;font-weight: 600;font-family: sans-serif;">精选蔬菜组合</text>
</view>
<!-- <view style="border: 1px #FF9900 solid;font-size: 16px;color: #FF9900;font-weight: 600;font-family: sans-serif;border-radius: 15px;
padding:5px 15px;" @click="optionalClick()">
+ 自选菜窖
</view> -->
</view>
<view v-for="(item,index) in data" :key="index"
style="display: flex;flex-direction: column;margin-top: 14px;width: 100%;"
@click="detail(item)">
<view :style="{'border-bottom':(index===data.length-1 ? 'none':'1px #EFEFEF solid')}" style="display: flex;flex-direction: column;
margin-left: 20px;margin-right: 20px;padding-bottom: 10px;flex: 1;">
<view style="display: flex;flex-direction: row;width: 100%; ">
<text style="flex: 1;margin-right: 10px;color: #000;font-size: 16px;">{{item.name}}</text>
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="color: #FCA45C; font-size: 12px;margin-right: 5px;">订窖</text>
<image src="@/static/right_icon.png" style="width: 15px;height: 15px;"></image>
</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center; margin-right: 10px;margin-top: 5px; width: 100%; ">
<image :src='item.iconUrl' style="width: 70px;height: 70px;" mode="aspectFit"></image>
<view style="display: flex;flex-direction: column;margin-left: 20px;flex: 1; width: 100%; margin-top: 5px;">
<text style="color: #999;font-size: 13px;width: 100%;line-height: 20px;">{{item.remarks}}</text>
<view style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 10px;">
<view style="display: flex;flex-direction: row;">
<text
style="border: 1px #EE752F solid; border-radius: 10px; color:#EE752F ; font-size: 14px;
margin-right: 10px;padding: 0px 8px;"
v-show="item.isRecommend=='1'">推荐</text>
<text
style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 12px;;padding: 0px 8px;">{{item.count}}</text>
</view>
<text style="color: #FF5006;font-size: 14px;">{{convertPrice(item.price)}}</text>
</view>
<view v-if="item.giftBagGoods.length>0">
<view style="height: 10px;"></view>
<view v-for="(child,pos) in item.giftBagGoods" :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.name}}
</view>
<view style="font-size: 11px;color: #E99D42;flex-shrink: 0;margin-left: 23px;">
{{child.count}}
</view>
<view style="font-size: 11px;color: #E99D42;min-width: 60px;text-align: right;padding-left: 5px;">
{{child.spec}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view slot="loadingMoreNoMore">
<view style="display: flex;flex-direction: column;justify-content: center; align-items: center; margin-top: 20px; border-top: 2px #efefef solid;
padding-top: 20px; margin-left:20px;margin-right: 20px;;">
<text style="color: #888888; font-size: 13px;">您也可以自由选菜自建惠享云菜窖</text>
<text style="color: #fff; font-size: 16px; font-weight: 600; font-family: sans-serif; background: #FCA45C; border-radius: 8px; padding: 10px 15px; margin-top: 15px;;" @click="optionalClick()">自建云菜窖</text>
</view>
<view style="height: 20px;"></view>
</view>
</z-paging>
<!-- </view> -->
</view>
</template>
<script>
export default {
data() {
return {
styleObject: {
// 'position': 'fixed',
// 'top':'80vw',
'margin-top': '68vw',
'border-top-left-radius': '25px',
'border-top-right-radius': '25px',
'background': '#fff',
'padding-top': '10px',
},
page: {
startHeight: 0,
endHeight: 0
},
data: [],
}
},
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
},
onUnload() {
uni.$off('order');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
// 分页的请求
queryList(pageNo, pageSize) {
let _this = this
_this.$api.appletGiftBagList().then((resp) => {
// 添加数据源
// this.$refs.paging.complete(resp.records)
this.$refs.paging.complete(resp)
}).catch(e => {
// 出错了,点击重试
_this.$refs.paging.complete(false);
})
},
detail(item) {
// 详情
uni.navigateTo({
url: '/pages/cloud/detail_cloudCard?sid=' + item.sid+"&name="+item.name
})
},
optionalClick(){
uni.navigateTo({
url: '/pages/cloud/optionalCard'
})
}
}
}
</script>
<style>
._ellipsis {
overflow-wrap: break-word;
}
.top {
width: 100vw;
/* height: 126.66vw; */
height: 75vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/clound_bj1.png);
/* background-image: url(../../static/clound_bj1.png); */
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.topText {
margin-top: 60vw;
margin-left: 7vw;
margin-right: 7vw;
border-radius: 15px;
background-color: #FFF0E5;
padding: 10px 10px;
font-size: 12px;
color: #FF9900;
font-weight: 600;
font-family: sans-serif;
}
.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 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/carPerson.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
width: calc(100% - 18px);
}
.item2 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/caradLose.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;
}
</style>

View File

@@ -0,0 +1,260 @@
<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/binding2.png" style="width: 20px;height: 20px;">
</image>
<text
style="height: 45px;line-height: 45px;font-size: 17px; text-align: center;color: #fff;margin-left: 11px;">绑定企业卡</text>
</view>
</view>
</view>
<!--
<view
style="display: flex;flex-direction: column;background: #fff;height:55vh;border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: -9.1vw;">
-->
<z-paging ref="paging" :pagingStyle='styleObject' v-model="data" @query="queryList" :refresher-enabled="true">
<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/enterpriseNormal.png" mode="aspectFill"
v-show="item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/enterpriseLose.png" mode="aspectFill"
v-show="!item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
</view>
<view style="width: 100%;display: flex;flex-direction: column;">
<view style="display: flex;flex-direction: row; width: 100%;">
<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: ##6FADFF;margin-top: 5px;width: calc(100vw - 182px);">{{item.pname}}</text>
</view>
<text :class="(item.showBtn)?'state1':'state2'">
{{item.state}}</text>
</view>
<text style="font-size: 12px;color: ##6FADFF;margin-top: 5px;"
v-show="item.showBtn">企业卡内的商品及数量可以派生出福礼卡</text>
<text style="font-size: 12px;color: #999;margin-top: 5px;"
v-show="!item.showBtn">当前卡片已失效</text>
<!-- 按钮 24 + 48 = 72px-->
<view v-show="item.showBtn" style="font-size: 12px;color:#fff;flex-shrink: 0;
text-align: center;margin-top: 5px;
border-radius: 15px; height: 30px;padding: 0px 12px;line-height: 30px;box-sizing: border-box;
background: -webkit-linear-gradient(left,#0473FF,#A4CDFF);">发放福礼卡</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>
</z-paging>
<!-- </view> -->
</view>
</template>
<script>
export default {
data() {
return {
data: [],
styleObject: {
'margin-top': '78vw',
'border-top-left-radius': '25px',
'border-top-right-radius': '25px',
'background': '#fff',
'padding-top': '10px',
},
page: {
remarks: '',
startHeight: 0,
endHeight: 0
},
}
},
created() {
this.$bus.$on('order3', 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
},
methods: {
// 分页的请求
queryList(pageNo, pageSize) {
let _this = this
_this.$api.empcardList({
"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_enterpriseCard'
})
},
detail(item) {
if (item.showBtn) {
// 正常
uni.navigateTo({
url: '/pages/enterprise/corporate_card_detail?sid=' + item.sid
})
} else {
// 过期 已完成
uni.navigateTo({
url: '/pages/enterprise/corporate_card_detail2?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_bj3.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;
height: 13vw;
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/bindBtn_bj3.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/cardEnterprise.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
width: calc(100% - 18px);
}
.item2 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/caradLose.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;
}
.state1 {
height: 17px;
border: 1px #6FADFF solid;
margin-left: 10px;
border-radius: 15px;
padding: 3px 10px;
font-size: 12px;
color: #6FADFF;
flex-shrink: 0;
}
.state2 {
height: 17px;
border: 1px #D9D9D9 solid;
margin-left: 10px;
border-radius: 15px;
padding: 3px 10px;
font-size: 12px;
color: #7E7E7E;
flex-shrink: 0;
}
</style>

245
pages/home/giftCard.vue Normal file
View File

@@ -0,0 +1,245 @@
<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/binding2.png" style="width: 20px;height: 20px;">
</image>
<text
style="height: 45px;line-height: 45px;font-size: 17px; text-align: center;color: #fff;margin-left: 11px;">绑定福礼卡</text>
</view>
</view>
</view>
<!--
<view
style="display: flex;flex-direction: column;background: #fff;height:55vh;border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: -9.1vw;">
-->
<z-paging ref="paging2" v-model="data2" :pagingStyle='styleObject' @query="queryList2" :refresher-enabled="true">
<view v-for="(item,index) in data2" :key="index"
style="display: flex;flex-direction: column;align-items: center;margin-top: 14px;"
:class="item.showBtn==true?'oragin':'gray'" @click="detail2(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/giftNormal.png" mode="aspectFill"
v-show="item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/giftLose.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,#FF2B00,#FA6B54);">预约提货</view>
</view>
<!-- 蔬菜礼包经典款+状态 -->
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="font-size: 15px;color: #FF2B00;">福礼卡</text>
<text
style="border: 1px #FF2B00 solid;margin-left: 10px;border-radius: 15px;padding: 3px 10px; font-size: 12px; color: #FF2B00;flex-shrink: 0;">
{{item.state}}</text>
</view>
</view>
</view>
</view>
</view>
</z-paging>
<!-- </view> -->
</view>
</template>
<script>
export default {
data() {
return {
styleObject:{
'margin-top': '78vw',
'border-top-left-radius': '25px',
'border-top-right-radius': '25px',
'background': '#fff',
'padding-top': '10px',
},
page: {
remarks: '',
startHeight: 0,
endHeight: 0
},
data: [],
data2: [],
currentTab: 0,
}
},
created() {
this.$bus.$on('order2', msg => {
console.log("aaaaaaaaaaa4", msg)
this.$refs.paging2.reload(true);
});
},
onLoad() {
let info = uni.getSystemInfoSync();
this.page.startHeight = info.windowWidth * 0.6
this.page.endHeight = info.windowWidth * 0.8
},
onUnload() {
uni.$off('order2');
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
// 分页的请求
queryList2(pageNo, pageSize) {
let _this = this
_this.$api.gifcardList({
"current": pageNo,
"size": pageSize,
"params": {
"customerSid": getApp().globalData.sid
}
}).then((resp) => {
// 添加数据源
this.$refs.paging2.complete(resp.records)
}).catch(e => {
// 出错了,点击重试
_this.$refs.paging2.complete(false);
})
},
bind() {
uni.navigateTo({
url: '/pages/bind/bind_giftCard'
})
},
detail2(item) {
if (item.showBtn) {
// 正常
uni.navigateTo({
url: '/pages/enterprise/welfare_card_detail?sid=' + item.sid
})
} else {
// 过期 已完成
uni.navigateTo({
url: '/pages/enterprise/welfare_card_detail2?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_bj2.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_bj2.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/cardGift.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
width: calc(100% - 18px);
}
.item2 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/caradLose.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;
}
</style>

244
pages/home/personCard.vue Normal file
View File

@@ -0,0 +1,244 @@
<template>
<view style="display: flex;flex-direction: column;height: 100#;">
<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/binding2.png" style="width: 20px;height: 20px;">
</image>
<text
style="height: 45px;line-height: 45px;font-size: 17px; text-align: center;color: #fff;margin-left: 11px;">绑定个人卡</text>
</view>
</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">
<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/personNormal.png" mode="aspectFill"
v-show="item.showBtn" style="width: 50px;height: 50px;margin-right: 10px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/peronLose.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>
</z-paging>
<!-- </view> -->
</view>
</template>
<script>
export default {
data() {
return {
styleObject:{
'margin-top': '78vw',
'border-top-left-radius': '25px',
'border-top-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
},
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);
})
},
bind() {
uni.navigateTo({
url: '/pages/bind/bind_personCard'
})
},
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
})
}
},
}
}
</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 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/carPerson.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
width: calc(100% - 18px);
}
.item2 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/caradLose.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;
}
</style>

533
pages/home/pickUpCard.vue Normal file
View File

@@ -0,0 +1,533 @@
<template>
<view style="display: flex;flex-direction: column;height: 100#;">
<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: 60vw; margin-right: 25px;width: 20px;height: 20px;">
</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': '68vw',
'border-top-left-radius': '25px',
'border-top-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);
},
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'
})
},
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>

268
pages/home/recordList.vue Normal file
View File

@@ -0,0 +1,268 @@
<template>
<!-- 有列表的时候用 :auto='false' 需要你在onload等调用reload方法 -->
<z-paging ref="paging" v-model="data" @query="queryList" :pagingStyle='styleObject' :auto='true'>
<view v-for="(item,index) in data"
style=" display: flex;flex-direction: column;margin-left: 10px;margin-right: 10px;">
<view v-show="item.type=='1'" >
<view class="item" :class="{ item2: item.state=='已提货' }"
style="display: flex;flex-direction: row;padding: 25px 15px; ">
<view style="margin-left: 10px; margin-right: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/personNormal.png" mode="aspectFill"
v-show="item.state=='未提货'" style="width: 50px;height: 50px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/peronLose.png" mode="aspectFill"
v-show="item.state=='已提货'" style="width: 50px;height: 50px;" />
</view>
<view style=" display: flex;flex-direction: column;margin-right: 10px;">
<text style="color: #FE801A; font-size: 18px;">{{item.bagName}}</text>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.serialNumber}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货门店</text>
<text style="color: #333; font-size: 14px;">{{item.store}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货日期</text>
<text style="color: #333; font-size: 14px;">{{item.reserveDate}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.userName}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">联系电话</text>
<text style="color: #333; font-size: 14px;">{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 14px;"
:style="{color:(item.state=='未提货'? '#FE8128' : '#333')}">{{item.state}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
</view>
<view v-show="item.type=='2'">
<view class="item3" :class="{ item4: item.state=='已提货' }"
style="display: flex;flex-direction: row;padding: 25px 15px;">
<view style="margin-left: 10px; margin-right: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/giftNormal.png" mode="aspectFill"
v-show="item.state=='未提货'" style="width: 50px;height: 50px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/giftLose.png" mode="aspectFill"
v-show="item.state=='已提货'" style="width: 50px;height: 50px;" />
</view>
<view style=" display: flex;flex-direction: column; margin-right: 10px;">
<text style="color: #FE801A; font-size: 18px;">{{item.bagName}}</text>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.serialNumber}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货门店</text>
<text style="color: #333; font-size: 14px;">{{item.store}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货日期</text>
<text style="color: #333; font-size: 14px;">{{item.reserveDate}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.userName}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">联系电话</text>
<text style="color: #333; font-size: 14px;">{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 14px;"
:style="{color:(item.state=='未提货'? '#FE8128' : '#333')}">{{item.state}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
</view>
<view v-show="item.type=='3'">
<view class="item5" :class="{ item6: item.state=='已提货' }"
style="display: flex;flex-direction: row;padding: 25px 15px;">
<view style="margin-left: 10px; margin-right: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/enterpriseNormal.png" mode="aspectFill"
v-show="item.state=='未提货'" style="width: 50px;height: 50px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/enterpriseLose.png" mode="aspectFill"
v-show="item.state=='已提货'" style="width: 50px;height: 50px;" />
</view>
<view style=" display: flex;flex-direction: column; margin-right: 10px;">
<text style="color: #FE801A; font-size: 18px;">{{item.bagName}}</text>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.serialNumber}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货门店</text>
<text style="color: #333; font-size: 14px;">{{item.store}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货日期</text>
<text style="color: #333; font-size: 14px;">{{item.reserveDate}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.userName}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">联系电话</text>
<text style="color: #333; font-size: 14px;">{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 14px;"
:style="{color:(item.state=='未提货'? '#FE8128' : '#333')}">{{item.state}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
</view>
</view>
</z-paging>
</template>
<script>
export default {
data() {
return {
styleObject:{
'padding-top': '10px',
},
data: []
}
},
created() {
// this.$bus.$on('order', msg => {
// console.log("aaaaaaaaaaa4", msg)
// this.$refs.paging.reload(true);
// });
this.$bus.$on('order2', msg => {
console.log("aaaaaaaaaaa4", msg)
this.$refs.paging.reload(true);
});
},
methods: {
// 分页的请求
queryList(pageNo, pageSize) {
let _this = this
_this.$api.orderListByUserSid({
"current": pageNo,
"size": pageSize,
"params": {
"userSid": getApp().globalData.sid
}
}).then((resp) => {
// 添加数据源
this.$refs.paging.complete(resp.records)
}).catch(e => {
// 出错了,点击重试
_this.$refs.paging.complete(false);
})
},
detail(sid) {
uni.navigateTo({
url: '/pages/card/card_record_detail?sid=' + sid
})
},
}
}
</script>
<style>
.item {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_perosn_item1.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item2 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_person_item2.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item3 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_gift_item3.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item4 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_gift_item4.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item5 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_enterprise_item5.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item6 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_enterprise_item6.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
</style>

271
pages/home/recordList2.vue Normal file
View File

@@ -0,0 +1,271 @@
<template>
<!-- 有列表的时候用 :auto='false' 需要你在onload等调用reload方法 -->
<z-paging ref="paging" v-model="data" @query="queryList" :pagingStyle='styleObject' :auto='true'>
<view v-for="(item,index) in data"
style=" display: flex;flex-direction: column;margin-left: 10px;margin-right: 10px;">
<view v-show="item.type=='1'">
<view class="item" :class="{ item2: item.state=='已提货' }"
style="display: flex;flex-direction: row;padding: 25px 15px; ">
<view style="margin-left: 10px; margin-right: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_family.png" mode="aspectFill"
v-show="item.state=='未提货'" style="width: 50px;height: 50px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/home_notFamily.png" mode="aspectFill"
v-show="item.state=='已提货'" style="width: 50px;height: 50px;" />
</view>
<view style=" display: flex;flex-direction: column;margin-right: 10px;">
<text style="color: #FE801A; font-size: 18px;">{{item.bagName}}</text>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.serialNumber}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货门店</text>
<text style="color: #333; font-size: 14px;">{{item.store}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货日期</text>
<text style="color: #333; font-size: 14px;">{{item.reserveDate}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.userName}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">联系电话</text>
<text style="color: #333; font-size: 14px;">{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 14px;"
:style="{color:(item.state=='未提货'? '#FE8128' : '#333')}">{{item.state}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
</view>
<view v-show="item.type=='2'">
<view class="item3" :class="{ item4: item.state=='已提货' }"
style="display: flex;flex-direction: row;padding: 25px 15px;">
<view style="margin-left: 10px; margin-right: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_affection.png" mode="aspectFill"
v-show="item.state=='未提货'" style="width: 50px;height: 50px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/home_notAffection.png" mode="aspectFill"
v-show="item.state=='已提货'" style="width: 50px;height: 50px;" />
</view>
<view style=" display: flex;flex-direction: column; margin-right: 10px;">
<text style="color: #FE801A; font-size: 18px;">{{item.bagName}}</text>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.serialNumber}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货门店</text>
<text style="color: #333; font-size: 14px;">{{item.store}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货日期</text>
<text style="color: #333; font-size: 14px;">{{item.reserveDate}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.userName}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">联系电话</text>
<text style="color: #333; font-size: 14px;">{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 14px;"
:style="{color:(item.state=='未提货'? '#FE8128' : '#333')}">{{item.state}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
</view>
<view v-show="item.type=='3'">
<view class="item5" :class="{ item6: item.state=='已提货' }"
style="display: flex;flex-direction: row;padding: 25px 15px;">
<view style="margin-left: 10px; margin-right: 10px;">
<image src="https://supervise.yxtsoft.com/lpk/image/home_enterprise.png" mode="aspectFill"
v-show="item.state=='未提货'" style="width: 50px;height: 50px;" />
<image src="https://supervise.yxtsoft.com/lpk/image/home_notEnterprise.png" mode="aspectFill"
v-show="item.state=='已提货'" style="width: 50px;height: 50px;" />
</view>
<view style=" display: flex;flex-direction: column; margin-right: 10px;">
<text style="color: #FE801A; font-size: 18px;">{{item.bagName}}</text>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.serialNumber}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货门店</text>
<text style="color: #333; font-size: 14px;">{{item.store}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">提货日期</text>
<text style="color: #333; font-size: 14px;">{{item.reserveDate}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;</text>
<text style="color: #333; font-size: 14px;">{{item.userName}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">联系电话</text>
<text style="color: #333; font-size: 14px;">{{item.userPhone}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #333; font-size: 14px;">&ensp;&ensp;&ensp;&ensp;</text>
<text style="font-size: 14px;"
:style="{color:(item.state=='未提货'? '#FE8128' : '#333')}">{{item.state}}</text>
</view>
<view style=" display: flex;flex-direction: row;align-items: center;margin-top: 5px;">
<text style="color: #999; font-size: 12px;">- {{item.goods}}</text>
</view>
</view>
</view>
</view>
</view>
</z-paging>
</template>
<script>
export default {
data() {
return {
styleObject: {
'padding-top': '10px',
},
data: []
}
},
created() {
// this.$bus.$on('order', msg => {
// console.log("aaaaaaaaaaa4", msg)
// this.$refs.paging.reload(true);
// });
this.$bus.$on('order2', msg => {
console.log("aaaaaaaaaaa4", msg)
this.$refs.paging.reload(true);
});
},
methods: {
// 分页的请求
queryList(pageNo, pageSize) {
let _this = this
_this.$api.orderListByUserSid({
"current": pageNo,
"size": pageSize,
"params": {
"userSid": getApp().globalData.sid
}
}).then((resp) => {
// 添加数据源
this.$refs.paging.complete(resp.records)
}).catch(e => {
// 出错了,点击重试
_this.$refs.paging.complete(false);
})
},
detail(sid) {
uni.navigateTo({
url: '/pages/card/card_record_detail?sid=' + sid
})
},
}
}
</script>
<style>
.item {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_family_item1.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item2 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_family_item2.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item3 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_affection_item1.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item4 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_affection_item2.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item5 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_enterprise_item1.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.item6 {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/record_enterprise_item2.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
</style>

243
pages/index/BindPhone.vue Normal file
View File

@@ -0,0 +1,243 @@
<template>
<view>
<!-- 自定义导航栏 -->
<view class="navBarBox">
<!-- 状态栏占位 -->
<view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
<!-- 真正的导航栏内容 -->
<view class="navBar">
<view>绑定账号</view>
</view>
</view>
<view style="margin-top: 30rpx;">
<view class="inputRow">
<!-- <image src="../../static/baseIcon/username.png" mode="aspectFill" class="drawableLeft"></image> -->
<input type="number" maxlength="11" @input="phoneText" placeholder="请输入手机号" class="input" />
<SendCodeItem :phoneNum="page.mobile" url="/v1/wxuser/sendVerificationCode" @click="send"
ref="wxCodeItem"></SendCodeItem>
</view>
</view>
<!-- <view class="inputRow">
<image src="../../static/baseIcon/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" @input="codeText" maxlength="6" placeholder="请输入验证码" class="input" />
</view> -->
<view class="btn" @click="next">
<text class="btnText">绑定账号</text>
</view>
<view v-show="!isShow">
<view style="display: flex;flex-direction: column;justify-content: center;width: 100%;margin-top: 50px;">
<text style="width: 100%;text-align: center;font-size: 35px;color: #f00;">抱歉</text>
<text style="margin: 20px; text-align: center;font-size: 30px;color: #f00;">您的平台应用未被授权请联系工作人员</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isShow: true,
// 状态栏高度
statusBarHeight: 0,
// 导航栏高度
navBarHeight: 82 + 11,
page: {
mobile: '',
openid: '',
code: '',
unionid: ""
}
};
},
//第一次加载时调用
created() {
//获取手机状态栏高度
this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
},
onShow() {
/* #ifdef MP-WEIXIN */
wx.hideHomeButton();
/* #endif */
},
onLoad(options) {
console.log('=======', options)
this.page.openid = options.openid
this.page.unionid = options.unionid
console.log('this.page', this.page)
},
methods: {
next() {
var mobileLength = this.page.mobile.length;
var codeLength = this.page.code.length;
if (mobileLength == 0) {
uni.showToast({
icon: 'error',
title: '手机号不能为空'
})
return;
}
let _this = this
console.log('1111', _this.page)
_this.$api.wxBindMobile(_this.page).then((resp) => {
// if (resp.success) {
console.log('1111', resp)
getApp().globalData.sid = resp
// getApp().globalData.token = resp.token
// getApp().globalData.sid = resp.sid
// getApp().globalData.mobile = resp.mobile
// getApp().globalData.isLogin = true
// _this.WritePreference("sysUserSid", res.data)
// _this.WritePreference("isLogin", true)
// getApp().globalData.isLogin = true
// getApp().globalData.sysUserSid = res.data
uni.switchTab({
url: '/pages/card/card'
})
// uni.switchTab({
// url: '/pages/home/WorkFragment'
// });
}).catch(e => {
console.log('eeeee', e)
// uni.showModal({
// title: '温馨提示',
// content: '您的平台应用未被授权,请联系工作人员。',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// } else {
// console.log('点击了取消')
// }
// }
// })
})
// this.HTTP({
// url: 'aos/v1/aosUser/wxBindMobile',
// data: {
// mobile: this.page.phone,
// sysUserWxAuthSid: this.page.sysUserWxAuthSid,
// code: this.page.code
// },
// method: 'POST',
// paramsType: "JSON",
// loading: true
// }).then((res) => {
// console.log('=======', res)
// if (res.code == 200) {
// // 保存
// _this.WritePreference("sysUserSid", res.data)
// _this.WritePreference("isLogin", true)
// getApp().globalData.isLogin = true
// getApp().globalData.sysUserSid = res.data
// console.log(
// '=======1111111111111111111111111111111sdfasdf;kjasdfjkasdklfkasdjf;asdddddddddddddd',
// res)
// // $emit 触发事件 主要返回给webviwew页面
// // uni.$emit('login', res.data.memberSid)
// uni.navigateBack({
// delta: 10
// });
// }
// });
},
phoneText(e) {
//手机号
this.page.mobile = e.detail.value;
},
send(e) { //发送验证码
console.log(e);
this.isShow = e.success
console.log("this.isShow", this.isShow);
},
codeText(e) {
//验证码
this.page.code = e.detail.value;
}
}
};
</script>
<style lang="scss">
.navBarBox {
background: #007AFF;
}
.navBarBox .statusBar {}
.navBarBox .navBar {
padding-top: 15px;
padding-bottom: 13px;
display: flex;
font-size: 13px;
flex-direction: row;
color: #ffffff;
justify-content: center;
align-items: center;
}
.inputRow {
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: #007AFF;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

261
pages/index/auditReport.vue Normal file
View File

@@ -0,0 +1,261 @@
<template>
<view style="margin-left: 20px; margin-right: 20px;padding-bottom: 50px">
<view style="display: flex;width: 100%;">
<view style="flex: 1;"></view>
<text style="size: 25px;font-family: sans-serif;font-weight: 600;color: white;
margin-top: 10px;margin-right: 5px;border: none; padding: 5px 15px;
border-radius: 5px 5px;
background: #0498FD;" @click="download">
下载
</text>
</view>
<view
style="display: flex;width: 100%;justify-content: center;size: 25px;font-family: sans-serif;font-weight: 600;margin-top: 10px;">
每日回款审核报告
</view>
<view style="margin-top: 20px;font-family: sans-serif;font-weight: 600;">石家庄汇融农村合作银行振头支行</view>
<view style=" line-height: 30px; margin-top: 10px;text-indent:2em;">
<text style="font-family: sans-serif;font-weight: 600;">{{info.companyName}}</text>
<text>昨日销售及今日回款情况如下昨日销售总计</text>
<text style="font-family: sans-serif;font-weight: 600;">{{info.totalSales}}</text>
<text> 今日应回款</text>
<text style="font-family: sans-serif;font-weight: 600;">{{info.collection}}</text>
<text> 今日实际回款</text>
<text style="font-family: sans-serif;font-weight: 600;">{{info.actualCollection}}</text>
<text> 回款差额</text>
<text style="font-family: sans-serif;font-weight: 600;">{{info.difference}}</text>
<text> 未回款原因平台扣除手续费服务费等具体原因详见附件今日回款明细</text>
<view>
<text>截至</text>
<text style="font-family: sans-serif;font-weight: 600;">{{info.endTime}}</text>
<text>今日支付完毕款项后账户余额为</text>
<text style="font-family: sans-serif;font-weight: 600;">{{info.balance}}</text>
<text> </text>
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 15px; line-height: 30px;">
<text style="size: 25px;font-family: sans-serif;font-weight: 600;">审核结果</text>
<text style="text-indent:2em;">{{info.auditResult}}</text>
<!-- <view>
<text
style="margin-top: 10px;text-indent:2em;">实际回款资金已按要求回到{{info.companyName}}{{info.account}}账号为</text>
<text style="font-family: sans-serif;font-weight: 600;">{{info.accountNumber}}</text>
<text></text>
</view> -->
</view>
<view style="display: flex;flex-direction: column;width: 100%;align-items: flex-end; margin-top: 30px;">
<text style="font-family: sans-serif;font-weight: 600;">{{info.reviewedBy}}</text>
<text style="margin-top:10px ; font-family: sans-serif;font-weight: 600;">{{info.date}}</text>
</view>
<view style="margin-top: 50px; display: flex; flex-direction: column;">
<text style="size: 25px;font-family: sans-serif;font-weight: 600;padding-bottom: 10px;">附件今日回款明细</text>
<uni-table ref="table1" border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center">销售日期</uni-th>
<uni-th align="center">支付渠道</uni-th>
<uni-th align="center">金额</uni-th>
<uni-th align="center">对应公司主体</uni-th>
<uni-th align="center">回款金额</uni-th>
<uni-th align="center">回款差额</uni-th>
<uni-th align="center">备注</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData1" :key="index">
<uni-td align="center">{{ item.salesDate }}</uni-td>
<uni-td align="center">{{ item.payChannels }}</uni-td>
<uni-td align="center">{{ item.money }}</uni-td>
<uni-td align="center">{{ item.mainBody }}</uni-td>
<uni-td align="center">{{ item.collection }}</uni-td>
<uni-td align="center">{{ item.different }}</uni-td>
<uni-td align="center">{{ item.notes }}</uni-td>
</uni-tr>
</uni-table>
</view>
<view style="margin-top: 30px; display: flex; flex-direction: column;">
<text style="size: 25px;font-family: sans-serif;font-weight: 600;padding-bottom: 10px;">附件昨日销售报表</text>
<uni-table ref="table2" border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center">支付渠道</uni-th>
<uni-th align="center">金额</uni-th>
<uni-th align="center">对应公司主体</uni-th>
<uni-th align="center">到账周期</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData2" :key="index">
<uni-td align="center">{{ item.payChannels }}</uni-td>
<uni-td align="center">{{ item.money }}</uni-td>
<uni-td align="center">{{ item.mainBody }}</uni-td>
<uni-td align="center">{{ item.cycle }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</template>
<script>
export default {
data() {
return {
queryParams: {
dataDate: "2023-06-14",
companyName: "河北源蜂惠民科技集团有限公司"
},
loading1: false,
loading2: false,
info: {
companyName: "",
totalSales: "",
collection: "",
actualCollection: "",
different: "",
endTime: "",
balance: "",
account: "",
accountNumber: "",
reviewedBy: "",
date: "",
},
tableData1: [
// {
// "salesDate": "2023年6月7日",
// "payChannels": "批发-京东",
// "money": "397.09",
// "mainBody": "源蜂-汇融",
// "collection": "357.87",
// "different": "39.22",
// "notes": "6.7回小时购150.12"
// },
],
tableData2: [
// {
// "payChannels": "现金",
// "money": "63094.88",
// "mainBody": "-",
// "cycle": "每月19号归集"
// },
],
fileUrl: ""
};
},
onLoad(option) {
// this.queryParams = {
// dataDate: option.dataDate,
// companyName: option.companyName
// }
console.log('1111', this.queryParams)
this.getData()
},
onShow() {
wx.hideHomeButton()
},
methods: {
download() {
if (this.fileUrl == '') {
uni.showToast({
title: "下载地址错误,请重新进入页面。",
duration: 5000
})
return
}
uni.downloadFile({
url: this.fileUrl, // 网络文档地址
success: (data) => {
if (data.statusCode === 200) {
uni.saveFile({
tempFilePath: data.tempFilePath, //临时路径
success: function(res) {
// 保存路径
uni.showToast({
title: "文件已保存:" + res.savedFilePath,
duration: 5000
})
setTimeout(() => {
//打开文档查看
uni.openDocument({
filePath: res.savedFilePath,
showMenu: true, //右上角是否有可以转发分享的功能
success: function(res) {
console.log('打开文档成功')
}
})
}, 3000);
}
});
}
},
fail: (err) => {
uni.showToast({
title: '失败请重新下载'
});
},
});
},
getData() {
console.log('getData', this.queryParams)
this.$api.getReportInfo(this.queryParams).then((resp) => {
console.log('1111>>>>>>', resp)
this.fileUrl = resp.downloadUrl
this.info = resp
}).catch(e => {
console.log('eeeee', e)
})
this.$api.getCsmReportTodayByComSid(this.queryParams).then((resp) => {
console.log('2222>>>>>>', resp)
this.loading1 = true
this.tableData1 = resp
}).catch(e => {
console.log('eeeee', e)
})
this.$api.getCsmReportYesterdayByComSid(this.queryParams).then((resp) => {
console.log('3333>>>>>>', resp)
this.loading2 = true
this.tableData2 = resp
}).catch(e => {
console.log('eeeee', e)
})
},
}
}
</script>
<style>
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,284 @@
<template>
<view class="pages">
<uni-card title="36524快消品动产质押项目" :isFull="true" extra="点击下载Excel文件" :thumbnail="avatar"
style="padding-top: 10px;">
<template v-slot:title>
<uni-section :title="logInfo.title" title-font-size="25" type="line">
<template v-slot:decoration>
<uni-icons type="location-filled" size="18" color="green"></uni-icons>
</template>
<template v-slot:right> <uni-tag :inverted="true" text="下载Excel文件" type="primary"
@click="onClick" /> </template>
</uni-section>
</template>
<view style="display: flex;flex-direction: row;">
<view style="flex: 1;">
<text>上报日期</text>
<text>{{logInfo.reportTime}}</text>
</view>
<view style="flex: 1;">
<text>货值总计</text>
<text>{{logInfo.countAmount}}</text>
</view>
</view>
<!-- <uni-list>
<uni-list-item title="上报日期:" :rightText="logInfo.reportTime"></uni-list-item>
<uni-list-item title="货值总计:" :right-text="logInfo.countAmount"></uni-list-item>
</uni-list> -->
<view v-for="(item, index) in tableData1" style="margin-top: 10px;">
<view>
<uni-title type="h3" :title="item.storeType" color="#444"></uni-title>
<uni-row>
<uni-col :span="8">
<view class="table-header tleft"><text>仓库数量</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-header"><text>品种数量</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-header"><text>品种货值</text></view>
</uni-col>
</uni-row>
<uni-row>
<uni-col :span="8">
<view class="table-body tleft"><text>{{item.storeNumber}}</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-body"><text>{{item.productCountNumber}}</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-body"><text>{{item.productAmount}}</text></view>
</uni-col>
</uni-row>
</view>
</view>
</uni-card>
<uni-collapse style="margin-top: 10px;">
<uni-collapse-item title="仓库库存明细表" style="font-size: 18px;" :open="true">
<view style="display: flex;flex-direction: row;margin-left: 16px;">
<view style="flex: 1;">
<text>商品数量合计</text>
<text>{{logInfo2.countProductNumber}}</text>
</view>
<view style="flex: 1;">
<text>商品货值合计</text>
<text>{{logInfo2.countAmount}}</text>
</view>
</view>
<view class="ttbale"style="margin-top: 10px;" >
<uni-row>
<uni-col :span="8">
<view class="table-header tleft"><text>序号</text></view>
</uni-col>
<uni-col :span="16">
<view class="table-header"><text>仓库名称</text></view>
</uni-col>
</uni-row>
<uni-row>
<uni-col :span="8">
<view class="table-header tleft"><text>商品数量</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-header"><text>商品品种数量</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-header"><text>货值</text></view>
</uni-col>
</uni-row>
</view>
<view v-for="(item, index) in tableData2" >
<view class="ttbale">
<uni-row>
<uni-col :span="8">
<view class="table-body tleft"><text>{{index+1}}</text></view>
</uni-col>
<uni-col :span="16">
<view class="table-body"><text>{{item.storeCodeName}}</text></view>
</uni-col>
</uni-row>
<uni-row>
<uni-col :span="8">
<view class="table-body tleft"><text>{{ item.productCountNumber}}</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-body"><text>{{item.typeNumber}}</text></view>
</uni-col>
<uni-col :span="8">
<view class="table-body"><text>{{item.productAmount}}</text></view>
</uni-col>
</uni-row>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
date: "2023-06-25",
tableData1: [],
logInfo: {
title: "",
reportTime: "",
countAmount: "",
},
tableData2: [],
logInfo2: {
countProductNumber: "",
countAmount: "",
},
tableData3: [],
logInfo3: {
countProductNumber: "",
countAmount: "",
},
}
},
onLoad(option) {
// this.date = option.orderDate
// console.log('1111', this.queryParams)
this.getData()
},
methods: {
onClick(e) {
uni.showToast({
title: '点击下载文件',
duration: 2000
});
console.log(e)
},
actionsClick(text) {
uni.showToast({
title: text,
icon: 'none'
})
},
getData() {
console.log('getData', this.date)
this.$api.getReportInventoryDayGather(this.date).then((resp) => {
console.log('1111>>>>>>', resp)
this.fileUrl = resp.downloadUrl
this.tableData1 = resp.list
this.logInfo = {
title: resp.title,
reportTime: resp.orderDate,
countAmount: resp.countAmount,
}
}).catch(e => {
console.log('eeeee', e)
})
this.$api.getReportInventoryDayStore(this.date).then((resp) => {
console.log('2222>>>>>>', resp)
this.tableData2 = resp.list
this.logInfo2 = {
countProductNumber: resp.countProductNumber,
countAmount: resp.countAmount,
}
}).catch(e => {
console.log('eeeee', e)
})
// this.$api.getReportInventoryDayToStore(this.date).then((resp) => {
// console.log('3333>>>>>>', resp)
// this.tableData3 = resp.list
// this.logInfo3 = {
// countProductNumber: resp.countProductNumber,
// countAmount: resp.countAmount,
// }
// }).catch(e => {
// console.log('eeeee', e)
// })
},
}
}
</script>
<style lang="scss">
.pages {}
$uni-success: #18bc37 !default;
.table-header {
text-align: center;
border: 0.5px solid #ccc;
font-weight: bold;
font-size: 15px;
border-left: 0.0px;
padding: 5px;
}
.table-body {
text-align: center;
border: 0.5px solid #ccc;
font-size: 13px;
padding: 5px;
border-left: 0.0px;
border-top: 0.0px;
}
.tleft {
border-left: 0.5px solid #ccc;
}
.ttbale {
margin: 0px 10px 0px 10px;
// border-bottom: 1px solid #ccc;
}
.uni-wrap {
flex-direction: column;
/* #ifdef H5 */
height: calc(100vh - 44px);
/* #endif */
/* #ifndef H5 */
height: 100vh;
/* #endif */
flex: 1;
}
.mb-10 {
margin-bottom: 10px;
}
.decoration {
width: 8px;
height: 8px;
margin-right: 4px;
border-radius: 50%;
background-color: $uni-success;
}
</style>

View File

@@ -0,0 +1,247 @@
<template>
<view class="charts-box" style="padding-bottom: 50px;">
<view class="top" style="margin-top: 15px;">
<text>企业名称</text>
<text>{{queryParams.businessName}}</text>
</view>
<view class="top">
<text>核查日期</text>
<text>{{queryParams.executionTime}}</text>
</view>
<view class="top">
<text>核查结果</text>
<text>{{result}}</text>
</view>
<view v-show="isShow">
<view class="top">
<text>异常信息详情</text>
</view>
<block v-for="item in list" :key="item.index">
<!-- 包裹图片+两行文字 id="{{index}}"是给按下了那个item记录-->
<view class="view_tupian_wenzi" @click="clickData(item.index)">
<!-- 包裹两行文字 -->
<view class="view_wenzi2">
<view class="top2">
<text>列入日期</text>
<text>{{item.addDate}}</text>
</view>
<view class="top2">
<text>列入经营异常名录原因</text>
<text>{{item.addReason}}</text>
</view>
<view class="top2">
<text>作出决定机关</text>
<text>{{item.decisionOffice}}</text>
</view>
<view class="top2">
<text>移出日期</text>
<text>{{item.removeDate}}</text>
</view>
<view class="top2">
<text>移出经营异常名录原因</text>
<text>{{item.romoveReason}}</text>
</view>
<view class="top2">
<text>移出决定机关</text>
<text>{{item.removeDecisionOffice}}</text>
</view>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: "",
result: "",
isShow: false,
queryParams: {
businessName: "",
executionTime: ""
},
list: [],
fileUrl:"",
};
},
onLoad(option) {
// var data = JSON.stringify(option)
this.queryParams = {
businessName: option.businessName,
executionTime: option.executionTime
}
console.log('1111', this.queryParams)
// this.setData({
// queryParams: JSON.stringify(option)
// })
// console.log('setData', this.queryParams)
this.getData()
// console.log('App onLoad', JSON.stringify(option))
// this.title = JSON.stringify(option)
// wx.showToast({
// title: 'onLoad成功>>>>>' + JSON.stringify(option),
// icon: 'none',
// duration: 5000 //持续的时间
// })
},
onShow() {
wx.hideHomeButton()
},
methods: {
download() {
uni.downloadFile({
url: this.fileUrl,// 网络文档地址
success: (data) => {
if (data.statusCode === 200) {
uni.saveFile({
tempFilePath: data.tempFilePath, //临时路径
success: function(res) {
// 保存路径
uni.showToast({ title: "文件已保存:"+res.savedFilePath,duration:5000 })
setTimeout(()=>{
//打开文档查看
uni.openDocument({
filePath:res.savedFilePath,
showMenu: true,//右上角是否有可以转发分享的功能
success:function(res){
console.log('打开文档成功')
}
})
}, 3000);
}
});
}
},
fail: (err) => {
uni.showToast({
title: '失败请重新下载'
});
},
});
},
getData() {
console.log('getData', this.queryParams)
this.$api.selectBusinessRiskInfo(this.queryParams).then((resp) => {
console.log('1111>>>>>>', resp)
this.list = resp
console.log('2222>>>>>>', this.list.length)
this.result = this.list.length == 0 ? "无异常信息" : "共有" + this.list.length + "条异常信息"
this.isShow = this.list.length == 0 ? false : true
}).catch(e => {
console.log('eeeee', e)
})
},
clickData(e) {
console.log("按了:", e.currentTarget.id)
}
},
};
</script>
<style lang="scss">
.top {
margin-left: 25px;
margin-top: 5px;
}
/* 包裹图片和两行文字 */
.view_tupian_wenzi {
display: flex;
flex-direction: row;
align-items: center;
/* 圆角 */
border-radius: 20rpx;
/* 边 */
border: 3rpx solid #E0E3DA;
box-shadow: 5rpx 5rpx 5rpx 5rpx #E0E3DA;
background-color: #ffffff;
margin: 30rpx;
/* padding使得文字和图片不至于贴着边框 */
padding: 30rpx;
}
/* 图片 */
.image_1 {
width: 100rpx;
height: 100rpx;
}
/* 包裹两行文字 */
.view_wenzi2 {
width: 100%;
margin-left: 25rpx;
display: flex;
flex-direction: column;
.top2 {
margin-top: 5px;
}
.text1 {
font-size: 15px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.text2 {
flex: 1;
margin-top: 5px;
font-size: 12px;
}
}
/* 小字 */
.text_small {
font-size: 30rpx;
word-break: break-all;
color: #7a7878;
margin-top: 10rpx
}
.text_small2 {
font-size: 25rpx;
color: #f00;
margin-top: 10rpx
}
</style>

176
pages/index/index.vue Normal file
View File

@@ -0,0 +1,176 @@
<template>
<view class="charts-box">
<view style="display: flex;justify-content: center; width: 100%; ">
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;" @click="jump(1)">1</text>
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;" @click="jump(2)">2</text>
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;" @click="jump(3)">3</text>
</view>
<view style="margin-top: 20px;margin-left: 20px;">
<text>当日数据1</text>
<text style="margin-left: 10px;">{{newDate}}</text>
</view>
<view style="margin-top: 15px;margin-left: 10px;margin-right: 10px;">
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" />
</view>
<view style="margin-top: 25px;margin-left: 15px;margin-right: 15px;">
<uni-table ref="table" :border="true" stripe type="" emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center">现金流量-经营活动产生的现金流量()</uni-th>
<uni-th align="center">总额</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td align="center">{{ item.name }}</uni-td>
<uni-td align="center">{{ item.price }}</uni-td>
</uni-tr>
</uni-table>
</view>
<view style="margin-top: 25px;margin-left: 15px;margin-right: 15px;">
<uni-table ref="table" :border="true" stripe type="" emptyText="暂无更多数据">
<uni-tr>
<uni-th width="200" align="center">销售渠道类别</uni-th>
<uni-th align="center">总额</uni-th>
<uni-th align="center">应收帐款</uni-th>
<uni-th align="center">扣除应收</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData2" :key="index">
<uni-td align="center">{{ item.name }}</uni-td>
<uni-td align="center">{{ item.totalAmount }}</uni-td>
<uni-td align="center">{{ item.accountsReceivable }}</uni-td>
<uni-td align="center">{{ item.deductionAccountsReceivable }}</uni-td>
</uni-tr>
</uni-table>
</view>
<navigator url="enterpriseRisk?businessName=aaaabbbb&executionTime=2023-03-15" hover-class="navigator-hover">
<button type="default" style="margin-top: 20px;">测试企业经营页面</button>
</navigator>
</view>
</template>
<script>
export default {
data() {
return {
newDate: new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate(),
tableData: [{
name: "销售商品收到的现金(元)",
price: "2000000",
},
{
name: "收到其他与经营活动有关的现金(元)",
price: "28700",
},
{
name: "本项合计",
price: "123456",
},
],
tableData2: [{
name: "销售商品收到的现金(元)",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793"
},
{
name: "连锁内加盟",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793"
},
{
name: "配送中心",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793",
}, {
name: "连锁外加盟",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793",
}
],
chartData: {},
opts: {
xAxis: {
disableGrid: true
},
yAxis: {
data: [{
min: 0
}]
},
extra: {
column: {
type: "group"
}
}
}
};
},
onLoad() {
this.getServerData();
},
methods: {
getServerData() {
setTimeout(() => {
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
series: [{
name: "分销商进货额",
data: [35, 36, 31, 33, 13, 34]
},
{
name: "实际发货额",
data: [18, 27, 21, 24, 6, 28]
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 100);
},
jump(index) {
console.log("index>>", index)
switch (index) {
case 1:
break;
case 2:
uni.navigateTo({
url: 'index2'
});
break;
case 3:
uni.navigateTo({
url: 'index3'
});
break;
}
}
}
};
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box {
width: 100%;
height: 300px;
}
</style>

179
pages/index/index2.vue Normal file
View File

@@ -0,0 +1,179 @@
<template>
<view class="charts-box">
<view style="display: flex;justify-content: center; width: 100%; ">
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;"
@click="jump(1)">1</text>
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;"
@click="jump(2)">2</text>
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;"
@click="jump(3)">3</text>
</view>
<view style="margin-top: 20px;margin-left: 20px;">
<text>2当日数据</text>
<text style="margin-left: 10px;">{{newDate}}</text>
</view>
<view style="margin-top: 15px;margin-left: 10px;margin-right: 10px;">
<qiun-data-charts type="pie" :opts="opts" :chartData="chartData" />
</view>
<view style="margin-top: 25px;margin-left: 15px;margin-right: 15px;">
<text>到货时间预警表</text>
</view>
<view style="margin-top: 20px;margin-left: 15px;margin-right: 15px;">
<uni-table ref="table" :border="true" stripe type="" emptyText="暂无更多数据">
<uni-tr>
<uni-th width="50" align="center">序号</uni-th>
<uni-th width="280" align="center">供应商名称</uni-th>
<uni-th align="center">到货日期</uni-th>
<uni-th align="center">是否延期</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData2" :key="index">
<uni-td align="center">{{ index+1 }}</uni-td>
<uni-td align="center">{{ item.supplierName }}</uni-td>
<uni-td align="center">{{ item.allArrivedDate }}</uni-td>
<uni-td align="center">{{ item.isDelay }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</template>
<script>
export default {
data() {
return {
newDate: new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate(),
tableData2: [{
supplierName: "中粮可口可乐饮料(河北)有限公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
},
{
supplierName: "中顺洁柔纸业股份有限公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
},
{
supplierName: "今麦郎食品股份有限公司石家庄分公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
}, {
supplierName: "农夫山泉股份有限公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
}, {
supplierName: "北京百事可乐饮料有限公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
}, {
supplierName: "今麦郎食品股份有限公司石家庄分公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
}, {
supplierName: "农夫山泉股份有限公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
}, {
supplierName: "北京百事可乐饮料有限公司",
allArrivedDate: "2022.12.29",
isDelay: "是",
}
],
chartData: {},
opts: {
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
"#ea7ccc"
],
padding: [5, 5, 5, 5],
enableScroll: false,
extra: {
pie: {
activeOpacity: 0.5,
activeRadius: 10,
offsetAngle: 0,
labelWidth: 15,
border: true,
borderWidth: 3,
borderColor: "#FFFFFF",
linearType: "custom"
}
}
}
};
},
onLoad() {
this.getServerData();
},
methods: {
getServerData() {
//模拟从服务器获取数据时的延时
setTimeout(() => {
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
series: [{
data: [{
"name": "一班",
"value": 50
}, {
"name": "二班",
"value": 30
}, {
"name": "三班",
"value": 20
}, {
"name": "四班",
"value": 18
}, {
"name": "五班",
"value": 8
}]
}]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
},
jump(index) {
console.log("index>>2",index)
switch (index) {
case 1:
uni.navigateTo({
url: 'index'
});
break;
case 2:
break;
case 3:
uni.navigateTo({
url: 'index3'
});
break;
}
}
},
}
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box {
width: 100%;
height: 300px;
}
</style>

236
pages/index/index3.vue Normal file
View File

@@ -0,0 +1,236 @@
<template>
<view class="charts-box">
<view style="display: flex;justify-content: center; width: 100%; ">
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;"
@click="jump(1)">1</text>
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;"
@click="jump(2)">2</text>
<text style="padding-top: 10px;padding-bottom: 10px;color: blue;margin-left: 20px;"
@click="jump(3)">3</text>
</view>
<view style="margin-top: 20px;margin-left: 20px;">
<text>3当日数据</text>
<text style="margin-left: 10px;">{{newDate}}</text>
</view>
<view style="margin-top: 15px;margin-left: 10px;">
<qiun-data-charts type="mix" :opts="opts" :chartData="chartData" />
</view>
<view style="margin-top: 25px;margin-left: 15px;margin-right: 15px;">
<uni-table ref="table" :border="true" stripe type="" emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center">现金流量-经营活动产生的现金流量()</uni-th>
<uni-th align="center">总额</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td align="center">{{ item.name }}</uni-td>
<uni-td align="center">{{ item.price }}</uni-td>
</uni-tr>
</uni-table>
</view>
<view style="margin-top: 25px;margin-left: 15px;margin-right: 15px;">
<uni-table ref="table" :border="true" stripe type="" emptyText="暂无更多数据">
<uni-tr>
<uni-th width="200" align="center">销售渠道类别</uni-th>
<uni-th align="center">总额</uni-th>
<uni-th align="center">应收帐款</uni-th>
<uni-th align="center">扣除应收</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData2" :key="index">
<uni-td align="center">{{ item.name }}</uni-td>
<uni-td align="center">{{ item.totalAmount }}</uni-td>
<uni-td align="center">{{ item.accountsReceivable }}</uni-td>
<uni-td align="center">{{ item.deductionAccountsReceivable }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</template>
<script>
export default {
data() {
return {
newDate: new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate(),
tableData: [{
name: "销售商品收到的现金(元)",
price: "2000000",
},
{
name: "收到其他与经营活动有关的现金(元)",
price: "28700",
},
{
name: "本项合计",
price: "123456",
},
],
tableData2: [{
name: "销售商品收到的现金(元)",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793"
},
{
name: "连锁内加盟",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793"
},
{
name: "配送中心",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793",
}, {
name: "连锁外加盟",
totalAmount: "2000000",
accountsReceivable: "31914",
deductionAccountsReceivable: "35793",
}
],
chartData: {},
opts: {
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
"#ea7ccc"
],
padding: [15, 15, 0, 15],
enableScroll: false,
legend: {},
xAxis: {
disableGrid: true,
title: ""
},
yAxis: {
disabled: false,
disableGrid: false,
splitNumber: 5,
gridType: "dash",
dashLength: 4,
gridColor: "#CCCCCC",
padding: 10,
showTitle: true,
data: [{
position: "left",
title: "折线"
},
{
position: "right",
min: 0,
max: 200,
title: "柱状图",
textAlign: "left"
},
]
},
extra: {
mix: {
column: {
width: 20
}
}
}
}
};
},
onLoad() {
this.getServerData();
},
methods: {
getServerData() {
//模拟从服务器获取数据时的延时
setTimeout(() => {
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
categories: ["2018", "2019", "2020", "2021", "2022", "2023"],
series: [{
name: "仓库货值",
index: 1,
type: "column",
data: [40, {
"value": 30,
"color": "#f04864"
}, 55, 110, 24, 58]
},
{
name: "在途货值",
index: 1,
type: "column",
data: [50, 20, 75, 60, 34, 38]
}, {
name: "门店货值",
index: 1,
type: "column",
data: [50, 20, 75, 60, 34, 38]
}, {
name: "账户余额",
index: 1,
type: "column",
data: [50, 20, 75, 60, 34, 38]
}, {
name: "应收账款",
index: 1,
type: "column",
data: [50, 20, 75, 60, 34, 38]
}, {
name: "借款金额",
index: 1,
type: "column",
data: [50, 20, 75, 60, 34, 38]
},
{
name: "折线",
type: "line",
color: "#D33682",
data: [120, 140, 105, 170, 95, 160]
},
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
},
jump(index) {
console.log("index>>3", index)
switch (index) {
case 1:
uni.navigateTo({
url: 'index'
});
break;
case 2:
uni.navigateTo({
url: 'index2'
});
break;
case 3:
break;
}
}
},
};
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box {
width: 100%;
height: 300px;
}
</style>

View File

@@ -0,0 +1,268 @@
<template>
<view style="margin-left: 20px; margin-right: 20px;padding-bottom: 50px">
<view style="display: flex;width: 100%;">
<view style="flex: 1;"></view>
<text style="size: 25px;font-family: sans-serif;font-weight: 600;color: white;
margin-top: 10px;margin-right: 5px;border: none; padding: 5px 15px;
border-radius: 5px 5px;
background: #0498FD;" @click="download">
下载
</text>
</view>
<view
style="display: flex; width: 100%;justify-content: center; size: 25px;font-family: sans-serif;font-weight: 600;margin: 10px;">
{{date}}
</view>
<view style="margin-top: 20px; display: flex; flex-direction: column;">
<text style="size: 25px;font-family: sans-serif;font-weight: 600;padding-bottom: 10px;">库存日报汇总表</text>
<text>编号:{{logInfo.serialNumber}}</text>
<text>上报时间:{{logInfo.reportTime}}</text>
<text style="margin-bottom: 10px;">货值合计:{{logInfo.countAmount}}</text>
<uni-table ref="table1" border stripe emptyText="暂无更多数据">
<uni-tr>
<!-- <uni-th align="center">序号</uni-th> -->
<uni-th align="center" width="180">仓库类型</uni-th>
<uni-th align="center" width="80">仓库数量</uni-th>
<uni-th align="center" width="80">品种数量</uni-th>
<uni-th align="center" width="100">品种货值</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData1" :key="index">
<!-- <uni-td align="center">{{ index+1}}</uni-td> -->
<uni-td align="center">{{ item.storeType }}</uni-td>
<uni-td align="center">{{ item.storeNumber }}</uni-td>
<uni-td align="center">{{ item.productCountNumber }}</uni-td>
<uni-td align="center">{{ item.productAmount }}</uni-td>
</uni-tr>
</uni-table>
</view>
<view style="margin-top: 50px; display: flex; flex-direction: column;">
<text style="size: 25px;font-family: sans-serif;font-weight: 600;padding-bottom: 10px;">仓库库存明细表</text>
<text>商品数量合计:{{logInfo2.countProductNumber}}</text>
<text style="margin-bottom: 10px;">商品货值合计:{{logInfo2.countAmount}}</text>
<uni-table ref="table1" border stripe emptyText="暂无更多数据">
<uni-tr>
<!-- <uni-th align="center" width="50">序号</uni-th> -->
<uni-th align="center" width="180">仓库名称</uni-th>
<uni-th align="center" width="80">商品数量</uni-th>
<uni-th align="center" width="100">商品货值</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData2" :key="index">
<!-- <uni-td align="center">{{ index+1 }}</uni-td> -->
<uni-td align="center">{{ item.storeCodeName }}</uni-td>
<uni-td align="center">{{ item.productCountNumber }}</uni-td>
<uni-td align="center">{{ item.productAmount }}</uni-td>
</uni-tr>
</uni-table>
</view>
<view style="margin-top: 50px; display: flex; flex-direction: column;">
<text style="size: 25px;font-family: sans-serif;font-weight: 600;padding-bottom: 10px;">烟草库存明细表</text>
<text>商品数量合计:{{logInfo3.countProductNumber}}</text>
<text style="margin-bottom: 10px;">商品货值合计:{{logInfo3.countAmount}}</text>
<uni-table ref="table1" border stripe emptyText="暂无更多数据">
<uni-tr>
<!-- <uni-th align="center">序号</uni-th> -->
<uni-th align="center" width="180">仓库名称</uni-th>
<uni-th align="center" width="80">品种数量</uni-th>
<uni-th align="center" width="100">品种货值</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData3" :key="index">
<!-- <uni-td align="center">{{ index+1 }}</uni-td> -->
<uni-td align="center">{{ item.storeCodeName }}</uni-td>
<uni-td align="center">{{ item.productCountNumber }}</uni-td>
<uni-td align="center">{{ item.productAmount }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</template>
<script>
export default {
data() {
return {
date: "2023-07-26",
logInfo: {
serialNumber: "",
reportTime: "",
countAmount: "",
},
logInfo2: {
countProductNumber: "",
countAmount: "",
},
logInfo3: {
countProductNumber: "",
countAmount: "",
},
tableData1: [],
tableData2: [],
tableData3: [],
tempFilePath: "",
// fileUrl:"https://desk-fd.zol-img.com.cn/t_s960x600c5/g5/M00/01/0F/ChMkJlbKwtmINC3iAAx4ozyK5jAAALGuAMGw3cADHi7853.jpg"
fileUrl: ""
};
},
onLoad(option) {
// this.date = option.orderDate
// console.log('1111', this.queryParams)
this.getData()
},
onShow() {
wx.hideHomeButton()
},
methods: {
download() {
if (this.fileUrl == '') {
uni.showToast({
title: "下载地址错误,请重新进入页面。",
duration: 5000
})
return
}
uni.downloadFile({
url: this.fileUrl, // 网络文档地址
success: (data) => {
if (data.statusCode === 200) {
uni.saveFile({
tempFilePath: data.tempFilePath, //临时路径
success: function(res) {
// 保存路径
uni.showToast({
title: "文件已保存:" + res.savedFilePath,
duration: 5000
})
setTimeout(() => {
//打开文档查看
uni.openDocument({
filePath: res.savedFilePath,
showMenu: true, //右上角是否有可以转发分享的功能
success: function(res) {
console.log('打开文档成功')
}
})
}, 3000);
}
});
}
},
fail: (err) => {
uni.showToast({
title: '失败请重新下载'
});
},
});
},
getData() {
console.log('getData', this.date)
this.$api.getReportInventoryDayGather(this.date).then((resp) => {
console.log('1111>>>>>>', resp)
this.fileUrl = resp.downloadUrl
this.tableData1 = resp.list
this.logInfo = {
serialNumber: resp.serialNumber,
reportTime: resp.reportTime,
countAmount: resp.countAmount,
}
}).catch(e => {
console.log('eeeee', e)
})
this.$api.getReportInventoryDayStore(this.date).then((resp) => {
console.log('2222>>>>>>', resp)
this.tableData2 = resp.list
this.logInfo2 = {
countProductNumber: resp.countProductNumber,
countAmount: resp.countAmount,
}
}).catch(e => {
console.log('eeeee', e)
})
this.$api.getReportInventoryDayToStore(this.date).then((resp) => {
console.log('3333>>>>>>', resp)
this.tableData3 = resp.list
this.logInfo3 = {
countProductNumber: resp.countProductNumber,
countAmount: resp.countAmount,
}
}).catch(e => {
console.log('eeeee', e)
})
},
}
}
</script>
<style lang="scss">
.title {
width: 100%;
height: 100rpx;
background: white;
display: flex;
align-items: center;
justify-content: space-around;
}
.titleSel {
color: #5f6fee;
font-size: 32rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.headerLineSel {
background: #5f6fee;
height: 6rpx;
width: 220rpx;
margin-top: 10rpx;
}
.headerLineUnsel {
background: #fff;
height: 6rpx;
width: 40rpx;
position: relative;
margin-top: 10rpx;
}
.swiper {
width: 100%;
flex: 1;
height: 100vh;
overflow: scroll;
}
.recordItem {
margin-top: 10rpx;
background-color: white;
padding-bottom: 20rpx;
padding-top: 20rpx;
}
</style>

1479
pages/login/fwxy.vue Normal file

File diff suppressed because it is too large Load Diff

175
pages/login/login.vue Normal file
View File

@@ -0,0 +1,175 @@
<template>
<view class="container">
<uni-load-more :status="status" :contentText="contentText" @clickLoadMore="loadMore"></uni-load-more>
</view>
</template>
<script>
import {
stringIsNotEmpty
} from '../../common/empty'
export default {
data() {
return {
status: "loading",
contentText: {
contentdown: "获取信息失败,点击重试",
contentrefresh: "获取信息中,请稍后",
contentnomore: "没有更多数据了"
},
// 中间件数据,不用改
middleware: null
}
},
onLoad(options) {
// 不用改
if (options != undefined && options.data != undefined) {
let shareData;
try {
// 跳转携带数据
shareData = JSON.parse(options.data)
} catch (e) {
shareData = JSON.parse(decodeURIComponent(options.data))
}
this.middleware = shareData
}
this.getWxCode()
},
methods: {
loadMore(e) {
if ('more' === e.detail.status) {
// 重新获取
this.getWxCode()
}
},
getWxCode() {
this.status = "loading"
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'
// _this.contentText.contentdown = res.data.msg+",点击重试"
}
} else {
// 成功后跳转主页
getApp().globalData.sid = res.data.data.sid
getApp().globalData.token = res.data.data.token
uni.setStorageSync("satoken", res.data.data.token)
console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token);
if (_this.middleware != null) {
// 走中间件的逻辑
if ('share' == _this.middleware.functionName) {
uni.reLaunch({
url: _this.middleware.url
});
} else if ('bindCard' == _this.middleware
.functionName) {
_this.middleware.params.customerSid = res.data.data
.sid
_this.$api.pickUpCardBind(_this.middleware.params)
.then((resp) => {
uni.reLaunch({
url: _this.middleware.url
});
}).catch(e => {
uni.showModal({
title: '提示',
content: e.msg,
showCancel: false,
success: function(res) {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}
});
})
} else {
uni.showModal({
title: '提示',
content: '版本过低',
showCancel: false,
success: function(res) {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}
});
}
} else {
uni.switchTab({
url: '/pages/home/pickUpCard'
})
}
if (_this.stringIsNotEmpty(_this.shareUrl)) {
} else {
}
}
} else {
_this.status = 'more'
}
},
fail: (err) => {
_this.status = 'more'
}
});
},
fail: function(res) {
_this.status = 'more'
}
});
}
}
}
</script>
<style>
.container {
width: 100%;
height: 90vh;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
uni-page-body,
page {
width: 100%;
height: 100%;
height: calc(100% + var(--window-bottom); );
}
</style>

334
pages/login/yszc.vue Normal file
View File

@@ -0,0 +1,334 @@
<template>
<view style="padding: 30rpx;">
<p style="text-align:center">
<span style=";font-family:黑体;font-size:21px">汇融云眼程序隐私政策</span>
</p>
<p style="text-indent:28px; margin-top: 20rpx;">
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
<span style="font-family:微软雅黑">欢迎使用汇融云眼</span>
</span>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px"></span>
</p>
<p style="text-indent:28px">
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
请您务必仔细阅读和理解以下条款若您一旦接受我公司产品或服务则表示您同意接受我公司约定的以下各项条款的约束若您不接受以下条款请您立即停止使用我公司的产品及服务
</span>
</p>
<p style="text-indent:28px">
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
<span style="font-family:微软雅黑">
为了使您充分理解本协议本协议中与您的权益存在或可能存在重大关系的部分我们已采用下划线加粗等方式提示您注意您点击
</span>
&quot;确认&quot;或进行类似操作后即表示您已同意我们按照本协议来使用和保护您的信息
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">声明与承诺</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您理解并承诺在您接受我公司的产品或服务前您已充分阅读理解并接受本协议的全部内容您接受我公司的产品或服务即表示您同意遵循本协议之所有约定您理解并同意本协议规定的内容并对相关法律法规有适当的了解如您不能清楚地知晓或理解国家相关法律法规规定的内容您应当咨询相关法律专业人士后再决定是否接受本协议
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您在此确认知悉并同意我公司有权依据国家法律法规及运营需求对本协议条款不时地进行修改我公司如更新本协议相关条款将采用在一诺云网www.enuoyun
.com上公布通知您该等修改增加或删减的内容以便您随时了解我公司产品或服务对您信息资料的收集和使用方法一经公告即视为上述内容已经通知到您若您在本协议及各类规则变更后继续使用我公司产品或服务的视为您已仔细认真阅读充分理解并同意接受修改后的协议条款及各类规则您有义务不时关注并阅读最新版的协议及网站公告等如您不同意更新后的协议应立即停止接受我公司产品或服务否则视为您同意接受更新后的协议
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您保证作为自然人在您同意接受本协议时您已经年满16周岁作为企业事业单位等组织您在中华人民共和国中国大陆地区不含香港台湾澳门地区合法开展经营活动或其他业务或依照中国大陆地区不含香港台湾澳门地区法律登记注册成立本协议内容不受您所属国家或地区法律的约束不具备前述条件的您应立即停止使用本软件提供的服务
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我公司为遵守国家法律法规向您提供服务保护您的隐私及提升服务质量的目的将按照本协议收集使用您的信息包括但不限于我公司认为了解您的需求和开展业务所必需的相关资料本协议包含了我们收集存储保护使用您的信息的条款请您完整地阅读本协议项下各条款
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">信息收集</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您在此不可撤销地同意并授权我公司收集以下信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.在您使用或接受我公司产品或服务时我们会获取您的信息包括但不限于基本信息企业经营商务交易信息等
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.设备信息我公司产品或服务会接收并记录您所使用的设备相关信息例如设备型号操作系统版本设备设置唯一设备标识符设备环境等软硬件特征信息设备所在位置相关信息例如IP
地址GPS位置以及能够提供相关信息的WLAN接入点蓝牙和基站等传感器信息及您所授予的设备权限使用所获信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.服务日志信息当您接受我公司提供的产品或服务时我们会自动收集您对我们服务的详细使用情况作为有关网络日志保存例如搜索查询内容IP地址浏览器的类型电信运营商使用的语言访问日期和时间及您访问的网页记录等
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.发票信息当您接受我公司提供的产品或服务时我们会收集您在使用我公司产品或服务时主动提供的以及通过自动化方式收集您在使用功能或接受服务过程中产生的增值税发票信息以及开具增值税发票需要的业务信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.为了更好地为您提供服务经您授权通过合法途径从我公司产品或我公司提供的服务过程中获取的其他您信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6.在法律行政法规允许的范围内采集的您的您信息
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">除外信息</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您了解并同意以下信息属于您自愿主动在公开领域传播的信息我公司存储使用以下信息无需您授权
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)您在使用我公司产品提供的搜索服务时输入的关键字信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2)您在使用我公司产品或接受我公司服务时所产生的信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3)您违反法律规定或违反我公司产品规则的行为以及我公司已对您采取的措施
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">信息使用</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一旦您使用我公司的产品或服务我公司即有权依照自行设立的模型模式格式规则流程等对您的您信息进行整理保存加工
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我公司将以高度的勤勉审慎义务对待您信息您不可撤销地授权并同意我公司将收集到的您信息用于以下用途
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)将信息进行整合和处理以便更好地为您提供服务并依此对我公司的产品或服务进行改进保存整理加工您信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2)为达到服务您的目的我公司可能通过使用您信息向您提供您感兴趣的通知营销活动及其他商业性电子信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3)经您明确同意并授权的其他用途
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4)除本协议明确阐述和相关法律法规规定外我公司不会向任何无关第三方提供出售出租或交易您的信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5)我公司不允许任何第三方以任何手段收集编辑出售或者传播您的信息如您从事上述活动一经发现我公司有权立即终止与该您的服务协议并要求赔偿相应损失
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">信息保护</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我们致力于维护您对我公司的产品或服务的信任因此我公司会使用商业上合理的技术和其他措施防止您信息的丢失和被盗用并对您信息的保护情况不定期进行自查记录自查情况以便及时消除自查中发现的安全隐患为尽可能地保护您的信息安全我公司提请您注意
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)我公司的产品账号均有安全保护功能请妥善保管您的账号及密码信息我公司将通过对您密码进行加密等安全措施确保您的信息不丢失不被滥用和变造尽管有前述安全措施但同时也请您注意在信息网络上不存在完善的安全措施您信息仍存在丢失被盗用的可能非因我公司过错而发生上述情况我公司不承担任何责任
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2)请您妥善保护自己的信息仅在必要的情形下向他人提供如您发现信息泄露尤其是您的账户及密码发生泄露请您立即联络客服以便采取相应措施
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">服务使用限制</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您在使用我公司产品或服务时应遵守中华人民共和国相关法律法规不将本服务用于任何非法目的也不以任何非法方式使用我公司产品或服务
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您不得利用我公司产品或服务从事侵害他人合法权益之行为
否则我们有权拒绝提供相关服务且您应承担所有相关法律责任因此导致我公司受损的您应承担赔偿责任
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您理解并同意我公司不对因下述任一情况导致的任何损害赔偿承担责任包括但不限于利润商誉数据等方面的损失或其他无形损失的损害赔偿无论我公司是否已被告知该等损害赔偿的可能性
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1如果您违反本协议的明文规定及精神我们可能对您暂停中断或终止提供本服务或其任何部分但我们会在法律允许的范围内继续持有保存您的您信息与使用本服务的记录
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2在发现我公司产品或服务被异常使用或对我公司产品或服务的使用有合理疑义或对我公司产品或服务的使用有违反法律规定或本协议约定之虞时我公司有权不经通知先行暂停或终止您对于本服务使用具体可能导致暂停或终止本软件服务的情形包括但不限于
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1根据本协议的约定</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2根据法律法规及法律文书的规定
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3根据有权机关的要求</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4您使用我公司的产品或服务的行为涉嫌违反国家法律法规及行政规定的
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5本公司依据自行合理判断认为可能产生风险的
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6您遭到他人投诉且对方已经提供了一定证据的
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;若您停止使用我公司的产品或服务我公司仍可能保有您的相关信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;禁止反向工程反向编译和反向汇编您不得对本软件产品进行反向工程ReverseEngineer反向编译Decompile或反向汇编Disassemble同时不得改动编译在程序文件内部的任何资源除法律法规明文规定允许上述活动外您必须遵守此协议限制
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
组件分割:我公司的产品或服务是作为一个单一产品而被授予许可使用,您不得将各个部分分开用于任何目的
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;个别授权:如需进行商业性的销售复制分发包括但不限于软件销售预装捆绑等必须获得我公司的书面授权和许可
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;保留权利本协议未明示授权的其他一切权利仍归我公司所有您使用其他权利时必须获得我公司的书面同意
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">信息披露</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我公司对您提供的信息严格保密除具备下列情形外不会向任何外部机构披露
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)经过您事先同意而对外披露的您信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2)应法律法规或公权力部门如法院政府部门上级监管机构等执法机构的要求而披露的您信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3)当我公司涉及合并收购或资产出售等重大交易时我公司有权依据交易的需要将您信息提供给交易相对方及交易各方聘请的各中介机构(包括但不限于律师会计师等)我们会在任何信息进行转让或受其他隐私权政策约束之前继续确保其保密性并及时通知受影响方
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4)我公司可能会为了保护我公司产品自身我公司员工和客户我公司合作伙伴和其他公众的合法权利利益和安全而披露您的信息
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
<span style="font-family:微软雅黑"></span>
Cookies的使用
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)在您未拒绝接受cookies的情况下我公司的产品或服务会在您的客户端设定或取用cookies以便您能登录或使用依赖于cookies的产品或服务我公司的产品或服务使用cookies可为您提供更加周到的个性化服务包括推广服务
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2)您有权选择接受或拒绝接受cookies您可以通过修改设置的方式拒绝接受cookies但如果您选择拒绝接受cookies则您可能无法登录或使用依赖于cookies的产品的网络服务或功能
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3)通过我公司的产品或服务所设cookies所取得的有关信息将适用本协议
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">法律管辖和适用</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本协议的订立履行和解释及争议的解决均应适用中华人民共和国大陆地区适用之有效法律但不包括其冲突法规则协议履行期间凡因本协议引起的或与本协议有关的一切争议纠纷双方应首先友好协商解决协商不成您在此完全同意将纠纷或争议提交被告住所地人民法院管辖
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">其他</span></p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)因台风地震海啸洪水战争计算机病毒感染黑客攻击网络通信故障等不能预见不能控制的不可抗力因素造成本我公司产品不能正常向您提供服务而可能导致的损失我公司不承担责任
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2)您理解并同意鉴于网络服务的特殊性本协议可在您接受我公司产品或服务的过程中多次使用未来为您提供服务时再次涉及到本协议服务内容时无需您另行签署
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3)知识产权与我公司产品及服务相关的任何内容和资源的知识产权均属于我公司所有未经我公司书面明确许可任何单位和个人不得以任何方式将我公司产品或服务之内容和相关资源作全部或部分复制转载引用编辑
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4)我公司产品或服务仅在您接受本协议条款并依此提供您信息且授权我公司产品按照上述条款的规定获取您信息的基础上提供服务如您不同意本协议条款或不同意进行相应操作则您将无法使用我公司产品的全部服务或相应部分服务
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5)若本协议中任何一条无论因何种原因完全或部分无效或不具有执行力本协议的其他条款仍继续有效
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6)您在本协议项下对我公司的产品或服务的授权将视为对我公司的授权
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7)您如需更正所提供的信息或希望停止接受我公司的产品或服务或对本协议有任何疑问请通过联系我公司在线客服或直接拨打客服电话
&nbsp;95113 &nbsp;的途径联系处理
</span>
</p>
<p>
<span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8)我公司对本协议有最终解释权
</span>
</p>
<p><span style="font-family: 微软雅黑;letter-spacing: 0;font-size: 14px">&nbsp; &nbsp; &nbsp;&nbsp;</span></p>
<p><br /></p>
</view>
</template>
<script></script>
<style></style>