111111111

This commit is contained in:
2024-01-28 10:04:08 +08:00
parent 854fc36817
commit f37a1de4f9
10 changed files with 359 additions and 35 deletions

View File

@@ -33,7 +33,7 @@
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text
style="font-size: 16px;color: #000; font-weight: 600;font-family: sans-serif;">暂无提货信息</text>
style="font-size: 16px;color: #000; font-weight: 600;font-family: sans-serif;">暂无提货信息</text>
<view style="display: flex;flex-direction: row;align-items: center;" @click="address()">
<text style="font-size: 12px;color: #FF9900;">去完善</text>
@@ -94,7 +94,7 @@
<view v-if="info.name==''" style="display: flex;flex-direction: row;align-items: center;"
@click="changePer()">
<text style="font-size: 12px;color: #999; margin-left: 8px;">完善</text>
<text style="font-size: 12px;color: #999; margin-left: 8px;">完善</text>
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;margin-left: 5px;">
</image>

View File

@@ -57,10 +57,9 @@
</view>
<view style="height: 150px; background: #F2F2F2;"></view>
</view>
<view v-if="notData"
style="display: flex;flex-direction: column;align-items: center;margin-top: -30vw;">
<view v-if="notData" style="display: flex;flex-direction: column;align-items: center;margin-top: -30vw;">
<image src="https://supervise.yxtsoft.com/lpk/image/not_Cart.png" mode="aspectFit"
style="width: 50vw;height: 50vw;"></image>
<view style="display: flex;flex-direction: column;align-items: center;margin-top: 10px;">
@@ -69,7 +68,7 @@
background: -webkit-linear-gradient(left,#FFC369,#FF9901);margin-top: 10px;" @click="gotoShopp()">去逛逛</text>
</view>
</view>
<!-- </scroll-view> -->
<view style=" width: 100%; display: flex;flex-direction: column;position: fixed;bottom: 0;overflow:hidden;
@@ -119,8 +118,7 @@
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="base" title="起订说明" :showConfirm="true"
:beforeClose="dialogBeforeClose" @confirm="dialogInputConfirm"
content="百姓菜窖及精品菜窖起订量为20斤\n\n20斤-99斤需额外支付10%附加费用,\n\n100斤-199斤需额外支付5%附加费用,\n\n满200斤及以上无附加费。"></uni-popup-dialog>
:beforeClose="dialogBeforeClose" @confirm="dialogInputConfirm" :content="page.qdxy"></uni-popup-dialog>
</uni-popup>
</view>
@@ -130,7 +128,7 @@
export default {
data() {
return {
notData:false,
notData: false,
dialogBeforeClose: false,
page: {
affiliation: '',
@@ -138,7 +136,8 @@
price: "0",
reduce: "0",
remarks: "",
qssl: ""
qssl: "",
qdxy: ""
},
data: [
@@ -148,16 +147,17 @@
onLoad(options) {
this.page.affiliation = options.affiliation
this.page.qssl = options.weight
this.page.qdxy = options.qdxy
console.log(" options", options);
},
onShow() {
this.request()
},
methods: {
gotoShopp(){
gotoShopp() {
uni.reLaunch({
url:"/pages/home/cloudCard2"
url: "/pages/home/cloudCard2"
})
},
showPop() {
@@ -180,8 +180,8 @@
_this.$api.shoppingCartList(params).then((resp) => {
console.log("resp", resp);
_this.data = resp
_this.notData = resp.length==0
_this.notData = resp.length == 0
// _this.getallPrice()
// _this.getweight()
_this.getAllPriceOrWeight()
@@ -342,8 +342,7 @@
// console.log("resp", resp);
this.$pay(resp)
}).catch(e => {
})
}).catch(e => {})
},

267
pages/good/transfer.vue Normal file
View File

@@ -0,0 +1,267 @@
<template>
<view style="width: 100%;height: 100%;background: #FFA35A;display: flex;flex-direction: column;">
<!-- <NavBar ref="nav" navTitle="转赠亲友" :showIcon="true" :supportChange="false">
</NavBar> -->
<view
style="display: flex;flex-direction: column;background: #f7f7f7;padding: 10px;border-radius: 15px; height: 100vh;width: 100%; box-sizing: border-box;">
<scroll-view scroll-y="true" style="height: calc(100vh - 150px); width: 100%; background: #fff;padding: 10px; box-sizing: border-box;
" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<view style="display: flex;flex-direction: column;">
<view v-for="(item,index) in pickingUpGoods"
style=" display: flex;flex-direction: row;margin-top: 15px; margin-bottom: 10px;">
<view style="display: flex;flex-direction: row;align-items: center;width: 100%; ">
<image :src="item.iconUrl" style="width: 90px;height: 90px; border-radius: 10px; "
mode="aspectFill" @click="itemClick(item.goodsSid)"></image>
<view
style="display: flex;flex-direction: column;flex: 1; padding-bottom: 15px; margin-left: 10px;"
:style="{'border-bottom':(index == goods.length-1 ? 'none' : '1px #EFEFEF solid')}">
<text style="font-size: 14px;color: #000; font-weight: 600;">{{item.name}}</text>
<text style="font-size: 10px;color: #999;margin-top: 5px;">{{item.remark}}</text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
font-size: 10px;color: #EE752F;">{{item.weight}}{{item.specificationUnit}}/{{item.unitName}}</text>
<text
style="border: 1px #EE752F solid; background: #FF9900;margin-left: 10px; color: #fff; font-size: 10px;border-radius: 5px; padding: 0px 8px;"
v-if="item.type=='0'">百姓菜!</text>
<text
style="border: 1px #3AA15F solid; background: #40C772;margin-left: 10px; color: #fff; font-size: 10px;border-radius: 5px; padding: 0px 8px;"
v-if="item.type=='1'">精品菜!</text>
<text
style="border: 1px #1D60C7 solid; background: #2489F7;margin-left: 10px; color: #fff; font-size: 10px;border-radius: 5px; padding: 0px 8px;"
v-if="item.type=='2'">企业菜!</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between; margin-top: 15px;
margin-right: 15px;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="font-size: 10px;color: #FF5006;">剩余</text>
<text
style="font-size: 14px;color: #FF5006;">{{item.goodsNumber}}{{item.unitName}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<image src="../../static/jian_icon.png" mode="aspectFill"
style="width: 20px;height: 20px;" @click.stop="jian(item)"></image>
<text
style="font-size: 14px;margin-left: 8px;margin-right: 8px;">{{item.count}}</text>
<image src="../../static/jia_icon.png" mode="aspectFill"
style="width: 20px;height: 20px;" @click.stop="jia(item)"></image>
</view>
</view>
</view>
</view>
</view>
<view v-if="transferNotData"
style="display: flex;flex-direction: column;justify-content: center;align-items: center;margin-top: 5vw;">
<image src="https://supervise.yxtsoft.com/lpk/image/supplementing.png" mode="aspectFit"
style="width: 50vw;height: 50vw;"></image>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: -15px;">
<text style=" border-radius: 8px; padding: 3px 8px; color: #999;">没有商品咯,请添加~</text>
</view>
</view>
</view>
</scroll-view>
</view>
<view style="position: fixed;bottom: 0;display: flex;flex-direction: column;
border-top: 1px solid #f7f7f7;
justify-content: center;background: #fff; width: 100%;box-sizing:border-box;">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;
padding-left: 15px;padding-right: 15px;">
<text style="font-size: 14px;margin-right: 10px;font-weight: 600;">转赠留言</text>
<input placeholder="可以写下您对亲友的祝福"
style="font-size: 30rpx;flex: 1;background: #F2F2F2;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;padding-right: 10px;"
:value="transferInfo.remarks" @input="onKeyInput" />
</view>
<button open-type="share" :disabled="transferNotData">确认</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
affiliation: "",
transferNotData: false,
transferInfo: {
},
pickingUpGoods: [],
}
},
onLoad(options) {
this.pickingUpGoods = JSON.parse(decodeURIComponent(options.pickingUpGoods))
this.affiliation = options.affiliation
console.log(">>>>>", options);
console.log(">>>>>", this.pickingUpGoods);
console.log(">>>>>", this.affiliation);
},
onPageScroll(res) {
// 渐变
this.$refs.nav.defaultColorBgAlpha(res)
},
methods: {
onKeyInput(event) {
this.transferInfo.remarks = event.target.value
},
jian(item) {
console.log("item》》》》", item)
const that = this
if (Number(item.count) == 1) {
wx.showModal({
content: '确定不要了吗',
cancelText: "再想想",
confirmText: "删除",
confirmColor: "#FF9900",
success(res) {
if (res.confirm) {
console.log('用户点击确定')
item.count = 0
const index = that.pickingUpGoods.findIndex((info) => info.goodsSid === item
.goodsSid)
console.log("index》》》》", index)
that.pickingUpGoods.splice(index, 1)
that.transferNotData = that.pickingUpGoods.length == 0
} else if (res.cancel) {
}
}
})
} else {
if (Number(item.count) > 0) {
item.count = Number(item.count) - 1
}
}
},
jia(item) {
if (item.count < item.goodsNumber)
item.count = Number(item.count) + 1
},
onShareAppMessage: function(res) {
let _this = this
const promise = new Promise(resolve => {
// 模拟网络请求
setTimeout(() => {
var list = []
for (var i = 0; i < this.pickingUpGoods.length; i++) {
var item = this.pickingUpGoods[i]
if (item.count > 0) {
list.push({
goodsSid: item.goodsSid,
select: item.count
})
}
}
var params = {
customerSid: getApp().globalData.sid,
brandId: _this.affiliation,
remarks: _this.transferInfo.remarks,
vos: list
}
// console.log("=========0", params);
_this.$api.transSubmission(params).then((resp) => {
// console.log("=========", resp);
_this.showModal3 = false
let shareData = JSON.stringify({
params: {
code: resp.transferCode,
codeKey: resp.sid
},
functionName: 'bindCard',
url: '/pages/bind/bind_cloudCard?code=' + resp
.transferCode + "&codeKey=" + resp.sid
// url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid,
// functionName: 'share'
})
// 转码传输
let value = encodeURIComponent(shareData)
resolve({
title: '汇融惠享-云菜窖',
// ②
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/share_transfer.png', //自定义图片路径,显示图片长宽比是 5:4。
})
}).catch(e => {
_this.shortToast('发生错误,请稍后再试.')
return
})
}, 0)
})
return promise
},
}
}
</script>
<style>
button {
background: #FF9900;
color: #fff;
margin-top: 20px;
height: 40px;
width: 80%;
line-height: 40px;
text-align: center;
border-radius: 20px;
margin-bottom: 20px;
}
</style>