Browse Source

11111111

master
guoxing 1 year ago
parent
commit
129c65d5d6
  1. 4
      common/config.js
  2. 8
      common/request.api.js
  3. 30
      pages.json
  4. 2
      pages/bind/bind_cloudCard.vue
  5. 257
      pages/good/goodsDetail.vue
  6. 349
      pages/good/goodsDetail2.vue
  7. 89
      pages/good/shoppCart.vue
  8. 4
      pages/home/cloudCard2.vue
  9. 108
      pages/home/myCellar.vue
  10. 327
      pages/me/addInvoice.vue
  11. 478
      pages/me/makeInvoice.vue
  12. 213
      pages/records/orderDetail.vue
  13. 75
      pages/records/reservationRecords3.vue
  14. BIN
      static/close3.png
  15. BIN
      static/phone-3.png

4
common/config.js

@ -6,10 +6,10 @@
* loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面
*/
module.exports = {
// baseUrl: 'http://192.168.2.117:7211', // 本地
baseUrl: 'http://192.168.2.117:7211', // 本地
// baseUrl: 'https://lpk.yyundong.com/lpkapi', // 测试服务器
// baseUrl: 'https://lpk.yyundong.com/mallapi', // 测试服务器
baseUrl: 'https://supervise.yxtsoft.com/lpkapi', // 正式服务器
// baseUrl: 'https://supervise.yxtsoft.com/lpkapi', // 正式服务器
// tokenName: "Authorization", // 请求头中token的名字,与服务器端对应
loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码
loginTimeoutPage: "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面

8
common/request.api.js

@ -71,6 +71,8 @@ export default {
createOrder: (params = {}) => request.post("/empsreservoorder/createOrder", params),
// 预约记录
orderListByUserSid: (params = {}) => request.post("/lpksreservoorder/orderListByUserSid", params, {}, {}),
// 取消预约记录
cancelReservation: (params = {}) => request.get("/lpksreservoorders/cancelReservation/"+ params, params, {}, {}),
// 转赠记录
transferRecordsList: (params = {}) => request.post("/transferrecords/transferRecordsList", params, {}, {}),
@ -108,6 +110,12 @@ export default {
orderDetails: (params = {}) => request.get("/empsreservoorder/OrderDetails/" + params, params, {}, {}, true),
// 我的 订单详情 修改订单状态
changePayState: (params = {}) => request.get("/empsreservoorder/changePayState/" + params, params, {}, {}, true),
// 查询发票列表
getInvoiceList: (params = {}) => request.get("/customerinvoice/listInvoice/" + params, params),
// 新增发票
saveOrUpdateInvoice: (params = {}) => request.post("/customerinvoice/saveOrUpdate", params, {}, {}),
// 提交申请发票
submitInvoice: (params = {}) => request.post("/invoicerecords/save", params, {}, {}),
// 我的 推荐有礼
recommendNewUsers: (params = {}) => request.post("/newcomerrecorecord/recommendNewUsers", params, {}, {}),
// 新人助力

30
pages.json

@ -1,7 +1,6 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/login/login",
"style": {
@ -146,7 +145,15 @@
"style": {
"navigationBarTitleText": "产品详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/good/goodsDetail2",
"style": {
"navigationBarTitleText": "产品详情",
"enablePullDownRefresh": false
}
},
{
@ -369,24 +376,37 @@
}
},
{
"path" : "pages/home/newUserPlay",
"path": "pages/home/newUserPlay",
"style": {
"navigationStyle": "custom"
}
},
{
"path" : "pages/records/recommendRecords",
"path": "pages/records/recommendRecords",
"style": {
"navigationStyle": "custom",
"disableScroll": true
}
},
{
"path" : "pages/me/authentication",
"path": "pages/me/authentication",
"style": {
"navigationStyle": "custom",
"disableScroll": true
}
}, {
"path": "pages/me/makeInvoice",
"style": {
"navigationBarTitleText": "开具发票",
"disableScroll": true
}
},
{
"path": "pages/me/addInvoice",
"style": {
"navigationBarTitleText": "新增发票",
"disableScroll": true
}
}

2
pages/bind/bind_cloudCard.vue

@ -151,7 +151,7 @@
},
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
url: '/pages/good/goodsDetail2?sid=' + goodsSid
})
},
getData() {

257
pages/good/goodsDetail.vue

@ -1,8 +1,8 @@
<template>
<view style="height: 100vh;background: #fff;">
<loading-state ref="pageView" @request="request">
<view style="height: 87vh;overflow: hidden;overflow-y: auto;">
<image :src="data.picUrl" style="width: 100vw;height: 80vw;" mode="aspectFill"></image>
<view style="height: 85vh;overflow: hidden;overflow-y: auto;">
<image :src="data.picUrl" style="width: 100vw;height: 80vw;" mode="scaleToFill"></image>
<view style="display: flex;flex-direction: column;background: #fff;padding: 20px 20px 0px 20px;margin-top: 10px;
border-top-left-radius: 20px;border-top-right-radius: 20px;height: 100%;">
@ -37,8 +37,9 @@
</view>
</loading-state>
<view style="position: absolute; bottom: 0px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box; padding-left: 16px;padding-right: 16px;background: #fff; height: 13vh;">
<view
style="position: absolute; bottom: 0px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box; padding-left: 16px;padding-right: 16px;background: #fff; height: 15vh;border-top: 1px solid #EFEFEF;">
<view
style="display: flex;flex-direction: row;align-items: center; justify-content: center; margin-top:10px;">
@ -68,16 +69,17 @@
<view
style="display: flex;flex-direction: row; justify-content: center;align-items: center;margin-top: 10px;padding: 0px 10px;margin-bottom: 20px;">
<text style="background: #FF9900; color: #fff;font-size: 13px; padding: 0px 15px;height: 40px;line-height: 40px;
border: 1px #FF5006 solid; border-top-left-radius: 25px; border-bottom-left-radius: 25px;flex-shrink: 0;"
@click="inCart()">加入购物车</text>
<text style="background: #FF9900; color: #fff;font-size: 14px; padding: 0px 15px;height: 50px;line-height:50px;flex: 1;text-align: center;
border: 1px #FF9900 solid; border-top-left-radius: 25px; border-bottom-left-radius: 25px;"
@click="showDialog()">加入购物车</text>
<view style="border: 1px #FF5006 solid;margin-left: 5px;margin-right: 5px;padding: 0px 5px;height: 42px;flex: 1;
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;" @click="gotoCart()">
<view style="border: 1px #FF9900 solid;border-top-right-radius: 25px; border-bottom-right-radius: 25px;padding: 0px 5px;height: 50px;line-height:50px;flex: 1;
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;justify-content: center;"
@click="gotoCart()">
<image src="../../static/shoppCart_icon.png" mode="aspectFill"
style="height: 20px;width: 20px;flex-shrink: 0;">
</image>
<view style="display: flex;flex-direction: column;flex: 1;">
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
<text
style="font-size: 15px;color: #FF5006;margin-left: 5px;height: 20px;line-height: 20px;margin-top: 5px;font-weight: bold;">{{page.price}}</text>
<text v-if="page.remarks!=''"
@ -85,18 +87,133 @@
</view>
</view>
<text style="background: #FF9900; color: #fff;font-size: 13px; padding: 0px 15px;height: 40px;line-height: 40px;
border: 1px #FF5006 solid; border-top-right-radius: 25px; border-bottom-right-radius: 25px;flex-shrink: 0;"
@click="settlement()">结算</text>
</view>
</view>
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal'></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal'>
<view style="display: flex;flex-direction: row;padding: 16px 20px;margin-top: 10px;">
<image :src="data.picUrl" style="width: 90px;height: 90px;border-radius: 10px;" mode="scaleToFill">
</image>
<view style="display: flex;flex-direction: column;flex: 1;margin-left: 15px;">
<view style="display: flex;flex-direction: row;">
<text style="flex: 1;margin-right: 10px;">{{data.name}}</text>
<image src="../../static/close2.png" style="width: 22px;height: 22px;" @click="colseDialog()">
</image>
</view>
<view style="display: flex;flex-direction: row;margin-top: 8px;">
<text style="color: #EE752F;border: 1px #EE752F solid;
border-radius: 8px;padding: 1px 10px;font-size: 10px;">{{data.price}}/{{data.specificationUnit}}</text>
<text
style="margin-left: 10px;color: #EE752F;border: 1px #EE752F solid;
border-radius: 8px;padding: 1px 10px;font-size: 10px;">{{data.weight}}{{data.specificationUnit}}/{{data.unitName}}</text>
</view>
<text style="font-size: 12px;color: #E36443;margin-top: 8px;">提货截止日{{data.periodValidity}}</text>
<text style="font-size: 12px;color: #E36443;margin-top: 8px;">{{data.price}}</text>
</view>
</view>
<view
style="display: flex;flex-direction: row;margin-top:10px;justify-content: space-between;padding: 16px 20px;">
<text style="font-size: 16px;font-weight: 600;font-family: sans-serif;">数量</text>
<view style="display: flex;flex-direction: row;align-items: center;">
<image src="../../static/jian_icon.png" mode="aspectFill" style="width: 25px;height: 25px;"
@click.stop="jian(data)">
</image>
<text style="font-size: 16px;padding:5px; margin-left: 8px;margin-right: 8px;"
@click.stop="numberClick(data)">{{data.goodsNumber}}</text>
<image src="../../static/jia_icon.png" mode="aspectFill" style="width: 25px;height: 25px;"
@click.stop="jia(data)">
</image>
</view>
</view>
<view style="position: absolute; bottom: 0px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box; padding-left: 16px;padding-right: 16px;background: #fff; height: 15vh;
border-top: 1px solid #EFEFEF;">
<view
style="display: flex;flex-direction: row;align-items: center; justify-content: center; margin-top:10px;">
<view id="bomView" style="display: flex;flex-direction: row;align-items: center;">
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
温馨提示已订</view>
<view style="color: #FF5006;font-size: 15px;height: 15px;line-height: 15px;font-weight: bold;">
{{page.weight}}
</view>
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
{{data.qssl}}斤起订</view>
<view style="display: flex;flex-direction: row;align-items: center;" @click="showPop2()">
<text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;text-decoration:underline;font-style:oblique;">
起订说明</text>
<text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;margin-left: 2px;">
>></text>
</view>
</view>
</view>
<view
style="display: flex;flex-direction: row; justify-content: center;align-items: center;margin-top: 10px;padding: 0px 10px;margin-bottom: 20px;">
<text style="background: #FF9900; color: #fff;font-size: 14px; padding: 0px 15px;height: 50px;line-height:50px;flex: 1;text-align: center;
border: 1px #FF9900 solid; border-radius: 25px;" @click="upDateShoppCart()">加入购物车</text>
</view>
</view>
</view>
<!-- 输入数量 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal1'></view>
<view class="modalDlg4" catchtouchmove='preventTouchMove' v-if='showModal1'>
<view
style="display: flex;flex-direction: column;background: #fff; width: 80%; border-radius: 20px;box-sizing: border-box;">
<input type="number" placeholder="请输入数量" v-model="data.goodsNumber"
style="margin: 20px;border: 1px #bbb solid; padding: 5px;line-height: 30px;height: 30px;border-radius: 6px;" />
<view
style="flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;">
<button class="button1" @click="colseDialog1()">取消</button>
<button class="button2" @click="saveNum()">确定</button>
</view>
</view>
</view>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="more" title="订购协议" :showConfirm="true"
:beforeClose="dialogBeforeClose" @confirm="dialogInputConfirm" :content="data.dgxy"
:confirm-text="confirmText"></uni-popup-dialog>
</uni-popup>
<uni-popup ref="inputDialog2" type="dialog">
<uni-popup-dialog ref="inputClose" mode="more" title="起订说明" :showConfirm="true"
@ -112,6 +229,8 @@
export default {
data() {
return {
showModal: false,
showModal1: false,
page: {
sid: '',
weight: "",
@ -174,6 +293,30 @@
},
},
methods: {
showDialog() {
this.showModal = true
},
colseDialog() {
this.showModal = false
},
colseDialog1() {
this.showModal1 = false
},
saveNum() {
this.showModal1 = false
},
jian(item) {
if (Number(item.goodsNumber) > 0) {
item.goodsNumber = Number(item.goodsNumber) - 1
}
},
jia(item) {
item.goodsNumber = Number(item.goodsNumber) + 1
},
numberClick(item) {
this.showModal1 = true
},
request() {
var params = {
@ -234,7 +377,7 @@
inCart() {
this.data.goodsNumber = Number(this.data.goodsNumber) + 1
// this.data.goodsNumber = Number(this.data.goodsNumber) + 1
this.upDateShoppCart()
},
@ -250,11 +393,16 @@
}
let _this = this
console.log("upDateShoppCart", good);
_this.$api.addShoppingCart(good).then((resp) => {
_this.shortToast('已加入购物车。')
_this.getAllPriceOrWeight()
_this.getAllPriceOrWeight()
_this.showModal = false
uni.navigateBack()
}).catch(e => {
_this.showModal = false
})
},
settlement() {
@ -346,4 +494,71 @@
page {
background: #f3f4f6;
}
/* 弹窗样式 */
.model {
position: absolute;
width: 100%;
height: 100%;
background: #000;
z-index: 1;
opacity: 0.5;
top: 0;
left: 0;
}
.modalDlg {
/* 设置超出滚动 */
overflow: auto;
width: 100%;
position: fixed;
top: 70vw;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
background-color: #fff;
border-top-right-radius: 20px;
border-top-left-radius: 20px;
display: flex;
flex-direction: column;
}
.modalDlg4 {
/* 设置超出滚动 */
overflow: auto;
position: fixed;
z-index: 2;
display: flex;
width: 100%;
height: 100%;
top: 0;
left: 0;
flex-direction: column;
justify-content: center;
align-items: center;
}
button::after {
border: 0;
}
.button1 {
background: #fff;
color: #666;
flex: 1;
border-radius: 0px;
border-bottom-left-radius: 20px;
border: 1px solid #eee;
}
.button2 {
background: #fff;
color: #FF9900;
border-radius: 0px;
border-bottom-right-radius: 20px;
flex: 1;
border: 1px solid #eee;
}
</style>

349
pages/good/goodsDetail2.vue

@ -0,0 +1,349 @@
<template>
<view style="height: 100vh;background: #fff;">
<loading-state ref="pageView" @request="request">
<view style="height: 100vh;overflow: hidden;overflow-y: auto;">
<image :src="data.picUrl" style="width: 100vw;height: 80vw;" mode="aspectFill"></image>
<view style="display: flex;flex-direction: column;background: #fff;padding: 20px 20px 0px 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.price}}/{{data.specificationUnit}}</text>
</view>
<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.weight}}{{data.specificationUnit}}/{{data.unitName}}</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>
<!-- <view style="position: absolute; bottom: 0px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box; padding-left: 16px;padding-right: 16px;background: #fff; height: 13vh;">
<view
style="display: flex;flex-direction: row;align-items: center; justify-content: center; margin-top:10px;">
<view id="bomView" style="display: flex;flex-direction: row;align-items: center;">
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
温馨提示已订</view>
<view style="color: #FF5006;font-size: 15px;height: 15px;line-height: 15px;font-weight: bold;">
{{page.weight}}
</view>
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
{{data.qssl}}斤起订</view>
<view style="display: flex;flex-direction: row;align-items: center;" @click="showPop2()">
<text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;text-decoration:underline;font-style:oblique;">
起订说明</text>
<text
style="color: #6190D8;font-size: 13px;height: 10px;line-height: 10px;margin-top: 5px;margin-left: 2px;">
>></text>
</view>
</view>
</view>
<view
style="display: flex;flex-direction: row; justify-content: center;align-items: center;margin-top: 10px;padding: 0px 10px;margin-bottom: 20px;">
<text style="background: #FF9900; color: #fff;font-size: 13px; padding: 0px 15px;height: 40px;line-height: 40px;
border: 1px #FF5006 solid; border-top-left-radius: 25px; border-bottom-left-radius: 25px;flex-shrink: 0;"
@click="inCart()">加入购物车</text>
<view style="border: 1px #FF5006 solid;margin-left: 5px;margin-right: 5px;padding: 0px 5px;height: 42px;flex: 1;
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;" @click="gotoCart()">
<image src="../../static/shoppCart_icon.png" mode="aspectFill"
style="height: 20px;width: 20px;flex-shrink: 0;">
</image>
<view style="display: flex;flex-direction: column;flex: 1;">
<text
style="font-size: 15px;color: #FF5006;margin-left: 5px;height: 20px;line-height: 20px;margin-top: 5px;font-weight: bold;">{{page.price}}</text>
<text v-if="page.remarks!=''"
style="font-size: 10px;color: #666;margin-left: 5px; height: 10px;line-height: 10px;margin-bottom: 5px;">{{page.remarks}}</text>
</view>
</view>
<text style="background: #FF9900; color: #fff;font-size: 13px; padding: 0px 15px;height: 40px;line-height: 40px;
border: 1px #FF5006 solid; border-top-right-radius: 25px; border-bottom-right-radius: 25px;flex-shrink: 0;"
@click="settlement()">结算</text>
</view>
</view>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="more" title="订购协议" :showConfirm="true"
:beforeClose="dialogBeforeClose" @confirm="dialogInputConfirm" :content="data.dgxy"
:confirm-text="confirmText"></uni-popup-dialog>
</uni-popup>
<uni-popup ref="inputDialog2" type="dialog">
<uni-popup-dialog ref="inputClose" mode="more" title="起订说明" :showConfirm="true"
:beforeClose="dialogBeforeClose2" @confirm="dialogInputConfirm2"
:content="data.qdxy"></uni-popup-dialog>
</uni-popup> -->
</view>
</template>
<script>
export default {
data() {
return {
page: {
sid: '',
weight: "",
remarks: "",
price: ""
},
data: {
picUrl: '',
name: '',
price: '',
remarks: '',
appContent: ""
},
dialogContent: "这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容这里是协议内容,这里是协议内容",
confirmText: "我知道了(5s)",
dialogBeforeClose: false,
dialogBeforeClose2: false,
countdown: 5,
}
},
onLoad(options) {
this.page.sid = options.sid
},
onShow() {
this.request()
},
filters: {
/**
* 处理富文本里的图片宽度自适应
* 1.去掉img标签里的stylewidthheight属性
* 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() {
var params = {
customerSid: getApp().globalData.sid,
sid: this.page.sid,
}
console.log("request", params);
let _this = this
_this.$api.goodsDetail(params).then((resp) => {
// console.log(resp);
_this.data = resp
_this.getAllPriceOrWeight()
// _this.$nextTick(() => {
// _this.$refs.pageView.setLoadState(2)
// })
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
getAllPriceOrWeight() {
let _this = this
var params = {
customerSid: getApp().globalData.sid,
brandId: _this.data.brandId,
}
console.log("getGoodsWeight", params);
_this.$api.getGoodsWeight(params).then((resp) => {
console.log("getGoodsWeight", resp);
_this.page.price = resp.totalPrice
_this.page.weight = resp.totalWeight
_this.page.remarks = resp.remarks
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
}).catch(e => {
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(1)
})
})
},
inCart() {
this.data.goodsNumber = Number(this.data.goodsNumber) + 1
this.upDateShoppCart()
},
upDateShoppCart() {
var good = {
goodsSid: this.data.sid,
goodsName: this.data.name,
goodsNumber: this.data.goodsNumber,
affiliation: this.data.brandId,
price: this.data.mefenPrice,
weight: this.data.weight,
customerSid: getApp().globalData.sid
}
let _this = this
_this.$api.addShoppingCart(good).then((resp) => {
_this.shortToast('已加入购物车。')
_this.getAllPriceOrWeight()
}).catch(e => {
})
},
settlement() {
//
if (this.page.weight < parseInt(this.data.qssl)) {
this.shortToast('满' + this.data.qssl + '斤才可定制云菜窖哦,请继续选菜吧。')
return
}
this.showPop()
},
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)
},
saveGoods() {
var params = {
customerSid: getApp().globalData.sid,
// cardNumber: 1,
brandId: this.data.brandId,
totalTee: this.page.price,
// ordOrderDetailsVoList: list
}
console.log("params", params);
let _this = this
_this.$api.createVegeOrder(params).then((resp) => {
// console.log("resp", resp);
this.$pay(resp)
}).catch(e => {})
},
gotoCart() {
uni.navigateTo({
url: 'shoppCart?affiliation=' + this.data.brandId + "&weight=" + this.data.qssl + "&qdxy=" +
this.data.qdxy
})
},
showPop2() {
this.$refs.inputDialog2.open()
},
dialogInputConfirm(val) {
if (this.confirmText == "确定") {
this.confirmText = "我知道了(5s)",
this.dialogBeforeClose = true,
this.countdown = 5
this.saveGoods()
}
},
dialogInputConfirm2(val) {
console.log(">>>>>>>>>>>", this.dialogBeforeClose2);
this.dialogBeforeClose2 = false
},
}
}
</script>
<style>
uni-page-body,
page {
background: #f3f4f6;
}
</style>

89
pages/good/shoppCart.vue

@ -12,13 +12,14 @@
<view style="display: flex;flex-direction: row;align-items: center;width: 100%; ">
<image :src="item.iconUrl" @click="itemClick(item.goodsSid)" style="width: 90px;height: 90px; border-radius: 10px; "
mode="aspectFill"></image>
<image :src="item.iconUrl" @click="itemClick(item.goodsSid)"
style="width: 90px;height: 90px; border-radius: 10px; " mode="aspectFill"></image>
<view style="display: flex;flex-direction: column;flex: 1;
margin-left: 10px;">
<text style="font-size: 13px;color: #000;" @click="itemClick(item.goodsSid)">{{item.goodsName}}</text>
<text style="font-size: 13px;color: #000;"
@click="itemClick(item.goodsSid)">{{item.goodsName}}</text>
<text style="font-size: 10px;color: #999;margin-top: 5px;">{{item.remarks}}</text>
@ -96,7 +97,7 @@
<view
style=" width: 100%; box-sizing: border-box; padding-left: 50px;padding-right: 50px;
display: flex;flex-direction: row; justify-content: center;align-items: center;margin-top: 10px;margin-bottom: 20px;">
<view
style="border: 1px #FF5006 solid;margin-left: 5px;margin-right: 5px;padding: 0px 5px;height: 42px; flex: 1;
display: flex;flex-direction: row;align-items: center;border-top-left-radius: 25px; border-bottom-left-radius: 25px;">
@ -203,42 +204,54 @@
jian(item) {
const that = this
console.log("item》》》》", item)
if (Number(item.goodsNumber) == 1) {
wx.showModal({
content: '确定不要了吗',
cancelText: "再想想",
confirmText: "删除",
confirmColor: "#FF9900",
success(res) {
if (res.confirm) {
console.log('用户点击确定')
item.goodsNumber = 0
const index = that.data.findIndex((info) => info.goodsSid === item.goodsSid)
console.log("index》》》》", index)
that.data.splice(index, 1)
// that.getallPrice()
// that.getweight()
that.notData = that.data.length == 0
that.upDateShoppCart(item)
} else if (res.cancel) {
}
}
})
} else {
if (Number(item.goodsNumber) > 0) {
item.goodsNumber = Number(item.goodsNumber) - 1
// if (Number(item.goodsNumber) == 1) {
// wx.showModal({
// content: '',
// cancelText: "",
// confirmText: "",
// confirmColor: "#FF9900",
// success(res) {
// if (res.confirm) {
// console.log('')
// item.goodsNumber = 0
// const index = that.data.findIndex((info) => info.goodsSid === item.goodsSid)
// console.log("index", index)
// that.data.splice(index, 1)
// // that.getallPrice()
// // that.getweight()
// that.notData = that.data.length == 0
// that.upDateShoppCart(item)
// } else if (res.cancel) {
// }
// }
// })
// } else {
if (Number(item.goodsNumber) > 0) {
item.goodsNumber = Number(item.goodsNumber) - 1
if (Number(item.goodsNumber) == 0) {
const index = that.data.findIndex((info) => info.goodsSid === item.goodsSid)
console.log("index》》》》", index)
that.data.splice(index, 1)
that.notData = that.data.length == 0
}
item.totalPrice = Number(item.goodsNumber) * Number(item.price)
// that.getallPrice()
// that.getweight()
that.upDateShoppCart(item)
}
item.totalPrice = Number(item.goodsNumber) * Number(item.price)
// that.getallPrice()
// that.getweight()
that.upDateShoppCart(item)
// }
},
jia(item) {

4
pages/home/cloudCard2.vue

@ -114,14 +114,14 @@
<text
style="font-size: 14px;color: #FF5006;">{{item.mefenPrice}}</text>
<view v-if="!item.showCart"
<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 v-if="!item.showCart"
<text
style="font-size: 14px;padding:5px; margin-left: 8px;margin-right: 8px;"
@click.stop="numberClick(item)">{{item.goodsNumber}}</text>

108
pages/home/myCellar.vue

@ -64,7 +64,7 @@
<text v-if="item.state == '1'" style="opacity: 0.7; font-size: 14px;font-weight: 600;font-family: sans-serif;z-index: 101;
margin-top: 30px; margin-left: 5px; width: 80px; height: 30px;line-height: 30px; text-align: center; background: #6d6d6d;
position: absolute;border-radius: 20px;color: #fff;">已失效</text>
<image :src="item.iconUrl" @click="itemClick(item.goodsSid)"
<image :src="item.iconUrl" @click="itemClick(item.goodsSid)"
style="width: 90px;height: 90px; border-radius: 10px;z-index: 100;"
mode="aspectFill"></image>
@ -123,7 +123,10 @@
style="width: 20px;height: 20px;" @click.stop="jian(item)"></image>
<text
style="font-size: 14px;margin-left: 8px;margin-right: 8px;">{{item.count}}</text>
style="font-size: 14px;padding:5px; margin-left: 8px;margin-right: 8px;"
@click.stop="numberClick(item)">{{item.count}}</text>
<image src="../../static/jia_icon.png" mode="aspectFill"
style="width: 20px;height: 20px;" @click.stop="jia(item)"></image>
@ -364,25 +367,28 @@
</view>
<!-- 恢复预约提货弹框 -->
<!-- <view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' ></view>
<view class="modalDlg2" catchtouchmove='preventTouchMove' v-if='showModal2'>
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;
width: 80%; border-radius: 20px; background: linear-gradient(#FFF4E4, #fff);">
<image src="../../static/notices.png" style="width: 60px;height: 60px; margin-top: -30px;" mode="scaleToFill"></image>
<text style="margin-top: 16px;font-size: 18px;color: #101010;font-weight: 600;font-family: sans-serif;">温馨提示</text>
<text style="margin-top: 12px;font-size: 14px;color: #333;padding-left: 30px;padding-right: 30px;">您好云菜窖预约提货服务现已恢复正常您可在我的菜窖页面进行预约提菜</text>
<text style="margin-top: 25px;margin-bottom: 20px;border: 1px #FF9900 solid; color: #FF9900;font-size: 14px;
border-radius: 20px;height: 40px; line-height: 40px;padding-left: 30px;padding-right: 30px;" @click="colseDialog2()">{{confirmText}}</text>
</view>
<!-- 输入数量 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2' @click="colseDialog2()"></view>
<view class="modalDlg4" catchtouchmove='preventTouchMove' v-if='showModal2'>
<view
style="display: flex;flex-direction: column;background: #fff; width: 80%; border-radius: 20px;box-sizing: border-box;">
<input type="number" placeholder="请输入数量" v-model="goodsItem.count" @input="inputNumber"
style="margin: 20px 20px 10px 20px;border: 1px #bbb solid; padding: 5px;line-height: 30px;height: 30px;border-radius: 6px;" />
<text
style="font-size: 12px;color: #f14;margin-left: 20px;margin-bottom: 20px;">商品存量{{goodsItem.goodsNumber}}{{goodsItem.unitName}}</text>
<view
style="flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;">
<button class="button1" @click="colseDialog2()">取消</button>
<button class="button2" @click="inCart()">确定</button>
</view>
</view>
</view> -->
</view>
@ -401,9 +407,7 @@
transferNotData: true,
notData: false,
showModal1: false,
showModal2: true,
confirmText: "我知道了(5s)",
countdown: 5,
showModal2: false,
showModal3: false,
showModal4: false,
scrollHeight: "",
@ -452,7 +456,11 @@
transferInfo: {},
newporGiftSid: "",
orderSid: "",
shareSid: ""
shareSid: "",
goodsItem: {
goodsNumber: "",
count: ""
},
}
},
@ -492,7 +500,6 @@
this.page.endHeight = info.windowWidth * 0.8
this.shareGift()
this.showPop()
},
filters: {
@ -530,24 +537,6 @@
},
methods: {
showPop() {
let timeOut = setInterval(() => {
if (this.countdown == 1) {
this.showModal2 = false
this.confirmText = "确定"
this.countdown = 5
clearInterval(timeOut)
} else {
this.countdown = this.countdown - 1;
this.confirmText = "我知道了" + "(" + this.countdown + "s)"
}
}, 1000)
},
getNotice() {
let _this = this
this.$api.getNotices().then((resp) => {
@ -633,6 +622,37 @@
})
})
},
numberClick(item) {
if (item.state == '0') {
this.showModal2 = true
console.log("inCart", item);
this.goodsItem = item
} else {
this.shortToast('商品已过提货日期')
}
},
inputNumber(val) {
console.log("inputNumber", val);
var num = val.detail.value
this.goodsItem.count = Number(num) > Number(this.goodsItem.goodsNumber) ? Number(this.goodsItem
.goodsNumber) : Number(num)
console.log("inputNumber222", this.goodsItem.count);
},
inCart() {
this.getcount()
this.addGoods(this.goodsItem)
this.showModal2 = false
},
jian(item) {
if (item.state == '0') {
@ -645,7 +665,6 @@
this.shortToast('商品已过提货日期')
}
},
jia(item) {
if (item.state == '0') {
@ -697,7 +716,7 @@
itemClick(goodsSid) {
uni.navigateTo({
url: '/pages/good/goodsDetail?sid=' + goodsSid
url: '/pages/good/goodsDetail2?sid=' + goodsSid
})
},
@ -746,7 +765,6 @@
},
colseDialog2() {
this.showModal2 = false
clearInterval()
},
colseDialog3() {
this.showModal3 = false

327
pages/me/addInvoice.vue

@ -0,0 +1,327 @@
<template>
<view class="page">
<view style="height: 80vh;overflow: hidden;overflow-y: auto;padding: 12px;">
<view class="top">
<view class="top-item">
<text class="item-text">发票类型</text>
<radio-group @change="radioChange">
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="普通发票"
:checked="info.invoiceType=='普通发票'">普通发票</radio>
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="增值税发票"
:checked="info.invoiceType=='增值税发票'">增值税发票</radio>
</radio-group>
</view>
<view class="top-item" style="margin-top: 24px;">
<text class="item-text">抬头类型</text>
<radio-group @change="radioChange2">
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="个人或事业单位"
:checked="info.headingType=='个人或事业单位'">个人或事业单位
</radio>
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="企业"
:checked="info.headingType=='企业'">企业</radio>
</radio-group>
</view>
</view>
<view class="bom">
<view class="bom-item">
<text class="item-text">发票抬头</text>
<view class="item-right">
<view style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="填写抬头名称" v-model="info.invoiceHeader" />
</view>
</view>
</view>
<view v-if="isPerson">
<view style="display: flex;flex-direction: column;" v-if="showDetail">
<view class="bom-item" style="margin-top: 12px;">
<text class="item-text">税号</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="纳税人识别号或社会统一征信代码"
v-model="info.dutyParagraph" />
</view>
</view>
<view class="bom-item" style="margin-top: 12px;">
<text class="item-text">开户银行</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.bankOfDeposit" />
</view>
</view>
<view class="bom-item" style="margin-top: 12px;">
<text class="item-text">银行账号</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.bankAccount" />
</view>
</view>
<view class="bom-item" style="margin-top: 12px;">
<text class="item-text">企业地址</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.enterpriseAddress" />
</view>
</view>
<view class="bom-item" style="margin-top: 12px;">
<text class="item-text">企业电话</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.enterprisePhone" />
</view>
</view>
</view>
<view class="item_btn" v-if="!showDetail" @click="showDetailClick(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">展开</text>
<image src="../../static/zhankai.png" style="width: 15px;height: 15px;"></image>
</view>
<view class="item_btn" v-if="showDetail" @click="showDetailClick(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">收起</text>
<image src="../../static/shouqi.png" style="width: 15px;height: 15px;"></image>
</view>
</view>
</view>
<view class="default">
<text class="item-text">设为默认</text>
<radio :checked="radioDefault" @click="radioDefaultClick" style="transform:scale(0.8);" color="#FF9900">
</radio>
</view>
</view>
<view style="position: absolute; bottom: 20px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box;padding-left: 40px;padding-right: 40px; ">
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B);
width: 100%;border-radius: 25px;height: 50px;text-align: center;
line-height: 50px;color: #FFFFFF;font-size: 16px;" @click="save">
完成</view>
</view>
</view>
</template>
<script>
//bus
import bus from '@/common/bus';
export default {
data() {
return {
isPerson: true,
showDetail: false,
radioDefault: false,
info: {
sid:"",
invoiceType: "", //
headingType: "", //
invoiceHeader: "", //
dutyParagraph: "", //
bankOfDeposit: "", //
bankAccount: "", //
enterpriseAddress: "", //
enterprisePhone: "", //
isDefault: "0", // 1
customerSid: getApp().globalData.sid,
}
}
},
onLoad(options) {
console.log("options", options);
if (JSON.stringify(options) != '{}') {
let userInfo = JSON.parse(decodeURIComponent(options.info));
console.log('userInfo', userInfo);
this.info = userInfo
this.radioDefault = this.info.isDefault == '1'
this.isPerson = this.info.headingType != '个人或事业单位'
}
},
methods: {
radioChange(val) {
console.log("radioChange", val);
this.info.invoiceType = val.detail.value
},
radioChange2(val) {
console.log("radioChange2", val);
this.info.headingType = val.detail.value
this.isPerson = val.detail.value != "个人或事业单位"
},
showDetailClick() {
this.showDetail = !this.showDetail
},
radioDefaultClick() {
this.radioDefault = !this.radioDefault
this.info.isDefault = this.radioDefault ? "1" : "0"
},
save() {
console.log("save", this.info);
if (this.stringIsEmpty(this.info.invoiceType)) {
this.shortToast('请选择发票类型')
return
}
if (this.stringIsEmpty(this.info.headingType)) {
this.shortToast('请选择抬头类型')
return
}
if (this.stringIsEmpty(this.info.invoiceHeader)) {
this.shortToast('发票抬头不能为空')
return
}
if (this.isPerson) {
if (this.stringIsEmpty(this.info.dutyParagraph)) {
this.shortToast('税号不能为空')
return
}
}
this.$api.saveOrUpdateInvoice(this.info).then((resp) => {
this.info.sid = resp
bus.$emit('invoice', this.info);
uni.navigateBack()
}).catch(e => {
})
},
}
}
</script>
<style lang="scss" scoped>
.page {
background: #F7F7F7;
height: 100vh;
.top {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 10px;
padding: 16px 12px;
.top-item {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.item-text {
font-size: 16px;
}
.item-right {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
}
}
}
.bom {
margin-top: 12px;
display: flex;
flex-direction: column;
background: #fff;
border-radius: 10px;
padding: 16px 12px;
.bom-item {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
.item-text {
font-size: 16px;
}
.item-right {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
.input {
width: 100%;
text-align: right;
pointer-events: auto;
}
}
}
.item_btn {
margin-top: 10px;
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
justify-content: center;
}
}
.default {
margin-top: 12px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
background: #fff;
border-radius: 10px;
padding: 16px 12px;
}
}
</style>

478
pages/me/makeInvoice.vue

@ -0,0 +1,478 @@
<template>
<view class="page">
<view style="height: 80vh;overflow: hidden;overflow-y: auto;padding: 12px;">
<view class="top">
<view class="top-item" style="margin-top: 0px;">
<text class="item-text">发票类型</text>
<radio-group @change="radioChange">
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="普通发票"
:checked="info.invoiceType=='普通发票'">普通发票</radio>
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="增值税发票"
:checked="info.invoiceType=='增值税发票'">增值税发票</radio>
</radio-group>
</view>
<view class="top-item">
<text class="item-text">抬头类型</text>
<radio-group @change="radioChange2">
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="个人或事业单位"
:checked="info.headingType=='个人或事业单位'">个人或事业单位
</radio>
<radio style="transform:scale(0.8);font-size: 20px;" color="#FF9900" value="企业"
:checked="info.headingType=='企业'">企业</radio>
</radio-group>
</view>
<view class="top-item">
<text class="item-text">发票抬头</text>
<view class="item-right">
<view style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="填写抬头名称" v-model="info.invoiceHeader" />
</view>
<image src="../../static/more.png" style="width: 15px;height: 15px;margin-left: 5px;"
@click="showList"></image>
</view>
</view>
<view v-if="isPerson">
<view style="display: flex;flex-direction: column;" v-if="showDetail">
<view class="top-item">
<text class="item-text">税号</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="纳税人识别号或社会统一征信代码"
v-model="info.dutyParagraph" />
</view>
</view>
<view class="top-item">
<text class="item-text">开户银行</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.bankOfDeposit" />
</view>
</view>
<view class="top-item">
<text class="item-text">银行账号</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.bankAccount" />
</view>
</view>
<view class="top-item">
<text class="item-text">企业地址</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.enterpriseAddress" />
</view>
</view>
<view class="top-item">
<text class="item-text">企业电话</text>
<view class="item-right" style="width: 100%;margin-left: 20px;padding-left: 5px;">
<input class="input" type="text" placeholder="选填" v-model="info.enterprisePhone" />
</view>
</view>
</view>
<view class="item_btn" v-if="!showDetail" @click="showDetailClick(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">展开</text>
<image src="../../static/zhankai.png" style="width: 15px;height: 15px;"></image>
</view>
<view class="item_btn" v-if="showDetail" @click="showDetailClick(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">收起</text>
<image src="../../static/shouqi.png" style="width: 15px;height: 15px;"></image>
</view>
</view>
</view>
</view>
<view style="position: absolute; bottom: 20px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box;padding-left: 40px;padding-right: 40px; ">
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B);
width: 100%;border-radius: 25px;height: 50px;text-align: center;
line-height: 50px;color: #FFFFFF;font-size: 16px;" @click="save">
提交申请</view>
</view>
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal'></view>
<view class="modalDlg" id="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal'>
<view style="display: flex;flex-direction: column;padding: 12px;">
<view
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between; width: 100%;">
<text style="font-size: 16px;font-weight: 600;font-family: sans-serif;margin-left: 5px;">选择抬头</text>
<image src="../../static/close2.png" style="width: 25px;height: 25px;" @click.stop="colseDialog()">
</image>
</view>
<scroll-view scroll-y="true" :show-scrollbar="false"
style="margin-top: 10px;padding-left: 12px;padding-right: 12px;box-sizing: border-box;"
:style="'height:'+viewHeight+'px'">
<view v-for="(item,index) in data" :key="index" style="display: flex;flex-direction: column;"
v-if="showData">
<view style="display: flex;flex-direction: row;justify-content: center;align-items: center;
background: #fff; border-radius: 10px; margin-top: 12px;padding: 20px 12px;" @click="itemClick(item)">
<view style="flex: 1;display: flex;flex-direction: column;">
<view style="flex: 1;display: flex;flex-direction: row;align-items: center;">
<text
style="font-size: 16px;font-weight: 600;font-family: sans-serif;">{{item.invoiceHeader}}</text>
<text v-if="item.isDefault==1" style="background: #FFF0DA; color: #FF7200;
font-size: 10px;margin-left: 6px;border-radius: 5px;padding: 2px 5px;">默认</text>
</view>
<text style="font-size: 12px;color: #999;margin-top: 5px;">
{{item.invoiceType}} - {{item.headingType}}</text>
</view>
<text style="font-size: 12px;color: #999;" @click.stop="editItem(item)">编辑</text>
</view>
</view>
<view v-if="notData" style="display: flex;flex-direction: column;align-items: center;">
<image src="https://supervise.yxtsoft.com/lpk/image/notData.png" mode="aspectFit"
style="width: 100px;height: 100px;"></image>
<view style="display: flex;flex-direction: column;align-items: center;margin-top: 10px;">
<text style="font-size: 14px; color: #999;margin-right: 5px;">暂无数据</text>
</view>
</view>
</scroll-view>
</view>
<view style="position: absolute; bottom: 20px; display: flex;flex-direction: column;width: 100%;
box-sizing: border-box;padding-left: 40px;padding-right: 40px; ">
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B);
width: 100%;border-radius: 25px;height: 50px;text-align: center;
line-height: 50px;color: #FFFFFF;font-size: 16px;" @click="addInviice">
添加新的抬头</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showModal: false,
showData: false,
notData: true,
viewHeight: "",
page: {
sid: ""
},
isPerson: true,
showDetail: false,
radioDefault: false,
info: {
sid: "",
invoiceType: "", //
headingType: "", //
invoiceHeader: "", //
dutyParagraph: "", //
bankOfDeposit: "", //
bankAccount: "", //
enterpriseAddress: "", //
enterprisePhone: "", //
isDefault: "0", // 1
customerSid: getApp().globalData.sid,
orderSid: "" // sid
},
data: []
}
},
onLoad(options) {
this.page.sid = options.sid
this.getData()
//
// uni.hideLoading();
},
onShow() {
// this.getData()
// //
// uni.hideLoading();
},
created() {
var _this = this
this.$bus.$on('invoice', msg => {
console.log("aaaaaaaaaaa4", msg)
const index = _this.data.findIndex(item => item.sid == msg.sid)
console.log(">>>>", index)
if (index != -1) {
//
_this.data.splice(index, 1, msg)
} else {
//
_this.data.push(msg)
}
});
},
methods: {
getData() {
this.$api.getInvoiceList(getApp().globalData.sid).then((resp) => {
console.log("getInvoiceList>>>" + resp);
this.data = resp
const arr1 = this.data.filter(item => item.isDefault == 1)
console.log(">>>>", arr1)
if (arr1.length > 0) {
this.info = arr1[0]
this.isPerson = this.info.headingType != '个人或事业单位'
}
}).catch(e => {
})
},
showList() {
this.showModal = true
uni.showLoading({
title: '加载中'
})
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.modalDlg').boundingClientRect(data => {
console.log("得到布局位置信息" + JSON.stringify(data));
console.log("节点离页面顶部的距离为" + data.top);
console.log("节点离页面顶部的距离为" + data.height);
this.viewHeight = data.height - 135
this.showData = this.data.length > 0
this.notData = this.data.length == 0
console.log("showData2" + this.showData);
console.log("notData2" + this.notData);
//
uni.hideLoading();
}).exec();
}, 500)
},
itemClick(item) {
console.log("itemClick", item);
this.info = item
this.isPerson = this.info.headingType != '个人或事业单位'
this.colseDialog()
},
editItem(item) {
console.log("editItem", item);
uni.navigateTo({
url: "/pages/me/addInvoice?info=" + encodeURIComponent(JSON.stringify(item))
})
},
colseDialog() {
this.showModal = false
},
addInviice() {
uni.navigateTo({
url: "/pages/me/addInvoice"
})
},
radioChange(val) {
console.log("radioChange", val);
this.info.invoiceType = val.detail.value
},
radioChange2(val) {
console.log("radioChange2", val);
this.info.headingType = val.detail.value
this.isPerson = val.detail.value != "个人或事业单位"
},
showDetailClick() {
this.showDetail = !this.showDetail
},
radioDefaultClick() {
this.radioDefault = !this.radioDefault
this.info.isDefault = this.radioDefault ? "1" : "0"
},
save() {
console.log("save", this.info);
if (this.stringIsEmpty(this.info.invoiceType)) {
this.shortToast('请选择发票类型')
return
}
if (this.stringIsEmpty(this.info.headingType)) {
this.shortToast('请选择抬头类型')
return
}
if (this.stringIsEmpty(this.info.invoiceHeader)) {
this.shortToast('发票抬头不能为空')
return
}
if (this.isPerson) {
if (this.stringIsEmpty(this.info.dutyParagraph)) {
this.shortToast('税号不能为空')
return
}
}
this.info.orderSid = this.page.sid
console.log("info", this.info);
this.$api.submitInvoice(this.info).then((resp) => {
uni.navigateBack()
}).catch(e => {
})
},
}
}
</script>
<style lang="scss" scoped>
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.page {
background: #F7F7F7;
height: 100vh;
.top {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 10px;
padding: 16px 12px;
.top-item {
margin-top: 24px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.item-text {
font-size: 16px;
}
.item-right {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
.input {
width: 100%;
text-align: right;
pointer-events: auto;
}
}
}
.item_btn {
margin-top: 10px;
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
justify-content: center;
}
}
}
/* 弹窗样式 */
.model {
position: absolute;
width: 100%;
height: 100%;
background: #000;
z-index: 1;
opacity: 0.5;
top: 0;
left: 0;
}
.modalDlg {
/* 设置超出滚动 */
overflow: auto;
width: 100%;
position: fixed;
top: 70vw;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
background-color: #F7F7F7;
border-top-right-radius: 20px;
border-top-left-radius: 20px;
display: flex;
flex-direction: column;
}
button::after {
border: 0;
}
</style>

213
pages/records/orderDetail.vue

@ -1,150 +1,158 @@
<template>
<view style="display: flex;flex-direction: column;height: 100vh; background: #F7F7F7;overflow-y: auto;">
<view style="display: flex;flex-direction: column;height: 100vh; background: #F7F7F7;">
<loading-state ref="pageView" @request="request">
<view style="height: 100vh;overflow: hidden;overflow-y: auto;">
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;width: 100%;justify-content: center;margin-top: 10px;padding: 10px;">
<text style="font-size: 14px;">还剩</text>
<text
style="font-weight: 600;color: #FF5006;font-size: 18px;margin-left: 2px;margin-right: 2px;">{{page.countdown}}</text>
<text style="font-size: 14px;">订单自动取消</text>
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;width: 100%;justify-content: center;margin-top: 10px;padding: 10px;">
<text style="font-size: 14px;">还剩</text>
<text
style="font-weight: 600;color: #FF5006;font-size: 18px;margin-left: 2px;margin-right: 2px;">{{page.countdown}}</text>
<text style="font-size: 14px;">订单自动取消</text>
</view>
</view>
<view
style="background: #fff;border-radius: 10px;display: flex;flex-direction: column;padding: 15px;margin-top: 15px; margin-left: 10px;margin-right: 10px;">
<view
style="background: #fff;border-radius: 10px;display: flex;flex-direction: column;padding: 15px;margin-top: 15px; margin-left: 10px;margin-right: 10px;">
<view v-for="(item,index) in data.ordOrderDetails"
style=" display: flex;flex-direction: row;align-items: center; margin-bottom: 15px;">
<view v-for="(item,index) in data.ordOrderDetails"
style=" display: flex;flex-direction: row;align-items: center; margin-bottom: 15px;">
<image :src="item.picUrl" @click="itemClick(item.goodsSid)" style="width: 70px;height: 70px;border-radius: 15px;" mode="scaleToFill">
</image>
<image :src="item.picUrl" @click="itemClick(item.goodsSid)"
style="width: 70px;height: 70px;border-radius: 15px;" mode="scaleToFill">
</image>
<view style="margin-left: 10px;display: flex;flex-direction: column;flex: 1;">
<view style="margin-left: 10px;display: flex;flex-direction: column;flex: 1;">
<view style="display: flex;flex-direction: row;width: 100%;">
<view style="display: flex;flex-direction: row;width: 100%;">
<text
style="flex: 1;font-weight: 600;font-family: sans-serif;font-size: 14px;" @click="itemClick(item.goodsSid)">{{item.goodsName}}</text>
<text
style="font-weight: 600;font-family: sans-serif;font-size: 14px;">{{item.pricePart}}</text>
</view>
<text style="flex: 1;font-weight: 600;font-family: sans-serif;font-size: 14px;"
@click="itemClick(item.goodsSid)">{{item.goodsName}}</text>
<text
style="font-weight: 600;font-family: sans-serif;font-size: 14px;">{{item.pricePart}}</text>
</view>
<!-- <text style="margin-top: 10px;font-size: 12px;color: #999;">{{item.remarks}}</text> -->
<!-- <text style="margin-top: 10px;font-size: 12px;color: #999;">{{item.remarks}}</text> -->
<view style="margin-top: 8px;display: flex;flex-direction: column;">
<view style="margin-top: 8px;display: flex;flex-direction: column;">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
font-size: 10px;color: #EE752F;">{{item.priceUnit}}/{{item.specificationUnit}}</text>
<text
style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
<text
style="border: 1px #EE752F solid; border-radius: 5px; padding: 0px 8px;
font-size: 10px;color: #EE752F; margin-left: 10px; margin-right: 10px; ">{{item.numofPart}}{{item.specificationUnit}}/{{item.unitName}}</text>
</view>
</view>
<text
style="margin-top: 12px;font-size: 12px;color: #999;">份数{{item.partNumber}}{{item.unitName}}</text>
<text
style="margin-top: 12px;font-size: 12px;color: #999;">份数{{item.partNumber}}{{item.unitName}}</text>
</view>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;
<view style="display: flex;flex-direction: column;
border-top: 1px solid #EFEFEF;padding-top: 15px;">
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>商品总额</text>
<text>{{data.meet}}</text>
</view>
<view
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>商品总额</text>
<text>{{data.meet}}</text>
</view>
<view
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;margin-top: 15px;">
<text>附加费</text>
<text>{{data.surcharge}}</text>
</view>
<view
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;margin-top: 15px;">
<text>附加费</text>
<text>{{data.surcharge}}</text>
</view>
</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;
<view style="display: flex;flex-direction: row;align-items: center;
border-top: 1px solid #EFEFEF;padding-top: 15px;margin-top: 15px;">
<view style="flex: 1;">
</view>
<view style="flex: 1;">
</view>
<view v-if="data.payStatus=='4'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>实付</text>
<text style="font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='4'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text>实付</text>
<text style="font-size: 16px;font-weight: 600;color: #FF5006;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #FF5006;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #FF5006;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='2'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #FF5006;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #FF5006;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='3'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #666;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #666;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
<view v-if="data.payStatus=='3'"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<text style="color: #666;margin-right: 3px;font-size: 14px;">需付款</text>
<text style="color: #666;font-size: 16px;font-weight: 600;">{{data.totalTee}}</text>
</view>
</view>
<view style="background: #fff;border-radius: 10px;margin-top: 12px;margin-left: 10px;margin-right: 10px;
display: flex;flex-direction: column;padding: 12px 16px;margin-bottom: 100px;">
</view>
<text style="font-size: 16px;">订单信息</text>
<view style="background: #fff;border-radius: 10px;margin-top: 12px;margin-left: 10px;margin-right: 10px;
display: flex;flex-direction: column;padding: 12px 16px;margin-bottom: 150px;">
<view style="display: flex;flex-direction: column;margin-top: 15px; ">
<text style="font-size: 16px;">订单信息</text>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="display: flex;flex-direction: column;margin-top: 15px; ">
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="font-size: 14px;color: #999;">订单编号</text>
<text
style="margin-left: 15px;font-size: 14px;color: #333;word-break: break-all;">{{data.outTradeNo}}</text>
</view>
<text style="font-size: 14px;color: #999;">订单编号</text>
<text
style="margin-left: 15px;font-size: 14px;color: #333;word-break: break-all;">{{data.outTradeNo}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 14px;color: #999;">下单时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.createTime}}</text>
</view>
<text style="font-size: 14px;color: #999;">下单时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.createTime}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 14px;color: #999;">支付方式</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payType}}</text>
</view>
<text style="font-size: 14px;color: #999;">支付方式</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payType}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;"
v-if="data.payStatus=='4'">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;"
v-if="data.payStatus=='4'">
<text style="font-size: 14px;color: #999;">付款时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payTime}}</text>
</view>
<text style="font-size: 14px;color: #999;">付款时间</text>
<text style="margin-left: 15px;font-size: 14px;color: #333;">{{data.payTime}}</text>
</view>
</view>
</view>
</loading-state>
<view v-if="data.payStatus=='2'" style="width: 100%; background-color: #fff;height: 15vw;position: fixed;bottom: 0;overflow:hidden;
display: flex;flex-direction: row;align-items: center;box-sizing: border-box;">
<view style="flex: 1;"></view>
<text style="font-size: 16px;color: #fff; height: 5vw; background-color: #FF9900;margin-right: 25px;
padding: 5px 20px;border-radius: 20px;" @click="continuePy">继续付款</text>
<view v-if="data.payStatus!='3'"
style="position: absolute; bottom: 0px; display: flex;flex-direction: row;width: 100%;align-items: center;
box-sizing: border-box; padding-left: 16px;padding-right: 16px;background: #fff; height: 8vh;border-top: 1px solid #EFEFEF;">
<view style="flex: 1;"></view>
<text style="font-size: 16px;color: #fff; background-color: #FF9900; height: 5vh;line-height: 5vh;
padding: 0px 20px;border-radius: 20px;" @click="continuePy" v-if="data.payStatus=='2'">继续付款</text>
<view style="display: flex;flex-direction: row;align-items: center;" v-if="data.payStatus=='4'">
<text style="font-size: 16px;color: #666; border: 1px #D3D3D3 solid; height: 5vh;line-height: 5vh;
padding: 0px 20px;border-radius: 20px;" @click="makeInvoice(data.sid)" v-if="data.invoiceStatus=='0'">开具发票</text>
<text style="font-size: 16px;color: #666; border: 1px #D3D3D3 solid; height: 5vh;line-height: 5vh;
padding: 0px 20px;border-radius: 20px;" v-if="data.invoiceStatus=='1'">发票审核中</text>
</view>
</loading-state>
</view>
</view>
@ -165,7 +173,10 @@
onLoad(options) {
this.page.sid = options.sid
this.request()
},
onShow() {
this.request()
},
methods: {
itemClick(goodsSid) {
@ -175,12 +186,16 @@
},
//
request() {
let _this = this
_this.$api.orderDetails(_this.page.sid).then((resp) => {
_this.data = resp
_this.page.nowDate = resp.nowDate
_this.countTime() //
if (_this.data.payStatus == 2)
_this.countTime() //
_this.$nextTick(() => {
_this.$refs.pageView.setLoadState(2)
})
@ -243,8 +258,16 @@
}).catch(e => {
})
},
makeInvoice(sid) {
uni.navigateTo({
url: "/pages/me/makeInvoice?sid=" + sid
})
}
}

75
pages/records/reservationRecords3.vue

@ -25,34 +25,35 @@
<text
style="font-size: 16px;margin-right: 8px;flex: 1;margin-right: 15px;">{{item.storeName}}</text>
<view style="display: flex;flex-direction: row;align-items: center;"
<!-- <view style="display: flex;flex-direction: row;align-items: center;"
@click="makePhoneCall(item.linkPhone)">
<image src="../../static/phone-2.png" style="width: 20px;height: 20px;margin-right: 5px;">
</image>
<text>咨询电话</text>
</view>
</view> -->
</view>
<view
style="display: flex;flex-direction: row;align-items: center;margin-left: 16px;margin-right: 16px;margin-top: 6px;">
<image src="../../static/dingwei.png" style="width: 20px;height: 20px;margin-right: 5px;" mode="aspectFit">
<image src="../../static/dingwei.png" style="width: 20px;height: 20px;margin-right: 5px;"
mode="aspectFit">
</image>
<text style="font-size: 12px;color: #333;">{{item.address}}</text>
<text style="font-size: 12px;color: #666;">{{item.address}}</text>
</view>
<view class="item-bom" style="margin-left: 16px;margin-right: 16px;margin-top: 10px;">
<view class="item-bom-left">
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 12px;color: #999; margin-right: 5px;">提菜日期</text>
<view style="display: flex;flex-direction: row;align-items: center;">
<text style="font-size: 12px;color: #666; margin-right: 5px;">提菜日期</text>
<text style="font-size: 12px;color: #FD6D2B;">{{item.reserveDate}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 16px;">
<text style="font-size: 12px;color: #999; margin-right: 5px;">提菜人</text>
<text style="font-size: 12px;color: #666; margin-right: 5px;">提菜人</text>
<text style="font-size: 12px;color: #333; margin-right: 5px;">{{item.userName}}</text>
<text style="font-size: 12px;color: #333; ">{{item.userPhone}}</text>
</view>
@ -62,13 +63,32 @@
<view class="item-bom_right">
<image src="https://supervise.yxtsoft.com/lpk/image/daiticai.png"
style="width: 104px; height: 104px;z-index: 100;border-radius: 20px;">
style="width: 80px; height: 80px;z-index: 100;border-radius: 20px;">
</image>
</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;width: 100%;margin-top: 15px;">
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;flex: 1;"
@click="cancelReservation(item)">
<image src="../../static/close3.png" style="width: 32px;height: 32px;"></image>
<text style="font-size: 12px;color: #666;margin-top: 5px;">取消预约</text>
</view>
<view style="background: #E0DBD0; height: 30px;width: 1px;"></view>
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;flex: 1;"
@click="makePhoneCall(item.linkPhone)">
<image src="../../static/phone-3.png" style="width: 32px;height: 32px;"></image>
<text style="font-size: 12px;color: #666;margin-top: 5px;">电话咨询</text>
</view>
</view>
<view style="
height: 30px;margin-top: 5px;">
<image src="https://supervise.yxtsoft.com/lpk/image/reservationRecords_icon1.png"
@ -129,6 +149,45 @@
},
methods: {
cancelReservation(item){
var _this = this
console.log("item",item);
if(item.cancel){
//
uni.showModal({
title: '',
content: '确认要取消预约吗?',
cancelText:"取消",
confirmText:"确定",
confirmColor:"#FF9900",
success(res) {
if (res.confirm) {
// console.log('')
_this.$api.cancelReservation(item.reserveCode).then((resp) => {
const index = _this.data.findIndex((info) => info.sid === item.sid)
console.log("index》》》》", index)
_this.data.splice(index, 1)
}).catch(e => {
})
} else if (res.cancel) {
// console.log('')
}
}
})
}else{
//
this.shortToast('已超出可取消预约提货时间。')
return
}
},
makePhoneCall(phone) {
if (this.stringIsNotEmpty(phone))
wx.makePhoneCall({

BIN
static/close3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/phone-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Loading…
Cancel
Save