zxz il y a 3 ans
Parent
commit
90a4ef735d
2 fichiers modifiés avec 32 ajouts et 56 suppressions
  1. 27 52
      pageA/product/business_sale.vue
  2. 5 4
      pageA/product/sales_detail.vue

+ 27 - 52
pageA/product/business_sale.vue

@@ -142,7 +142,7 @@
 						memo:'',
 						memo:'',
 						buyer:'',
 						buyer:'',
 						buyerPhone:'',
 						buyerPhone:'',
-						unitPrice:0,
+						salePrice:0,
 						address:'',
 						address:'',
 						count:0,
 						count:0,
 						province:'',
 						province:'',
@@ -182,7 +182,7 @@
 					memo:'',
 					memo:'',
 					buyer:'',
 					buyer:'',
 					buyerPhone:'',
 					buyerPhone:'',
-					unitPrice:0,
+					salePrice:0,
 					address:'',
 					address:'',
 					count:0,
 					count:0,
 					id:0,
 					id:0,
@@ -228,9 +228,10 @@
 				this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
 				this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
 				this.purchaseOrder.settlementPrice = options.basisPrice
 				this.purchaseOrder.settlementPrice = options.basisPrice
 				this.purchaseOrder.salePlanType = options.salePlanType
 				this.purchaseOrder.salePlanType = options.salePlanType
-				this.purchaseOrder.procurementPlan=options.procurementPlan
+				this.purchaseOrder.salePlan=options.salePlan
 				this.purchaseOrder.baggingNotes=options.baggingNotes
 				this.purchaseOrder.baggingNotes=options.baggingNotes
 				this.purchaseOrder.sendWarehouse = options.sendWarehouse
 				this.purchaseOrder.sendWarehouse = options.sendWarehouse
+				this.purchaseOrder.compId=options.compId
 			},
 			},
 			computed: {
 			computed: {
 				...mapState(['hasLogin','userInfo']),
 				...mapState(['hasLogin','userInfo']),
@@ -256,9 +257,9 @@
 						url: `/pageA/product/Identity_switching?goodsName=${this.purchaseOrder.goodsName}
 						url: `/pageA/product/Identity_switching?goodsName=${this.purchaseOrder.goodsName}
 						&receivePrivate=${this.purchaseOrder.receivePrivate}&receiveCity=${this.purchaseOrder.receiveCity}
 						&receivePrivate=${this.purchaseOrder.receivePrivate}&receiveCity=${this.purchaseOrder.receiveCity}
 						&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
 						&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
-						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&unitPrice=${this.purchaseOrder.unitPrice}
+						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&salePrice=${this.purchaseOrder.salePrice}
 						&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&salePlanType=${this.purchaseOrder.salePlanType}
 						&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&salePlanType=${this.purchaseOrder.salePlanType}
-						&procurementPlanNo=${this.purchaseOrder.procurementPlan}`
+						&salePlanNo=${this.purchaseOrder.salePlan}`
 					})
 					})
 				},
 				},
 				commit(){
 				commit(){
@@ -270,25 +271,27 @@
 						this.$api.msg('采购数量输入错误')
 						this.$api.msg('采购数量输入错误')
 						return
 						return
 					}
 					}
-					if(!this.purchaseOrder.pointPrice){
-						this.$api.msg('点价不能为空')
-						return
-					}
-					if(this.purchaseOrder.pointPrice>10000){
-						this.$api.msg('点价输入错误')
-						return
-					}
-					if(this.purchaseOrder.pointPrice.indexOf('.')!=-1){
-						if(this.purchaseOrder.pointPrice.split(".")[1].length>2){
+					if(this.purchaseOrder.salePlanType=='期货'){
+						if(!this.purchaseOrder.pointPrice){
+							this.$api.msg('点价不能为空')
+							return
+						}
+						if(this.purchaseOrder.pointPrice>10000){
 							this.$api.msg('点价输入错误')
 							this.$api.msg('点价输入错误')
 							return
 							return
 						}
 						}
+						if(this.purchaseOrder.pointPrice.indexOf('.')!=-1){
+							if(this.purchaseOrder.pointPrice.split(".")[1].length>2){
+								this.$api.msg('点价输入错误')
+								return
+						}
 					}
 					}
 					this.purchaseOrder.packingFee=-this.purchaseOrder.packingFee
 					this.purchaseOrder.packingFee=-this.purchaseOrder.packingFee
 					if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
 					if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
 						this.$api.msg('包装费输入错误')
 						this.$api.msg('包装费输入错误')
 						return
 						return
 					}
 					}
+				}
 					if(!this.purchaseOrder.customer){
 					if(!this.purchaseOrder.customer){
 						if(this.goods.customerTypeFlag==1){
 						if(this.goods.customerTypeFlag==1){
 							this.purchaseOrder.customer=this.goods.customerName
 							this.purchaseOrder.customer=this.goods.customerName
@@ -296,17 +299,21 @@
 							this.purchaseOrder.customer=this.goods.compName
 							this.purchaseOrder.customer=this.goods.compName
 						}
 						}
 					}
 					}
