gjy 3 gadi atpakaļ
vecāks
revīzija
ceba967718
2 mainītis faili ar 128 papildinājumiem un 38 dzēšanām
  1. 1 1
      pageA/product/detail.vue
  2. 127 37
      pageA/product/trade.vue

+ 1 - 1
pageA/product/detail.vue

@@ -376,7 +376,7 @@
 				})
 			},
 			salegrain(){
-				console.log(this.userInfo)
+				var that=this
 				if (!this.hasLogin) {
 					uni.showModal({
 						title: '登录提示',

+ 127 - 37
pageA/product/trade.vue

@@ -3,7 +3,7 @@
 	<view class="container">
 		<view class="detail-desc">
 			<view class="c-list">
-				<view class="c-row">
+				<view class="c-row b-b">
 					<text class="tit">卖方</text>
 					<view class="con-list">
 						<view v-if='goods.customerTypeFlag==1' class="title">{{goods.customerName}}</view>
@@ -20,35 +20,95 @@
 		</view>
 		<view class="detail-desc">
 			<view class="c-list">
-				<view class="c-row">
-					<text class="tit">卖方</text>
+				<view class="c-row b-b">
+					<text class="tit">收货地区</text>
 					<view class="con-list">
-						<view v-if='goods.customerTypeFlag==1' class="title">{{goods.customerName}}</view>
-						<view v-if='goods.customerTypeFlag==2' class="title">{{goods.compName}}</view>
+						<view  class="title">{{receivePrivate}}{{receiveCity}}{{receiveArea}}</view>
+					</view>
+				</view>
+				<view v-if='pcFlag==1' class="c-row  b-b">
+					<text class="tit">收货库</text>
+					<view class="con-list">
+						<view class="title">{{receiveWarehouse}}</view>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">货名</text>
+					<view class="con-list">
+						<view class="title">{{goodsName}}</view>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">最小成交量(吨)</text>
+					<view class="con-list">
+						<view class="title">{{minimumVolume}}</view>
 					</view>
 				</view>
 				<view class="c-row">
-					<text class="tit">买方</text>
+					<text class="tit">今日基差(元/吨)</text>
 					<view class="con-list">
-						<view class="title">{{seller}}</view>
+						<view class="title">{{basisPrice}}</view>
 					</view>
 				</view>
 			</view>
 		</view>
 		<view class="detail-desc">
 			<view class="c-list">
-				<view class="c-row">
-					<text class="tit">卖方</text>
+				<view class="c-row  b-b">
+					<text class="tit">发票类型</text>
+					<picker style="text-align:right;" @change="InvoiceTypeChange1" :value="invoiceTypeIndex1" :range="invoiceType1">
+						<view class="picker">
+							{{invoiceTypeIndex1>-1?invoiceType1[invoiceTypeIndex1]:'请选择'}}
+						</view>
+					</picker>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">出售数量(吨)<text style='color:#FC3535;'>*</text></text>
 					<view class="con-list">
-						<view v-if='goods.customerTypeFlag==1' class="title">{{goods.customerName}}</view>
-						<view v-if='goods.customerTypeFlag==2' class="title">{{goods.compName}}</view>
+						<input v-model='list.transactionsNumber' type="digit">
 					</view>
 				</view>
-				<view class="c-row">
-					<text class="tit">买方</text>
+				<view class="c-row b-b">
+					<text class="tit">发票类型</text>
+					<picker style="text-align:right;" @change="packingChange" :value="packingIndex" :range="packingType">
+						<view class="picker">
+							{{packingIndex>-1?packingType[packingIndex]:'请选择'}}
+						</view>
+					</picker>
+				</view>
+				<view class='b-b' style='padding:10px 15px;'>
+					<text class="tit">袋装备注</text>
+					<view style='position:relative;' class='con-list'>
+						<textarea maxlength='30' v-model='list.baggingNotes' placeholder="请输入袋装备注,如王中王彩袋,49公斤,大粒" class='textarea' name="" id=""  cols="30" rows="3"></textarea>
+					<text style='position:absolute;right:0;bottom:2px;'>{{list.baggingNotes.length}}/30个字</text>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">点价(元/吨)<text style='color:#FC3535;'>*</text></text>
 					<view class="con-list">
-						<view class="title">{{seller}}</view>
+						<input v-model='list.pointPrice' placeholder="请输入出售数量" type="digit">
+					</view>
+				</view>
+				<view  v-if='invoiceTypeIndex1==0&&goods.customerTypeFlag==1' class="c-row b-b">
+					<text class="tit">发票费用(元/吨)</text>
+					<view class="con-list">
+						<input disabled value='-20' placeholder="请输入出售数量" type="digit">
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">包装费(元/吨)</text>
+					<view class="con-list">
+						<input v-model='list.packingFee' placeholder="请输入包装费" type="digit">
+					</view>
+				</view>
+				<view  style='padding:10px 15px;'>
+					<view class='flex justify-between'>
+						<text class="tit">结算价格(元/吨)</text>
+						<view class="con-list">
+							<input disabled v-model='list.settlementPrice' placeholder="请输入包装费" type="digit">
+						</view>
 					</view>
+					<view style='font-size:11px;color:#AFB3BF;'>结算价格=点价+基差+发票费用+包装费</view>
 				</view>
 			</view>
 		</view>
@@ -70,40 +130,36 @@
 	export default {
 			data() {
 				return {
-					tradeInfo:{
-						salebuyId:0,
-						packing:'',
-						memo:'',
-						buyer:'',
-						buyerPhone:'',
-						unitPrice:0,
-						address:'',
-						count:0,
-						province:'',
-						area:'',
-						priceType:'',
-						invoiceType:'',
-						acceptType:'',
-						seller:'',
-						sellerPhone:'',
-						packingMoney:0,
-						type:0,
-					},
+					goodsName:'',
 					goods:{},
+					receiveWarehouse:'',
+					receivePrivate:'',
+					receiveCity:'',
+					receiveArea:'',
+					minimumVolume:0,
+					basisPrice:0,
+					pcFlag:0,
+					list:{
+						transactionsNumber:0,
+						baggingNotes:'',
+						pointPrice:0,
+						packingFee:'',
+						settlementPrice:0
+					},
 					invoiceTypeIndex:0,
 					invoiceTypeIndex1:0,
 					acceptTypeIndex:0,
 					priceTypeIndex:0,
 					bankNameIndex:0,
 					packingIndex:0,
-					packingType: ['散装', '袋装'],
+					packingType: ['散装', '大装','小袋'],
 					invoiceType: ['不开发票', '普通发票', '增值税发票'],
 					invoiceType1: ['不开发票','增值税发票'],
 					acceptType: ['第三方检验(国家检验资质)', '交收地库或港出具的检验', '现场看货','其他'],
 					priceType: ['库内价', '到库价', '到港价'],
 					priceTypeIndex1:'库内价',
 					region: [],
-					salebuyId:0,
+					id:0,
 					packing:'',
 					memo:'',
 					buyer:'',
@@ -138,9 +194,16 @@
 				};
 			},
 			onLoad(options) {
-				this.salebuyId = options.id
+				this.receiveWarehouse=options.receiveWarehouse
+				this.receivePrivate=options.receivePrivate
+				this.receiveCity=options.receiveCity
+				this.receiveArea=options.receiveArea
+				this.minimumVolume=options.minimumVolume
+				this.basisPrice=options.basisPrice
+				this.id = options.id
+				this.pcFlag = options.pcFlag
+				this.goodsName = options.goodsName
 				this.seller = options.seller
-				this.sellerPhone = options.sellerPhone
 				this.isFutures = options.isFutures
 				this.minSale = options.minSale
 				this.companyId=options.companyId
@@ -420,6 +483,23 @@
 			}
 		}
 	}
+	.c-list picker .picker {
+	    line-height: 80rpx;
+	    font-size: 24rpx;
+	    text-overflow: ellipsis;
+	    white-space: nowrap;
+	    overflow: hidden;
+	    width: 100%;
+	    text-align: right;
+	}
+	.c-list picker {
+	    -webkit-box-flex: 1;
+	    -webkit-flex: 1;
+	    flex: 1;
+	    padding-right: 10px;
+	    overflow: hidden;
+	    position: relative;
+	}
 	.c-list {
 		font-size: $font-sm + 2upx;
 		color: $font-color-base;
@@ -470,4 +550,14 @@
 			color: $uni-color-primary;
 		}
 	}
+	.textarea{
+		background:#F9F9FA;
+		font-size:12px;
+		text-align:left;
+		width:100%;
+		height:60px;
+		padding:10px;
+		border-radius:5px;
+		margin-top:10px;
+	}
 </style>