Browse Source

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

gjy 3 years ago
parent
commit
6f2cc42b89

+ 2 - 2
config/index.js

@@ -1,8 +1,8 @@
 const dev = {
 	// baseUrlNew: 'http://192.168.1.122:9100/',
 	baseUrl: 'https://www.zthymaoyi.com',
-	baseUrlNew: 'http://192.168.1.120:8090/',
-	  // baseUrlNew: 'http://api.eliangeyun.com/',
+	// baseUrlNew: 'http://192.168.1.120:8090/',
+	  baseUrlNew: 'http://api.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 1 - 1
pageA/product/Identity_switching.vue

@@ -143,7 +143,7 @@
 						if(res.data.code==200){
 							// this.lists = res.data.data.records
 							
-							wx.navigateBack({
+							uni.navigateBack({
 							 
 							  delta: 1
 							 

+ 457 - 414
pageA/product/business_buy.vue

@@ -1,444 +1,475 @@
 <template>
 	<view class="center">
 		<view class="transaction">
-			
-		
-		<view  class="c-row b-b">
-			<view class="title">卖方</view>
-			<view class="con-list">
-				<view v-if='goods.customerTypeFlag==2' class="title" @click="liang">{{purchaseOrder.compName?purchaseOrder.compName:goods.compName}}&nbsp></view>
-				<view v-else class="title" @click="liang">{{purchaseOrder.customer?purchaseOrder.customer:goods.customerName}}></view>
+
+
+			<view class="c-row b-b">
+				<view class="title">卖方</view>
+				<view class="con-list">
+					<view v-if='goods.customerTypeFlag==2' class="title" @click="liang">
+						{{purchaseOrder.compName?purchaseOrder.compName:goods.compName}}&nbsp>
+					</view>
+					<view v-else class="title" @click="liang">
+						{{purchaseOrder.customer?purchaseOrder.customer:goods.customerName}}>
+					</view>
+				</view>
 			</view>
-		</view>
-		<view  class="c-row">
-			<view class="title">买方</view>
-			<view class="con-list">
-			<view class="title">{{purchaseOrder.buyer}}</view>
+			<view class="c-row">
+				<view class="title">买方</view>
+				<view class="con-list">
+					<view class="title">{{purchaseOrder.buyer}}</view>
+				</view>
 			</view>
 		</view>
-		</view>
 		<view class="transaction">
-		<view   class="c-row b-b margin-top">
-			<view class="title">收货地区</view>
-			<view class="con-list">
-				<view class="title">{{purchaseOrder.receivePrivate}}{{purchaseOrder.receiveCity}}{{purchaseOrder.receiveArea}}</view>
+			<view class="c-row b-b margin-top">
+				<view class="title">收货地区</view>
+				<view class="con-list">
+					<view class="title">
+						{{purchaseOrder.receivePrivate}}{{purchaseOrder.receiveCity}}{{purchaseOrder.receiveArea}}
+					</view>
+				</view>
 			</view>
-		</view>
-		<view   class="c-row b-b ">
-			<view class="title">收货库</view>
-			<view class="con-list">
-				<view class="title">{{purchaseOrder.receiveWarehouse}}</view>
+			<view class="c-row b-b ">
+				<view class="title">收货库</view>
+				<view class="con-list">
+					<view class="title">{{purchaseOrder.receiveWarehouse}}</view>
+				</view>
 			</view>
-		</view>
-		<view v-if='companyId!=2' class="c-row b-b">
-			<view class="title">货名</view>
-			<view class="con-list">
-			<text>{{purchaseOrder.goodsName}}</text>
+			<view v-if='companyId!=2' class="c-row b-b">
+				<view class="title">货名</view>
+				<view class="con-list">
+					<text>{{purchaseOrder.goodsName}}</text>
+				</view>
 			</view>
-		</view>
-		<view class="c-row b-b">
-			<view class="title">最小成交量(吨)</view>
-			<view class="con-list">
-			<text>{{purchaseOrder.minimumVolume}}</text>
+			<view class="c-row b-b">
+				<view class="title">最小成交量(吨)</view>
+				<view class="con-list">
+					<text>{{purchaseOrder.minimumVolume}}</text>
+				</view>
 			</view>
-		</view>
-		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row">
-			<view  class="title">今日基差(元/吨)</view>
-			<view class="con-list">
-				<view class="picker">
-					<text>{{purchaseOrder.basis}}</text>
+			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row">
+				<view class="title">今日基差(元/吨)</view>
+				<view class="con-list">
+					<view class="picker">
+						<text>{{purchaseOrder.basis}}</text>
+					</view>
 				</view>
+			</view>
+
+			<view v-else class="c-row ">
+				<view class="title">采购单价(元/吨)</view>
+				<view class="con-list">
+					<view class="picker">
+						<text>{{purchaseOrder.procurementPrice}}</text>
+					</view>
 				</view>
+			</view>
 		</view>
-	
-		<view v-else class="c-row ">
-			<view   class="title">采购单价(元/吨)</view>
-			<view class="con-list">
-				<view class="picker">
-					<text>{{purchaseOrder.procurementPrice}}</text>
+		<view class="transaction">
+			<view class="c-row b-b margin-top">
+				<view class="title">发票类型</view>
+				<view class="con-list">
+					<picker @change="invoiceChange" :value="invoiceIndex" :range="invoiceType">
+						<view class="picker">
+							{{invoiceIndex>-1?invoiceType[invoiceIndex]:'请选择'}}
+						</view>
+					</picker>
 				</view>
+			</view>
+			<view class="c-row b-b">
+				<view class="title">出售数量(吨)</view>
+				<view class="con-list">
+					<input v-model='purchaseOrder.transactionsNumber' type="number" placeholder="请填写出售数量"
+						placeholder-style="font-size: 12px;" name="input"></input>
 				</view>
-		</view>
-			</view >
-				<view class="transaction">
-		<view class="c-row b-b margin-top">
-			<view class="title">发票类型</view>
-			<view class="con-list">
-			<picker @change="invoiceChange" :value="invoiceIndex" :range="invoiceType">
-				<view class="picker">
-					{{invoiceIndex>-1?invoiceType[invoiceIndex]:'请选择'}}
+			</view>
+			<view class="c-row b-b">
+				<view class="title">包装方式</view>
+				<view class="con-list">
+					<picker @change="packingChange" :value="packingIndex" :range="packingType">
+						<view class="picker">
+							{{packingIndex>-1?packingType[packingIndex]:'请选择'}}
+						</view>
+					</picker>
 				</view>
-			</picker>
 			</view>
-		</view>
-		<view  class="c-row b-b">
-			<view class="title">出售数量(吨)</view>
-			<view class="con-list">
-			<input v-model='purchaseOrder.transactionsNumber' placeholder="请填写出售数量" placeholder-style="font-size: 12px;" name="input"></input>
+			<view v-if='packingIndex!=0' class=" beizhu align-start">
+				<view class="title">袋装备注</view>
+				<view>
+					<textarea maxlength="-1" v-model='purchaseOrder.baggingNotes'
+						placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" placeholder-style="font-size: 12px;"
+						class="textareas"></textarea>
+				</view>
 			</view>
-		</view>
-		<view  class="c-row b-b">
-			<view class="title">包装方式</view>
-			<view class="con-list">
-			<picker @change="packingChange" :value="packingIndex" :range="packingType">
-				<view class="picker">
-					{{packingIndex>-1?packingType[packingIndex]:'请选择'}}
+			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
+				<view class="title">点价(元/吨)</view>
+				<view class="con-list">
+					<input placeholder="请填写点价" name="input" type="number" placeholder-style="font-size: 12px;"
+						@input='someprice' v-model="purchaseOrder.pointPrice"></input>
 				</view>
-			</picker>
 			</view>
-		</view>
-		<view v-if='packingIndex!=0' class=" beizhu align-start">
-			<view class="title">袋装备注</view>
-			<view >
-			<textarea maxlength="-1" v-model='purchaseOrder.baggingNotes' placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" placeholder-style="font-size: 12px;" class="textareas"></textarea>
+			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
+				<view class="title">发票费用(元/吨)</view>
+				<view class="con-list">
+					<input disabled placeholder="请填写发票费用" name="input" @input='someprice'
+						v-model="purchaseOrder.invoiceFee"></input>
+				</view>
 			</view>
-		</view>
-		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
-			<view class="title">点价(元/吨)</view>
-			<view class="con-list">
-			<input placeholder="请填写点价" name="input" placeholder-style="font-size: 12px;" @input='someprice' v-model="purchaseOrder.pointPrice"></input>
+			<view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
+				<view class="title">包装费(元/吨)</view>
+				<view class="con-list">
+					<input placeholder="请填写包装费" name="input" @input='someprice' v-model="packingFee"></input>
+					
+				</view>
 			</view>
-		</view>
-		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
-			<view class="title">发票费用(元/吨)</view>
-			<view class="con-list">
-			<input disabled placeholder="请填写发票费用" name="input" @input='someprice' v-model="purchaseOrder.invoiceFee"></input>
+			<view v-if="purchaseOrder.procurementPlanType=='期货'" class=" align-start ">
+				<view class="titles">结算价格</view>
+				<text class="textA">结算价格=点价+基差+发票费用+包装费</text>
+				<text
+					style="font-size: 18px;color: #FD714F;margin-left: 25px;">¥{{purchaseOrder.settlementPrice}}</text>
+				<!-- <input placeholder="请填写 例:袋装XX斤/散装" name="input" @input='packingInput' v-model="purchaseOrder.settlementPrice"></input> -->
 			</view>
 		</view>
-		<view  v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
-			<view class="title">包装费(元/吨)</view>
-			<view class="con-list">
-		<input placeholder="请填写包装费" name="input" @input='someprice' v-model="purchaseOrder.packingFee"></input>
-		</view>
-		</view>
-		<view  v-if="purchaseOrder.procurementPlanType=='期货'"  class=" align-start ">
-			<view class="titles">结算价格</view>
-			<text class="textA">结算价格=点价+基差+发票费用+包装费</text>
-			<text style="font-size: 18px;color: #FD714F;margin-left: 25px;">¥{{purchaseOrder.settlementPrice}}</text>
-			<!-- <input placeholder="请填写 例:袋装XX斤/散装" name="input" @input='packingInput' v-model="purchaseOrder.settlementPrice"></input> -->
-		</view>
-		</view>
-			<button class="btn" @click="commit()">提交</button>
+		<button class="btn" @click="commit()">提交</button>
 	</view>
 </template>
 
 <script>
 	import {
-	    mapState 
+		mapState
 	} from 'vuex';
 	export default {
-			data() {
-				return {
-					tradeInfo:{
-						salebuyId:0,
-						packing:'',
-						memo:'',
-						buyer:'',
-						buyerPhone:'',
-						procurementPrice:0,
-						address:'',
-						count:0,
-						province:'',
-						area:'',
-						priceType:'',
-						invoiceType:'',
-						acceptType:'',
-						seller:'',
-						sellerPhone:'',
-						packingMoney:0,
-						type:0,
-						modalName:"",
-					},
-					purchaseOrder: {
-						invoiceFee:0,
-						packingFee:0,
-						packingType:"散装",
-						packingTypeKey:1,
-						type:'不开发票',
-						typeKey:1
-					},
-					invoiceTypeIndex:0,
-					invoiceTypeIndex1:0,
-					acceptTypeIndex:0,
-					priceTypeIndex:0,
-					bankNameIndex:0,
-					packingIndex:0,
-					invoiceIndex:0,
-					packingType: ['散粮','大袋','小袋'],
-					// invoiceType: ['不开发票', '普通发票', '增值税发票'],
-					invoiceType: ['不开发票','增值税发票'],
-					acceptType: ['第三方检验(国家检验资质)', '交收地库或港出具的检验', '现场看货','其他'],
-					priceType: ['库内价', '到库价', '到港价'],
-					priceTypeIndex1:'库内价',
-					region: [],
-					salebuyId:0,
-					memo:'',
-					buyer:'',
-					buyerPhone:'',
-					procurementPrice:0,
-					address:'',
-					count:0,
-					id:0,
-					price:'库内价',
-					invoice:'不开发票',
-					accept:'',
-					seller:'',
-					sellerPhone:'',
-					minSale:'',
-					province:'',
-					city:'',
-					area:'',
-					storeName:'',
-					exsitCount:0,
-					isFutures:'',
-					bankNameList:'',
-					Company:[],
-					goods:{},
-					companyId:'',
-					tradeCompanyId:'',
-					basis:0,
-					basisBig:0,
-					basisSmall:0,
-					invoiceMoney:0,
-					unloadingFee:0,
-					packingMoney:0,
-					packing:'散装'
-				};
-			},
-			onLoad(options) {
-				this.id=options.id
-				this.purchaseOrder.planId=options.id
-				this.purchaseOrder.seller = options.seller
-				this.purchaseOrder.goodsName = options.goodsName
-				this.purchaseOrder.receivePrivate = options.receivePrivate
-				this.purchaseOrder.receiveCity = options.receiveCity
-				this.purchaseOrder.receiveArea = options.receiveArea
-				this.purchaseOrder.minimumVolume = options.minimumVolume
-				this.purchaseOrder.buyer = options.buyer
-				this.purchaseOrder.customer = options.customerName
-				this.purchaseOrder.basis = options.basisPrice
-				this.purchaseOrder.procurementPrice = options.procurementPrice
-				this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
-				this.purchaseOrder.settlementPrice = options.basisPrice
-				this.purchaseOrder.procurementPlanType = options.procurementPlanType
-				this.purchaseOrder.procurementPlan=options.procurementPlan
-				this.purchaseOrder.compId=options.compId
-			},
-			computed: {
-				...mapState(['hasLogin','userInfo']),
-			},
-			onShow() {
-				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)
-						}
+		data() {
+			return {
+				tradeInfo: {
+					salebuyId: 0,
+					packing: '',
+					memo: '',
+					buyer: '',
+					buyerPhone: '',
+					procurementPrice: 0,
+					address: '',
+					count: 0,
+					province: '',
+					area: '',
+					priceType: '',
+					invoiceType: '',
+					acceptType: '',
+					seller: '',
+					sellerPhone: '',
+					packingMoney: 0,
+					type: 0,
+					modalName: "",
+				},
+				purchaseOrder: {
+					invoiceFee: 0,
+					packingFee: null,
+					packingType: "散装",
+					packingTypeKey: 1,
+					type: '不开发票',
+					typeKey: 1
+				},
+				invoiceTypeIndex: 0,
+				invoiceTypeIndex1: 0,
+				acceptTypeIndex: 0,
+				priceTypeIndex: 0,
+				bankNameIndex: 0,
+				packingIndex: 0,
+				invoiceIndex: 0,
+				packingType: ['散粮', '大袋', '小袋'],
+				// invoiceType: ['不开发票', '普通发票', '增值税发票'],
+				invoiceType: ['不开发票', '增值税发票'],
+				acceptType: ['第三方检验(国家检验资质)', '交收地库或港出具的检验', '现场看货', '其他'],
+				priceType: ['库内价', '到库价', '到港价'],
+				priceTypeIndex1: '库内价',
+				region: [],
+				salebuyId: 0,
+				memo: '',
+				buyer: '',
+				buyerPhone: '',
+				procurementPrice: 0,
+				address: '',
+				count: 0,
+				id: 0,
+				price: '库内价',
+				invoice: '不开发票',
+				accept: '',
+				seller: '',
+				sellerPhone: '',
+				minSale: '',
+				province: '',
+				city: '',
+				area: '',
+				storeName: '',
+				exsitCount: 0,
+				isFutures: '',
+				bankNameList: '',
+				Company: [],
+				goods: {},
+				companyId: '',
+				tradeCompanyId: '',
+				basis: 0,
+				basisBig: 0,
+				basisSmall: 0,
+				invoiceMoney: 0,
+				unloadingFee: 0,
+				packingMoney: 0,
+				packing: '散装',
+				packingFee: 0
+			};
+		},
+		onLoad(options) {
+			this.id = options.id
+			this.purchaseOrder.planId = options.id
+			this.purchaseOrder.seller = options.seller
+			this.purchaseOrder.goodsName = options.goodsName
+			this.purchaseOrder.receivePrivate = options.receivePrivate
+			this.purchaseOrder.receiveCity = options.receiveCity
+			this.purchaseOrder.receiveArea = options.receiveArea
+			this.purchaseOrder.minimumVolume = options.minimumVolume
+			this.purchaseOrder.buyer = options.buyer
+			this.purchaseOrder.customer = options.customerName
+			this.purchaseOrder.basis = options.basisPrice
+			this.purchaseOrder.procurementPrice = options.procurementPrice
+			this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
+			this.purchaseOrder.settlementPrice = options.basisPrice
+			this.purchaseOrder.procurementPlanType = options.procurementPlanType
+			this.purchaseOrder.procurementPlan = options.procurementPlan
+			this.purchaseOrder.compId = options.compId
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+		},
+		onShow() {
+			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)
 					}
-					uni.hideLoading()
-				})
-			},
-			methods: {
-				liang(){
-					uni.navigateTo({
-						url: `/pageA/product/Identity_switching?goodsName=${this.purchaseOrder.goodsName}
+				}
+				uni.hideLoading()
+			})
+		},
+		methods: {
+			liang() {
+				uni.navigateTo({
+					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}&procurementPrice=${this.purchaseOrder.procurementPrice}
 						&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&procurementPlanType=${this.purchaseOrder.procurementPlanType}
 						&procurementPlanNo=${this.purchaseOrder.procurementPlan}`
-					})
-				},
-				commit(){
-					if(!this.purchaseOrder.transactionsNumber){
-						this.$api.msg('出售数量不能为空')
-						return
-					}
-					if(this.purchaseOrder.transactionsNumber>10000||this.purchaseOrder.transactionsNumber<1){
-						this.$api.msg('出售数量输入错误')
-						return
-					}
-					if(this.purchaseOrder.procurementPlanType=='期货'&&!this.purchaseOrder.pointPrice){
-						this.$api.msg('点价不能为空')
-						return
-					}
-					if(this.purchaseOrder.procurementPlanType=='期货'&&this.purchaseOrder.pointPrice>10000){
+				})
+			},
+			commit() {
+				if (!this.purchaseOrder.transactionsNumber) {
+					this.$api.msg('出售数量不能为空')
+					return
+				}
+				if (this.purchaseOrder.transactionsNumber > 10000 || this.purchaseOrder.transactionsNumber < 1) {
+					this.$api.msg('出售数量输入错误')
+					return
+				}
+				if (this.purchaseOrder.procurementPlanType == '期货' && !this.purchaseOrder.pointPrice) {
+					this.$api.msg('点价不能为空')
+					return
+				}
+				if (this.purchaseOrder.procurementPlanType == '期货' && this.purchaseOrder.pointPrice > 10000) {
+					this.$api.msg('点价输入错误')
+					return
+				}
+				if (this.purchaseOrder.procurementPlanType == '期货' && this.purchaseOrder.pointPrice.indexOf('.') != -1) {
+					if (this.purchaseOrder.pointPrice.split(".")[1].length > 2) {
 						this.$api.msg('点价输入错误')
 						return
 					}
-					if(this.purchaseOrder.procurementPlanType=='期货'&&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
-						}else{
-							this.purchaseOrder.customer=this.goods.compName
-						}
+				}
+
+				this.purchaseOrder.packingFee = -this.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
+					} 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
-						}
+				}
+				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
-					this.purchaseOrder.commonId=that.userInfo.id
-					this.purchaseOrder.pcFlag=0
-					if(this.purchaseOrder.procurementPlanType == "期货"){
+				}
+				var that = this
+				this.purchaseOrder.commonId = that.userInfo.id
+				this.purchaseOrder.pcFlag = 0
+				if (this.purchaseOrder.procurementPlanType == "期货") {
 					this.purchaseOrder.unitPrice = this.purchaseOrder.settlementPrice
-					}
-					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){
-										that.$api.doRequest('post','/purchaseOrder/api/submitPurchaseOrder', {id:res.data.data}).then(res1 => {
-											if(res1.data.code==200){
-												uni.navigateTo({
-													url: `/pages/business/business`
-												})
-												uni.showToast({
-													title: '提交成功,等待买方回复',
-													icon: 'none',
-													duration: 2000
-												})
-											}else{
-												uni.showToast({
-													title: res.data.message,
-													icon: 'none',
-													duration: 2000
-												})
-											}
-										}).catch(res => {
+				}
+				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) {
+									that.$api.doRequest('post',
+										'/purchaseOrder/api/submitPurchaseOrder', {
+											id: res.data.data
+										}).then(res1 => {
+										if (res1.data.code == 200) {
+											// uni.navigateTo({
+											//  url: `/pageA/product/detail`
+											// })
+											uni.showToast({
+												title: '提交成功,等待买方回复',
+												icon: 'none',
+												duration: 2000,
+												success() {
+													uni.navigateBack(1)
+												}
+											})
+										} else {
 											uni.showToast({
 												title: res.data.message,
 												icon: 'none',
 												duration: 2000
 											})
-										})
-										// uni.navigateBack();
-									}else{
-										uni.showToast({
-											title: '提交失败:'+res.data.message,
-											icon: 'none',
-											duration: 2000
-										})
-									}
-								}).catch(res => {
-									if(res.errmsg){
+										}
+									}).catch(res => {
 										uni.showToast({
-											title: res.errmsg,
+											title: res.data.message,
 											icon: 'none',
 											duration: 2000
 										})
-									}
-									else{
-										uni.showToast({
-											title: "系统异常,请联系管理员",
-											icon: 'none',
-											duration: 2000
-										})
-									}
-								})
-							}
+									})
+									// uni.navigateBack();
+								} else {
+									uni.showToast({
+										title: '提交失败:' + res.data.message,
+										icon: 'none',
+										duration: 2000
+									})
+								}
+							}).catch(res => {
+								if (res.errmsg) {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								} else {
+									uni.showToast({
+										title: "系统异常,请联系管理员",
+										icon: 'none',
+										duration: 2000
+									})
+								}
+							})
 						}
