Bladeren bron

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 3 jaren geleden
bovenliggende
commit
ae0802bc2c

+ 0 - 3
pageA/product/business_buy.vue

@@ -421,9 +421,6 @@
 				buyerPhoneInput(e){
 					this.buyerPhone = e.detail.value
 				},
-				unitPriceInput(e){
-					this.unitPrice = e.detail.value
-				},
 				addressInput(e){
 					this.address = e.detail.value
 				},

+ 26 - 51
pageA/product/business_sale.vue

@@ -55,7 +55,7 @@
 			<view   class="title">销售单价(元/吨)</view>
 			<view class="con-list">
 				<view class="picker">
-					<text>{{purchaseOrder.salePrice}}</text>
+					<text>{{purchaseOrder.unitPrice}}</text>
 				</view>
 				</view>
 		</view>
@@ -224,13 +224,14 @@
 				this.purchaseOrder.buyer = options.buyer
 				this.purchaseOrder.customer = options.customerName
 				this.purchaseOrder.basis = options.basisPrice
-				this.purchaseOrder.salePrice = options.salePrice
+				this.purchaseOrder.unitPrice = options.unitPrice
 				this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
 				this.purchaseOrder.settlementPrice = options.basisPrice
 				this.purchaseOrder.salePlanType = options.salePlanType
-				this.purchaseOrder.procurementPlan=options.procurementPlan
+				this.purchaseOrder.salePlan=options.salePlan
 				this.purchaseOrder.baggingNotes=options.baggingNotes
 				this.purchaseOrder.sendWarehouse = options.sendWarehouse
+				this.purchaseOrder.compId=options.compId
 			},
 			computed: {
 				...mapState(['hasLogin','userInfo']),
@@ -258,7 +259,7 @@
 						&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
 						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&unitPrice=${this.purchaseOrder.unitPrice}
 						&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&salePlanType=${this.purchaseOrder.salePlanType}
-						&procurementPlanNo=${this.purchaseOrder.procurementPlan}`
+						&salePlanNo=${this.purchaseOrder.salePlan}`
 					})
 				},
 				commit(){
@@ -270,25 +271,27 @@
 						this.$api.msg('采购数量输入错误')
 						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('点价输入错误')
 							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
 					if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
 						this.$api.msg('包装费输入错误')
 						return
 					}
+				}
 					if(!this.purchaseOrder.customer){
 						if(this.goods.customerTypeFlag==1){
 							this.purchaseOrder.customer=this.goods.customerName
@@ -296,17 +299,21 @@
 							this.purchaseOrder.customer=this.goods.compName
 						}
 					}
