Browse Source

Merge branch 'master' of http://git.jihengcc.cn/liubaiyan/qjd-shell-uniapp

zhangli 4 years ago
parent
commit
1cdf2a4065
4 changed files with 28 additions and 11 deletions
  1. 5 4
      pagesGood/goodForm.vue
  2. 5 5
      pagesMain/orderItem.vue
  3. 9 1
      pagesMain/orderList.vue
  4. 9 1
      pagesMain/pickOrderList.vue

+ 5 - 4
pagesGood/goodForm.vue

@@ -11,19 +11,19 @@
 				</view>
 			</u-cell-item>
 			<u-cell-item title="原价" :arrow="false">
-				<u-number-box :positive-integer="false" :min="0" step="1" v-model="goodInfo.originalPrice" bg-color="#51A539" color="#ffffff"
+				<u-number-box :positive-integer="false" :min="0.01" step="1" v-model="goodInfo.originalPrice" bg-color="#51A539" color="#ffffff"
 				 :disabled="ifEdit()" digit></u-number-box>
 			</u-cell-item>
 			<u-cell-item :title="formType == 1 ? '售价' : '采摘价格'" :arrow="false" v-if="formType != 2">
-				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.bizPrice" bg-color="#51A539" color="#ffffff"
+				<u-number-box :positive-integer="false" :min="0.01" v-model="goodInfo.bizPrice" bg-color="#51A539" color="#ffffff"
 				 :disabled="ifEdit()" digit></u-number-box>
 			</u-cell-item>
 			<u-cell-item title="起拍价" :arrow="false" v-if="formType == 2">
-				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.auctionStartPrice" bg-color="#51A539" color="#ffffff"
+				<u-number-box :positive-integer="false" :min="0.01" v-model="goodInfo.auctionStartPrice" bg-color="#51A539" color="#ffffff"
 				 :disabled="ifEdit()" digit></u-number-box>
 			</u-cell-item>
 			<u-cell-item title="每次最低加价金额" :arrow="false" v-if="formType == 2">
-				<u-number-box :positive-integer="false" :min="0" v-model="goodInfo.auctionMinAddPrice" bg-color="#51A539" color="#ffffff"
+				<u-number-box :positive-integer="false" :min="0.01" v-model="goodInfo.auctionMinAddPrice" bg-color="#51A539" color="#ffffff"
 				 :disabled="ifEdit()" digit></u-number-box>
 			</u-cell-item>
 			<u-field label="计量单位" placeholder="请输入计量单位" label-width="180" v-model="goodInfo.unit" :disabled="ifEdit()"></u-field>
@@ -146,6 +146,7 @@
 						this.sortText = sort.label + '-' + sort.children.find(site => site.value == res.data.categoryId).label
 					}
 				}).catch(res => {
+					console.log('454543', res)
 					this.$refs.uTips.show({
 						title: '获取商品详情失败',
 						type: 'warning',

+ 5 - 5
pagesMain/orderItem.vue

@@ -21,16 +21,16 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="noPick" class="pay-info">总价¥{{getAllPrice()}},实付¥{{orderData.paySum}}</view>
+		<view class="pay-info" v-if="!isPick">总价¥{{getAllPrice()}},实付¥{{orderData.paySum}}</view>
 		<view class="handle-box" v-if="(tabIndex > 1 && tabIndex < 5) || (tabIndex == 5 && orderData.evaluateStatus == 2 && orderData.evaluateReplyStatus == 1)">
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
-			 v-if="tabIndex == 2" @click.stop="handleOrder(1)">发货</u-button>
+			 v-if="tabIndex == 2 && orderData.auctionStatus != 1 && orderData.auctionStatus != 3" @click.stop="handleOrder(1)">发货</u-button>
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 3 || tabIndex == 4" @click.stop="handleOrder(2)">追踪物流</u-button>
 			<u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
 			 v-if="tabIndex == 5 && orderData.evaluateStatus == 2 && orderData.evaluateReplyStatus == 1" @click.stop="handleOrder(3)">回复</u-button>
 			 <u-button size="medium" :plain="true" type="success" shape="circle" :ripple="true" :hair-line="false" class="handle-button"
-			  v-if="noPick" @click.stop="handleOrder(6)">自助采摘</u-button>
+			  v-if="!orderData.noPick && orderData.orderStatus == 2" @click.stop="handleOrder(6)">自助采摘</u-button>
 		</view>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
@@ -44,8 +44,8 @@
 			tabIndex: {
 				default: 1
 			},
-			noPick: {
-				default: true
+			isPick: {
+				default: false
 			},
 			orderData: {
 				default: {

+ 9 - 1
pagesMain/orderList.vue

@@ -59,7 +59,7 @@
 				orderList4: [],
 				pageIndex5: 1,
 				isOver5: false,
-				orderList5: [],
+				orderList5: []
 			}
 		},
 		onLoad(options) {
@@ -107,6 +107,14 @@
 					}
 					this['isOver' + type] = res.data.list.length != 10
 					this['orderList' + type] = this['orderList' + type].concat(res.data.list)
+					if (this.orderList2.length) {
+						this.orderList2.forEach(v => {
+							v.noPick = true
+							if (v.products.some(vv => {return vv.productType == 3} )) {
+							    v.noPick = false
+							}
+						})
+					}
 				}).catch(error => {
 					this.$refs.uTips.show({
 						title: error.data.msg,

+ 9 - 1
pagesMain/pickOrderList.vue

@@ -4,7 +4,7 @@
 			<view style="padding: 10px 0" v-if="!orderList.length">
 				<u-divider color="#909399" border-color="#909399" bg-color="#f7f7f7">没有更多了</u-divider>
 			</view>
-			<orderItem v-for="(item, index) in orderList" :key="index" :orderData="item" :noPick="false"></orderItem>
+			<orderItem v-for="(item, index) in orderList" :key="index" :orderData="item" :isPick="true"></orderItem>
 		</scroll-view>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
@@ -66,6 +66,14 @@
 					}
 					this.isOver = res.data.list.length != 10
 					this.orderList = this.orderList.concat(res.data.list)
+					if (this.orderList.length) {
+						this.orderList.forEach(v => {
+							v.noPick = true
+							if (v.products.some(vv => {return vv.productType == 3} )) {
+							    v.noPick = false
+							}
+						})
+					}
 				}).catch(error => {
 					this.$refs.uTips.show({
 						title: error.data.msg,