Merge remote-tracking branch 'origin/master-2.0' into master-2.0
| | |
| | | "quickapp" : {}, |
| | | /* 快应用特有相关 */ |
| | | "mp-weixin" : { |
| | | "appid" : "wx1441324401626290", |
| | | "appid" : "wx3203fd935a6ffe09", |
| | | "setting" : { |
| | | "urlCheck" : false, |
| | | "es6" : true, |
| | |
| | | }, |
| | | async onPullDownRefresh() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | await getTj(true) |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | onLoad(options) { |
| | |
| | | const urlcode = options.url && decodeURIComponent(options.url) || '' |
| | | }, |
| | | onShow() { |
| | | this.getTj() |
| | | this.getTj(true) |
| | | }, |
| | | created() { |
| | | //公告 |
| | |
| | | }, |
| | | }) |
| | | }, |
| | | getTj() { |
| | | getTj(refresh=false) { |
| | | // /api/supplier/delivery |
| | | |
| | | if (this.currentInfo.id && this.currentInfo.id !== this.cacheUserId) { |
| | | if (this.currentInfo.id && (this.currentInfo.id !== this.cacheUserId || refresh)) { |
| | | this.cacheUserId = this.currentInfo.id |
| | | let that = this |
| | | setTimeout(() => { |
| | |
| | | </view> |
| | | <view class="info-container bg-white br-4 m-t-12" v-if="!showSales"> |
| | | <view class="form-item flex"> |
| | | <view class="label">订单金额:</view> |
| | | <view class="value m-l-a m-r-0 text-right">+{{ dto.totalAmount || '0' }}</view> |
| | | <view class="label">商品金额:</view> |
| | | <view class="value m-l-a m-r-0 text-right">+{{ dto.flowerAmount || '0' }}</view> |
| | | </view> |
| | | <view class="form-item flex"> |
| | | <view class="label">运费:</view> |
| | |
| | | {{item.point||'0'}}积分 |
| | | </view> |
| | | <view class="m-l-10 desc-gray"> |
| | | 库存:{{item.stock||'0'}} |
| | | 库存:{{item.couponAmount||'0'}} |
| | | </view> |
| | | <view class="button m-l-a m-r-15" :class="[item.stock===0?'over':'']" |
| | | <view class="button m-l-a m-r-15" :class="[item.couponAmount===0?'over':'']" |
| | | @click="exchange('coupon',item)"> |
| | | {{item.stock===0?'已售磬':'兑换'}} |
| | | {{item.couponAmount===0?'已售磬':'兑换'}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | this.refreshList() |
| | | }, |
| | | async exchange(type, item) { |
| | | if (item.stock === 0) { |
| | | if (item.stock === 0 || item.couponAmount === 0) { |
| | | this.$message.showToast('库存为0,无法兑换') |
| | | return |
| | | } |
| | |
| | | //刷新积分 |
| | | this.$store.dispatch('getCurrentInfo'); |
| | | await this.$message.showToast('兑换成功') |
| | | |
| | | if (type == 'good') { |
| | | item.stock -= 1 |
| | | this.$forceUpdate() |
| | | } |
| | | if (type == 'coupon') { |
| | | item.couponAmount -= 1 |
| | | this.$forceUpdate() |
| | | } |
| | | } |
| | | }, |
| | | toDetail(item) { |
| | |
| | | <view class="m-l-12 info-container flex1"> |
| | | <view @click.stop="toDetail(item)"> |
| | | <view class="title"> |
| | | {{item.name||'-'}} |
| | | <view style="max-width: 240rpx;">{{item.name||'-'}}</view> |
| | | |
| | | <view class="price component-price-new"> |
| | | <span class="tip">会员价</span>¥<span class="p">{{item.priceMember||item.price}}</span>/扎 |
| | |
| | | <view class="flex1"> |
| | | <view class="cateen_infos list"> |
| | | <view class="title flex"> |
| | | {{item.name}} |
| | | <view style="max-width: 200rpx;text-align: left;">{{item.name}}</view> |
| | | <view class="desc m-l-a m-r-0">在售 {{item.stock||'0'}} 扎</view> |
| | | </view> |
| | | <view class="price"> |
| | |
| | | return |
| | | } |
| | | } |
| | | if (this.form.status == 'lack') { |
| | | if (!this.form.pictureList || this.form.pictureList.length < 1) { |
| | | this.$message.showToast('未上传图片') |
| | | return |
| | | } |
| | | } |
| | | if (this.form.status == 'replace' || this.form.status == 'lack') { |
| | | if (isNaN(parseInt(this.form.num)) || this.form.num < 0) { |
| | | this.$message.showToast('数量需要大于等于0') |
| | |
| | | <view class="button button-0 " @click="printDeliveryOrder(item)">打印</view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | <uni-popup ref="popup_form" type="top" :mask-click="false"> |
| | |
| | | </view> |
| | | <view class="form-item" v-if="form.status==='reduce'"> |
| | | <view class="form-item-label require"> |
| | | 扣款金额 |
| | | 扣款金额/每扎 |
| | | </view> |
| | | <view class="form-item-value"> |
| | | <input v-model="form.deductAmount" placeholder="请输入扣款金额" type="digit" |
| | |
| | | <input v-model="form.remarks" placeholder="请输入质检备注" class="form-input"></input> |
| | | </view> |
| | | </view> |
| | | <view class="form-item" v-if="form.status==='reduce'"> |
| | | <view class="form-item" v-if="form.status==='reduce'||form.status==='lack'"> |
| | | <view class="form-item-label require"> |
| | | 图片 |
| | | </view> |
| | |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | |
| | | |
| | | .label-color { |
| | | font-weight: 400; |
| | | font-size: 24rpx; |
| | |
| | | text-align: left; |
| | | padding-right: 10rpx; |
| | | } |
| | | |
| | | .value-color { |
| | | font-weight: 400; |
| | | font-size: 24rpx; |
| | |
| | | |
| | | |
| | | <view class="line-gray"></view> |
| | | <view class="m-t-12 flex" v-if="item.arriveRemarks"> |
| | | <view>备注:</view> |
| | | <view class="text-left m-l-10 m-r-0 flex1"> |
| | | {{item.arriveRemarks}} |
| | | </view> |
| | | </view> |
| | | <view class="m-t-12 flex" v-if="item.arriveImageList&&item.arriveImageList.length>0"> |
| | | <view class="m-t-12 m-r-10 " v-for="(timg,vv) of item.arriveImageList" :key="vv"> |
| | | <image class="arrive-img" :src="timg" @click.stop="previewImg(timg)"> |
| | |
| | | </view> |
| | | <view class="form-item" v-if="form.status==='reduce'"> |
| | | <view class="form-item-label require"> |
| | | 扣款金额 |
| | | 扣款金额/每扎 |
| | | </view> |
| | | <view class="form-item-value"> |
| | | <input v-model="form.deductAmount" placeholder="请输入扣款金额" type="digit" |
| | |
| | | |
| | | <!-- <view class="name" v-if="dto.type">处理类型:{{ dto.type || '-'}}</view> --> |
| | | <view class="name">处理数量:{{ dto.num || '-' }}</view> |
| | | <view class="name">扣款金额:¥{{ dto.deductAmount || '-'}}</view> |
| | | <view class="name">扣款金额/每扎:¥{{ dto.deductAmount || '-'}}</view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <!-- #ifndef PUB_CUSTOMER --> |
| | | |
| | | <view class="p10" style="margin-top: 0rpx;padding-top: 0rpx;" v-if="dto.pictureList&&dto.pictureList.length>0"> |
| | | <view class="line-gray"></view> |
| | | |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- #endif --> |
| | | |
| | | </view> |
| | | |