-					if(!this.purchaseOrder.seller){
+					if(!this.purchaseOrder.buyer){
 						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{
-							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
+					this.purchaseOrder.commonId=that.userInfo.id
 					this.purchaseOrder.pcFlag=0
+					if(this.purchaseOrder.salePlanType == "期货"){
+					this.purchaseOrder.unitPrice = this.purchaseOrder.settlementPrice
+					}
 					uni.showModal({
 						content: '订单提交后将发送给卖方,是否确定提交?',
 						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>

+ 13 - 1
pageA/product/detail.vue

@@ -74,6 +74,18 @@
 						<text>{{goods.priceType}}</text>
 					</view>
 				</view>
+				<view v-if='goods.procurementPlanType=="现货"' class="c-row">
+					<text class="tit">采购价格(元/吨)</text>
+					<view class="con-list">
+						<text>{{goods.unitPrice}}</text>
+					</view>
+				</view>
+				<view v-else class="c-row">
+					<text class="tit">基差(元/吨)</text>
+					<view class="con-list">
+						<text>{{goods.basisPrice}}</text>
+					</view>
+				</view>
 				<view class="c-row">
 					<text class="tit">收货地区</text>
 					<view class="con-list">
@@ -92,7 +104,7 @@
 						<text>{{goods.packingType}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view v-if='goods.baggingNotes' class="c-row">
 					<text class="tit">袋装备注</text>
 					<view class="con-list">
 						<text>{{goods.baggingNotes}}</text>

+ 5 - 4
pageA/product/sales_detail.vue

@@ -250,8 +250,8 @@
 					moldy: 0,
 					impurity: 0,
 					overFlow: 0,
-					seller:'',
-					sellerPhone:'',
+					buyer:'',
+					buyerPhone:'',
 					minSale: 0,
 					status:0
 				},
@@ -267,6 +267,7 @@
 		onShow() {
 		},
 		onLoad(options) {
+			this.goods.compId=options.compId
 			const that = this
 			uni.showLoading({
 				title: '正在加载',
@@ -383,8 +384,8 @@
 							uni.navigateTo({
 								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}
-										&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}
 							// 	&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}

+ 8 - 9
pageD/myRelease/buyEdit.vue

@@ -5,7 +5,7 @@
 		<view class="c-row b-b">
 			<text class="tit">名头</text>
 			<view class="con-list">
-				<text @click="navToDetailPage">{{deptList.procurementPlanNo}}</text>
+				<text @click="navToDetailPage">{{deptList.buyer}}</text>
 			</view>
 		</view>
 		<view class="c-row b-b">
@@ -34,12 +34,9 @@
 		</view>
 		<view class="c-row b-b">
 			<text class="tit">类型</text>
-			<picker @change="typeChange" :value="typesIndex" :range="typesType" class="con-list"
-				>
-				<view class="picker" v-model="deptList.procurementPlanType">
-					{{typesIndex>-1?typesType[typesIndex]:'请选择类型'}}
-				</view>
-			</picker>
+			<view class="con-list">
+				{{deptList.procurementPlanType}}
+			</view>
 		</view>
 		<view class="c-row b-b">
 			<text class="tit">价格类型</text>
@@ -51,7 +48,7 @@
 		<view class="c-row b-b" v-if="this.typesIndex != 1">
 			<text class="tit">单价(元/吨)</text>
 			<view class="con-list">
-				<input placeholder="请填写单价" name="input" v-model="deptList.unitPrice"></input>
+				<input placeholder="请填写单价" name="input" v-model="deptList.procurementPrice"></input>
 			</view>
 		</view>
 		<view class="c-row b-b" v-if="this.typesIndex == 1">
@@ -558,7 +555,9 @@
 				}
 				}
 				this.insertProcurementPlanInfo = this.deptList
-				this.insertProcurementPlanInfo.basisPrice=-this.insertProcurementPlanInfo.basisPrice
+				if(this.deptList.procurementPlanType == '期货'){
+								this.insertProcurementPlanInfo.basisPrice=-this.insertProcurementPlanInfo.basisPrice
+					}
 		         this.insertProcurementPlanInfo.commonId = this.userInfo.id
 				 this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 				 uni.showModal({

+ 0 - 1
pageD/myRelease/sellDetails.vue

@@ -37,7 +37,6 @@
 			<view class="c-row b-b">
 				<text class="tit">类型</text>
 				<view class="con-list">
-
 					{{deptList.salePlanType}}
 				</view>
 			</view>

+ 7 - 7
pageD/myRelease/sellEdit.vue

@@ -4,7 +4,7 @@
 			<view class="c-row b-b">
 				<text class="tit">名头</text>
 				<view class="con-list">
-					<text @click="navToDetailPage">{{deptList.procurementPlanNo}}</text>
+					<text @click="navToDetailPage">{{deptList.seller}}</text>
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -34,11 +34,9 @@
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">类型</text>
-				<picker @change="typeChange" :value="typesIndex" :range="typesType" class="con-list">
-					<view class="picker" v-model="deptList.salePlanType">
-						{{typesIndex>-1?typesType[typesIndex]:'请选择类型'}}
-					</view>
-				</picker>
+				<view class="con-list">
+					{{deptList.salePlanType}}
+				</view>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">价格类型</text>
@@ -512,7 +510,9 @@
 					}
 				}
 				this.insertProcurementPlanInfo = this.deptList
-				this.insertProcurementPlanInfo.basisPrice = -this.insertProcurementPlanInfo.basisPrice
+				if (this.deptList.salePlanType == '期货') {
+					this.insertProcurementPlanInfo.basisPrice = -this.insertProcurementPlanInfo.basisPrice
+				}
 				this.insertProcurementPlanInfo.commonId = this.userInfo.id
 				this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 				this.$api.doRequest('post', '/salePlanInfo/api/editSalePlanInfo', this

+ 8 - 8
pageD/myRelease/sellGrain.vue

@@ -21,9 +21,9 @@
 				</view>
 			</view>
 			<view class="c-row b-b">
-				<text class="tit">出量(吨)</text>
+				<text class="tit">出量(吨)</text>
 				<view class="con-list">
-					<input placeholder="请输入采购重量,如1000" name="input" v-model="deptList.plannedSaleVolume"></input>
+					<input placeholder="请输入出售重量,如1000" name="input" v-model="deptList.plannedSaleVolume"></input>
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -216,7 +216,7 @@
 					gradeKey:0,
 					packingTypeKey:0,
 					freightPayerKey:-1,
-					priceType: "定价采购",
+					priceType: "定价销售",
 					procurementPlanType: "现货",
 					grain: "塔粮",
 					grade: "不限(默认)",
@@ -245,7 +245,7 @@
 				],
 				show: false,
 				show1: false,
-				region: '请选择货地区',
+				region: '请选择货地区',
 				region1: '请选择产地',
 				baoIndex: 0,
 				baoType: ['不限(默认)', '散装', '大袋', '小袋'],
@@ -382,7 +382,7 @@
 				this.deptList.salePlanTypeKey = e.detail.value+1
 				this.deptList.salePlanType = this.typesType[this.typesIndex];
 				if (this.typesIndex == 0) {
-					this.deptList.priceType = '定价采购'
+					this.deptList.priceType = '定价销售'
 				} else {
 					this.deptList.priceType = '期货盘面价+基差'
 				}
@@ -413,16 +413,16 @@
 					return
 				}
 				if (!this.deptList.plannedSaleVolume) {
-					this.$api.msg('出量不能为空')
+					this.$api.msg('出量不能为空')
 					return
 				}
 				if (this.deptList.plannedSaleVolume > 100000 || this.deptList.plannedSaleVolume < 1) {
-					this.$api.msg('出量输入错误')
+					this.$api.msg('出量输入错误')
 					return
 				}
 				if (this.deptList.plannedSaleVolume.indexOf('.') != -1) {
 					if (this.deptList.plannedSaleVolume.split('.')[1].length > 2) {
-						this.$api.msg('出量输入错误')
+						this.$api.msg('出量输入错误')
 						return
 					}
 				}

+ 18 - 17
pages/release/release.vue

@@ -11,7 +11,7 @@
 						<view class="status">
 							<view v-if='item.status=="已驳回"' class='put2'>未通过</view>
 							<view v-if='item.status=="待审核"' class='put1'>审核中</view>
-							<view v-if='item.status=="已认证"' class='put'>已通过</view>
+							<view v-if='item.status=="已通过"' class='put'>已通过</view>
 						</view>
 					</view>
 					<view class="address">{{item.privates}}{{item.city}}{{item.Area}}</view>
@@ -28,8 +28,8 @@
 				<hr style="margin: 16px 0; color: #EEEEEE;">
 				<view class="flex" style="right: 10px;">
 					<view @click='edit(item)' v-if='item.status!="待审核"' class='anniu'>编辑</view>
-					<view class='anniu' @click="switch1(item)" v-if="item.showFlag == 0">隐藏</view>
-					<view class='anniu' @click="switch1(item)" v-if="item.showFlag == 1">显示</view>
+					<view class='anniu' @click="switch1(item)" v-if="item.showFlag == 0">显示</view>
+					<view class='anniu' @click="switch1(item)" v-if="item.showFlag == 1">隐藏</view>
 					<view class='anniu' @click="deleteRelease(item)">删除</view>
 				</view>
 			</view>
@@ -76,9 +76,9 @@
 				if (item.type == "买粮") {
 					var that = this
 					var tips
-					if (item.showFlag == 0) {
+					if (item.showFlag == 1) {
 						tips = "隐藏后该信息不再展示给其他用户,是否确定隐藏?"
-					} else if (item.showFlag == 1) {
+					} else if (item.showFlag == 0) {
 						tips = "确定显示该信息?"
 					}
 					uni.showModal({
@@ -94,9 +94,9 @@
 									}).then(res => {
 										// this.procurementPlanInfos = res.data.data.records
 										if (res.data.message == "Success") {
-											if (item.showFlag == 0) {
+											if (item.showFlag == 1) {
 												that.$api.msg('隐藏成功!')
-											} else if (item.showFlag == 1) {
+											} else if (item.showFlag == 0) {
 												that.$api.msg('显示成功!')
 											}
 											that.getList()
@@ -118,9 +118,9 @@
 				} else if (item.type == "卖粮") {
 					var that = this
 					var tips
-					if (item.showFlag == 0) {
+					if (item.showFlag == 1) {
 						tips = "隐藏后该信息不再展示给其他用户,是否确定隐藏?"
-					} else if (item.showFlag == 1) {
+					} else if (item.showFlag == 0) {
 						tips = "确定显示该信息?"
 					}
 					uni.showModal({
@@ -135,9 +135,9 @@
 									}).then(res => {
 										// this.procurementPlanInfos = res.data.data.records
 										if (res.data.message == "Success") {
-											if (item.showFlag == 0) {
+											if (item.showFlag == 1) {
 												that.$api.msg('隐藏成功!')
-											} else if (item.showFlag == 1) {
+											} else if (item.showFlag == 0) {
 												that.$api.msg('显示成功!')
 											}
 											that.getList()
@@ -171,6 +171,7 @@
 			},
 			deleteRelease(item) {
 				if (item.type == "买粮") {
+					var that = this
 					uni.showModal({
 						// title: '登录提示',
 						content: '确定删除该信息?',
@@ -178,12 +179,12 @@
 						confirmText: '确定',
 						success: function(res) {
 							if (res.confirm) {
-								this.$api.doRequest('post', '/procurementPlanInfo/api/deleteProcurementPlan', {
+								that.$api.doRequest('post', '/procurementPlanInfo/api/deleteProcurementPlan', {
 										id: item.id
 									}).then(res => {
 										if (res.data.message == "Success") {
-											this.$api.msg('删除成功!')
-											this.getList()
+											that.$api.msg('删除成功!')
+											that.getList()
 											return
 										}
 									})
@@ -209,12 +210,12 @@
 						confirmText: '确定',
 						success: function(res) {
 							if (res.confirm) {
-								this.$api.doRequest('post', '/salePlanInfo/api/deleteSalePlanInfo', {
+								that.$api.doRequest('post', '/salePlanInfo/api/deleteSalePlanInfo', {
 										id: item.id
 									}).then(res => {
 										if (res.data.message == "Success") {
-											this.$api.msg('删除成功!')
-											this.getList()
+											that.$api.msg('删除成功!')
+											that.getList()
 											return
 										}
 									})