1111
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
<NavBar ref="nav" navTitle=" " :showIcon="false" :start-change-height="page.startHeight"
|
||||
:end-change-height="page.endHeight">
|
||||
</NavBar>
|
||||
|
||||
<!-- <view style="background: #F7F7F7; opacity: 0.5; border-radius: 20px;display: flex;flex-direction: row;align-items: center;
|
||||
padding-left: 10px; margin-left: 20px;width: 40vw; margin-top: 5vh;">
|
||||
<image src="../../static/search_icon.png" mode="aspectFill" style="width: 25px;height: 25px;">
|
||||
</image>
|
||||
<input placeholder="搜索"
|
||||
style="font-size: 25rpx;flex: 1;height: 35px;line-height: 35px;padding-left: 10px;padding-right: 10px;"
|
||||
:value="searchInfo.name" @input="onKeyInput" />
|
||||
</view> -->
|
||||
|
||||
<view style="display: flex;flex-direction: row;align-items: center;justify-content: center;;
|
||||
padding-left: 10vw;padding-right: 10vw; margin-top: 40vw;">
|
||||
@@ -99,8 +108,9 @@
|
||||
<image :src="item.iconUrl" style="width: 90px;height: 90px; border-radius: 10px; "
|
||||
mode="aspectFill"></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')}">
|
||||
<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: 13px;color: #000;">{{item.name}}</text>
|
||||
|
||||
@@ -219,8 +229,17 @@
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<uni-popup ref="inputDialog" type="dialog">
|
||||
<uni-popup-dialog ref="inputClose" mode="base" title="订购协议" :showConfirm="true"
|
||||
:beforeClose="dialogBeforeClose" @confirm="dialogInputConfirm" :content="dialogContent"
|
||||
:confirm-text="confirmText"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
@@ -229,6 +248,10 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogContent: "这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容这里是协议内容,这里是协议内容",
|
||||
confirmText: "我知道了(5s)",
|
||||
dialogBeforeClose: false,
|
||||
countdown: 5,
|
||||
scrollHeight: "",
|
||||
scrollLeftTop: "0",
|
||||
scrollRightTop: "0",
|
||||
@@ -283,7 +306,7 @@
|
||||
|
||||
}
|
||||
this.getAllPriceOrWeight()
|
||||
this.getgoods()
|
||||
this.getgoods()
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
@@ -294,7 +317,7 @@
|
||||
this.page.endHeight = info.windowWidth * 0.8
|
||||
|
||||
this.request()
|
||||
|
||||
|
||||
// this.getallPrice()
|
||||
// this.getweight()
|
||||
// this.getcount()
|
||||
@@ -517,10 +540,10 @@
|
||||
settlement() {
|
||||
// 支付
|
||||
|
||||
// if (this.page.weight < 200) {
|
||||
// this.shortToast('满200斤才可定制云菜窖哦,请继续选菜吧。')
|
||||
// return
|
||||
// }
|
||||
if (this.page.weight < 20) {
|
||||
this.shortToast('满200斤才可定制云菜窖哦,请继续选菜吧。')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let list = []
|
||||
@@ -544,19 +567,78 @@
|
||||
return
|
||||
}
|
||||
|
||||
this.showPop()
|
||||
|
||||
// console.log("params", params);
|
||||
|
||||
// let _this = this
|
||||
// _this.$api.createOrder(params).then((resp) => {
|
||||
|
||||
// // console.log("resp", resp);
|
||||
// this.$pay(resp)
|
||||
// }).catch(e => {})
|
||||
|
||||
},
|
||||
showPop() {
|
||||
|
||||
this.$refs.inputDialog.open()
|
||||
|
||||
let timeOut = setInterval(() => {
|
||||
|
||||
if (this.countdown == 1) {
|
||||
this.confirmText = "确定"
|
||||
this.countdown = 5
|
||||
this.dialogBeforeClose = false
|
||||
clearInterval(timeOut)
|
||||
|
||||
} else {
|
||||
this.dialogBeforeClose = true
|
||||
this.countdown = this.countdown - 1;
|
||||
this.confirmText = "我知道了" + "(" + this.countdown + "s)"
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
|
||||
dialogInputConfirm(val) {
|
||||
if (this.confirmText == "确定") {
|
||||
this.confirmText = "我知道了(5s)",
|
||||
this.dialogBeforeClose = true,
|
||||
this.countdown = 5
|
||||
this.saveGoods()
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
saveGoods() {
|
||||
|
||||
let list = []
|
||||
|
||||
for (var i = 0; i < this.goods.length; i++) {
|
||||
var item = this.goods[i]
|
||||
if (item.goodsNumber > 0)
|
||||
list.push({
|
||||
goodsSid: item.goodsSid,
|
||||
goodsNumber: item.goodsNumber,
|
||||
})
|
||||
}
|
||||
// console.log("ddd", list);
|
||||
|
||||
if (list.length == 0) {
|
||||
this.shortToast('请添加商品')
|
||||
return
|
||||
}
|
||||
|
||||
var params = {
|
||||
customerSid: getApp().globalData.sid,
|
||||
cardNumber: 1,
|
||||
totalTee: this.page.price,
|
||||
ordOrderDetailsVoList: list
|
||||
affiliation: this.brandType,
|
||||
vos: list
|
||||
}
|
||||
// console.log("params", params);
|
||||
|
||||
let _this = this
|
||||
_this.$api.createOrder(params).then((resp) => {
|
||||
_this.$api.saveGoods(params).then((resp) => {
|
||||
|
||||
// console.log("resp", resp);
|
||||
this.$pay(resp)
|
||||
_this.request()
|
||||
}).catch(e => {})
|
||||
|
||||
},
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
||||
|
||||
<image src="https://supervise.yxtsoft.com/lpk/image/buchongcaijiao.png"
|
||||
mode="aspectFit" style="width: 15vm;height: 15vm;"></image>
|
||||
mode="aspectFit" style="width: 50vw;height: 50vw;"></image>
|
||||
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;">
|
||||
<text style="font-size: 14px; color: #666;margin-right: 5px;">您的菜窖为空,请</text>
|
||||
<text
|
||||
@@ -399,6 +399,9 @@
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
this.request()
|
||||
this.page.count=0
|
||||
},
|
||||
onHide() {
|
||||
this.colseDialog()
|
||||
@@ -411,7 +414,7 @@
|
||||
this.page.startHeight = info.windowWidth * 0.6
|
||||
this.page.endHeight = info.windowWidth * 0.8
|
||||
|
||||
this.request()
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
@@ -507,7 +510,12 @@
|
||||
},
|
||||
reservation() {
|
||||
if (this.pickingUpGoods.length > 0){
|
||||
this.showModal = true
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/good/reservation?pickingUpGoods='+JSON.stringify(this.pickingUpGoods)+"&affiliation="+this.brandType,
|
||||
})
|
||||
|
||||
// this.showModal = true
|
||||
}else{
|
||||
this.shortToast('请先选择商品')
|
||||
}
|
||||
@@ -561,6 +569,7 @@
|
||||
opacity: 0.5;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 65;
|
||||
}
|
||||
|
||||
.modalDlg {
|
||||
@@ -571,8 +580,8 @@
|
||||
top: 50vw;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 9999;
|
||||
opacity:1;
|
||||
background-color: #fff;
|
||||
border-top-right-radius: 20px;
|
||||
border-top-left-radius: 20px;
|
||||
|
||||
Reference in New Issue
Block a user