-					})
-				},
-				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){
-					this.bankNameIndex=e.detail.value
-					this.buyer =this.Company[e.detail.value].companyName
-					this.buyerPhone=this.Company[e.detail.value].companyPhone
-					this.tradeCompanyId=this.Company[e.detail.value].id
-				},
-				AcceptTypeChange(e) {
-					this.acceptTypeIndex = e.detail.value
-					this.accept = this.acceptType[this.acceptTypeIndex];
-				},
-				packingChange(e){
-					this.packingIndex = e.detail.value
-					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
-						}
-					}
-					else{
-						this.purchaseOrder.invoiceFee=0
+				})
+			},
+			someprice(e) {
+
+				if (this.purchaseOrder.pointPrice && this.purchaseOrder.invoiceFee && this.packingFee) {
+					this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) + Number(this.purchaseOrder
+						.pointPrice) + Number(this.purchaseOrder.invoiceFee) + Number(-this.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.packingFee) {
+					this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) + Number(this.purchaseOrder
+						.pointPrice) + Number(-this.packingFee)
+				} else if (this.purchaseOrder.pointPrice) {
+					this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) + Number(this.purchaseOrder
+						.pointPrice)
+				} else if (this.packingFee) {
+					this.purchaseOrder.settlementPrice = Number(this.purchaseOrder.basis) + Number(-this.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) {
+				this.bankNameIndex = e.detail.value
+				this.buyer = this.Company[e.detail.value].companyName
+				this.buyerPhone = this.Company[e.detail.value].companyPhone
+				this.tradeCompanyId = this.Company[e.detail.value].id
+			},
+			AcceptTypeChange(e) {
+				this.acceptTypeIndex = e.detail.value
+				this.accept = this.acceptType[this.acceptTypeIndex];
+			},
+			packingChange(e) {
+				this.packingIndex = e.detail.value
+				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(){
-					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
-				},
-				addressInput(e){
-					this.address = e.detail.value
-				},
-				countInput(e){
-					this.count = e.detail.value
-				},
-			}
+				} else {
+					this.purchaseOrder.invoiceFee = 0
+				}
+			},
+			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
+			},
+			addressInput(e) {
+				this.address = e.detail.value
+			},
+			countInput(e) {
+				this.count = e.detail.value
+			},
 		}