-					if(!this.purchaseOrder.seller){
+					if(!this.purchaseOrder.buyer){
 						if(this.goods.customerTypeFlag==1){
 						if(this.goods.customerTypeFlag==1){
-							this.purchaseOrder.seller=this.goods.customerName
-							this.purchaseOrder.sellerPhone=this.goods.customerPhone
+							this.purchaseOrder.buyer=this.goods.customerName
+							this.purchaseOrder.buyerPhone=this.goods.customerPhone
 						}else{
 						}else{
-							this.purchaseOrder.seller=this.goods.compName
-							this.purchaseOrder.sellerPhone=this.goods.customerPhone
+							this.purchaseOrder.buyer=this.goods.compName
+							this.purchaseOrder.buyerPhone=this.goods.customerPhone
 						}
 						}
 					}
 					}
 					var that=this
 					var that=this
+					this.purchaseOrder.commonId=that.userInfo.id
 					this.purchaseOrder.pcFlag=0
 					this.purchaseOrder.pcFlag=0
+					if(this.purchaseOrder.procurementPlanType == "期货"){
+					this.purchaseOrder.salePrice = this.purchaseOrder.settlementPrice
+					}
 					uni.showModal({
 					uni.showModal({
 						content: '订单提交后将发送给卖方,是否确定提交?',
 						content: '订单提交后将发送给卖方,是否确定提交?',
 						success: function (res) {
 						success: function (res) {
@@ -381,38 +388,6 @@
 						}
 						}
 					}
 					}
 				},
 				},
-				changeZhihang(){
-					uni.navigateTo({
-						url: '/pageA/pages/newcompany'
-					})
-				},
-				PriceTypeChange(e) {
-					this.priceTypeIndex = e.detail.value
-					this.price = this.priceType[this.priceTypeIndex]
-				},
-				RegionChange(e) {
-					this.region = e.detail.value
-					this.province = this.region[0];
-					this.area = this.region[0]+this.region[1]+this.region[2];
-				},
-				textareaInput(e) {
-					this.memo = e.detail.value
-				},
-				buyerInput(e){
-					this.buyer = e.detail.value
-				},
-				buyerPhoneInput(e){
-					this.buyerPhone = e.detail.value
-				},
-				unitPriceInput(e){
-					this.unitPrice = e.detail.value
-				},
-				addressInput(e){
-					this.address = e.detail.value
-				},
-				countInput(e){
-					this.count = e.detail.value
-				},
 			}
 			}
 		}
 		}
 </script>
 </script>

+ 5 - 4
pageA/product/sales_detail.vue

@@ -250,8 +250,8 @@
 					moldy: 0,
 					moldy: 0,
 					impurity: 0,
 					impurity: 0,
 					overFlow: 0,
 					overFlow: 0,
-					seller:'',
-					sellerPhone:'',
+					buyer:'',
+					buyerPhone:'',
 					minSale: 0,
 					minSale: 0,
 					status:0
 					status:0
 				},
 				},
@@ -267,6 +267,7 @@
 		onShow() {
 		onShow() {
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
+			this.goods.compId=options.compId
 			const that = this
 			const that = this
 			uni.showLoading({
 			uni.showLoading({
 				title: '正在加载',
 				title: '正在加载',
@@ -383,8 +384,8 @@
 							uni.navigateTo({
 							uni.navigateTo({
 								url: `/pageA/product/business_sale?id=${this.goods.id}&sendArea=${this.goods.sendArea}&minimumVolume=${this.goods.minimumVolume}
 								url: `/pageA/product/business_sale?id=${this.goods.id}&sendArea=${this.goods.sendArea}&minimumVolume=${this.goods.minimumVolume}
 										&goodsName=${this.goods.goodsName}&sendCity=${this.goods.sendCity}&sendPrivate=${this.goods.sendPrivate}&seller=${this.goods.seller}
 										&goodsName=${this.goods.goodsName}&sendCity=${this.goods.sendCity}&sendPrivate=${this.goods.sendPrivate}&seller=${this.goods.seller}
-										&basisPrice=${this.goods.basisPrice}&salePrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}
-										&salePlanType=${this.goods.salePlanType}&salePlanNo=${this.goods.salePlanNo}&baggingNotes=${this.goods.baggingNotes}`
+										&basisPrice=${this.goods.basisPrice}&salPrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}
+										&salePlanType=${this.goods.salePlanType}&salePlan=${this.goods.salePlanNo}&baggingNotes=${this.goods.baggingNotes}&compId=${this.goods.compId}`
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}
 							// 	&city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}
 							// 	&companyId=${this.goods.companyId}&sellerPhone=${this.goods.sellerPhone}&minSale=${this.goods.minSale}
 							// 	&companyId=${this.goods.companyId}&sellerPhone=${this.goods.sellerPhone}&minSale=${this.goods.minSale}