Browse Source

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

zhongtianhaoyuan 3 years ago
parent
commit
36c8bb057f

+ 0 - 62
components/colorui/main.css

@@ -87,7 +87,6 @@ image.loading::after {
  ==================== */
 
 switch,
-checkbox,
 radio {
 	position: relative;
 }
@@ -132,35 +131,8 @@ switch.checked::before {
 
 /* #ifndef MP-ALIPAY */
 radio::before,
-checkbox::before {
-	font-family: "cuIcon";
-	content: "\e645";
-	position: absolute;
-	color: #ffffff !important;
-	top: 50%;
-	margin-top: -8px;
-	right: 5px;
-	font-size: 32upx;
-	line-height: 16px;
-	pointer-events: none;
-	transform: scale(1, 1);
-	transition: all 0.3s ease-in-out 0s;
-	z-index: 9;
-}
-
 radio .wx-radio-input,
-checkbox .wx-checkbox-input,
 radio .uni-radio-input,
-checkbox .uni-checkbox-input {
-	margin: 0;
-	width: 24px;
-	height: 24px;
-}
-
-checkbox.round .wx-checkbox-input,
-checkbox.round .uni-checkbox-input {
-	border-radius: 100upx;
-}
 
 /* #endif */
 
@@ -222,11 +194,9 @@ switch.radius .uni-switch-input::before {
 
 switch .wx-switch-input::before,
 radio.radio::before,
-checkbox .wx-checkbox-input::before,
 radio .wx-radio-input::before,
 switch .uni-switch-input::before,
 radio.radio::before,
-checkbox .uni-checkbox-input::before,
 radio .uni-radio-input::before {
 	display: none;
 }
@@ -276,10 +246,8 @@ radio.radio .uni-radio-input-checked::after {
 }
 
 switch.red[checked] .wx-switch-input.wx-switch-input-checked,
-checkbox.red[checked] .wx-checkbox-input,
 radio.red[checked] .wx-radio-input,
 switch.red.checked .uni-switch-input.uni-switch-input-checked,
-checkbox.red.checked .uni-checkbox-input,
 radio.red.checked .uni-radio-input {
 	background-color: #e54d42 !important;
 	border-color: #e54d42 !important;
@@ -287,10 +255,8 @@ radio.red.checked .uni-radio-input {
 }
 
 switch.orange[checked] .wx-switch-input,
-checkbox.orange[checked] .wx-checkbox-input,
 radio.orange[checked] .wx-radio-input,
 switch.orange.checked .uni-switch-input,
-checkbox.orange.checked .uni-checkbox-input,
 radio.orange.checked .uni-radio-input {
 	background-color: #f37b1d !important;
 	border-color: #f37b1d !important;
@@ -298,10 +264,8 @@ radio.orange.checked .uni-radio-input {
 }
 
 switch.yellow[checked] .wx-switch-input,
-checkbox.yellow[checked] .wx-checkbox-input,
 radio.yellow[checked] .wx-radio-input,
 switch.yellow.checked .uni-switch-input,
-checkbox.yellow.checked .uni-checkbox-input,
 radio.yellow.checked .uni-radio-input {
 	background-color: #fbbd08 !important;
 	border-color: #fbbd08 !important;
@@ -309,10 +273,8 @@ radio.yellow.checked .uni-radio-input {
 }
 
 switch.olive[checked] .wx-switch-input,
-checkbox.olive[checked] .wx-checkbox-input,
 radio.olive[checked] .wx-radio-input,
 switch.olive.checked .uni-switch-input,
-checkbox.olive.checked .uni-checkbox-input,
 radio.olive.checked .uni-radio-input {
 	background-color: #8dc63f !important;
 	border-color: #8dc63f !important;
@@ -321,14 +283,10 @@ radio.olive.checked .uni-radio-input {
 
 switch.green[checked] .wx-switch-input,
 switch[checked] .wx-switch-input,
-checkbox.green[checked] .wx-checkbox-input,
-checkbox[checked] .wx-checkbox-input,
 radio.green[checked] .wx-radio-input,
 radio[checked] .wx-radio-input,
 switch.green.checked .uni-switch-input,
 switch.checked .uni-switch-input,
-checkbox.green.checked .uni-checkbox-input,
-checkbox.checked .uni-checkbox-input,
 radio.green.checked .uni-radio-input,
 radio.checked .uni-radio-input {
 	background-color: #39b54a !important;
@@ -338,10 +296,8 @@ radio.checked .uni-radio-input {
 }
 
 switch.cyan[checked] .wx-switch-input,
-checkbox.cyan[checked] .wx-checkbox-input,
 radio.cyan[checked] .wx-radio-input,
 switch.cyan.checked .uni-switch-input,
-checkbox.cyan.checked .uni-checkbox-input,
 radio.cyan.checked .uni-radio-input {
 	background-color: #1cbbb4 !important;
 	border-color: #1cbbb4 !important;
@@ -349,10 +305,8 @@ radio.cyan.checked .uni-radio-input {
 }
 
 switch.blue[checked] .wx-switch-input,
-checkbox.blue[checked] .wx-checkbox-input,
 radio.blue[checked] .wx-radio-input,
 switch.blue.checked .uni-switch-input,
-checkbox.blue.checked .uni-checkbox-input,
 radio.blue.checked .uni-radio-input {
 	background-color: #0081ff !important;
 	border-color: #0081ff !important;
@@ -360,10 +314,8 @@ radio.blue.checked .uni-radio-input {
 }
 
 switch.purple[checked] .wx-switch-input,
-checkbox.purple[checked] .wx-checkbox-input,
 radio.purple[checked] .wx-radio-input,
 switch.purple.checked .uni-switch-input,
-checkbox.purple.checked .uni-checkbox-input,
 radio.purple.checked .uni-radio-input {
 	background-color: #6739b6 !important;
 	border-color: #6739b6 !important;
@@ -371,10 +323,8 @@ radio.purple.checked .uni-radio-input {
 }
 
 switch.mauve[checked] .wx-switch-input,
-checkbox.mauve[checked] .wx-checkbox-input,
 radio.mauve[checked] .wx-radio-input,
 switch.mauve.checked .uni-switch-input,
-checkbox.mauve.checked .uni-checkbox-input,
 radio.mauve.checked .uni-radio-input {
 	background-color: #9c26b0 !important;
 	border-color: #9c26b0 !important;
@@ -382,10 +332,8 @@ radio.mauve.checked .uni-radio-input {
 }
 
 switch.pink[checked] .wx-switch-input,
-checkbox.pink[checked] .wx-checkbox-input,
 radio.pink[checked] .wx-radio-input,
 switch.pink.checked .uni-switch-input,
-checkbox.pink.checked .uni-checkbox-input,
 radio.pink.checked .uni-radio-input {
 	background-color: #e03997 !important;
 	border-color: #e03997 !important;
@@ -393,10 +341,8 @@ radio.pink.checked .uni-radio-input {
 }
 
 switch.brown[checked] .wx-switch-input,
-checkbox.brown[checked] .wx-checkbox-input,
 radio.brown[checked] .wx-radio-input,
 switch.brown.checked .uni-switch-input,
-checkbox.brown.checked .uni-checkbox-input,
 radio.brown.checked .uni-radio-input {
 	background-color: #a5673f !important;
 	border-color: #a5673f !important;
@@ -404,10 +350,8 @@ radio.brown.checked .uni-radio-input {
 }
 
 switch.grey[checked] .wx-switch-input,
-checkbox.grey[checked] .wx-checkbox-input,
 radio.grey[checked] .wx-radio-input,
 switch.grey.checked .uni-switch-input,
-checkbox.grey.checked .uni-checkbox-input,
 radio.grey.checked .uni-radio-input {
 	background-color: #8799a3 !important;
 	border-color: #8799a3 !important;
@@ -415,10 +359,8 @@ radio.grey.checked .uni-radio-input {
 }
 
 switch.gray[checked] .wx-switch-input,
-checkbox.gray[checked] .wx-checkbox-input,
 radio.gray[checked] .wx-radio-input,
 switch.gray.checked .uni-switch-input,
-checkbox.gray.checked .uni-checkbox-input,
 radio.gray.checked .uni-radio-input {
 	background-color: #f0f0f0 !important;
 	border-color: #f0f0f0 !important;
@@ -426,10 +368,8 @@ radio.gray.checked .uni-radio-input {
 }
 
 switch.black[checked] .wx-switch-input,
-checkbox.black[checked] .wx-checkbox-input,
 radio.black[checked] .wx-radio-input,
 switch.black.checked .uni-switch-input,
-checkbox.black.checked .uni-checkbox-input,
 radio.black.checked .uni-radio-input {
 	background-color: #333333 !important;
 	border-color: #333333 !important;
@@ -437,10 +377,8 @@ radio.black.checked .uni-radio-input {
 }
 
 switch.white[checked] .wx-switch-input,
-checkbox.white[checked] .wx-checkbox-input,
 radio.white[checked] .wx-radio-input,
 switch.white.checked .uni-switch-input,
-checkbox.white.checked .uni-checkbox-input,
 radio.white.checked .uni-radio-input {
 	background-color: #ffffff !important;
 	border-color: #ffffff !important;

+ 1 - 0
manifest.json

@@ -65,6 +65,7 @@
             },
             "android" : {
                 "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>"
                 ],
                 "permissionExternalStorage" : {

+ 62 - 6
pageA/product/Identity_switching.vue

@@ -11,7 +11,8 @@
 						</view>
 						<view class="info">{{item.customerPhone}}</view>
 						<label>
-							<checkbox /><text>设置默认</text>
+							<checkbox style='transform: scale(0.8);' :value='item.id' :checked="item.checked" @click.stop="checkBox($event,item)" ></checkbox>
+							<text>设置默认</text>
 						</label>
 						
 					</view>
@@ -44,6 +45,18 @@
 				scrollTop: 0,
 				TabCur: 0,
 				current: 1,
+				checked:false,
+				goodsName:'',
+				receivePrivate:'',
+				receiveCity:'',
+				receiveArea:'',
+				minimumVolume:'',
+				basis:'',
+				buyer:'',
+				unitPrice:'',
+				receiveWarehouse:'',
+				procurementPlanType:'',
+				procurementPlan:'',
 				identityAuthenticationInfo: {
 					pageSize: 10,
 					currentPage: 1,
@@ -53,23 +66,64 @@
 				},
 			};
 		},
-		onLoad() {
+		onShow(){
 			this.getList()
 		},
+		onLoad(options) {
+			this.goodsName = options.goodsName
+			this.receivePrivate = options.receivePrivate
+			this.receiveCity = options.receiveCity
+			this.receiveArea = options.receiveArea
+			this.minimumVolume = options.minimumVolume
+			this.buyer = options.buyer
+			this.basis = options.basisPrice
+			this.unitPrice = options.unitPrice
+			this.receiveWarehouse = options.receiveWarehouse
+			this.procurementPlanType = options.procurementPlanType
+			this.procurementPlan=options.procurementPlanNo
+		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
 			getList() {
 				this.identityAuthenticationInfo.commonId = this.userInfo.id
-				console.log(12313)
 				this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
 						pageSize: 10,
 						currentPage: 1,
 						commonId: this.userInfo.id
 					}, 'application/json;charset=UTF-8').then(res => {
-						console.log("成功连接123")
-						this.lists = res.data.data.records
+						if(res.data.code==200){
+							for(var i=0;i<res.data.data.records.length;i++){
+								if(res.data.data.records[i].defaultFlag!=1){
+									res.data.data.records[i].checked=false
+								}else{
+									res.data.data.records[i].checked=true
+								}
+							}
+							this.lists = res.data.data.records
+						}
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			checkBox(e,item){
+				for(var i=0;i<this.lists.length;i++){
+					this.lists[i].checked=true
+				}
+				item.checked=true
+				this.$api.doRequest('post', '/identityAuthenticationInfo/api/setDefault', {
+						id:item.id,
+						commonId: this.userInfo.id
+					}).then(res => {
+						if(res.data.code==200){
+							// this.lists = res.data.data.records
+						}
 					})
 					.catch(res => {
 						uni.showToast({
@@ -93,7 +147,9 @@
 			navToDetailPage(item) {
 				// if (index == 1) {
 					uni.navigateTo({
-						url: `/pageA/product/business_buy?id=${item.id}&customerName=${item.customerName}`
+						url: `/pageA/product/business_buy?id=${item.id}&customerName=${item.customerName}&goodsName=${this.goodsName}
+						&receivePrivate=${this.receivePrivate}&receiveCity=${this.receiveCity}&receiveArea=${this.receiveArea}&minimumVolume=${this.minimumVolume}&buyer=${this.buyer}&basisPrice=${this.basis}&unitPrice=${this.unitPrice}
+						&receiveWarehouse=${this.receiveWarehouse}&procurementPlanType=${this.procurementPlanType}&procurementPlanNo=${this.procurementPlan}`
 					})
 					},
 				// } else {

+ 159 - 193
pageA/product/business_buy.vue

@@ -2,9 +2,8 @@
 	<view class="container">
 		<view  class="cu-form-group">
 			<view class="title">卖方</view>
-			
-			<view class="title" @click="liang">{{purchaseOrder.customerName}}></view>
-			
+			<view v-if='goods.customerTypeFlag==1' class="title" @click="liang">{{purchaseOrder.customer?purchaseOrder.customer:goods.customerName}}></view>
+			<view v-if='goods.customerTypeFlag==2' class="title" @click="liang">{{purchaseOrder.compName?purchaseOrder.compName:goods.compName}}></view>
 		</view>
 		<view  class="cu-form-group">
 			<view class="title">买方</view>
@@ -23,30 +22,26 @@
 		<view v-if='companyId!=2' class="cu-form-group">
 			<view class="title">货名</view>
 			<text>{{purchaseOrder.goodsName}}</text>
-			<!-- <input placeholder="请填写" name="input" @input="addressInput"></input> -->
 		</view>
 		<view class="cu-form-group">
 			<view class="title">最小成交量(吨)</view>
 			<text>{{purchaseOrder.minimumVolume}}</text>
 		</view>
-		<view  v-if="invoiceType !=2" class="cu-form-group">
+		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="cu-form-group">
 			<view  class="title">今日基差(元/吨)</view>
 				<view class="picker">
-					<text>{{purchaseOrder.basisPrice}}</text>
-					<!-- {{invoiceTypeIndex1>-1?invoiceType1[invoiceTypeIndex1]:'请选择'}} -->
+					<text>{{purchaseOrder.basis}}</text>
 				</view>
-			
 		</view>
 		<view v-else class="cu-form-group">
 			<view   class="title">采购单价(元/吨)</view>
 				<view class="picker">
 					<text>{{purchaseOrder.unitPrice}}</text>
-					<!-- {{invoiceTypeIndex>-1?invoiceType[invoiceTypeIndex]:'请选择'}} -->
 				</view>
 		</view>
 		<view class="cu-form-group margin-top">
 			<view class="title">发票类型</view>
-			<picker @change="packingChange" :value="packingIndex" :range="invoiceType">
+			<picker @change="invoiceChange" :value="invoiceIndex" :range="invoiceType">
 				<view class="picker">
 					{{packingIndex>-1?invoiceType[packingIndex]:'请选择'}}
 				</view>
@@ -54,7 +49,7 @@
 		</view>
 		<view  class="cu-form-group">
 			<view class="title">出售数量(吨)</view>
-			<input placeholder="请填写出售数量" name="input" @input='packingInput'></input>
+			<input v-model='purchaseOrder.transactionsNumber' placeholder="请填写出售数量" name="input"></input>
 		</view>
 		<view  class="cu-form-group">
 			<view class="title">包装方式</view>
@@ -64,28 +59,30 @@
 				</view>
 			</picker>
 		</view>
-		<view class="cu-form-group align-start">
+		<view v-if='packingIndex==0' class="cu-form-group align-start">
 			<view class="title">袋装备注</view>
-			<textarea maxlength="-1" :disabled="modalName!=null" @input="textareaInput" placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" ></textarea>
+			<textarea maxlength="-1" v-model='purchaseOrder.baggingNotes' placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" ></textarea>
 		</view>
-		<view class="cu-form-group align-start">
+		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="cu-form-group align-start">
 			<view class="title">点价(元/吨)</view>
-			<input placeholder="请填写点价" name="input" @input='packingInput' v-model="purchaseOrder.pointPrice"></input>
+			<input placeholder="请填写点价" name="input" @input='someprice' v-model="purchaseOrder.pointPrice"></input>
 		</view>
-		<view class="cu-form-group align-start">
+		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="cu-form-group align-start">
 			<view class="title">发票费用(元/吨)</view>
-			<input placeholder="请填写发票费用" name="input" @input='packingInput' v-model="purchaseOrder.invoiceFee"></input>
+			<input disabled placeholder="请填写发票费用" name="input" @input='someprice' v-model="purchaseOrder.invoiceFee"></input>
 		</view>
-		<view class="cu-form-group align-start">
+		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="cu-form-group align-start">
 			<view class="title">包装费(元/吨)</view>
-		<input placeholder="请填写包装费" name="input" @input='packingInput' v-model="purchaseOrder.packingFee"></input>
+		<input placeholder="请填写包装费" name="input" @input='someprice' v-model="purchaseOrder.packingFee"></input>
 		</view>
-		<view class="cu-form-group align-start">
+		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="cu-form-group align-start">
 			<view class="title">结算价格</view>
-			<text>{{Number(purchaseOrder.pointPrice)  + Number(purchaseOrder.invoiceFee)  + Number(purchaseOrder.packingFee) + Number(purchaseOrder.basisPrice)  }}</text>
-			
+			<text>{{purchaseOrder.settlementPrice}}</text>
 			<!-- <input placeholder="请填写 例:袋装XX斤/散装" name="input" @input='packingInput' v-model="purchaseOrder.settlementPrice"></input> -->
 		</view>
+		<view style='background:#fff;'>
+			结算价格=点价+基差+发票费用+包装费
+		</view>
 		<view class="padding flex flex-direction">
 			<button class="cu-btn bg-red margin-tb-sm lg" @click="commit()">提交</button>
 		</view>
@@ -93,6 +90,9 @@
 </template>
 
 <script>
+	import {
+	    mapState 
+	} from 'vuex';
 	export default {
 			data() {
 				return {
@@ -116,14 +116,21 @@
 						type:0,
 						modalName:"",
 					},
-					purchaseOrder: {},
+					purchaseOrder: {
+						invoiceFee:0,
+						packingFee:0,
+						packingType:"散装",
+						packingTypeKey:1,
+						type:'不开发票',
+						typeKey:1
+					},
 					invoiceTypeIndex:0,
 					invoiceTypeIndex1:0,
 					acceptTypeIndex:0,
 					priceTypeIndex:0,
 					bankNameIndex:0,
 					packingIndex:0,
-					// packingChange:['散袋(默认)','大袋','小袋'],
+					invoiceIndex:0,
 					packingType: ['散袋(默认)','大袋','小袋'],
 					// invoiceType: ['不开发票', '普通发票', '增值税发票'],
 					invoiceType: ['不开发票','增值税发票'],
@@ -138,6 +145,7 @@
 					unitPrice:0,
 					address:'',
 					count:0,
+					id:0,
 					price:'库内价',
 					invoice:'不开发票',
 					accept:'',
@@ -152,6 +160,7 @@
 					isFutures:'',
 					bankNameList:'',
 					Company:[],
+					goods:{},
 					companyId:'',
 					tradeCompanyId:'',
 					basis:0,
@@ -164,21 +173,8 @@
 				};
 			},
 			onLoad(options) {
-				// this.salebuyId = options.id
-				// this.seller = options.seller
-				// this.sellerPhone = options.sellerPhone
-				// this.isFutures = options.isFutures
-				// this.minSale = options.minSale
-				// this.companyId=options.companyId
-				// this.province = options.province
-				// this.city = options.city
-				// this.area = options.area
-				// this.storeName=options.storeName
-				// this.exsitCount = Math.floor(options.exsitCount * 100) / 100
-				// this.basis = options.basis
-				// this.basisBig = options.basisBig
-				// this.basisSmall = options.basisSmall
-				// this.unloadingFee = options.unloadingFee
+				console.log(options)
+				this.id=options.id
 				this.purchaseOrder.seller = options.seller
 				this.purchaseOrder.goodsName = options.goodsName
 				this.purchaseOrder.receivePrivate = options.receivePrivate
@@ -186,78 +182,132 @@
 				this.purchaseOrder.receiveArea = options.receiveArea
 				this.purchaseOrder.minimumVolume = options.minimumVolume
 				this.purchaseOrder.buyer = options.buyer
-				this.purchaseOrder.customerName = options.customerName
-				this.purchaseOrder.basisPrice = options.basisPrice
+				this.purchaseOrder.customer = options.customerName
+				this.purchaseOrder.basis = options.basisPrice
 				this.purchaseOrder.unitPrice = options.unitPrice
 				this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
-				
+				this.purchaseOrder.settlementPrice = options.basisPrice
+				this.purchaseOrder.procurementPlanType = options.procurementPlanType
+				this.purchaseOrder.procurementPlan=options.procurementPlan
+			},
+			computed: {
+				...mapState(['hasLogin','userInfo']),
 			},
 			onShow() {
-				var that=this
-				this.$api.request('company', 'getCompany', failres => {
-					that.$api.msg(failres.errmsg)
-					uni.hideLoading()
-				}).then(res => {
-					if(res.data.code=='SUCCESS'){
-						var data=[]
-						this.Company=res.data.data
-						if(res.data.data){
-							for(let i=0;i<res.data.data.length;i++){
-								data.push(res.data.data[i].companyName+' '+res.data.data[i].companyPhone)
-							}
-						}
-						if(this.Company){
-							this.buyer =this.Company[0].companyName
-							this.buyerPhone=this.Company[0].companyPhone
-							this.tradeCompanyId=this.Company[0].id
+				this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
+					if(res.data.code==200){
+						this.goods=res.data.data
+						if(this.goods.customerTypeFlag==1){
+							this.purchaseOrder.invoiceFee=-20
+							this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis)+Number(this.purchaseOrder.invoiceFee)
+						}else{
+							this.purchaseOrder.invoiceFee=0
+							this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis)+Number(this.purchaseOrder.invoiceFee)
 						}
-						that.bankNameList=data
-						uni.hideLoading()
-					}else{
-						that.$api.msg(res.data.code)
-						uni.hideLoading()
 					}
+					uni.hideLoading()
 				})
-				},
-				// uni.getLocation({
-				//     type: 'wgs84',
-				// 	geocode:true,
-				//     success: function (res) {
-				//         console.log('当前位置的经度:' + res.longitude);
-				//         console.log('当前位置的纬度:' + res.latitude);
-				//     }
-				// });
-			// },
+			},
 			methods: {
 				liang(){
 					uni.navigateTo({
-						url: '/pageA/product/Identity_switching'
+						url: `/pageA/product/Identity_switching?goodsName=${this.purchaseOrder.goodsName}
+						&receivePrivate=${this.purchaseOrder.receivePrivate}&receiveCity=${this.purchaseOrder.receiveCity}
+						&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
+						&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&unitPrice=${this.purchaseOrder.unitPrice}
+						&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&procurementPlanType=${this.purchaseOrder.procurementPlanType}
+						&procurementPlanNo=${this.purchaseOrder.procurementPlan}`
 					})
 				},
 				commit(){
-					this.$api.doRequest('post','/purchaseOrder/api/insertPurchaseOrder', this.purchaseOrder).then(res => {
-					console.log("成功123")
-					}).catch(res => {
-						uni.showToast({
-							title: res.data.message,
-							icon: 'none',
-							duration: 2000
-						})
+					if(!this.purchaseOrder.transactionsNumber){
+						this.$api.msg('出售价格不能为空')
+						return
+					}
+					if(this.purchaseOrder.transactionsNumber>10000||this.purchaseOrder.transactionsNumber<1){
+						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){
+							this.$api.msg('点价输入错误')
+							return
+						}
+					}
+					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
+						}else{
+							this.purchaseOrder.customer=this.goods.compName
+						}
+					}
+					if(!this.purchaseOrder.seller){
+						if(this.goods.customerTypeFlag==1){
+							this.purchaseOrder.seller=this.goods.customerName
+							this.purchaseOrder.sellerPhone=this.goods.customerPhone
+						}else{
+							this.purchaseOrder.seller=this.goods.compName
+							this.purchaseOrder.sellerPhone=this.goods.customerPhone
+						}
+					}
+					var that=this
+					uni.showModal({
+						content: '订单提交后将发送给买方,是否确定提交?',
+						success: function (res) {
+							if (res.confirm) {
+								that.$api.doRequest('post','/purchaseOrder/api/insertPurchaseOrder', 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
+									})
+								})
+							}
+						}
 					})
 				},
-				InvoiceTypeChange(e) {
-					this.invoiceTypeIndex = e.detail.value
-					this.invoice = this.invoiceType[this.invoiceTypeIndex];
-					
-				},
-				InvoiceTypeChange1(e) {
-					this.invoiceTypeIndex1 = e.detail.value
-					this.invoice = this.invoiceType1[this.invoiceTypeIndex1];
-					if(this.invoiceTypeIndex1 == 0){
-						this.invoiceMoney = 0
-					}
-					else{
-						this.invoiceMoney = 20
+				someprice(e){
+					if(this.purchaseOrder.pointPrice&&this.purchaseOrder.invoiceFee&&this.purchaseOrder.packingFee){
+						this.purchaseOrder.settlementPrice=Number(this.purchaseOrder.basis)+Number(this.purchaseOrder.pointPrice)+Number(this.purchaseOrder.invoiceFee)+Number(-this.purchaseOrder.packingFee)
+					}else if(this.purchaseOrder.pointPrice&&this.purchaseOrder.invoiceFee){
+						this.purchaseOrder.settlementPrice=Number(this.purchaseOrder.basis)+Number(this.purchaseOrder.pointPrice)+Number(this.purchaseOrder.invoiceFee)
+					}else if(this.purchaseOrder.pointPrice&&this.purchaseOrder.packingFee){
+						this.purchaseOrder.settlementPrice=Number(this.purchaseOrder.basis)+Number(this.purchaseOrder.pointPrice)+Number(-this.purchaseOrder.packingFee)
+					}else if(this.purchaseOrder.pointPrice){
+						this.purchaseOrder.settlementPrice=Number(this.purchaseOrder.basis)+Number(this.purchaseOrder.pointPrice)
+					}else if(this.purchaseOrder.packingFee){
+						this.purchaseOrder.settlementPrice=Number(this.purchaseOrder.basis)+Number(-this.purchaseOrder.packingFee)
+					}else if(this.purchaseOrder.invoiceFee){
+						this.purchaseOrder.settlementPrice=Number(this.purchaseOrder.basis)+Number(this.purchaseOrder.invoiceFee)
+					}else{
+						this.purchaseOrder.settlementPrice=this.purchaseOrder.basis
 					}
 				},
 				bankNameChange(e){
@@ -272,15 +322,19 @@
 				},
 				packingChange(e){
 					this.packingIndex = e.detail.value
-					this.packing = this.packingType[this.packingIndex];
-					if(this.packingIndex == 0){
-						this.packingMoney = 0
-					}
-					else if(this.packingIndex == 1){
-						this.packingMoney = this.basisBig - this.basis
-					}
-					else if(this.packingIndex == 2){
-						this.packingMoney = this.basisSmall - this.basis
+					this.purchaseOrder.packingTypeKey=e.detail.value+1
+					this.purchaseOrder.packingType = this.packingType[this.packingIndex];
+				},
+				invoiceChange(e){
+					this.invoiceIndex = e.detail.value
+					this.purchaseOrder.typeKey=e.detail.value+1
+					this.purchaseOrder.type = this.invoiceType[this.invoiceIndex];
+					if(this.invoiceIndex == 0){
+						if(this.goods.customerTypeFlag==1){
+							this.purchaseOrder.invoiceFee=-20
+						}else{
+							this.purchaseOrder.invoiceFee=0
+						}
 					}
 				},
 				changeZhihang(){
@@ -300,9 +354,6 @@
 				textareaInput(e) {
 					this.memo = e.detail.value
 				},
-				packingInput(e){
-					this.packing = e.detail.value
-				},
 				buyerInput(e){
 					this.buyer = e.detail.value
 				},
@@ -318,91 +369,6 @@
 				countInput(e){
 					this.count = e.detail.value
 				},
-				commit(){
-					const that = this
-					// if ( that.companyId !=2&& !that.address) {
-					// 	that.$api.msg('请填写详细交收地址')
-					// 	return
-					// }
-					if (!that.price) {
-						that.$api.msg('请选择出售数量')
-						return
-					}
-					if (!that.invoice) {
-						that.$api.msg('请选择发票类型')
-						return
-					}
-						if (!that.packingType) {
-						that.$api.msg('请选择包装类型')
-						return
-					}
-					if(!that.pointPrice){
-						that.$api.msg('请填写点价');
-						return
-					}
-					if (!that.invoiceFee) {
-						that.$api.msg('请填写发票费用')
-						return
-					}
-					// if(Number(that.count) < Number(that.minSale)){
-					// 	that.$api.msg('购买数量不能小于最小成交量');
-					// 	return
-					// }
-					// if(!that.tradeCompanyId){
-					// 	that.$api.msg('请选择公司名头');
-					// 	return
-					// }
-					// if(that.count > that.exsitCount){
-					// 	that.$api.msg('购买数量大于库存量');
-					// 	return
-					// }
-					//this.$api.prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
-					
-					// this.$api.msg(`地址${this.manageType=='edit' ? '修改': '添加'}成功`);
-					that.tradeInfo.salebuyId = that.salebuyId
-					that.tradeInfo.buyer = that.buyer
-					that.tradeInfo.buyerPhone = that.buyerPhone
-					that.tradeInfo.priceType = that.price
-					that.tradeInfo.unitPrice = that.unitPrice
-					that.tradeInfo.province = that.province
-					that.tradeInfo.area = that.area
-					that.tradeInfo.address = that.address
-					that.tradeInfo.count = that.count
-					that.tradeInfo.acceptType = that.accept
-					that.tradeInfo.invoiceType = that.invoice
-					that.tradeInfo.packing = that.packing
-					that.tradeInfo.packingMoney = that.packingMoney
-					that.tradeInfo.memo = that.memo
-					that.tradeInfo.seller = that.seller
-					that.tradeInfo.sellerPhone = that.sellerPhone
-					that.tradeInfo.tradeCompanyId = that.tradeCompanyId
-					that.tradeInfo.invoiceMoney = that.invoiceMoney
-					// that.tradeInfo.unloadingFee = that.unloadingFee
-					uni.showLoading({
-						title: '正在提交',
-						mask:true
-					})
-					that.$api.request('trade', 'addTrade',that.tradeInfo, failres => {
-						uni.hideLoading()
-						that.$api.msg(failres.errmsg);
-						
-					}).then(res => {
-						uni.hideLoading()
-						uni.showModal({
-							title: '提示',
-							content: "交易申请提交成功",
-							showCancel: false,
-							confirmText: '确定',
-							success: () => {
-								uni.navigateBack({
-									delta: 2
-								})
-							}
-						})
-						// that.$api.prePage().refreshList(data, that.manageType);
-					})
-				
-				}
 			}
 		}
 </script>

+ 1 - 1
pageA/product/buydetails.vue

@@ -391,7 +391,7 @@
 </script>
 
 
-<style lang='scss'>
+<style scoped lang='scss'>
 	page {
 		background: $page-color-base;
 		/* padding-bottom: 160upx; */

+ 4 - 2
pageA/product/detail.vue

@@ -407,7 +407,7 @@
 								url: `/pageA/product/business_buy?id=${this.goods.id}&receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}
 										&goodsName=${this.goods.goodsName}&receiveCity=${this.goods.receiveCity}&receivePrivate=${this.goods.receivePrivate}&buyer=${this.goods.buyer}
 										&basisPrice=${this.goods.basisPrice}&unitPrice=${this.goods.unitPrice}&receiveWarehouse=${this.goods.receiveWarehouse}
-										`
+										&procurementPlanType=${this.goods.procurementPlanType}&procurementPlan=${this.goods.procurementPlanNo}`
 							// 	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}
@@ -538,7 +538,7 @@
 </script>
 
 
-<style lang='scss'>
+<style scoped lang='scss'>
 	.title1{
 		position:absolute;
 		left:50%;
@@ -1106,6 +1106,7 @@
 		.title-tip {
 			flex:1.5;
 			color:#FD714F;font-size:30px;
+			    text-align: right;
 		}
 		.price-box {
 			display: flex;
@@ -1182,4 +1183,5 @@
 		padding:35px 10px;
 		border-radius:15px;
 	}
+	
 </style>

+ 1 - 1
pageA/product/lookup.vue

@@ -344,7 +344,7 @@
 		}
 	}
 </script>
-<style>
+<style scoped>
 	.search-form{
 		    background: #F5F6F9;
 	}

+ 1 - 0
pageD/identity/companyIdentity.vue

@@ -253,6 +253,7 @@
 			license() {
 				var that = this
 				wx.chooseImage({
+					sourceType: ['camera','album'],
 					success: function(res) {
 						wx.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',

+ 10 - 9
pages.json

@@ -327,9 +327,16 @@
                 "enablePullDownRefresh": false
             }
             
-        }
+        },{
+            "path" : "pages/release/release",
+            "style" :                                                                                    
+            {
+				"navigationBarTitleText": "我的发布",
+				"enablePullDownRefresh": false
+				}
+		},
 
-        ,{
+        {
             "path" : "pageD/identity/driverIdentity",
             "style" :                                                                                    
             {
@@ -396,13 +403,7 @@
 		        "enablePullDownRefresh": false
 		    }   
 		}
-        ,{
-            "path" : "pages/release/release",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的发布"
-				}
-		},
+        ,
 		{
             "path" : "pages/task/my_task",
             "style" :                                                                                    

+ 6 - 8
pages/business/business.vue

@@ -31,13 +31,13 @@
 			<view v-for="(item, index) in buyInfo" :key="index" class="guess-item" @click="navToDetailPage(item)">
 				<view class="price-box">
 					<view class="title">{{item.title}}</view>
-					<view class='flex justify-between'>
-						<view class='address'>
-							{{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}{{item.receiveWarehouse}}
-						</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>
+				<view class='flex justify-between'>
+					<view class='address'>
+						{{item.receivePrivate}}{{item.receiveCity}}{{item.receiveArea}}{{item.receiveWarehouse}}
 					</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>
 				<view class='flex justify-between'>
 					<view>
@@ -681,10 +681,8 @@ currentPage:this.currentPage,searchKeyWord:this.searchKeyWord,receivePrivate:thi
 		.price-box {
 			display: flex;
 			align-items: baseline;
-			height: 70upx;
 			padding: 10upx 0;
 			font-size: 26upx;
-			color: $uni-color-primary;
 		}
 
 		.price {

+ 3 - 0
pages/public/code.vue

@@ -166,6 +166,9 @@
 					})
 					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList}).then(res => {
 					    if(res.data.code==200){
+							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
+							password: "y123456",
+							username: "13333333333"}).then(res => {})
 							uni.setStorageSync('userInfo', res.data.data)
 					        that.$store.commit('login', res.data.data)
 					        that.liangxinLogin()

+ 19 - 7
pages/public/register.vue

@@ -219,13 +219,25 @@
 							mask:true
 						})
 						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
-							// 获得数据
-							uni.setStorageSync('userInfo', res.data)
-							that.$store.commit('login', res.data)
-							that.liangxinLogin()
-							uni.switchTab({
-								url: '/pages/sale/information'
-							});
+							
+							if(res.data.code==200){
+								// pc登录
+								this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
+								password: "y123456",
+								username: "13333333333"}).then(res => {})
+								uni.setStorageSync('userInfo', res.data)
+								that.$store.commit('login', res.data)
+								that.liangxinLogin()
+								uni.switchTab({
+									url: '/pages/sale/information'
+								});
+							}else{
+								uni.showToast({
+									title: res.data.message,
+									icon:'none',
+									duration: 2000
+								})
+							}
 							uni.hideLoading()
 						})
 						.catch(res => {

+ 3 - 0
pages/public/reset.vue

@@ -144,6 +144,9 @@
 						})
 						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(req => {
 						if(res.data.code==200){
+							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
+							password: "y123456",
+							username: "13333333333"}).then(res => {})
 							uni.setStorageSync('userInfo', req.data.data)
 							that.$store.commit('login', req.data.data)
 							that.liangxinLogin()

+ 1 - 1
pages/user/user.vue

@@ -303,7 +303,7 @@
 				
 				})
 			},
-			gridClick (item, index) {	
+			gridClick (item, index) {
 				var that = this
 				if(item.name == "退出登录"){
 					this.logout()