瀏覽代碼

前端gjy

gjy 3 年之前
父節點
當前提交
9e0440833e
共有 3 個文件被更改,包括 46 次插入33 次删除
  1. 1 0
      pageA/product/business_buy.vue
  2. 33 32
      pageA/product/business_sale.vue
  3. 12 1
      pages/business/business.vue

+ 1 - 0
pageA/product/business_buy.vue

@@ -282,6 +282,7 @@
 							return
 						}
 					}
+					this.purchaseOrder.packingFee=-this.purchaseOrder.packingFee
 					if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
 						this.$api.msg('包装费输入错误')
 						return

+ 33 - 32
pageA/product/business_sale.vue

@@ -47,7 +47,7 @@
 			<view  class="title">今日基差(元/吨)</view>
 			<view class="con-list">
 				<view class="picker">
-					<text>{{purchaseOrder.basisPrice}}</text>
+					<text>{{purchaseOrder.basis}}</text>
 				</view>
 				</view>
 		</view>
@@ -75,7 +75,7 @@
 		<view  class="c-row b-b">
 			<view class="title">采购数量(吨)</view>
 			<view class="con-list">
-			<input v-model='purchaseOrder.transactionsNumber' placeholder="请填写出售数量" name="input"></input>
+			<input v-model='purchaseOrder.transactionsNumber' placeholder="请填写采购数量" name="input"></input>
 			</view>
 		</view>
 		<view  class="c-row b-b">
@@ -286,7 +286,8 @@
 							return
 						}
 					}
-					if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<= 2000){
+					this.purchaseOrder.packingFee=-this.purchaseOrder.packingFee
+					if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
 						this.$api.msg('包装费输入错误')
 						return
 					}
@@ -308,35 +309,35 @@
 					}
 					var that=this
 					this.purchaseOrder.pcFlag=0
-					// uni.showModal({
-					// 	content: '订单提交后将发送给买方,是否确定提交?',
-					// 	success: function (res) {
-					// 		if (res.confirm) {
-					// 			that.$api.doRequest('post','  ', that.purchaseOrder).then(res => {
-					// 				if(res.data.code==200){
-					// 					uni.showToast({
-					// 						title: '提交成功,等待买方回复',
-					// 						icon: 'none',
-					// 						duration: 2000
-					// 					})
-					// 					// uni.navigateBack();
-					// 				}else{
-					// 					uni.showToast({
-					// 						title: '提交失败:'+res.data.message,
-					// 						icon: 'none',
-					// 						duration: 2000
-					// 					})
-					// 				}
-					// 			}).catch(res => {
-					// 				uni.showToast({
-					// 					title: res.data.message,
-					// 					icon: 'none',
-					// 					duration: 2000
-					// 				})
-					// 			})
-					// 		}
-					// 	}
-					// })
+					uni.showModal({
+						content: '订单提交后将发送给卖方,是否确定提交?',
+						success: function (res) {
+							if (res.confirm) {
+								that.$api.doRequest('post','/saleOrder/api/insertSaleOrder', that.purchaseOrder).then(res => {
+									if(res.data.code==200){
+										uni.showToast({
+											title: '提交成功,等待卖方回复',
+											icon: 'none',
+											duration: 2000
+										})
+										// uni.navigateBack();
+									}else{
+										uni.showToast({
+											title: '提交失败:'+res.data.message,
+											icon: 'none',
+											duration: 2000
+										})
+									}
+								}).catch(res => {
+									uni.showToast({
+										title: res.data.message,
+										icon: 'none',
+										duration: 2000
+									})
+								})
+							}
+						}
+					})
 				},
 				someprice(e){
 					if(this.purchaseOrder.pointPrice&&this.purchaseOrder.invoiceFee&&this.purchaseOrder.packingFee){

+ 12 - 1
pages/business/business.vue

@@ -35,23 +35,34 @@
 					<view class="title">{{item.title}}</view>
 				</view>
 				<view class='flex justify-between'>
-					<view class='address'>
+					<view v-if='TabCur==0' class='address'>
 						{{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}{{item.receiveWarehouse}}
 					</view>
+					<view v-if='TabCur==1' class='address'>
+						{{item.sendPrivate}}{{item.sendCity}}{{item.sendArea}}{{item.sendWarehouse}}
+					</view>
 					<view class='price' v-if='item.procurementPlanType=="期货"'>{{item.basisPrice}}<text
 							style='font-size:13px;color:#333333;'>元/吨</text></view>
 					<view class='price' v-if='item.procurementPlanType=="现货"'>{{item.unitPrice}}<text
 							style='font-size:13px;color:#333;'>元/吨</text></view>
+					<view class='price' v-if='item.salePlanType=="期货"'>{{item.basisPrice}}<text
+						style='font-size:13px;color:#333333;'>元/吨</text></view>
+					<view class='price' v-if='item.salePlanType=="现货"'>{{item.unitPrice}}<text
+						style='font-size:13px;color:#333;'>元/吨</text></view>
 				</view>
 				<view class='flex justify-between'>
 					<view>
 						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="现货"'>现货</view>
 						<view class='tag1 tag-bule radius line-pink' v-if='item.procurementPlanType=="期货"'>期货</view>
+						<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="现货"'>现货</view>
+						<view class='tag1 tag-bule radius line-pink' v-if='item.salePlanType=="期货"'>期货</view>
 						<view class='tag1 tag-yellow radius line-green'>{{item.goodsName}}</view>
 						<view class='tag1 tag-red radius line-yellow'>{{item.weight}}吨</view>
 					</view>
 					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="期货"'>今日基差</view>
 					<view style='color:#878C9C;padding-top:5px;' v-if='item.procurementPlanType=="现货"'>采购价格</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="期货"'>今日基差</view>
+					<view style='color:#878C9C;padding-top:5px;' v-if='item.salePlanType=="现货"'>采购价格</view>
 				</view>
 			</view>
 			<view v-show="isLoadMore">