+	}
 </script>
 
 <style scoped>
@@ -446,70 +477,82 @@
 		padding: 10px 20px;
 		background-color: #F5F6FA;
 	}
+
 	.cu-form-group input {
 		text-align: right;
 	}
+
 	.cu-form-group textarea {
 		text-align: right;
 	}
-	.margin-bottom{
-		margin-bottom:30px;
+
+	.margin-bottom {
+		margin-bottom: 30px;
 	}
+
 	.c-row {
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-align: center;
-	    -webkit-align-items: center;
-	    align-items: center;
-	    padding: 20rpx 30rpx;
-	    position: relative;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		padding: 20rpx 30rpx;
+		position: relative;
 	}
+
 	.con-list {
-	    -webkit-box-flex: 1;
-	    -webkit-flex: 1;
-	    flex: 1;
-	    display: -webkit-box;
-	    display: -webkit-flex;
-	    display: flex;
-	    -webkit-box-orient: vertical;
-	    -webkit-box-direction: normal;
-	    -webkit-flex-direction: column;
-	    flex-direction: column;
-	    color: #303133;
-	    line-height: 40rpx;
-	    text-align: right;
-	    padding-right: 20rpx;
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-box-direction: normal;
+		-webkit-flex-direction: column;
+		flex-direction: column;
+		color: #303133;
+		line-height: 40rpx;
+		text-align: right;
+		padding-right: 20rpx;
 	}
-	.transaction{
+
+	.transaction {
 		background-color: #FFFFFF;
 		margin-top: 10px;
 		padding-bottom: 10px;
 		border-radius: 20px;
 	}
-	.btn{
+
+	.btn {
 		width: 100%;
 		background-color: #22C572;
 		border-radius: 20px;
 		margin-top: 10px;
+		color: white;
 	}
-	.textareas{
+
+	.textareas {
 		width: 95%;
 		background-color: #F9F9FA;
 		padding: 10px 20px 0px 20px;
 		border-radius: 10px;
 	}
-	.beizhu{
+
+	.beizhu {
 		margin-left: 15px;
 		margin-bottom: 20px;
 		/* margin: 10px; */
 		margin-top: 10px;
 	}
-	.titles{
+
+	.titles {
 		margin-left: 20px;
 		margin-top: 10px;
 	}
-	.textA{
+
+	.textA {
 		margin-left: 20px;
 		color: #AFB3BF;
 		font-size: 10px;

+ 21 - 11
pageA/product/business_sale.vue

@@ -74,7 +74,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' type="number" placeholder-style="font-size: 12px;" placeholder="请填写采购数量" name="input"></input>
 			</view>
 		</view>
 		<view  class="c-row b-b">
@@ -90,25 +90,25 @@
 		<view v-if='purchaseOrder.packingType =="大袋" || purchaseOrder.packingType =="小袋"' class="beizhu align-start">
 			<view class="title">袋装备注</view>
 			<view >
-			<textarea maxlength="-1" v-model='purchaseOrder.baggingNotes' placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" class="textareas"></textarea>
+			<textarea maxlength="-1" v-model='purchaseOrder.baggingNotes' placeholder-style="font-size: 12px;" placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" class="textareas"></textarea>
 			</view>
 		</view>
 		<view  v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
 			<view class="title">点价(元/吨)</view>
 			<view class="con-list">
-			<input placeholder="请填写点价" name="input" @input='someprice' v-model="purchaseOrder.pointPrice"></input>
+			<input placeholder="请填写点价"  type="number" placeholder-style="font-size: 12px;" name="input" @input='someprice' v-model="purchaseOrder.pointPrice"></input>
 			</view>
 		</view>
 		<view  v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
 			<view class="title">发票费用(元/吨)</view>
 			<view class="con-list">
-			<input disabled placeholder="请填写发票费用" name="input" @input='someprice' v-model="purchaseOrder.invoiceFee"></input>
+			<input disabled placeholder="请填写发票费用" placeholder-style="font-size: 12px;" name="input" @input='someprice' v-model="purchaseOrder.invoiceFee"></input>
 			</view>
 		</view>
 		<view  v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
 			<view class="title">包装费(元/吨)</view>
 			<view class="con-list">
-		<input placeholder="请填写包装费" name="input" @input='someprice' v-model="purchaseOrder.packingFee"></input>
+		<input placeholder="请填写包装费" name="input" type="number" placeholder-style="font-size: 12px;" @input='someprice' v-model="purchaseOrder.packingFee"></input>
 		</view>
 		</view>
 		<view  v-if="purchaseOrder.salePlanType=='期货'" class=" align-start ">
@@ -169,7 +169,7 @@
 					bankNameIndex:0,
 					packingIndex:0,
 					invoiceIndex:0,
-					packingType: ['散袋(默认)','大袋','小袋'],
+					packingType: ['散','大袋','小袋'],
 					// invoiceType: ['不开发票', '普通发票', '增值税发票'],
 					invoiceType: ['不开发票','增值税发票'],
 					acceptType: ['第三方检验(国家检验资质)', '交收地库或港出具的检验', '现场看货','其他'],
@@ -321,12 +321,21 @@
 										uni.showToast({
 											title: '提交成功,等待卖方回复',
 											icon: 'none',
-											duration: 2000
-										})
-										uni.navigateTo({
-											url: `/pages/business/business`
+											duration: 2000,
+											success() {
+												uni.showToast({
+													title: '提交成功,等待买方回复',
+													icon: 'none',
+													duration: 2000,
+													success() {
+														uni.navigateBack(1)
+													}
+												})
+											}
 										})
-										// uni.navigateBack();
+										// uni.navigateTo({
+										// 	url: `/pages/business/business`
+										// })
 									}else{
 										uni.showToast({
 											title: '提交失败:'+res.data.message,
@@ -443,6 +452,7 @@
 		background-color: #22C572;
 		border-radius: 20px;
 		margin-top: 10px;
+		color: white;
 	}
 	.textareas{
 		width: 260px;

+ 26 - 11
pageA/product/detail.vue

@@ -132,67 +132,67 @@
 				<text>货物要求</text>
 			</view>
 			<view class="c-list">
-				<view class="c-row">
+				<view class="c-row"  v-if="goods.waterContent!=null">
 					<text class="tit">水分(%){{'<='}} </text>
 					<view class="con-list">
 						<text>{{goods.waterContent}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.bulkDensity!=null">
 					<text class="tit">容重(g/L){{'>='}}</text>
 					<view class="con-list">
 						<text>{{goods.bulkDensity}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.jiaorenli!=null">
 					<text class="tit">热损伤(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.jiaorenli}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.impurity!=null">
 					<text class="tit">杂质(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.impurity}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.mildewGrain!=null">
 					<text class="tit">霉变粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.mildewGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.imperfectGrain!=null">
 					<text class="tit">不完善粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.imperfectGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.protein!=null">
 					<text class="tit">蛋白(%){{'>='}} </text>
 					<view class="con-list">
 						<text>{{goods.protein}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.grain!=null">
 					<text class="tit">粒型</text>
 					<view class="con-list">
 						<text>{{goods.grain}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.grade!=null">
 					<text class="tit">品级</text>
 					<view class="con-list">
 						<text>{{goods.grade}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.outputPrivate!=null">
 					<text class="tit">产地</text>
 					<view class="con-list">
 						<text>{{goods.outputPrivate}}{{goods.outputCity}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.outputYear!=null">
 					<text class="tit">产出年份</text>
 					<view class="con-list">
 						<text>{{goods.outputYear}}</text>
@@ -498,6 +498,21 @@
 				uni.navigateBack();
 			},
 			tradeNow(){
+					uni.showModal({
+						title: '立即发车',
+						content: '是否立即发车?',
+						showCancel: true,
+						confirmText: '确认',
+						success: (e) => {
+							if (e.confirm) {
+								uni.navigateTo({
+									url: '../freightTransport/addsendgoods'
+								})
+							}
+						},
+						fail: () => {},
+						complete: () => {}
+					})
 				// this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:options.id}).then(res => {
 				// 	uni.hideLoading()
 				// 	this.goods=res.data.data

+ 4 - 1
pageA/product/lookup.vue

@@ -4,7 +4,7 @@
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 			<view style='flex:6;' class="search-form round" >
 				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-				<input type="text" maxlength="20" v-model="searchKeyWord" @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
+				<input type="text" maxlength="20" v-model="searchKeyWord" @confirm="doSearch()" @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
 				
 			</view>
 			<view @click='doSearch()' style="width:4%;flex:1;">搜索</view>
@@ -183,6 +183,9 @@
 					this.loadOldKeyword()
 					this.loadHotKeyword()
 				}
+				else{
+					this.searchKeyWord = e.detail.value
+				}
 			},
 			blur(){
 				uni.hideKeyboard()

+ 11 - 11
pageA/product/sales_detail.vue

@@ -129,67 +129,67 @@
 				<text>货物要求</text>
 			</view>
 			<view class="c-list">
-				<view class="c-row">
+				<view class="c-row" v-if="goods.waterContent!=null">
 					<text class="tit">水分(%){{'<='}} </text>
 					<view class="con-list">
 						<text>{{goods.waterContent}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.bulkDensity!=null">
 					<text class="tit">容重(g/L){{'>='}}</text>
 					<view class="con-list">
 						<text>{{goods.bulkDensity}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.jiaorenli!=null">
 					<text class="tit">热损伤(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.jiaorenli}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.impurity!=null">
 					<text class="tit">杂质(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.impurity}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.mildewGrain!=null">
 					<text class="tit">霉变粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.mildewGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.imperfectGrain!=null">
 					<text class="tit">不完善粒(%){{'<='}}</text>
 					<view class="con-list">
 						<text>{{goods.imperfectGrain}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.protein!=null">
 					<text class="tit">蛋白(%){{'>='}} </text>
 					<view class="con-list">
 						<text>{{goods.protein}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.grain!=null">
 					<text class="tit">粒型</text>
 					<view class="con-list">
 						<text>{{goods.grain}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.grade!=null">
 					<text class="tit">品级</text>
 					<view class="con-list">
 						<text>{{goods.grade}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.outputPrivate!=null||goods.outputCity!=null">
 					<text class="tit">产地</text>
 					<view class="con-list">
 						<text>{{goods.outputPrivate}}{{goods.outputCity}}</text>
 					</view>
 				</view>
-				<view class="c-row">
+				<view class="c-row" v-if="goods.outputYear!=null">
 					<text class="tit">产出年份</text>
 					<view class="con-list">
 						<text>{{goods.outputYear}}</text>

+ 4 - 0
pageB/contract/contract.vue

@@ -172,6 +172,10 @@
 		onLoad() {
 			this.getList()
 		},
+		onPullDownRefresh() {
+			this.getList()
+			uni.stopPullDownRefresh()
+		},
 		methods: {
 			amendprice() {
 				this.$api.doRequest('post', '/purchaseOrder/api/pointPrice', {

+ 363 - 359
pageB/contract/contract_detail.vue

@@ -1,60 +1,62 @@
 <template>
 	<view class="container">
 		<view class="information">
-		<!-- <block v-if="TabCur==2"> -->
-		<view class="c-row">
-			<view class="title1">发车信息</view>
-			
-		</view>
+			<!-- <block v-if="TabCur==2"> -->
+			<view class="c-row">
+				<view class="title1">发车信息</view>
+
+			</view>
 			<view class="c-row b-b">
 				<view class="title">派车编号</view>
 				<view class="con-list">
-					<input disabled  name="input" v-model="goods.tranCarNo"></input>
+					<input disabled name="input" v-model="goods.tranCarNo"></input>
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">车牌号</view>
 				<view class="con-list">
-				<input maxlength='7' placeholder="请输入车牌号" name="input" v-model="goods.carNo"></input>
+					<input maxlength='7' placeholder="请输入车牌号" name="input" v-model="goods.carNo"></input>
 				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">司机手机号</view>
 				<view class="con-list">
-				<input  maxlength='11' placeholder="请输入司机手机号" name="input" v-model="goods.driverPhone"></input>
-			  </view>
+					<input maxlength='11' placeholder="请输入司机手机号" name="input" v-model="goods.driverPhone"></input>
+				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">毛重(吨)</view>
 				<view class="con-list">
-				<input placeholder="请输入毛重" type="mobile" name="input"  @input="grossWeightchange" v-model="goods.grossWeight"></input>
-			</view>
+					<input placeholder="请输入毛重" type="mobile" name="input" @input="grossWeightchange"
+						v-model="goods.grossWeight"></input>
+				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">皮重(吨)</view>
 				<view class="con-list">
-				<input placeholder="请输入皮重" type="mobile" name="input"  @input="tarechange" v-model="goods.tare"></input>
-			</view>
+					<input placeholder="请输入皮重" type="mobile" name="input" @input="tarechange"
+						v-model="goods.tare"></input>
+				</view>
 			</view>
 			<view class="c-row b-b">
 				<view class="title">净重(吨)</view>
 				<view class="con-list">
-				<view class="con-list">
-				<input placeholder="自动计算" type="mobile" name="input" v-model="goods.loadNetWeight"></input>
+					<view class="con-list">
+						<input placeholder="自动计算" type="mobile" name="input" v-model="goods.loadNetWeight"
+							disabled="disabled"></input>
+					</view>
 				</view>
 			</view>
-			</view>
 			<view class="c-row ">
 				<view class="title">发货日期</view>
 				<view class="con-list">
-				<view @click="show = true">{{goods.sendDateStart!=''?goods.sendDateStart:time}}</view>
-				<u-picker  :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
-			</view>
-			</view>
-			
-				
+					<view @click="show = true">{{goods.sendDateStart!=''?goods.sendDateStart:time}}</view>
+					<u-picker :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time">
+					</u-picker>
+				</view>
 			</view>
-			<view class="information">
+		</view>
+		<view class="information">
 			<view class="c-row">
 				<view class="action">
 					上传磅单照片
@@ -62,8 +64,9 @@
 			</view>
 			<view class="c-row">
 				<view class="grid col-4 grid-square flex-sub">
-					<view class="bg-img" v-if="goods.loadPoundImg != ''" @tap="ViewImage" :data-url="goods.loadPoundImg">
-					 <image :src="goods.loadPoundImg" mode="aspectFit"></image>
+					<view class="bg-img" v-if="goods.loadPoundImg != ''" @tap="ViewImage"
+						:data-url="goods.loadPoundImg">
+						<image :src="goods.loadPoundImg" mode="aspectFit"></image>
 						<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
 							<text class='cuIcon-close'></text>
 						</view>
@@ -73,10 +76,10 @@
 					</view>
 				</view>
 			</view>
-			</view>
-			
-				<button class="btn btns" @click="getList">提交</button>
-			
+		</view>
+
+		<button class="btn btns" @click="getList">提交</button>
+
 		<!-- </block> -->
 	</view>
 </template>
@@ -87,367 +90,365 @@
 		mapState
 	} from 'vuex';
 	export default {
-			name: "trust",
-			data() {
-				return {
-					goods: {
-						tranCarNo:'',
-						carNo:'',
-						grossWeight:'',
-						tare:'',
-						loadNetWeight:'',
-						loadPoundImg:'',
-						 contractNo:'',
-						 goodsName:'',
-						 sendDateStart:''
-						
-					},
-					params:{
-						year: true,
-						month: true,
-						day: true,
-					},
-					carNo:'',
-					PageCur: "trust",
-					TabCur: 0,
-					priceTypeIndex:-1,
-					priceType: ['库内价', '到库价', '到港价'],
-					unitPrice:0,
-					price:'',
-					seller:'',
-					sellerPhone:'',
-					minSale:'',
-					exsitCount:0,
-					origin:'',
-					stock:'',
-					show:false,
-					goodsName:'',
-					verifyCode:'',
-					sendText0:'获取验证码',
-					sendText1:'获取验证码',
-					sendText2:'获取验证码',
-					sendText3:'获取验证码',
-					sendDisabled0: false,
-					sendDisabled1: false,
-					sendDisabled2: false,
-					sendDisabled3: false,
-					buyer:'',
-					buyerPhone:'',
-					level:'',
-					sender:'',
-					senderPhone:'',
-					receiver:'',
-					receiverPhone:'',
-					total:0,
-					startPlace:'',
-					endPlace:'',
-					driver:'',
-					driverPhone:'',
-					carNo:'',
-					personNoImg:'',
-					personNoImg1:'',
-					driverNoImg:'',
-					driverNoImg1:'',
-					carNoImg:'',
-					carNoImg1:'',
-					goodsName:'',
-					showTran:true
-				};
+		name: "trust",
+		data() {
+			return {
+				goods: {
+					tranCarNo: '',
+					carNo: '',
+					grossWeight: '',
+					tare: '',
+					loadNetWeight: '',
+					loadPoundImg: '',
+					contractNo: '',
+					goodsName: '',
+					sendDateStart: ''
+
+				},
+				params: {
+					year: true,
+					month: true,
+					day: true,
+				},
+				carNo: '',
+				PageCur: "trust",
+				TabCur: 0,
+				priceTypeIndex: -1,
+				priceType: ['库内价', '到库价', '到港价'],
+				unitPrice: 0,
+				price: '',
+				seller: '',
+				sellerPhone: '',
+				minSale: '',
+				exsitCount: 0,
+				origin: '',
+				stock: '',
+				show: false,
+				goodsName: '',
+				verifyCode: '',
+				sendText0: '获取验证码',
+				sendText1: '获取验证码',
+				sendText2: '获取验证码',
+				sendText3: '获取验证码',
+				sendDisabled0: false,
+				sendDisabled1: false,
+				sendDisabled2: false,
+				sendDisabled3: false,
+				buyer: '',
+				buyerPhone: '',
+				level: '',
+				sender: '',
+				senderPhone: '',
+				receiver: '',
+				receiverPhone: '',
+				total: 0,
+				startPlace: '',
+				endPlace: '',
+				driver: '',
+				driverPhone: '',
+				carNo: '',
+				personNoImg: '',
+				personNoImg1: '',
+				driverNoImg: '',
+				driverNoImg1: '',
+				carNoImg: '',
+				carNoImg1: '',
+				goodsName: '',
+				showTran: true
+			};
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+			time() {
+				var date = new Date()
+				var year = date.getFullYear()
+				var month = date.getMonth()
+				var date1 = date.getDate()
+				if (month + 1 < 10) {
+					month = "0" + (month + 1)
+				}
+				if (date1 + 1 < 10) {
+					date1 = "0" + date1
+				}
+				return year + '-' + month + "-" + date1
 			},
-			computed: {
-				...mapState(['hasLogin','userInfo']),
-					time() {
-						var date=new Date()
-						var year=date.getFullYear()
-						var month=date.getMonth()
-						var date1=date.getDate()
-						if(month+1<10){
-							month="0"+(month+1)
-						}
-						if(date1+1<10){
-							date1="0"+date1
-						}
-						return year+'-'+month+"-"+date1
-					},
-					startDate() {
-					//限制开始时间;
-					//也可以直接限定为当天日期 var date= new Date(); return date
-						return new Date(new Date(new Date().toLocaleDateString()).getTime()-(1*60*60*1000))
-					},
-					endDate() {
-						return new Date()
-					}
-				},	
-			// onShow() {
-			// },
-			onLoad(option) {
-				this.goods.planId = option.planId
-				this.goodsName = option.goodsName
-				this.contractNo = option.contractNo
-				this.goods.goodsName = option.goodsName
-				this.goods.contractNo = option.contractNo
-				this.goods.tranCarNo = option.tranCarNo
+			startDate() {
+				//限制开始时间;
+				//也可以直接限定为当天日期 var date= new Date(); return date
+				return new Date(new Date(new Date().toLocaleDateString()).getTime() - (1 * 60 * 60 * 1000))
 			},
-			methods: {
-				 DateChange(e) {
-					 this.goods.sendDateStart=e.year+'-'+e.month+'-'+e.day
-				 	// this.goods.sendDateStart = e.detail.value
-				 },
-				commit1(item){
-					uni.navigateTo({				
-						url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
-					})
-				},
-				grossWeightchange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				tarechange(e) {
-				      if (this.goods.grossWeight && this.goods.tare) {
-				        this.goods.loadNetWeight = Number(
-				          this.goods.grossWeight - this.goods.tare
-				        )
-				      }
-				    },
-				getList(){
-					// tranCarNo:'',
-					// carNo:'',
-					// grossWeight:'',
-					// tare:'',
-					// loadNetWeight:'',
-					// loadPoundImg:'',
-					//  contractNo:'',
-					//  goodsName:'',
-					if(this.goods.carNo.length==0){
-						this.$api.msg('车牌号不能为空')
-						return
-					}
-					if(this.goods.carNo.length!=7){
-						this.$api.msg('车牌号输入错误')
-						return
-					}
-					if(this.goods.driverPhone.length==0){
-						this.$api.msg('手机号不能为空')
-						return
-					}
-					if(this.goods.driverPhone.length!=11){
-						this.$api.msg('司机手机号输入错误')
-						return
-					}
-					if(this.goods.grossWeight==''){
-						this.$api.msg('毛重不能为空')
-						return
-					}
-					if(this.goods.tare==''){
-						this.$api.msg('皮重不能为空')
-						return
-					}
-					if(this.goods.grossWeight>100){
-						this.$api.msg('毛重输入错误')
-						return
-					}
-					if(this.goods.tare>50){
-						this.$api.msg('皮重输入错误')
-						return
-					}
-					var that=this
-					uni.showModal({
-						content: '确定提交发车信息?',
-						success: function (res) {
-							if (res.confirm) {
-								that.$api.doRequest('post','/tranCarInfo/api/addTranTask',that.goods).then(res => {
-								    if(res.data.code==200){
-										console.log(that.goods)
-										uni.showModal({
-											content: '提交成功!',
-											success: function (res) {
-												if (res.confirm) {
-													var result = that.goods.tranCarNo.substr(that.goods.tranCarNo.indexOf("C") + 1,that.goods.tranCarNo.length);
-												    var num=Number(result)+1
-													if(num<=9){
-														num='C00'+num
-													}else if(num<100&&num>9){
-														num='C0'+num
-													}else  if(num<1000&&num>99){
-														num='C'+num
+			endDate() {
+				return new Date()
+			}
+		},
+		// onShow() {
+		// },
+		onLoad(option) {
+			this.goods.planId = option.planId
+			this.goodsName = option.goodsName
+			this.contractNo = option.contractNo
+			this.goods.goodsName = option.goodsName
+			this.goods.contractNo = option.contractNo
+			this.goods.tranCarNo = option.tranCarNo
+		},
+		methods: {
+			DateChange(e) {
+				this.goods.sendDateStart = e.year + '-' + e.month + '-' + e.day
+				// this.goods.sendDateStart = e.detail.value
+			},
+			commit1(item) {
+				uni.navigateTo({
+					url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
+				})
+			},
+			grossWeightchange(e) {
+				if (this.goods.grossWeight && this.goods.tare) {
+					this.goods.loadNetWeight = Number(
+						this.goods.grossWeight - this.goods.tare
+					)
+				}
+			},
+			tarechange(e) {
+				if (this.goods.grossWeight && this.goods.tare) {
+					this.goods.loadNetWeight = Number(
+						this.goods.grossWeight - this.goods.tare
+					)
+				}
+			},
+			getList() {
+				// tranCarNo:'',
+				// carNo:'',
+				// grossWeight:'',
+				// tare:'',
+				// loadNetWeight:'',
+				// loadPoundImg:'',
+				//  contractNo:'',
+				//  goodsName:'',
+				if (this.goods.carNo.length == 0) {
+					this.$api.msg('车牌号不能为空')
+					return
+				}
+				if (this.goods.carNo.length != 7) {
+					this.$api.msg('车牌号输入错误')
+					return
+				}
+				if (this.goods.driverPhone.length == 0) {
+					this.$api.msg('手机号不能为空')
+					return
+				}
+				if (this.goods.driverPhone.length != 11) {
+					this.$api.msg('司机手机号输入错误')
+					return
+				}
+				if (this.goods.grossWeight == '') {
+					this.$api.msg('毛重不能为空')
+					return
+				}
+				if (this.goods.tare == '') {
+					this.$api.msg('皮重不能为空')
+					return
+				}
+				if (this.goods.grossWeight > 100) {
+					this.$api.msg('毛重输入错误')
+					return
+				}
+				if (this.goods.tare > 50) {
+					this.$api.msg('皮重输入错误')
+					return
+				}
+				var that = this
+				uni.showModal({
+					content: '确定提交发车信息?',
+					success: function(res) {
+						if (res.confirm) {
+							that.$api.doRequest('post', '/tranCarInfo/api/addTranTask', that.goods).then(
+								res => {
+									if (res.data.code == 200) {
+										uni.showToast({
+											title: '提交成功!',
+											icon: 'success',
+											duration: 2000,
+											success: function(res) {
+												setTimeout(() => {
+													var result = that.goods.tranCarNo
+														.substr(that.goods.tranCarNo
+															.indexOf("C") + 1, that
+															.goods.tranCarNo.length);
+													var num = Number(result) + 1
+													if (num <= 9) {
+														num = 'C00' + num
+													} else if (num < 100 && num > 9) {
+														num = 'C0' + num
+													} else if (num < 1000 && num >
+														99) {
+														num = 'C' + num
 													}
-													that.goods={
-														tranCarNo:num,
-														carNo:'',
-														grossWeight:'',
-														tare:'',
-														loadNetWeight:'',
-														loadPoundImg:'',
-														 contractNo:that.contractNo,
-														 goodsName:that.goodsName,
-														 sendDateStart:''	
+													that.goods = {
+														tranCarNo: num,
+														carNo: '',
+														grossWeight: '',
+														tare: '',
+														loadNetWeight: '',
+														loadPoundImg: '',
+														contractNo: that
+															.contractNo,
+														goodsName: that.goodsName,
+														sendDateStart: ''
 													}
-												}else if (res.cancel) {
-													uni.navigateBack();
-												}
+													uni.navigateBack({
+														delta: 1
+													});
+												}, 2000)
 											}
-										});
-									}else if(res.data.code==11015){
+										})
+									} else if (res.data.code == 11015) {
 										uni.showToast({
-										 title: '该司机未认证身份,请司机认证后再操作',
-										 icon:'none',
-										 duration: 2000
+											title: '该司机未认证身份,请司机认证后再操作',
+											icon: 'none',
+											duration: 2000
 										})
 									}
-								    })
-								    .catch(res => {
-										 if(res.errmsg){
-										 	uni.showToast({
-										 		title: res.errmsg,
-										 		icon: 'none',
-										 		duration: 2000
-										 	})
-										 }
-										 else{
-										 	uni.showToast({
-										 		title: "系统异常,请联系管理员",
-										 		icon: 'none',
-										 		duration: 2000
-										 	})
-										 }
-								    });
-							} else if (res.cancel) {
-							
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+						} else if (res.cancel) {}
+					}
+				});
+			},
+			ChooseImagePerson() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+
+						uploadImage(res.tempFilePaths[0], 'loadPoundImg/',
+							result => {
+
+								this.goods.loadPoundImg = result
+								uni.hideLoading();
 							}
-						}
-					});
-				},
-				ChooseImagePerson() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							
-							uploadImage(res.tempFilePaths[0], 'loadPoundImg/',
-								result => {
-	
-								 	this.goods.loadPoundImg = result
-								 uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ChooseImageDriver() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'driverNoImg/',
-								result => {
-									if (this.driverNoImg.length != 0) {
-										this.driverNoImg1 = result
-									} else {
-										this.driverNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ChooseImageCar() {
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: ['album','camera'], //从相册选择
-						success: (res) => {
-							//上传图片
-							//图片路径可自行修改
-							uploadImage(res.tempFilePaths[0], 'carNoImg/',
-								result => {
-									if (this.carNoImg.length != 0) {
-										this.carNoImg1 = result
-									} else {
-										this.carNoImg = result
-									}
-									uni.hideLoading();
-								}
-							)
-						}
-					});
-				},
-				ViewImage(e) {
-					var img = [];
-					img = e.currentTarget.dataset.url.split(' ')
-					uni.previewImage({
-						current:0,
-						urls: img
-					});
-				},
-				DelImg(e) {
-					uni.showModal({
-						title: '提示',
-						content: '确定要删除该照片吗?',
-						cancelText: '取消',
-						confirmText: '确定',
-						success: res => {
-							if (res.confirm) {
-								if(e.currentTarget.dataset.index == 0){
-									this.personNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 1){
-									this.personNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 2){
-									this.driverNoImg = "";
-								}
-								else if(e.currentTarget.dataset.index == 3){
-									this.driverNoImg1 = "";
-								}
-								else if(e.currentTarget.dataset.index == 4){
-									this.carNoImg = "";
+						)
+					}
+				});
+			},
+			ChooseImageDriver() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+						uploadImage(res.tempFilePaths[0], 'driverNoImg/',
+							result => {
+								if (this.driverNoImg.length != 0) {
+									this.driverNoImg1 = result
+								} else {
+									this.driverNoImg = result
 								}
-								else if(e.currentTarget.dataset.index == 5){
-									this.carNoImg1 = "";
+								uni.hideLoading();
+							}
+						)
+					}
+				});
+			},
+			ChooseImageCar() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						//上传图片
+						//图片路径可自行修改
+						uploadImage(res.tempFilePaths[0], 'carNoImg/',
+							result => {
+								if (this.carNoImg.length != 0) {
+									this.carNoImg1 = result
+								} else {
+									this.carNoImg = result
 								}
-								
+								uni.hideLoading();
 							}
+						)
+					}
+				});
+			},
+			ViewImage(e) {
+				var img = [];
+				img = e.currentTarget.dataset.url.split(' ')
+				uni.previewImage({
+					current: 0,
+					urls: img
+				});
+			},
+			DelImg(e) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除该照片吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						if (res.confirm) {
+							if (e.currentTarget.dataset.index == 0) {
+								this.personNoImg = "";
+							} else if (e.currentTarget.dataset.index == 1) {
+								this.personNoImg1 = "";
+							} else if (e.currentTarget.dataset.index == 2) {
+								this.driverNoImg = "";
+							} else if (e.currentTarget.dataset.index == 3) {
+								this.driverNoImg1 = "";
+							} else if (e.currentTarget.dataset.index == 4) {
+								this.carNoImg = "";
+							} else if (e.currentTarget.dataset.index == 5) {
+								this.carNoImg1 = "";
+							}
+
 						}
-					})
-				},
+					}
+				})
 			},
-		}
+		},
+	}
 </script>
 
 <style scoped>
-	.container{
+	.container {
 		padding: 10px 10px;
 		background-color: #F5F6FA;
 	}
-	.title1{
+
+	.title1 {
 		font-size: 18px;
 		font-weight: 600;
-		}
+	}
+
 	.cu-form-group input {
 		text-align: right;
 	}
-	.text-white text{
+
+	.text-white text {
 		background: linear-gradient(45deg, #3DC146, #B2D612);
-		padding:5px 10px;
+		padding: 5px 10px;
 		border-radius: 38rpx;
 	}
+
 	.cu-form-group textarea {
 		text-align: right;
 	}
-	.commit{
+
+	.commit {
 		background: linear-gradient(45deg, #DF331C, #DA611A);
-		color:#fff;
+		color: #fff;
 	}
+
 	.c-row {
 		display: -webkit-box;
 		display: -webkit-flex;
@@ -458,6 +459,7 @@
 		padding: 20rpx 30rpx;
 		position: relative;
 	}
+
 	.con-list {
 		-webkit-box-flex: 1;
 		-webkit-flex: 1;
@@ -475,12 +477,14 @@
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
-	.information{
+
+	.information {
 		background-color: #FFFFFF;
 		border-radius: 20px;
 		margin-top: 10px;
 	}
-	.btn{
+
+	.btn {
 		margin-top: 10px;
 		border-radius: 25px;
 		background-color: #22C572;

+ 1 - 1
pageB/contract/look.vue

@@ -67,7 +67,7 @@
 						<image :src="item.unloadPoundImg" mode="" class="poundlist"></image>
 					</view>
 				</view>
-				<button v-if='item.confirmFlag!=3' class=" btn btns unload" style="background-color: #22C572; color: #FFFFFF ;width:80%;"
+				<button v-if='item.confirmFlag != 3 && item.status == "已送达"' class=" btn btns unload" style="background-color: #22C572; color: #FFFFFF ;width:80%;"
 					@click="confirmunload(item)" >确认卸货</button>
 			</view>
 		</view>

+ 1 - 0
pageD/identity/companyIdentity.vue

@@ -345,6 +345,7 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 
 	.switchs1 {

+ 10 - 10
pageD/identity/companyIdentityEdit.vue

@@ -264,9 +264,9 @@
 				},
 				license() {
 					var that = this
-					wx.chooseImage({
+					uni.chooseImage({
 						success: function(res) {
-							wx.uploadFile({
+							uni.uploadFile({
 								url: 'https://www.zthymaoyi.com/upload/admin',
 								filePath: res.tempFilePaths[0],
 								name: 'file',
@@ -282,9 +282,9 @@
 				},
 				idUp(){
 					var that = this
-					wx.chooseImage({
+					uni.chooseImage({
 						success: function(res) {
-							wx.uploadFile({
+							uni.uploadFile({
 								url: 'https://www.zthymaoyi.com/upload/admin',
 								filePath: res.tempFilePaths[0],
 								name: 'file',
@@ -300,9 +300,9 @@
 				},
 				idLow(){
 					var that = this
-					wx.chooseImage({
+					uni.chooseImage({
 						success: function(res) {
-							wx.uploadFile({
+							uni.uploadFile({
 								url: 'https://www.zthymaoyi.com/upload/admin',
 								filePath: res.tempFilePaths[0],
 								name: 'file',
@@ -318,9 +318,9 @@
 				},
 				bankUp(){
 					var that = this
-					wx.chooseImage({
+					uni.chooseImage({
 						success: function(res) {
-							wx.uploadFile({
+							uni.uploadFile({
 								url: 'https://www.zthymaoyi.com/upload/admin',
 								filePath: res.tempFilePaths[0],
 								name: 'file',
@@ -336,9 +336,9 @@
 				},
 				bankLow(){
 					var that = this
-					wx.chooseImage({
+					uni.chooseImage({
 						success: function(res) {
-							wx.uploadFile({
+							uni.uploadFile({
 								url: 'https://www.zthymaoyi.com/upload/admin',
 								filePath: res.tempFilePaths[0],
 								name: 'file',

+ 4 - 4
pageD/identity/companyIdentityThree.vue

@@ -139,9 +139,9 @@
 			},
 			bankUp() {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',
@@ -183,9 +183,9 @@
 			},
 			bankLow() {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',

+ 4 - 4
pageD/identity/companyIdentityTwo.vue

@@ -95,9 +95,9 @@
 			},
 			idUp(){
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',
@@ -133,9 +133,9 @@
 			},
 			idLow(){
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',

+ 4 - 4
pageD/identity/driverIdentity.vue

@@ -259,9 +259,9 @@
 			},
 			idUp() {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',
@@ -297,9 +297,9 @@
 			},
 			idLow() {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',

+ 317 - 260
pageD/identity/driverIdentityEdit.vue

@@ -3,53 +3,54 @@
 		<view>
 
 			<view>
-				<view style="margin: 0 auto;" v-if="id != ''"  @click="idUp">
-					<image v-bind:src = "id1" class="picture"></image>
+				<view style="margin: 0 auto;" v-if="id != ''" @click="idUp">
+					<image v-bind:src="id1" class="picture"></image>
 				</view>
-	
+
 				<view style="margin: 0 auto;" v-if="id2 != ''" @click="idLow">
-					<image v-bind:src = "id2" class="picture"></image>
+					<image v-bind:src="id2" class="picture"></image>
 				</view>
 			</view>
 			<view class="personalcss">
-				
-			
-			<view class="c-row b-b">
-				<text class="tit">姓名</text>
-				<view class="con-list">
-					<input placeholder="请填写姓名" name="input" v-model="DriverViewInfo.driverName"></input>
+
+
+				<view class="c-row b-b">
+					<text class="tit">姓名</text>
+					<view class="con-list">
+						<input placeholder="请填写姓名" name="input" v-model="DriverViewInfo.driverName"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row b-b">
-				<text class="tit">身份证号</text>
-				<view class="con-list">
-					<input placeholder="请填写身份证号" name="input" v-model="DriverViewInfo.numberCard"></input>
+				<view class="c-row b-b">
+					<text class="tit">身份证号</text>
+					<view class="con-list">
+						<input placeholder="请填写身份证号" name="input" v-model="DriverViewInfo.numberCard"></input>
+					</view>
 				</view>
-			</view>
-			<view class="c-row b-b">
-				<text class="tit">手机号</text>
-				<view class="con-list">
-					<input placeholder="请填写手机号" name="input" v-model="DriverViewInfo.driverPhone"></input>
+				<view class="c-row b-b">
+					<text class="tit">手机号</text>
+					<view class="con-list">
+						<input placeholder="请填写手机号" name="input" v-model="DriverViewInfo.driverPhone"></input>
+					</view>
 				</view>
-			</view>
-			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
-				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
-					class='getcode'>{{sendText}}</button>
-				<view style='width:70%;position:relative;margin-left: 200px;'>
-				<view class="con-list">
-					<!-- style='width:70%;position:relative;margin-left: 200px;' -->
-					<input v-model='verifyCode' placeholder="请输入验证码" type="text">
+				<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+					<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
+						class='getcode'>{{sendText}}</button>
+					<view style='width:70%;position:relative;margin-left: 200px;'>
+						<view class="con-list">
+							<!-- style='width:70%;position:relative;margin-left: 200px;' -->
+							<input v-model='verifyCode' placeholder="请输入验证码" type="text">
+						</view>
+
+					</view>
 				</view>
-			
-			</view>
-			</view>
-			<view class="c-row b-b">
-				<text class="tit">常驻城市</text>
-				<view class="con-list">
-					<input placeholder="请填写常驻城市" name="input" v-model="DriverViewInfo.residentCityProvincial"></input>
+				<view class="c-row b-b">
+					<text class="tit">常驻城市</text>
+					<view class="con-list">
+						<input placeholder="请填写常驻城市" name="input"
+							v-model="DriverViewInfo.residentCityProvincial"></input>
+					</view>
 				</view>
 			</view>
-			</view>
 
 
 		</view>
@@ -58,7 +59,7 @@
 			<view class="c-row">
 				<text class="tit" style="line-height: 36px;">货车信息</text>
 				<view class="con-list">
-					<image v-bind:src="opencar" class="open" opencarboolean @click="opencarclick" ></image>
+					<image v-bind:src="opencar" class="open" opencarboolean @click="opencarclick"></image>
 				</view>
 			</view>
 		</view>
@@ -67,7 +68,8 @@
 			<view class="c-row ">
 				<text class="tit">车辆 -{{index+1}}</text>
 				<view class="con-list">
-					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="carDel(index)" ></image>
+					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="carDel(index)">
+					</image>
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -87,11 +89,19 @@
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">不含车头车长(米)</text>
-				<picker @change="carLongChange" :value="carLongIndex" :range="carLongType" class="con-list">
+				<picker @change="carLongChange" :value="carLongIndex" :range="carLongType" class="con-list"
+					v-if="carchength">
 					<view class="picker" v-model="item.carLength">
 						{{carLongIndex>-1?carLongType[carLongIndex]:'请选择车长'}}
 					</view>
 				</picker>
+
+
+				<view v-else class="con-list">
+					<input placeholder="请填写车长(米)" name="input" v-model="item.carLength"></input>
+				</view>
+				<button v-if="carchength" class='cu-btn bg-green shadow' @click="changeCarChength">填写</button>
+				<button v-else class='cu-btn bg-green shadow' @click="changeCarChength">选择</button>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">载重(吨)</text>
@@ -102,14 +112,17 @@
 			<view class="c-row ">
 				<text class="tit">出厂年份</text>
 				<view class="con-list">
-					<input placeholder="请填写出厂年份" name="input" v-model="item.yearManufacture"></input>
+					<view @click='yearchange'>{{item.yearManufacture == null?"请选择出厂年份":item.yearManufacture}}</view>
+					<u-picker :params='params' @confirm='yearpicker($event,index)' v-model="show" mode="time"
+						:start-year="startData" :end-year="endData">
+					</u-picker>
 				</view>
 			</view>
 		</view>
 		<button class="btn" v-if="opencarboolean == true" @click="carAdd">
-				 <image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image> 
-				 <texe>添加车辆</texe>
-				 </button>
+			<image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image>
+			<texe>添加车辆</texe>
+		</button>
 		<!-- 账户信息 -->
 		<view class="information">
 			<view class="c-row">
@@ -119,14 +132,15 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<view class="informations" v-if="openuserboolean == true" v-for="(items , index) in driverPayeeInfoList"
 			:Key="index">
 			<!-- <view class="labels"> 账户 -?</view> -->
 			<view class="c-row ">
 				<text class="tit">账户 -{{index+1}}</text>
 				<view class="con-list">
-					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="userDel(index)"></image>
+					<image src="../../static/img/jiaoyi/shanchu@2x.png" class="eliminate" @click="userDel(index)">
+					</image>
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -135,15 +149,15 @@
 					<input placeholder="请填写账户类型" name="input" v-model="items.accountType"></input>
 				</view>
 			</view>
-			<view class="c-row b-b"> 
+			<view class="c-row b-b">
 				<text class="tit">银行卡照片(可选)</text>
 				<view class="con-list">
 					<!-- <input placeholder="请上传照片" name="input" v-model="items.payeeAddressUrl" @clisk="bankimg(items)"></input> -->
-					<view  v-if="bankimg == ''"  @click="bankimgs(index)">请上传照片</view>
-					<view  v-if="bankimg != ''" @click="bankimgs(index)">
+					<view v-if="bankimg == ''" @click="bankimgs(index)">请上传照片</view>
+					<view v-if="bankimg != ''" @click="bankimgs(index)">
 						<image v-bind:src="bankimg" style="width: 40px; height: 40px;"></image>
 					</view>
-					
+
 				</view>
 			</view>
 			<view class="c-row b-b">
@@ -154,19 +168,19 @@
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">开户行</text>
-				
+
 				<view class="con-list">
 					<input placeholder="请输入开户行" name="input" v-model="items.bankDeposit"></input>
 				</view>
-			
+
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">开户支行</text>
 				<picker @change="bankChange" :value="bankIndex" :range="bankType" class="con-list">
-				<view class="con-list">
-					{{bankIndex>-1?bankType[bankIndex]:'请选择开户支行'}}
-				</view>
-					</picker>
+					<view class="con-list">
+						{{bankIndex>-1?bankType[bankIndex]:'请选择开户支行'}}
+					</view>
+				</picker>
 			</view>
 			<view class="c-row b-b">
 				<text class="tit">收款人姓名</text>
@@ -182,34 +196,34 @@
 			</view>
 		</view>
 		<button class="btn" v-if="openuserboolean == true" @click="userAdd()">
-			 <image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image> 
+			<image src="../../static/img/jiaoyi/ic_fabu@3x.png" class="add" style="top: 8px;"></image>
 			<text style="margin-top: -2px;">添加账户</text>
-			</button>
-		<view  class="fujians" v-if="travels != ''" @click="travel">
+		</button>
+		<view class="fujians" v-if="travels != ''" @click="travel">
 			<view class="c-row b-b">
-				<text class="picturebiaoti">行驶证</text>			
+				<text class="picturebiaoti">行驶证</text>
 			</view>
 			<image v-bind:src="travels" class="picture"></image>
-		</view>	
-		<view  class="fujians" v-if="drives != ''" @click="drive">
+		</view>
+		<view class="fujians" v-if="drives != ''" @click="drive">
 			<view class="c-row b-b">
-				<text class="picturebiaoti">驾驶证</text>			
+				<text class="picturebiaoti">驾驶证</text>
 			</view>
 			<image v-bind:src="drives" class="picture"></image>
-		</view>	
-		<view  class="fujians" v-if="operates != ''" @click="operate">
+		</view>
+		<view class="fujians" v-if="operates != ''" @click="operate">
 			<view class="c-row b-b">
-				<text class="picturebiaoti">道路运营证</text>			
+				<text class="picturebiaoti">道路运营证</text>
 			</view>
 			<image v-bind:src="operates" class="picture"></image>
-		</view>	
-		<view  class="fujians" v-if="practices != ''" @click="practice">
+		</view>
+		<view class="fujians" v-if="practices != ''" @click="practice">
 			<view class="c-row b-b">
-				<text class="picturebiaoti">从业资格证</text>			
+				<text class="picturebiaoti">从业资格证</text>
 			</view>
 			<image v-bind:src="practices" class="picture"></image>
-		</view>	
-			<button class="btn btns" @click="commitEdit">修改</button>
+		</view>
+		<button class="btn btns" @click="commitEdit">修改</button>
 
 	</view>
 	</view>
@@ -217,63 +231,89 @@
 
 <script>
 	import {
-	    mapState 
+		mapState
 	} from 'vuex';
 	export default {
 		data() {
 			return {
-				goods:{},
-				ModelIndex:'高栏',
-				Model:'',
-				ModelType:["高栏","集装箱","自卸车"],
-				carLong:'',
-				carLongType:['13','9.6','8.2','8.7','11.7','12.5','13.7','15','16','17.5'],
-				id:[],
-				id1:"",
-				id2:"",
-				travels:"",
-				drives:"",
-				operates:"",
-				practices:"",
+				goods: {},
+				ModelIndex: '高栏',
+				Model: '',
+				ModelType: ["高栏", "集装箱", "自卸车"],
+				carLong: '',
+				carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
+				id: [],
+				id1: "",
+				id2: "",
+				travels: "",
+				drives: "",
+				operates: "",
+				practices: "",
 				// bank1:"",
 				// bank2:"",
 				// bankid:[],
 				sendText: '获取验证码',
-                sendDisabled: false,
+				sendDisabled: false,
 				sendText: '获取验证码',
 				ModelIndex: '高栏',
 				Model: '',
 				ModelType: ["高栏", "集装箱", "自卸车"],
 				carLong: '',
-				carLongIndex:0,
+				carLongIndex: 0,
 				carLongType: ['13', '9.6', '8.2', '8.7', '11.7', '12.5', '13.7', '15', '16', '17.5'],
 				driverCarInfoList: [],
 				driverPayeeInfoList: [],
 				DriverViewInfo: {
 					driverCarInfoList: [],
-					driverPayeeInfoList: [],	
+					driverPayeeInfoList: [],
 				},
-				verifyCode:"",
-				codestatus:false,
+				params: {
+					year: true,
+				},
+				verifyCode: "",
+				codestatus: false,
 				customerPhone: '',
-				addressUrl:[],
-				opencarboolean:false,
-				openuserboolean:false,
+				addressUrl: [],
+				opencarboolean: false,
+				openuserboolean: false,
+				carchength: true,
+				show: false,
 				opencar: "../../static/img/authentication/down2@3x.png",
-					openuser: "../../static/img/authentication/down2@3x.png",
-					bankimg:"",
-					bankImgs1:{},
-					bankIndex:-1,
-					bankType:[],
+				openuser: "../../static/img/authentication/down2@3x.png",
+				bankimg: "",
+				bankImgs1: {},
+				bankIndex: -1,
+				bankType: [],
+				year:[],
 			}
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		computed:{
+			yearchange() {
+				this.show = true
+			},
+			startData(){
+				var data = new Date()
+				return data.getFullYear() - 30
+			},
+			endData(){
+				var data = new Date()
+				return data.getFullYear()
+			}
 		},
-		onLoad(option){
+		onLoad(option) {
 			this.getList(option.id)
 		},
 		methods: {
+			yearpicker(e, index) {
+				this.year[index] = e.year
+				this.driverCarInfoList[index].yearManufacture = e.year
+			},
+			changeCarChength() {
+				this.carchength = !this.carchength
+			},
 			carAdd() {
 				this.driverCarInfoList.push({
 					carNumber: '',
@@ -285,13 +325,13 @@
 			},
 			userAdd() {
 				this.driverPayeeInfoList.push({
-					accountType:"",
-					cardAddressUrl:"",
-					bankCard:"",
-					bankDeposit:"",
-					bankDepositBranch:"",
-					payeeName:"",
-					payeeNumberCard:"",
+					accountType: "",
+					cardAddressUrl: "",
+					bankCard: "",
+					bankDeposit: "",
+					bankDepositBranch: "",
+					payeeName: "",
+					payeeNumberCard: "",
 				})
 			},
 			carDel(index) {
@@ -322,7 +362,7 @@
 					this.openuser = "../../static/img/authentication/down2@3x.png"
 				}
 			},
-			openfujianclick(){
+			openfujianclick() {
 				if (this.openfujianboolean == false) {
 					this.openfujianboolean = true;
 					this.openfujian = "../../static/img/authentication/up2%20(3).png"
@@ -332,27 +372,24 @@
 				}
 			},
 			bankChange(e) {
-				console.log(e,"e是神恶魔")
 				this.bankIndex = e.detail.value
-				this.Model = this.bankType[this.bankIndex];	
+				this.Model = this.bankType[this.bankIndex];
 				this.driverPayeeInfoList[index].bankDepositBranch = this.bankType[this.bankIndex];
 			},
 			getList(ids) {
 				this.$api.doRequest('get', '/driverViewInfo/getDriver', {
 						id: ids
 					}, 'application/json;charset=UTF-8').then(res => {
-						console.log("成功连接")
 						this.procurementPlanInfos = res.data.data
 						this.DriverViewInfo = res.data.data
 						this.driverCarInfoList = this.DriverViewInfo.driverCarInfoList
 						this.driverPayeeInfoList = this.DriverViewInfo.driverPayeeInfoList
-						this.addressUrl =this.DriverViewInfo.addressUrl.split(",")
-						console.log(this.driverPayeeInfoList,"dsfds")
+						this.addressUrl = this.DriverViewInfo.addressUrl.split(",")
 						this.drivers = res.data.data
 						if (this.drivers.cardAddressUrl != "") {
 							this.id = this.drivers.cardAddressUrl.split(","),
 								this.id1 = this.id[0]
-							    this.id2 = this.id[1]
+							this.id2 = this.id[1]
 						}
 						if (this.drivers.addressUrl != "") {
 							this.address = this.drivers.addressUrl.split(","),
@@ -380,32 +417,32 @@
 					});
 			},
 			commitEdit() {
-				console.log(this.addressUrl,"数组")
+				console.log(this.addressUrl, "数组")
 				this.DriverViewInfo.addressUrl = this.addressUrl.toString()
-				console.log(this.DriverViewInfo.addressUrl,"字符串")
-				
+				console.log(this.DriverViewInfo.addressUrl, "字符串")
+
 				this.DriverViewInfo.driverCarInfoList = this.driverCarInfoList
 				this.DriverViewInfo.driverPayeeInfoList = this.driverPayeeInfoList
 				this.DriverViewInfo.commonId = this.userInfo.id
 				this.DriverViewInfo.cardAddressUrl = this.id.toString()
 				this.DriverViewInfo.pcFlag = 0
 				this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-				console.log(this.DriverViewInfo,"司机对象")
-				this.$api.doRequest('post', '/driverViewInfo/api/editInfo', this.DriverViewInfo).then(res => {
-				}).catch(res => {
-					uni.showToast({
-						title: res.data.message,
-						icon: 'none',
-						duration: 2000
+				console.log(this.DriverViewInfo, "司机对象")
+				this.$api.doRequest('post', '/driverViewInfo/api/editInfo', this.DriverViewInfo).then(res => {}).catch(
+					res => {
+						uni.showToast({
+							title: res.data.message,
+							icon: 'none',
+							duration: 2000
+						})
 					})
-				})
 			},
-			bankimgs(items){
+			bankimgs(items) {
 				console.log(items)
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',
@@ -414,12 +451,15 @@
 								var strToObj = JSON.parse(data)
 								// that.id[0] = strToObj.url
 								that.bankimg = strToObj.url
-								 that.bankImgs1.bankImg = strToObj.url
-								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that.bankImgs1).then(res => {
+								that.bankImgs1.bankImg = strToObj.url
+								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
+									.bankImgs1).then(res => {
 									console.log(res)
-									that.$set(that.driverPayeeInfoList[items],'bankCard',res.data.data.bankNo)
-									that.$set(that.driverPayeeInfoList[items],'bankDeposit',res.data.data.bankName)
-					
+									that.$set(that.driverPayeeInfoList[items], 'bankCard', res
+										.data.data.bankNo)
+									that.$set(that.driverPayeeInfoList[items], 'bankDeposit',
+										res.data.data.bankName)
+
 									that.bankType = res.data.data.bankNameZhihang
 									console.log(that.ban)
 								}).catch(res => {
@@ -432,19 +472,19 @@
 							}
 						})
 					}
-				})	
+				})
 			},
-			idUp(){
+			idUp() {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',
 							success(res) {
 								var data = res.data
-								var strToObj = JSON.parse(data)			
+								var strToObj = JSON.parse(data)
 								that.id[0] = strToObj.url
 								that.id1 = strToObj.url
 							}
@@ -452,17 +492,17 @@
 					}
 				})
 			},
-			idLow(){
+			idLow() {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',
 							success(res) {
 								var data = res.data
-								var strToObj = JSON.parse(data)			
+								var strToObj = JSON.parse(data)
 								that.id[1] = strToObj.url
 								that.id2 = strToObj.url
 							}
@@ -470,17 +510,17 @@
 					}
 				})
 			},
-			travel(){
+			travel() {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',
 							success(res) {
 								var data = res.data
-								var strToObj = JSON.parse(data)			
+								var strToObj = JSON.parse(data)
 								that.travels = strToObj.url
 								that.addressUrl[0] = strToObj.url
 								console.log(that.addressUrl)
@@ -488,67 +528,67 @@
 						})
 					}
 				})
-				},
-				drive(){
-					var that = this
-					wx.chooseImage({
-						success: function(res) {
-							wx.uploadFile({
-								url: 'https://www.zthymaoyi.com/upload/admin',
-								filePath: res.tempFilePaths[0],
-								name: 'file',
-								success(res) {
-									var data = res.data
-									var strToObj = JSON.parse(data)			
-									that.drives = strToObj.url
-									that.addressUrl[1] = strToObj.url
-										console.log(that.addressUrl)
-								}
-							})
-						}
-					})
-					},
-					operate(){
-						var that = this
-						wx.chooseImage({
-							success: function(res) {
-								wx.uploadFile({
-									url: 'https://www.zthymaoyi.com/upload/admin',
-									filePath: res.tempFilePaths[0],
-									name: 'file',
-									success(res) {
-										var data = res.data
-										var strToObj = JSON.parse(data)			
-										that.operates = strToObj.url
-										that.addressUrl[2] = strToObj.url
-										console.log(that.addressUrl)
-									}
-								})
+			},
+			drive(){
+				var that = this
+				uni.chooseImage({
+					success: function(res) {
+						uni.uploadFile({
+							url: 'https://www.zthymaoyi.com/upload/admin',
+							filePath: res.tempFilePaths[0],
+							name: 'file',
+							success(res) {
+								var data = res.data
+								var strToObj = JSON.parse(data)			
+								that.drives = strToObj.url
+								that.addressUrl[1] = strToObj.url
+									console.log(that.addressUrl)
 							}
 						})
-					},
-					practice(){
-						var that = this
-						wx.chooseImage({
-							success: function(res) {
-								wx.uploadFile({
-									url: 'https://www.zthymaoyi.com/upload/admin',
-									filePath: res.tempFilePaths[0],
-									name: 'file',
-									success(res) {
-										var data = res.data
-										var strToObj = JSON.parse(data)			
-										that.practices = strToObj.url
-										that.addressUrl[3] = strToObj.url
-										console.log(that.addressUrl)
-									}
-								})
+					}
+				})
+			},
+			operate(){
+				var that = this
+				uni.chooseImage({
+					success: function(res) {
+						uni.uploadFile({
+							url: 'https://www.zthymaoyi.com/upload/admin',
+							filePath: res.tempFilePaths[0],
+							name: 'file',
+							success(res) {
+								var data = res.data
+								var strToObj = JSON.parse(data)			
+								that.operates = strToObj.url
+								that.addressUrl[2] = strToObj.url
+								console.log(that.addressUrl)
+							}
+						})
+					}
+				})
+			},
+			practice(){
+				var that = this
+				uni.chooseImage({
+					success: function(res) {
+						uni.uploadFile({
+							url: 'https://www.zthymaoyi.com/upload/admin',
+							filePath: res.tempFilePaths[0],
+							name: 'file',
+							success(res) {
+								var data = res.data
+								var strToObj = JSON.parse(data)			
+								that.practices = strToObj.url
+								that.addressUrl[3] = strToObj.url
+								console.log(that.addressUrl)
 							}
 						})
 					},
+				})
+			},
 			getcode() {
 				var that = this
-					console.log(that.DriverViewInfo.driverPhone)
+				console.log(that.DriverViewInfo.driverPhone)
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.DriverViewInfo.driverPhone)) {
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
 							customerPhone: that.DriverViewInfo.driverPhone
@@ -597,7 +637,7 @@
 				this.carLongIndex = e.detail.value
 				this.carLong = this.carLongType[this.carLongIndex];
 			},
-			
+
 		}
 	}
 </script>
@@ -605,61 +645,68 @@
 <style>
 	.center {
 		padding: 10px 20px;
-		}
-		.labels{
-			font-size: 16px;
-			font-weight: 400;
-		}
-		.c-row {
-		    display: -webkit-box;
-		    display: -webkit-flex;
-		    display: flex;
-		    -webkit-box-align: center;
-		    -webkit-align-items: center;
-		    align-items: center;
-		    padding: 20rpx 30rpx;
-		    position: relative;
-		}
-		.con-list {
-		    -webkit-box-flex: 1;
-		    -webkit-flex: 1;
-		    flex: 1;
-		    display: -webkit-box;
-		    display: -webkit-flex;
-		    display: flex;
-		    -webkit-box-orient: vertical;
-		    -webkit-box-direction: normal;
-		    -webkit-flex-direction: column;
-		    flex-direction: column;
-		    color: #303133;
-		    line-height: 40rpx;
-		    text-align: right;
-		    padding-right: 20rpx;
-			font-size: 14px;
-		}
-		.getcode {
-			font-size: 14px;
-			position: absolute;
-			top: 50%;
-			transform: translateY(-50%);
-			color: #AFB3BF;
-			background: #F5F6F9;
-			height: 30px;
-			line-height: 30px;
-		}
-		.getcode.active {
-			border: none;
-		}
-		.uni-navigator{
-			display:inline-block;
-			color:#22C572;
-		}
-		.getcode.active {
-			background: #22C572;
-			color: #fff;
-		}
+	}
+
+	.labels {
+		font-size: 16px;
+		font-weight: 400;
+	}
+
+	.c-row {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		padding: 20rpx 30rpx;
+		position: relative;
+	}
+
+	.con-list {
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-box-direction: normal;
+		-webkit-flex-direction: column;
+		flex-direction: column;
+		color: #303133;
+		line-height: 40rpx;
+		text-align: right;
+		padding-right: 20rpx;
+		font-size: 14px;
+	}
+
+	.getcode {
+		font-size: 14px;
+		position: absolute;
+		top: 50%;
+		transform: translateY(-50%);
+		color: #AFB3BF;
+		background: #F5F6F9;
+		height: 30px;
+		line-height: 30px;
+	}
+
+	.getcode.active {
+		border: none;
+	}
+
+	.uni-navigator {
+		display: inline-block;
+		color: #22C572;
+	}
+
+	.getcode.active {
+		background: #22C572;
+		color: #fff;
+	}
+
 
-	
 
 	.labels {
 		font-size: 16px;
@@ -694,6 +741,7 @@
 		padding-right: 20rpx;
 		font-size: 14px;
 	}
+
 	.verificationCode {
 		margin-top: 20px;
 		background: #F5F6F9;
@@ -730,29 +778,33 @@
 		background: #22C572;
 		color: #fff;
 	}
+
 	.picture {
 		width: 100%;
 		height: 220px;
 		text-align: center;
 		margin-top: 10px;
 	}
-	.fujians{
+
+	.fujians {
 		margin: 0 auto;
 		background-color: #FFFFFF;
 		margin-top: 30px;
 		border-radius: 20px;
 		padding: 10px 10px;
 	}
+
 	.btn {
 		margin-top: 10px;
 		background-color: #FFFFFF;
 		border-radius: 25px;
 		border: none;
 	}
-	
+
 	.btns {
 		background-color: #22C572;
 	}
+
 	.information {
 		margin-top: 10px;
 		width: 100%;
@@ -760,16 +812,19 @@
 		background-color: #FFFFFF;
 		border-radius: 16px;
 	}
+
 	.informations {
 		margin-top: 10px;
 		background-color: #FFFFFF;
 		border-radius: 20px;
 	}
-	.personalcss{
+
+	.personalcss {
 		background-color: #FFFFFF;
 		border-radius: 20px;
 		margin-top: 10px;
 	}
+
 	.open {
 		width: 30px;
 		height: 20px;
@@ -777,19 +832,21 @@
 		right: 20px;
 		margin-top: -10px;
 	}
-	
-	.add{
+
+	.add {
 		width: 26px;
 		height: 26px;
 		/* background-image: url(../../static/img/jiaoyi/ic_fabu@3x.png); */
 	}
+
 	/* 清除 */
 	.eliminate {
 		width: 20px;
 		height: 20px;
 		float: right;
 	}
-	.bankImg{
+
+	.bankImg {
 		width: 20px;
 		height: 20px;
 	}

+ 10 - 8
pageD/identity/driverIdentityThree.vue

@@ -281,9 +281,9 @@
 					},
 					travel() {
 						var that = this
-						wx.chooseImage({
+						uni.chooseImage({
 							success: function(res) {
-								wx.uploadFile({
+								uni.uploadFile({
 									url: 'https://www.zthymaoyi.com/upload/admin',
 									filePath: res.tempFilePaths[0],
 									name: 'file',
@@ -300,9 +300,9 @@
 					},
 					drive() {
 						var that = this
-						wx.chooseImage({
+						uni.chooseImage({
 							success: function(res) {
-								wx.uploadFile({
+								uni.uploadFile({
 									url: 'https://www.zthymaoyi.com/upload/admin',
 									filePath: res.tempFilePaths[0],
 									name: 'file',
@@ -319,9 +319,9 @@
 					},
 					practice() {
 						var that = this
-						wx.chooseImage({
+						uni.chooseImage({
 							success: function(res) {
-								wx.uploadFile({
+								uni.uploadFile({
 									url: 'https://www.zthymaoyi.com/upload/admin',
 									filePath: res.tempFilePaths[0],
 									name: 'file',
@@ -338,9 +338,9 @@
 					},
 					operate() {
 						var that = this
-						wx.chooseImage({
+						uni.chooseImage({
 							success: function(res) {
-								wx.uploadFile({
+								uni.uploadFile({
 									url: 'https://www.zthymaoyi.com/upload/admin',
 									filePath: res.tempFilePaths[0],
 									name: 'file',
@@ -384,6 +384,8 @@
 
 	.btns {
 		background-color: #22C572;
+		margin-bottom: 30rpx;
+		color: white;
 	}
 
 	.words {

+ 2 - 2
pageD/identity/driverIdentityTwo.vue

@@ -250,9 +250,9 @@
 			},
 			bankimgs(items) {
 				var that = this
-				wx.chooseImage({
+				uni.chooseImage({
 					success: function(res) {
-						wx.uploadFile({
+						uni.uploadFile({
 							url: 'https://www.zthymaoyi.com/upload/admin',
 							filePath: res.tempFilePaths[0],
 							name: 'file',

+ 3 - 3
pages/attestation/index.vue

@@ -24,7 +24,7 @@
 			<image src="../../static/img/authentication/siji@3x.png" class="portrait1"></image>
 		</view>
 		
-		 <view class="homePage2">
+		 <!-- <view class="homePage2">
 			<image src="../../static/img/authentication/bg@2x.png" class="background"></image>
 			<view class="title">
 				粮农身份
@@ -33,7 +33,7 @@
 				<view style="margin-right: 30px;">{{changes}}</view>
 			</view>
 			<image src="../../static/img/authentication/farmer@2x.png" class="portrait1"></image>
-		</view> 
+		</view> -->
 	</view>
 </template>
 
@@ -310,6 +310,7 @@
 
 <style>
 	.center {
+		overflow-x: hidden;
 		padding: 10px 20px;
 	}
 
@@ -347,7 +348,6 @@
 		width: 100%;
 		height: 350rpx;
 		margin-top: 20rpx;
-
 	}
 
 	.arrows {

+ 2 - 2
pages/public/login_account_number.vue

@@ -17,7 +17,7 @@
 			</view>
 			<button :class='phone!=""&&password!=""?"active":""' @click='passlogin' class='verificationCode'>登录</button>
 			<view class='flex' style='color:#6A6A6A;margin-top:10px;'>
-				<view style='flex:1;text-align:center;border-right:1px solid #E8E9ED;'>忘记密码</view>
+				<view style='flex:1;text-align:center;border-right:1px solid #E8E9ED;' @click="forgetpass()">忘记密码</view>
 				<view @click='gocode' style='flex:1;text-align:center;'>验证码登录</view>
 			</view>
 		    <button @click='goregister' class='register'>手机号一键注册</button>
@@ -54,7 +54,7 @@
 					gender:'',
 					phone:''
 				},
-				type:'text',
+				type:'password',
 				inputStatus:'none',
 				verifyCode:null,
 				sendText:'获取验证码',

+ 2 - 2
pages/release/release.vue

@@ -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&&item.status!="待审核"'>显示</view>
-					<view class='anniu' @click="switch1(item)" v-if='item.showFlag == 1&&item.status!="待审核"'>隐藏</view>
+					<!-- <view class='anniu' @click="switch1(item)" v-if='item.showFlag == 0&&item.status!="待审核"'>显示</view> -->
+					<!-- <view class='anniu' @click="switch1(item)" v-if='item.showFlag == 1&&item.status!="待审核"'>隐藏</view> -->
 					<view class='anniu' @click="deleteRelease(item)">删除</view>
 				</view>
 			</view>

+ 4 - 4
pages/tran/tran.vue

@@ -15,12 +15,12 @@
 			<swiper-item class="tab-content" data-id="1">
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
 					<block v-if="TabCur==0">
-						<view class="cu-bar search">
+						<!-- <view class="cu-bar search">
 							<view class="search-form round" @click="naviageToPage('/pageA/product/search?TabCur=2')">
 								<text class="cuIcon-search"></text>
 								<input type="text" placeholder="搜索" confirm-type="search"></input>
 							</view>
-						</view>
+						</view> -->
 						<view class="guess-section">
 							<view 
 								v-for="(item , index) in tranInfo" :key="index"
@@ -57,12 +57,12 @@
 			<swiper-item class="tab-content" data-id="0">
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
 					<block v-if="TabCur==1">
-						<view class="cu-bar search">
+						<!-- <view class="cu-bar search">
 							<view class="search-form round" @click="naviageToPage('/pageA/product/search?TabCur=3')">
 								<text class="cuIcon-search"></text>
 								<input type="text" placeholder="搜索" confirm-type="search"></input>
 							</view>
-						</view>
+						</view> -->
 						<view class="guess-section">
 							<view 
 								v-for="(item, index) in carInfo" :key="index"

+ 7 - 2
pages/user/user.vue

@@ -19,7 +19,7 @@
 			<image v-bind:src="headUrl" class="headPortrait"></image>
 			<view class="personal">
 				<view @click="toLogin" class="information">{{hasLogin? username : '立即登录' }}</view>
-				<view class="information">{{userphone}}</view>
+				<view class="information">{{starUserphone}}</view>
 			</view>
 
 		</view>
@@ -257,7 +257,12 @@
 		},
 		// #endif
 		computed: {
-			...mapState(['hasLogin', 'userInfo'])
+			...mapState(['hasLogin', 'userInfo']),
+			// 手机号中间4位加*
+			starUserphone(){
+				let reg = /^(\d{3})\d{4}(\d{4})$/;
+				return this.userphone.replace(reg, "$1****$2");
+			}
 		},
 		onShow() {
 			uni.showTabBar()

+ 13 - 10
websocket_sdk.js

@@ -138,15 +138,19 @@ export default class Websocket {
                         console.log('网络已断开');
                         _this._netWork = false;
                         // 网络断开后显示model
-                        uni.showModal({
-                            title: '网络错误',
-                            content: '请重新打开网络',
-                            success: function(res) {
-                                if (res.confirm) {
-                                    console.log('用户点击确定')
-                                }
-                            }
-                        })
+                        // uni.showModal({
+                        //     title: '网络错误',
+                        //     content: '请重新打开网络',
+                        //     success: function(res) {
+                        //         if (res.confirm) {
+                        //             console.log('用户点击确定')
+                        //         }
+                        //     }
+                        // })
+						uni.showToast({
+							title: "网络错误 请重新打开网络",
+							icon: 'none'
+						})
                     }
                 }
             })
@@ -287,7 +291,6 @@ export default class Websocket {
 			    },
 			    method: 'GET',
 			    success: (res) => {			
-					console.log("websocket myTips",res)
 					if (res.data.data) {
 			    		let name = 'myTip';
 			    		let value = res.data.data.myTip;