hsb 6 months ago
parent
commit
28d342c436

+ 8 - 0
api/order.js

@@ -332,6 +332,14 @@ export function getSalePointByCompany(e) {
 	})
 }
 
+//分配车号
+export function setVehicleToOrder(data) {
+	return request({
+		url: '/admin/block/getBlockByCompany',
+		method: 'get',
+    data:data
+	})
+}
 
 
 

+ 5 - 0
lang/zh-Hans.js

@@ -271,6 +271,8 @@ export default {
 		myIsDriver: "我是司机",
 		aKeyOrder: "货源保障 一键下单",
 		odersTheNearest: "就近接单 方便快捷",
+		myIsTrans: "我是运输商",
+		onTimeArrive: "准时送达 安全无忧",
 		dealer: "客商",
 		driver: "司机",
 		server: "切换服务器",
@@ -331,6 +333,9 @@ export default {
 			orderDeliver: "订单发货",
 			orderDeliverList: "发货列表",
 		},
+		transMenu:{
+			transOrder: "运输单",
+		},
 		initiated: "我发起的",
 		toDo: '待办事项',
 		done: "已办事项",

+ 2 - 2
manifest.json

@@ -143,10 +143,10 @@
             "proxy" : {
                 "/" : {
                     // "target" : "https://saas.createtobest.com",
-                    // "target" : "http://5.63.101.254:3789",
+                    "target" : "http://192.168.124.23:3789",
                     // "target" : "http://localhost:9999",
                     // "target" : "http://localhost:9999",
-                    "target" : "http://localhost:3789",
+                    // "target" : "http://localhost:3789",
                     "changeOrigin" : true,
                     "secure" : false,
                     "pathRewrite" : {

+ 28 - 6
pages.json

@@ -1,5 +1,12 @@
 {
 	"pages": [{
+			"path": "pages/home/home",
+			"style": {
+				"navigationBarTitleText": "%home%",
+				"navigationStyle": "custom"
+			}
+		},
+		{
 			"path": "pages/login/login",
 			"style": {
 				"navigationBarTitleText": "%login%",
@@ -8,12 +15,6 @@
 					"popGesture": "none"
 				}
 			}
-		},{
-			"path": "pages/home/home",
-			"style": {
-				"navigationBarTitleText": "%home%",
-				"navigationStyle": "custom"
-			}
 		},
 		{
 			"path": "pages/report/report",
@@ -156,6 +157,13 @@
 					}
 				},
 				{
+					"path": "order/transOrderAdd",
+					"style": {
+						"navigationBarTitleText": "",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
 					"path": "order/multipleVehicle",
 					"style": {
 						"navigationBarTitleText": "",
@@ -178,6 +186,14 @@
 					}
 				},
 				{
+					"path": "order/transOrderList",
+					"style": {
+						"navigationBarTitleText": "%dealerOrderList%",
+						"navigationBarBackgroundColor": "#4680F9",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
 					"path": "order/driverList",
 					"style": {
 						"navigationBarTitleText": "%driverOrderList%",
@@ -228,6 +244,12 @@
 					}
 				},
 				{
+					"path": "order/transVehicle",
+					"style": {
+						"navigationBarTitleText": "%selectVehicle%"
+					}
+				},
+				{
 					"path": "order/fixedOrderInfo",
 					"style": {
 						"navigationBarTitleText": "%tandingOrderList%",

+ 81 - 80
pages/home/home.vue

@@ -15,7 +15,7 @@
 					{{currentTanent}}
 					<u-icon name="arrow-down"></u-icon>
 				</span> -->
-				<view class="custom" v-if="isDealerUser || isEnterpriseUser" @click="changeTanent">
+				<view class="custom" v-if="isDealerUser || isEnterpriseUser || isTransUser" @click="changeTanent">
 					<span v-if="currentTanent">
 						{{currentTanent}}
 					</span>
@@ -49,79 +49,29 @@
 			<!-- <u-notice-bar v-if="isDriverUser && !currentVehicleInfo" bgColor="red" color="white"
 				:text="$t('driver.selectRunCar')"></u-notice-bar> -->
 			<view class="oper-btn">
-				<template v-if="isDealerUser">
-					<view class="menu-line" v-show="dealerMenuList.headMenuList.length">
-						<view class="menu-item" v-for="(item,index) in dealerMenuList.headMenuList" :key="index"
-							@click="todo(item)">
-							<image :src="item.icon" style="height:88rpx;width:88rpx" mode="scaleToFill" />
-							<text class="text">{{item.title}}</text>
-						</view>
+				<view class="menu-line" v-show="currentMenu.headMenuList.length">
+					<view class="menu-item" v-for="(item,index) in currentMenu.headMenuList" :key="index"
+						@click="todo(item)">
+						<image :src="item.icon" style="height:88rpx;width:88rpx" mode="scaleToFill" />
+						<text class="text">{{item.title}}</text>
 					</view>
-					<view class="menu-wrap" v-show="dealerMenuList.menuList.length">
-						<view class="menu-module-title">
-							<image src="../../static/czzn-img/home/home-xdgl.png" mode="scaleToFill"
-								style="width:36rpx;height:36rpx;margin-right:20rpx" />
-							{{$t('home.dealerMenu.orderManage')}}
-						</view>
-						<view class="menu-list">
-							<template v-for="(item,index) in dealerMenuList.menuList">
-								<view class="item" :key="index"
-									v-if="item.isShow==true" @click="todo(item)">
-									<image :src="item.icon" style="height:100rpx;width:100rpx" mode="scaleToFill" />
-									<text class="text">{{item.title}}</text>
-								</view>
-							</template>
-						</view>
-					</view>
-				</template>
-				<template v-if="isDriverUser">
-					<view class="menu-line" v-show="driverMenuList.headMenuList.length">
-						<view class="menu-item" v-for="(item,index) in driverMenuList.headMenuList" :key="index"
-							@click="todo(item)">
-							<image :src="item.icon" style="height:88rpx;width:88rpx" mode="scaleToFill" />
-							<text class="text">{{item.title}}</text>
-						</view>
-					</view>
-					<view class="menu-wrap" v-show="driverMenuList.menuList.length">
-						<view class="menu-module-title">
-							<image src="../../static/czzn-img/home/home-xdgl.png" mode="scaleToFill"
-								style="width:36rpx;height:36rpx;margin-right:20rpx" />
-							{{$t('home.dealerMenu.orderManage')}}
-						</view>
-						<view class="menu-list">
-							<view class="item" v-for="(item,index) in driverMenuList.menuList" :key="index"
-								@click="todo(item)">
-								<image :src="item.icon" style="height:100rpx;width:100rpx" mode="scaleToFill" />
-								<text class="text">{{item.title}}</text>
-							</view>
-						</view>
-					</view>
-				</template>
-				<!-- <template v-if="isEnterpriseUser">
-					<view class="menu-line" v-show="operatorMenuList.headMenuList.length">
-						<view class="menu-item" v-for="(item,index) in operatorMenuList.headMenuList" :key="index"
-							@click="todo(item)">
-							<image :src="item.icon" style="height:88rpx;width:88rpx" mode="scaleToFill" />
-							<text class="text">{{item.title}}</text>
-						</view>
+				</view>
+				<view class="menu-wrap" v-show="currentMenu.menuList.length">
+					<view class="menu-module-title">
+						<image src="../../static/czzn-img/home/home-xdgl.png" mode="scaleToFill"
+							style="width:36rpx;height:36rpx;margin-right:20rpx" />
+						{{$t('home.dealerMenu.orderManage')}}
 					</view>
-					<view class="menu-wrap"
-						v-show="operatorMenuList.menuList.filter((item)=>{return item.isShow==true}).length">
-						<view class="menu-module-title">
-							<image src="../../static/czzn-img/home/home-xdgl.png" mode="scaleToFill"
-								style="width:36rpx;height:36rpx;margin-right:20rpx" />
-							{{$t('home.dealerMenu.orderManage')}}
-						</view>
-						<view class="menu-list">
-							<view class="item"
-								v-for="(item,index) in operatorMenuList.menuList.filter((item)=>{return item.isShow==true})"
-								:key="index" @click="todo(item)">
+					<view class="menu-list">
+						<template v-for="(item,index) in currentMenu.menuList">
+							<view class="item" :key="index"
+								v-if="item.isShow==true" @click="todo(item)">
 								<image :src="item.icon" style="height:100rpx;width:100rpx" mode="scaleToFill" />
 								<text class="text">{{item.title}}</text>
 							</view>
-						</view>
+						</template>
 					</view>
-				</template> -->
+				</view>
 			</view>
 			<!-- <view v-if="isDriverUser" class="vehicle-main" @click="toSelectVehicle">
 				<view class="vehicle-item">
@@ -146,8 +96,6 @@
 				</view>
 			</view> -->
 			<Bars></Bars>
-		
-			
 			<u-toast ref="loadingToast"></u-toast>
 		</view>
 </template>
@@ -193,7 +141,10 @@
 				code: "",
 				currentTanent: '',
 				permissionList: [],
-		
+				currentMenu:{
+					headMenuList:[],
+					menuList:[],
+				},
 				//客商服务菜单
 				dealerMenuList: {
 					headMenuList: [{
@@ -267,6 +218,13 @@
 							key: "app_home_big_order",
 							isShow: false,
 						},
+						{
+							title: this.$t("home.transMenu.transOrder"),
+							to: '/subpages/order/transOrderAdd',
+							icon: img.hzAdd,
+							key: "app_home_big_order",
+							isShow: true,
+						},
 					]
 				},
 				//司机服务菜单
@@ -311,6 +269,34 @@
 					// }
 					]
 				},
+				//运输商服务菜单
+				transMenuList: {
+					headMenuList: [{
+							title: this.$t("home.dealerMenu.tenant"),
+							to: '/subpages/tenant/list',
+							icon: img.tenantList,
+							key: null,
+							isShow: false,
+						},
+						{
+							title: this.$t("home.dealerMenu.driver"),
+							to: '/subpages/driver/dealerList',
+							icon: img.driverList,
+							key: null,
+							isShow: false,
+						},
+						{
+							title: this.$t("home.allOrder"),
+							to: '/subpages/order/transOrderList?index=0',
+							icon: img.orderList,
+							key: null,
+							isShow: false,
+						}
+					],
+					menuList: [
+						
+					]
+				},
 				//企业验收服务菜单
 				operatorMenuList: {
 					headMenuList: [{
@@ -369,6 +355,7 @@
 				isDealerUser: false,
 				isDriverUser: false,
 				isEnterpriseUser: false,
+				isTransUser:false,
 				currentVehicleInfo: {}, //司机端当前运营车号
 				location: {
 					address: '',
@@ -426,6 +413,7 @@
 			}
 		},
 		onLoad(options) {
+			uni.hideTabBar()
 			this.options = options
 			this.noNeedUpdate()
 		},
@@ -435,7 +423,7 @@
 				// uni.hideTabBar()
 				// console.log(this.location);
 				// console.log("获取到参数信息、", this.options);
-				// this.countNavber()
+				this.countNavber()
 				// if (this.options.q) {
 				// 	const url = decodeURIComponent(this.options.q)
 				// 	this.code = getUrlValueByParamName(url, 'code')
@@ -449,13 +437,30 @@
 
 				this.isAuditUser = uni.getStorageSync('isAuditUser')
 				this.isEnterpriseUser = uni.getStorageSync('isEnterpriseUser')
-
+				this.isTransUser = uni.getStorageSync('isTransUser')
+				if(this.isDealerUser){
+					this.currentMenu.headMenuList = this.dealerMenuList.headMenuList
+					this.currentMenu.menuList = this.dealerMenuList.menuList
+				}
+				if(this.isTransUser){
+					this.currentMenu.headMenuList = this.transMenuList.headMenuList
+					this.currentMenu.menuList = this.transMenuList.menuList
+				}
+				if(this.isDriverUser){
+					this.currentMenu.headMenuList = this.driverMenuList.headMenuList
+					this.currentMenu.menuList = this.driverMenuList.menuList
+				}
+				if(this.isEnterpriseUser){
+					this.currentMenu.headMenuList = this.operatorMenuList.headMenuList
+					this.currentMenu.menuList = this.operatorMenuList.menuList
+				}
 				this.currentVehicleInfo = uni.getStorageSync("currentVehicleInfo");
+				
 				var userRoleCodeList = uni.getStorageSync('userRoleCode');
 
-				if (this.isDealerUser == true || this.isEnterpriseUser == true) {
+				if (this.isDealerUser || this.isEnterpriseUser || this.isTransUser) {
 					this.dealerInit()
-				} else if (this.isDriverUser == true) {
+				} else if (this.isDriverUser) {
 					this.driverInit()
 				}
 				if (!this.hasLogin) {
@@ -657,15 +662,11 @@
 					// #ifdef MP-WEIXIN
 					this.rect = wx.getMenuButtonBoundingClientRect();
 					// #endif
-					console.log(this.rect, this.statusBarHeight);
+					console.log('11111111111111111',this.rect, this.statusBarHeight);
 				} catch (e) {
 					console.log("计算设备状态栏出错、", e);
 				}
 			},
-
-
-
-
 			...mapMutations({
 				setUserInfo: 'user/login'
 			}),

+ 5 - 3
pages/info/info.vue

@@ -18,6 +18,7 @@
 						<span class="role-tag" v-if="isDriverUser">{{$t('mine.driver')}}</span>
 						<span class="role-tag" v-if="isDealerUser">{{$t('mine.dealer')}}</span>
 						<span class="role-tag" v-if="isAuditUser">{{$t('mine.auditUser')}}</span>
+						<span class="role-tag" v-if="isTransUser">{{$t('order.transporter')}}</span>
 					</view>
 					<text class="user-name" v-else>{{$t('mine.notLogged')}}</text>
 					<text class="user-phone">{{userInfo.phone}}</text>
@@ -62,7 +63,7 @@
 				</template>
 			</view>
 		</template>
-		<template v-else>
+		<!-- <template v-else>
 			<view class="message-wrap" style="padding:32rpx">
 				<view class="message-title" @click="toPage('/subpages/approval/messageList')">
 					<span class="label">消息通知</span>
@@ -72,7 +73,6 @@
 					</span>
 				</view>
 
-				<!-- 单消息 -->
 				<view class="message-item">
 					<view class="title">
 						<span style="color:#222">价格申请</span>
@@ -87,7 +87,7 @@
 					</view>
 				</view>
 			</view>
-		</template>
+		</template> -->
 		<Bars></Bars>
 	</view>
 </template>
@@ -220,6 +220,7 @@
 				isDriverUser: false,
 				isAcceptUser: false,
 				isDeliverUser: false,
+				isTransUser: false,
 			};
 		},
 		onLoad() {
@@ -228,6 +229,7 @@
 			this.isDriverUser = uni.getStorageSync('isDriverUser')
 			this.isAcceptUser = uni.getStorageSync('isAcceptUser')
 			this.isDeliverUser = uni.getStorageSync('isDeliverUser')
+			this.isTransUser = uni.getStorageSync('isTransUser')
 			// const routers = getCurrentPages();
 			// console.log(routers);
 			if(this.isDealerUser){

+ 35 - 14
pages/login/chooserole.vue

@@ -21,6 +21,13 @@
       </view>
       <uni-icons color="rgb(42, 90, 122)" type="forward" size="22"></uni-icons>
     </view>
+    <view class="role-card yss"  @click="toRegister('7')">
+      <view class="role-info">
+        <p class="title">{{$t("login.myIsTrans")}}</p>
+        <p class="text">{{$t("login.onTimeArrive")}}</p>
+      </view>
+      <uni-icons color="rgb(42, 90, 122)" type="forward" size="22"></uni-icons>
+    </view>
 	<!-- <view class="role-card qy"  @click="toRegister('5')">
 	  <view class="role-info">
 	    <p class="title">{{$t("login.myIsEnterprise")}}</p>
@@ -102,19 +109,33 @@ export default {
           color: rgb(105, 145, 160);
         }
     }
-	.qy{
-		background: linear-gradient(to left ,  #11c198, #a1f5e3);
-		margin-top: 32rpx;
-		.title{
-		    font-size: 32rpx;
-		    line-height: 60rpx;
-		    color: rgb(42, 90, 122);
-		  }
-		  .text{
-		    font-size: 28rpx;
-		    line-height: 60rpx;
-		    color: rgb(105, 145, 160);
-		  }
-	}
+    .yss{
+      background: linear-gradient(to left ,  #11c198, #a1f5e3);
+      margin-top: 32rpx;
+      .title{
+          font-size: 32rpx;
+          line-height: 60rpx;
+          color: rgb(42, 90, 122);
+        }
+        .text{
+          font-size: 28rpx;
+          line-height: 60rpx;
+          color: rgb(105, 145, 160);
+        }
+    }
+    .qy{
+      background: linear-gradient(to left ,  #11c198, #a1f5e3);
+      margin-top: 32rpx;
+      .title{
+          font-size: 32rpx;
+          line-height: 60rpx;
+          color: rgb(42, 90, 122);
+        }
+        .text{
+          font-size: 28rpx;
+          line-height: 60rpx;
+          color: rgb(105, 145, 160);
+        }
+    }
   }
 </style>

+ 19 - 18
pages/login/login.vue

@@ -429,30 +429,31 @@
 						uni.setStorageSync('isEnterpriseUser', userType == "5" ? true : false)
 						uni.setStorageSync('isDealerUser', userType == "3" ? true : false)
 						uni.setStorageSync('isDriverUser', userType == "4" ? true : false)
+						uni.setStorageSync('isTransUser', userType == "7" ? true : false)
 						var tenantList = getTenantCacheList();
 						//默认第一个租户
 						uni.setStorageSync("currentTenantId", tenantList[0]);
 						//AUDIT_USER 移动端审核角色
 						//DEALER_USER 客商角色
 						//DRIVER_USER 移动端司机
-						if (res.data.data.roleCodes) {
-							uni.setStorageSync('userRoleCode', res.data.data.roleCodes)
-							if (res.data.data.roleCodes.includes("DEALER_USER")) {
-								uni.setStorageSync('isDealerUser', true)
-								uni.setStorageSync('isAuditUser', false)
-								uni.setStorageSync('isDeliverUser', false)
-							}
-							if (res.data.data.roleCodes.includes("DRIVER_USER")) {
-								uni.setStorageSync('isDriverUser', true)
-								uni.setStorageSync('isAuditUser', false)
-								uni.setStorageSync('isDeliverUser', false)
-							}
-							if (res.data.data.roleCodes.includes("AUDIT_USER")) {
-								uni.setStorageSync('isAuditUser', true)
-								uni.setStorageSync('isDealerUser', false)
-								uni.setStorageSync('isDriverUser', false)
-							}
-						}
+						// if (res.data.data.roleCodes) {
+						// 	uni.setStorageSync('userRoleCode', res.data.data.roleCodes)
+						// 	if (res.data.data.roleCodes.includes("DEALER_USER")) {
+						// 		uni.setStorageSync('isDealerUser', true)
+						// 		uni.setStorageSync('isAuditUser', false)
+						// 		uni.setStorageSync('isDeliverUser', false)
+						// 	}
+						// 	if (res.data.data.roleCodes.includes("DRIVER_USER")) {
+						// 		uni.setStorageSync('isDriverUser', true)
+						// 		uni.setStorageSync('isAuditUser', false)
+						// 		uni.setStorageSync('isDeliverUser', false)
+						// 	}
+						// 	if (res.data.data.roleCodes.includes("AUDIT_USER")) {
+						// 		uni.setStorageSync('isAuditUser', true)
+						// 		uni.setStorageSync('isDealerUser', false)
+						// 		uni.setStorageSync('isDriverUser', false)
+						// 	}
+						// }
 						this.setUserInfo(res.data.data.sysUser)
 						if (isBindWebChart == true) {
 							// this.bindWechat() //自动绑定微信

+ 3 - 1
pages/login/register.vue

@@ -240,7 +240,9 @@
 				// 	})
 				// 	return;
 				// }
-				register(this.registerForm).then(res => {
+				let datasss = JSON.parse(JSON.stringify(this.registerForm))
+				datasss.tenantId = this.registerForm.code
+				register(datasss).then(res => {
 					if (res.statusCode == 200 && res.data.code==0) {
 						let data = {
 						username: this.registerForm.phone,

+ 4 - 0
subpages/order/orderInfo.vue

@@ -93,6 +93,10 @@
 									'4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT')) }}</text>
 							</view>
 							<p class="cell">
+								<text class="label">{{ $t('order.transporter') }}</text>
+								<text class="info">{{ orderInfo.transporterName || '' }}</text>
+							</p>
+							<p class="cell">
 								<text class="label">{{ $t('order.driver') }}</text>
 								<text class="info">{{ orderInfo.driver || '' }}</text>
 							</p>

+ 932 - 0
subpages/order/transOrderAdd.vue

@@ -0,0 +1,932 @@
+<template>
+	<view class="order">
+		<view class="example">
+			<u-form labelPosition="left" :model="orderForm" :rules="rules" ref="form1" labelWidth='120'>
+				<!-- 下单日期 -->
+				<u-form-item :label="$t('order.orderDate')" borderBottom prop="setDate">
+					<!-- <u-input readonly v-model="orderForm.setDate" border="none"
+						:placeholder="$t('base.common.placeholderS')+$t('order.orderDate')" /> -->
+					<span>{{ orderForm.setDate }}</span>
+				</u-form-item>
+
+				<!-- 有效日期 -->
+				<u-form-item v-if="orderForm.orderType !== '1'" :label="$t('order.endDate')" borderBottom
+					prop="orderValidDate" @click="showEndDateCalendar = true">
+					<!-- <u-input readonly v-model="orderForm.orderValidDate" border="none"
+						:placeholder="$t('base.common.placeholderS')+$t('order.endDate')" /> -->
+					<span>{{ orderForm.orderValidDate }}</span>
+				</u-form-item>
+
+
+				<!-- 选择企业 -->
+				<u-form-item :label="$t('order.enterprise')" borderBottom prop="tenantId"
+					@click="showPopup('popupTenantId')">
+					<!-- <u-input readonly v-model="orderForm.tenantName" border="none"
+						:placeholder="$t('base.common.placeholderS')+$t('order.enterprise')" /> -->
+					<span>{{ orderForm.tenantName }}</span>
+				</u-form-item>
+
+
+				<!-- 临时/固定 -->
+				<u-form-item :label="$t('order.orderType')" borderBottom prop="orderType"
+					@click="showPopup('popupOrderType')">
+					<!-- <u-input readonly v-model="orderForm.orderTypeName" border="none"
+						:placeholder="$t('base.common.placeholderS')+$t('order.orderType')" /> -->
+					<span>{{ orderForm.orderTypeName }}</span>
+				</u-form-item>
+
+
+				<!-- 业务类型 -->
+				<!-- 				<u-form-item :label="$t('order.vehicleType')" borderBottom prop="vehicleType"
+					@click="showPopup('popupVehicleType')">
+					<u-input readonly v-model="orderForm.vehicleTypeName" border="none"
+						:placeholder="$t('base.common.placeholderS')+$t('order.vehicleType')" />
+				</u-form-item> -->
+
+
+				<u-form-item :label="$t('order.vehicleType')" borderBottom prop="vehicleType">
+					<!-- <u-radio-group v-model="orderForm.vehicleType" @change="onVehicleTypeConfirm" placement="row"
+						class="p-input">
+						<u-radio :customStyle="{marginRight: '10px'}" v-for="item in vehicleTypeOption"
+							:key="item.value" :label="item.text" :name="item.value">
+						</u-radio>
+					</u-radio-group> -->
+					<view class="uni-list">
+						<radio-group v-model="orderForm.vehicleType" @change="onVehicleTypeConfirm" placement="row">
+							<label class="uni-list-cell uni-list-cell-pd" v-for="item in vehicleTypeOption"
+								:key="item.value">
+								<view>
+									<radio style="transform:scale(0.8)" :value="item.value"
+										:checked="item.value === orderForm.vehicleType" />{{ item.text }}
+								</view>
+							</label>
+						</radio-group>
+					</view>
+				</u-form-item>
+
+				<template>
+					<u-form-item :label="$t('order.companyName')" borderBottom prop="companyId"
+						@click="showPopup('popupCompanyId')">
+						<span>{{ orderForm.companyName }}</span>
+						<view v-if="paymentOption && paymentOption.isShow == '1'" style="color: darkgreen;font-size: 9pt;">
+							{{ paymentOption.usableTotal }}
+						</view>
+						<!-- <u-input readonly v-model="orderForm.companyName" border="none"
+							:placeholder="$t('base.common.placeholderS')+$t('order.companyName')">
+							<template slot="suffix">
+								<view v-if="paymentOption && paymentOption=='1'"
+									style="color: darkgreen;font-size: 9pt;">
+									{{paymentOption.usableTotal}}
+								</view>
+							</template>
+
+						</u-input> -->
+					</u-form-item>
+					<!-- <view v-if="paymentOption && paymentOption.isShow=='1'"
+						style="display: flex;flex-direction: row;justify-content:flex-end;">
+						<view style="color: red;font-size: 9pt;">{{$t('order.allTotal')}}:{{paymentOption.total}}
+							{{$t('order.waitTotal')}}:{{paymentOption.waitTotal}}
+						</view>
+						
+					
+					</view> -->
+					<view v-if="paymentOption && paymentOption.isShow == '1'" style="display: flex;flex-direction:justify-content:flex-end;flex-direction: column;
+    text-align: end;">
+						<view style="color: red;font-size: 9pt;">
+							{{ $t('order.allTotal') }}:{{ paymentOption.total }}
+						</view>
+						<view style="color: red;font-size: 9pt;">
+							{{ $t('order.waitTotal') }}:{{ paymentOption.waitTotal }}
+						</view>
+						<view style="color: red;font-size: 9pt;">
+							{{ $t('order.source') }}:{{ paymentOption.companyName }}
+						</view>
+					</view>
+					<!-- <u-form-item :label="$t('order.materialName')" borderBottom prop="materialId"
+						@click="showPopup('popupmaterialId')"> -->
+					<u-form-item :label="$t('order.materialName')" borderBottom prop="materialId" @click="selectMater">
+						<u-input v-model="orderForm.materialName" border="none"
+							:placeholder="$t('base.common.placeholderS') + ' ' + $t('order.materialName')" />
+					</u-form-item>
+				</template>
+
+				<u-form-item v-if="paymentOption && paymentOption.isFlag == '1'" :label="$t('order.orderRelease')"
+					borderBottom prop="releaseUponPayment">
+					<view class="uni-list">
+						<radio-group v-model="orderForm.releaseUponPayment" @change="onReleaseUponPaymentConfirm"
+							placement="row">
+							<label class="uni-list-cell uni-list-cell-pd" v-for="item in releaseUponPaymentOption"
+								:key="item.value">
+								<radio style="transform:scale(0.8)" :value="item.value"
+									:checked="item.value === orderForm.releaseUponPayment" />{{ item.text }}
+							</label>
+						</radio-group>
+					</view>
+				</u-form-item>
+				<u-form-item v-if="paymentOption && paymentOption.isFlag == '1'" :label="$t('order.isIntima')" borderBottom
+					prop="isIntima">
+					<view class="uni-list">
+						<radio-group v-model="orderForm.isIntima" @change="onisIntimaConfirm" placement="row">
+							<label class="uni-list-cell uni-list-cell-pd" v-for="item in isIntimaOption" :key="item.value">
+								<radio style="transform:scale(0.8)" :value="item.value"
+									:checked="item.value === orderForm.isIntima" />{{ item.text }}
+							</label>
+						</radio-group>
+					</view>
+				</u-form-item>
+				<u-form-item :label="$t('order.phone')" borderBottom prop="phone">
+					<u--input v-model="orderForm.phone" border="none" type="number"
+						:placeholder="$t('base.common.placeholderI') + $t('order.phone')">
+					</u--input>
+				</u-form-item>
+				<!-- <u-form-item :label="$t('order.axle')" borderBottom prop="axle">
+					<u--input v-model="orderForm.axle" border="none"
+						:placeholder="$t('base.common.placeholderI')+$t('order.axle')">
+					</u--input>
+				</u-form-item> -->
+				<u-form-item v-if="orderForm.orderType == '1'" :label="$t('order.transportType')" borderBottom
+					prop="transporterType" @click="showPopup('popupTransporterTypeId')">
+					<span>{{ orderForm.transporterTypeName }}</span>
+					<!-- <u-input readonly v-model="orderForm.transporterTypeName" border="none"
+						:placeholder="$t('base.common.placeholderS')+$t('order.transportType')" /> -->
+				</u-form-item>
+				<u-form-item v-if="orderForm.orderType == '1'" :label="$t('order.transporter')" borderBottom
+					prop="transporterId" @click="showPopup('popupTransporterId')">
+					<!-- <u-input readonly v-model="orderForm.transporterName" border="none"
+						:placeholder="$t('base.common.placeholderS')+$t('order.transporter')" /> -->
+					<span>{{ orderForm.transporterName }}</span>
+				</u-form-item>
+				<u-form-item :label="$t('order.remarks')" borderBottom prop="remarks">
+					<u-input v-model="orderForm.remark" border="none"
+						:placeholder="$t('base.common.placeholderI') + $t('order.remarks')" />
+				</u-form-item>
+			</u-form>
+			<view style="margin: 16px 0;">
+				<button class="bind-btn" @click="submit('form1')">{{ $t('base.common.submit') }}
+				</button>
+			</view>
+		</view>
+		<u-toast ref="loadingToast"></u-toast>
+		<CarKeyboard :show.sync="carKeyboardShow" :vehicleNo="orderForm.vehicle" @confirm="onKeyBoardConfirm"
+			vehicleType="car"></CarKeyboard>
+		<!-- 下单日期 -->
+		<u-calendar color="#4680F9" round='25' :show="showSetDateCalendar" @confirm="onSetDateConfirm"
+			@close="showSetDateCalendar = false"></u-calendar>
+		<!-- 有效日期 -->
+
+		<u-datetime-picker :show="showEndDateCalendar" v-model="defaultEndDate" :defaultDate="defaultEndDate"
+			mode="datetime" @confirm="onEndDateConfirm" @close="showEndDateCalendar = false" />
+		<!-- <u-calendar color="#4680F9" :defaultDate="defaultEndDate" :show="showEndDateCalendar"
+			@confirm="onEndDateConfirm" @close="showEndDateCalendar=false" /> -->
+		<!-- 临时或固定 -->
+		<PopupSelect ref="popupOrderType" :option="orderTypeOption.filter((item) => { return item.isShow == true })"
+			@onConfirm="onOrderTypeConfirm" />
+		<!-- 业务类型 -->
+		<!-- 	<PopupSelect ref="popupVehicleType" :option="vehicleTypeOption" @onConfirm="onVehicleTypeConfirm" /> -->
+		<!-- 客户 -->
+		<PopupSelect ref="popupCompanyId" :hasSearch='false' :option="companyOption" @onConfirm="onCompanyConfirm" />
+		<PopupSelect ref="popupTransporterId" :hasSearch='false' :option="transporterOption"
+			@onConfirm="onTransporterConfirm" />
+
+		<!-- 原料 -->
+		<PopupSelect ref="popupmaterialId" kind="m" :hasSearch='false' :option="materialOption"
+			@onConfirm="onProductConfirm" />
+		<PopupSelect ref="popupTransporterTypeId" kind="m" :hasSearch='false' :option="transporterTypeOption"
+			@onConfirm="onTransporterTypeConfirm" />
+
+		<!-- 企业选项 -->
+		<PopupSelect ref="popupTenantId" :hasSearch='false' :option="tenantOption" @onConfirm="onTenantConfirm" />
+		<!-- 销售点 -->
+		<!-- <PopupSelect ref="salePoint" :hasSearch='false' :option="salePointOption" @onConfirm="onSalePointConfirm" /> -->
+	</view>
+</template>
+
+<script>
+import PopupSelect from '../../components/popup-select/index'
+import dayjs from 'dayjs'
+import CarKeyboard from '../../components/carKeyboard/carKeyboard'
+import {
+	getTenantCacheList,
+	getOrderType,
+} from '../../utils/util.js'
+
+import {
+	saveOrder,
+	getOption,
+	getMaterialsByCompany,
+	getSalesMaterByCompany,
+	getSalePointByCompany
+} from '../../api/order'
+export default {
+	components: {
+		CarKeyboard,
+		PopupSelect
+	},
+	data() {
+		return {
+			carKeyboardShow: false,
+			start: dayjs().format('YYYY-MM-DD'),
+			orderForm: {
+				kind: "",
+				setDate: dayjs().format('YYYY-MM-DD'), //订单日期
+				orderValidDate: dayjs().add(30, 'day').format('YYYY-MM-DD HH:mm:ss'), //有效日期
+				tenantId: '', //企业
+				orderType: '1', //订单类型
+				companyId: '', //客商
+				materialId: "", //物料
+				orderNumber: "0", //数量
+				vehicle: '', //车号
+				driverId: '', //司机id\
+				vehicleType: '1',
+				xfFlag: '',
+				phone: '',
+				axle: '',
+				idcard: "",
+				driver: '',
+				orderPiece: '', //件数
+				tenantName: '',
+				vehicleTypeName: '', //业务类型
+				companyName: "", //客商
+				materialName: "", //物料id
+				orderTypeName: '临时订单',
+				sourceId: "", //第三方大订单ID
+				remark: "",
+				measureUnit: '', //单位
+				transporterType: "",
+				transporterTypeName: "",
+				transporterId: "", //运输单位
+				transporterName: "",
+				appUserType: "3",
+				releaseUponPayment: "0",
+				isIntima: "0",
+				saleBlockId: "",
+				saleBlockName: "",
+			},
+			rules: {
+				orderType: [{
+					required: true,
+					message: this.$t('base.common.placeholderS') + ' ' + this.$t('order.orderType')
+				}],
+				vehicleType: [{
+					required: true,
+					message: this.$t('base.common.placeholderS') + ' ' + this.$t('order.vehicleType')
+				}],
+				tenantId: [{
+					required: true,
+					message: this.$t('base.common.placeholderS') + ' ' + this.$t('order.enterprise')
+				}],
+				companyId: [{
+					required: true,
+					message: this.$t('base.common.placeholderS') + ' ' + this.$t('order.companyName')
+				}],
+				materialId: [{
+					required: true,
+					message: this.$t('base.common.placeholderS') + ' ' + this.$t('order.materialName')
+				}],
+				orderNumber: [{
+					required: true,
+					message: this.$t('base.common.placeholderI') + ' ' + this.$t('order.orderNumber')
+				}]
+			},
+			vehicleTypeOption: [{
+				text: this.$t('base.common.noData'),
+				value: null
+			},],
+			releaseUponPaymentOption: [{
+				text: this.$t('driver.yes'),
+				value: '1'
+			}, {
+				text: this.$t('driver.no'),
+				value: '0'
+			},],
+			isIntimaOption: [{
+				text: this.$t('driver.have'),
+				value: '1'
+			}, {
+				text: this.$t('driver.notHave'),
+				value: '0'
+			},],
+			orderTypeOption: [
+				{
+					text: this.$t("order.tempOrder"),
+					isShow: true,
+					value: '1',
+					index: 1,
+					key: "add_temp_order",
+				},
+			],
+			paymentOption: {},
+			//产品选项
+			materialOption: [{
+				text: this.$t('base.common.noData'),
+				value: null,
+			}], //物料选项
+			//产品选项
+			transporterTypeOption: [{
+				text: this.$t('base.common.noData'),
+				value: null,
+			}], //物料选项
+
+			//客户选项
+			companyOption: [{
+				text: this.$t('base.common.noData'),
+				compvalueanyId: null
+			}], //供应商选项
+			//客户选项
+			transporterOption: [{
+				text: this.$t('base.common.noData'),
+				compvalueanyId: null
+			}], //供应商选项
+			// vehicleOption:[{vehicle:this.$t('base.common.noData'),value:null}], //司机选项
+			tenantOption: [{
+				text: this.$t('base.common.noData'),
+				value: null
+			}], //企业选项
+			salePointOption: [{
+				text: this.$t('base.common.noData'),
+				value: null
+			}], //销售点
+
+			showSetDateCalendar: false,
+			showEndDateCalendar: false,
+			defaultEndDate: dayjs().add(30, 'day').format('YYYY-MM-DD HH:mm:ss'), //默认有效日期
+			//业务对应的客户信息
+			vehicleTypeCompanyList: [],
+			//参数
+			appParameters: {},
+			//客户对应的物料信息
+			companyMaterialList: [],
+			language: 'zh-Hans'
+		}
+	},
+	onLoad(options) {
+		this.bindTenant()
+		console.log("允许操作的订单类型、", this.orderTypeOption);
+		this.language = uni.getStorageSync('CURRENT_LANG')
+		if (this.orderTypeOption && this.orderTypeOption.length > 0) {
+			this.orderForm.orderType = this.orderTypeOption[0].value
+			this.orderForm.orderTypeName = this.orderTypeOption[0].text
+		}
+	},
+	methods: {
+		onOrderNumberFocus() {
+			if (this.orderForm.orderNumber == 0) {
+				this.orderForm.orderNumber = null
+			}
+		},
+		//选择品种
+		selectMater() {
+			uni.navigateTo({
+				url: `/subpages/order/materSelect?option=${JSON.stringify(this.materialOption)}`
+			})
+		},
+		//去选择司机
+		toSelectVehicle() {
+			uni.navigateTo({
+				url: '/subpages/order/vehicle'
+			})
+		},
+		//车号键盘输出
+		onKeyBoardConfirm(id) {
+			this.orderForm.vehicle = id
+		},
+		//显示车牌键盘
+		carKeyboardOut() {
+			this.carKeyboardShow = true
+		},
+		//选择订单类型后加载选项 //获取品种信息 101:销售,102:采购
+		bindOption() {
+			this.clear(true);
+			console.log("订单租户信息、", this.orderForm.tenantId);
+			if (!this.orderForm.tenantId) {
+				console.log("订单业务租户信息");
+				return;
+			}
+			var that = this;
+			console.log("当前租户ID、", that.orderForm.tenantId);
+			if (that.orderForm.tenantId) {
+				let data = JSON.parse(JSON.stringify(that.orderForm))
+				getOption(data).then(res => {
+					console.log("查询基础数据返回、", res);
+					if (res.statusCode === 200) {
+						console.log("用户业务类型、", res.data.data.appVehicleType)
+						console.log("用户客户信息、", res.data.data.appCompany)
+						console.log("用户品种信息、", res.data.data.appMaterial)
+						if (that.language == 'zh-Hans') {
+							that.vehicleTypeOption = res.data.data.appVehicleType;
+						} else {
+							that.vehicleTypeOption = res.data.data.appVehicleType.map(item => {
+								return {
+									text: item.language,
+									value: item.value
+								}
+							});
+						}
+						that.vehicleTypeOption = that.vehicleTypeOption.filter(item => item.value =='102');
+						if (that.vehicleTypeOption && that.vehicleTypeOption.length > 0) {
+							that.orderForm.vehicleType = '102'
+							that.onVehicleTypeConfirm({ detail: { value: that.orderForm.vehicleType } })
+							that.appParameters = res.data.data.appParameters
+							that.vehicleTypeCompanyList = res.data.data.appCompany
+							that.bindCompany();
+
+							that.transporterTypeOption = res.data.data.appTransportTypeList
+							if (that.transporterTypeOption && that.transporterTypeOption.length > 0) {
+								that.orderForm.transporterType = that.transporterTypeOption[0].value
+								that.orderForm.transporterTypeName = that.transporterTypeOption[0].text
+							}
+						}
+					}
+				})
+			}
+		},
+
+		//获取销售区域
+		bindProject() {
+			this.orderForm.saleBlockId = ''
+			this.orderForm.saleBlockName = ''
+			if (this.orderForm.vehicleType != '102') {
+				getSalePointByCompany(this.orderForm.companyId).then(res => {
+					if (res.statusCode === 200) {
+						this.orderForm.saleBlockId = res.data.data.id
+						this.orderForm.saleBlockName = res.data.data.name
+					}
+				})
+			}
+		},
+
+		bindCompany() {
+			var vehicleType = this.orderForm.vehicleType;
+			if (vehicleType && this.vehicleTypeCompanyList) {
+				this.companyOption = [{
+					text: this.$t('order.notSelected'),
+					value: null
+				}] //物料选项
+				var companyInfos = this.vehicleTypeCompanyList.filter(function (company) {
+					return company.vehicleType == vehicleType;
+				});
+
+				if (companyInfos && companyInfos.length > 0) {
+					companyInfos[0].companyList.forEach(item => {
+						this.companyOption.push({
+							text: item.companyName,
+							value: item.companyId
+						})
+					})
+					this.orderForm.companyId = this.companyOption[1].value
+					this.orderForm.companyName = this.companyOption[1].text
+					this.bindMaterial();
+					this.bindProject()
+				}
+				console.log("客户信息、", this.companyOption);
+			}
+		},
+		bindMaterial() {
+			var companyId = this.orderForm.companyId;
+			this.materialOption = []
+			this.orderForm.materialId = ''
+			this.orderForm.materialName = ''
+			this.paymentOption = {}
+			if (companyId) {
+				if (this.orderForm.vehicleType == '101') {
+					getSalesMaterByCompany(this.orderForm).then(res => {
+						if (res.data.code == 0) {
+							this.paymentOption = res.data.hardInfo
+							if (res.data.companyList) {
+								res.data.companyList.forEach(item => {
+									this.transporterOption.push({
+										text: item.name,
+										value: item.id
+									})
+								})
+							}
+							// this.materialOption = [{
+							// 	text: this.$t('order.notSelected'),
+							// 	value: null
+							// }] //物料选项
+							var materialInfos = res.data.data;
+							console.log("1111213213", materialInfos);
+							if (materialInfos && materialInfos.length > 0) {
+								materialInfos.forEach(item => {
+									this.materialOption.push({
+										text: item.name,
+										value: item.id,
+										type: item.materTypeName ? item.materTypeName : '暂无分类',
+										kind: item.kind,
+										measureUnit: item.measureUnit
+									})
+								})
+
+								// if (this.materialOption[1] && this.materialOption.length == 2) {
+								// 	this.orderForm.materialId = this.materialOption[1].value
+								// 	this.orderForm.materialName = this.materialOption[1].text
+								// 	this.orderForm.kind = this.materialOption[1].kind
+								// 	this.orderForm.measureUnit = this.materialOption[1].measureUnit
+
+
+								// }
+							}
+							console.log("品种信息、", this.materialOption);
+						}
+					})
+				} else {
+					getMaterialsByCompany(this.orderForm).then(res => {
+						if (res.data.code == 0) {
+							this.paymentOption = res.data.hardInfo
+							if (res.data.companyList) {
+								res.data.companyList.forEach(item => {
+									this.transporterOption.push({
+										text: item.name,
+										value: item.id
+									})
+								})
+							}
+							// this.materialOption = [{
+							// 	text: this.$t('order.notSelected'),
+							// 	value: null
+							// }] //物料选项
+							var materialInfos = res.data.data;
+							console.log("1111213213", materialInfos);
+							if (materialInfos && materialInfos.length > 0) {
+								materialInfos.forEach(item => {
+									this.materialOption.push({
+										text: item.name,
+										value: item.id,
+										type: item.materTypeName ? item.materTypeName : '暂无分类',
+										kind: item.kind,
+										measureUnit: item.measureUnit
+									})
+								})
+
+								// if (this.materialOption[1] && this.materialOption.length == 2) {
+								// 	this.orderForm.materialId = this.materialOption[1].value
+								// 	this.orderForm.materialName = this.materialOption[1].text
+								// 	this.orderForm.kind = this.materialOption[1].kind
+								// 	this.orderForm.measureUnit = this.materialOption[1].measureUnit
+
+
+								// }
+							}
+							console.log("品种信息、", this.materialOption);
+						}
+					})
+				}
+			}
+		},
+		//
+		bindTenant() {
+			this.tenantOption = getTenantCacheList();
+			if (this.tenantOption.length > 0) {
+				this.orderForm.tenantId = this.tenantOption[0].value
+				this.orderForm.tenantName = this.tenantOption[0].text
+			}
+			this.bindOption();
+		},
+		//提交订单
+		submit(ref) {
+			let _this = this
+			console.log("提交的订单信息、", this.orderForm);
+			var isCheckVehicle = true
+
+			if (this.orderForm.vehicleType == "101" &&
+				this.appParameters &&
+				this.orderForm.transporterType &&
+				this.appParameters.VEHICLE_ALLOW_EMPTY_TRANSPORTER_TYPE &&
+				this.appParameters.VEHICLE_ALLOW_EMPTY_TRANSPORTER_TYPE.indexOf(this.orderForm.transporterType) > -1) {
+				isCheckVehicle = false
+			}
+
+			this.$refs[ref].validate().then(() => {
+				let data = JSON.parse(JSON.stringify(_this.orderForm))
+				console.log("保存订单信息、", data);
+				this.$refs.loadingToast.show({
+					type: "loading",
+					message: this.$t('base.common.loading'),
+					duration: "1000000"
+				})
+				saveOrder(data).then(res => {
+					this.$refs.loadingToast.hide()
+					if (res.statusCode === 200) {
+						uni.showModal({
+							// title: '提示',
+							content: this.$t("order.isContinueAddOrder"),
+							showCancel: true,
+							cancelText: this.$t("base.button.goBack"),
+							confirmText: this.$t("base.button.continue"),
+							success: function (res) {
+								if (res.confirm) {
+									_this.orderForm = {
+										kind: "",
+										setDate: dayjs().format('YYYY-MM-DD'), //订单日期
+										orderValidDate: dayjs().add(30, 'day').format('YYYY-MM-DD HH:mm:ss'), //有效日期
+										tenantId: '', //企业
+										orderType: '1', //订单类型
+										companyId: '', //客商
+										materialId: "", //物料
+										orderNumber: "0", //数量
+										vehicle: '', //车号
+										driverId: '', //司机id\
+										vehicleType: '1',
+										xfFlag: '',
+										phone: '',
+										axle: '',
+										idcard: "",
+										driver: '',
+										orderPiece: '', //件数
+										tenantName: '',
+										vehicleTypeName: '', //业务类型
+										companyName: "", //客商
+										materialName: "", //物料id
+										orderTypeName: '临时订单',
+										sourceId: "", //第三方大订单ID
+										remark: "",
+										measureUnit: '', //单位
+										transporterType: "",
+										transporterTypeName: "",
+										transporterId: "", //运输单位
+										transporterName: "",
+										appUserType: "3",
+										releaseUponPayment: "0",
+										isIntima: "0",
+										saleBlockId: "",
+										saleBlockName: "",
+									},
+										_this.bindTenant()
+									console.log("允许操作的订单类型、", _this.orderTypeOption);
+
+									if (_this.orderTypeOption && _this.orderTypeOption.length > 0) {
+										_this.orderForm.orderType = _this.orderTypeOption[0].value
+										_this.orderForm.orderTypeName = _this.orderTypeOption[0].text
+									}
+									console.log('用户点击确定');
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+									uni.redirectTo({
+										url: '/subpages/order/dealerList?index=0'
+									})
+								}
+							}
+						})
+					}
+				})
+			}).catch(err => {
+				console.log('err', err);
+				this.$refs.loadingToast.hide()
+			})
+		},
+		formatOption(data) {
+			let arr = []
+			data.forEach(item => {
+				arr.push({
+					text: item.name || item.label,
+					value: item.value || item.id
+				})
+			})
+			if (arr.length) {
+				arr.unshift({
+					text: this.$t('order.notSelected'),
+					value: null
+				})
+			} else {
+				arr.unshift({
+					text: this.$t('base.common.noData'),
+					value: null
+				})
+			}
+			return arr
+		},
+		//显示选择
+		showPopup(refs) {
+			this.$refs[refs].showPicker = true
+		},
+		//选择下单日期
+		onSetDateConfirm(date) {
+			this.orderForm.setDate = dayjs(date).format('YYYY-MM-DD');
+			this.showSetDateCalendar = false;
+		},
+		//选择下单日期
+		onEndDateConfirm(date) {
+			this.orderForm.orderValidDate = dayjs(date.value).format('YYYY-MM-DD HH:mm:ss');
+			this.showEndDateCalendar = false;
+		},
+		//选择订单类型
+		onOrderTypeConfirm(value) {
+			this.orderForm.orderType = ''
+			this.orderForm.orderTypeName = ''
+			if (value.value) {
+				this.orderForm.orderType = value.value
+				this.orderForm.orderTypeName = value.text
+			}
+		},
+		//选择订单类型
+		onVehicleTypeConfirm(value) {
+			console.log('value', value);
+			this.orderForm.vehicleType = value.detail.value
+			if (this.orderForm.vehicleType == '101') {
+				this.orderTypeOption[1].isShow = false
+				this.orderForm.orderType = this.orderTypeOption[0].value
+				this.orderForm.orderTypeName = this.orderTypeOption[0].text
+			} else {
+				this.orderTypeOption = getOrderType(this.orderTypeOption);
+			}
+			this.clear(false)
+			this.bindCompany();
+			// this.bindMaterial();
+		},
+		onReleaseUponPaymentConfirm(value) {
+			this.orderForm.releaseUponPayment = value.detail.value
+		},
+		onisIntimaConfirm(value) {
+			this.orderForm.isIntima = value.detail.value
+		},
+
+		//选择客户
+		onCompanyConfirm(value) {
+			this.orderForm.companyId = ''
+			this.orderForm.companyName = ''
+			if (value.value) {
+				this.orderForm.companyId = value.value
+				this.orderForm.companyName = value.text
+			}
+			this.bindMaterial();
+			this.bindProject()
+			// this.bindCompany();
+		},
+
+		onTransporterConfirm(value) {
+			this.orderForm.transporterId = ''
+			this.orderForm.transporterName = ''
+			if (value.value) {
+				this.orderForm.transporterId = value.value
+				this.orderForm.transporterName = value.text
+			}
+		},
+		//选择原料
+		onProductConfirm(value) {
+			console.log("选择的物料信息、", value);
+			this.orderForm.materialId = ''
+			this.orderForm.materialName = ''
+			if (value.value) {
+				this.orderForm.materialId = value.value
+				this.orderForm.materialName = value.text
+			}
+		},
+		//选择运输类型
+		onTransporterTypeConfirm(value) {
+			console.log("选择的运输类型信息、", value);
+			this.orderForm.transporterType = ''
+			this.orderForm.transporterTypeName = ''
+			if (value.value) {
+				this.orderForm.transporterType = value.value
+				this.orderForm.transporterTypeName = value.text
+			}
+		},
+		//选择销售点类型
+		onSalePointConfirm(value) {
+			console.log("选择的销售点信息、", value);
+			this.orderForm.salePoint = ''
+			this.orderForm.saleBlockName = ''
+			if (value.value) {
+				this.orderForm.salePoint = value.value
+				this.orderForm.saleBlockName = value.text
+			}
+		},
+
+
+
+		//选择企业
+		onTenantConfirm(value) {
+			this.orderForm.tenantId = ''
+			this.orderForm.tenantName = ''
+			if (value.value) {
+				this.orderForm.tenantId = value.value
+				this.orderForm.tenantName = value.text
+
+			}
+			this.bindOption();
+		},
+
+		clear(isVehicleType) {
+			if (isVehicleType == true) {
+				this.vehicleTypeOption = [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}]
+				this.orderForm.vehicleType = ''
+			}
+			this.companyOption = [{
+				text: this.$t('base.common.noData'),
+				value: null
+			}] //客户选项
+			this.materialOption = [{
+				text: this.$t('base.common.noData'),
+				value: null
+			}] //物料选项
+
+			this.orderForm.companyId = ''
+			this.orderForm.materialId = ''
+			this.orderForm.companyName = ''
+			this.orderForm.materialName = ''
+			this.orderForm.orderNumber = '0';
+			this.orderForm.driver = '';
+			this.orderForm.driverId = '';
+			this.orderForm.vehicle = '';
+
+		},
+	}
+}
+</script>
+
+<style lang="less" scoped>
+.order {
+	padding: 32rpx;
+
+	.picker-title {
+		display: flex;
+		padding: 0 32rpx;
+		line-height: 84rpx;
+		justify-content: space-between;
+
+		.confirm {
+			color: #4680F9;
+		}
+	}
+
+	.picker-wrap {
+		height: 440rpx;
+
+		.picker-view {
+			height: 100%;
+
+			.item {
+				display: flex;
+				justify-content: space-between;
+				height: 88rpx;
+				line-height: 88rpx;
+				padding: 0 32rpx;
+
+				.text {
+					width: 33%;
+				}
+
+				.text1 {
+					width: 33%;
+					text-align: center;
+				}
+
+				.text2 {
+					width: 33%;
+					text-align: right;
+				}
+			}
+
+			.btn-item {
+				display: flex;
+				justify-content: center;
+				height: 88rpx;
+				line-height: 88rpx;
+				padding: 0 32rpx;
+				align-items: center;
+
+				.add-vehicle {
+					line-height: 64rpx;
+					height: 64rpx;
+					background: #4680F9;
+					width: 25%;
+					font-size: 28rpx;
+				}
+			}
+		}
+	}
+
+	.form-wrap {
+		height: 444rpx;
+		padding: 0 32rpx;
+	}
+}
+
+// button {
+// 	// background:linear-gradient(to right,#4680F9 0%,#00e2fa 80%,#00e2fa 100%);
+// 	background: #4680F9;
+// 	line-height: 100rpx;
+// 	color: #fff;
+// 	border: none;
+// }
+
+uni-button:after {
+	border: none;
+}
+
+uni-input {
+	height: 72rpx;
+	padding: 0 10rpx 0 20rpx;
+}
+
+.uni-forms-item__inner {
+	padding: 20rpx 0;
+}
+
+// /deep/ .u-button--primary {
+// 	background-color: #4680F9;
+// 	border-color: #4680F9;
+// }</style>

+ 970 - 0
subpages/order/transOrderList.vue

@@ -0,0 +1,970 @@
+<template>
+	<view class="order-list">
+		<u-sticky bgColor="#fff">
+			<view class="search-wrap">
+				<view class="input-wrap">
+					<view @click="showPopup('popupTenant')" class="input">
+						<u--input prefixIcon="account-fill" readonly :placeholder="$t('queue.pleaseSelectTenant')"
+							prefixIconStyle="font-size:46rpx" border="none" v-model="form.tenantName"
+							:showAction='false'></u--input>
+					</view>
+					<view @click="onClickRight" class="sx-btn">
+					<uni-icons type="settings-filled" size='24'></uni-icons>
+					<view>{{$t('base.common.condition')}}</view>
+				</view>
+				</view>
+			</view>
+			<view class="tabs-box">
+				<u-tabs lineWidth="40" :list="orderTypeList.filter((item)=>{return item.isShow==true})"
+					:current="currentOrderType" @change="onChangeOrderType" lineColor="#3275F5"
+					:itemStyle="{'height':'90rpx','padding':'0 32rpx'}">
+					<view slot="right" style="padding-left: 160rpx;">
+					</view>
+				</u-tabs>
+				
+				<view v-if="form.orderType != '5' && form.orderType != '4'">
+					<u-tabs lineWidth="40" :list="orderStatusList"
+						:current="form.orderStatus" @change="changeOrderStatus" lineColor="#3275F5"
+						:itemStyle="{'height':'90rpx','padding':'0 32rpx'}">
+					</u-tabs>
+					<!-- <span :class="form.orderStatus == item.value ? 'active' : ''" v-for="item in orderStatusList"
+						@click="changeOrderStatus(item)" :key="item.name">
+						{{ item.name }}
+					</span> -->
+				</view>
+				<view v-if="form.orderType == '4'">
+					<u-tabs lineWidth="40" :list="shareOrderStatusList"
+						:current="form.orderStatus" @change="changeOrderStatus" lineColor="#3275F5"
+						:itemStyle="{'height':'90rpx','padding':'0 32rpx'}">
+					</u-tabs>
+					<!-- <span :class="form.orderStatus == item.value ? 'active' : ''" v-for="item in shareOrderStatusList"
+						@click="changeOrderStatus(item)" :key="item.name">
+						{{ item.name }}
+					</span> -->
+				</view>
+			</view>
+			<PopupSelect ref="popupTenant" :hasSearch='false' :option="tenantOption" @onConfirm="onTenantConfirm"
+				@search="bindOption" />
+		</u-sticky>
+		<!-- 企业选项 -->
+
+
+		<view class="swiper-box">
+			<template v-if="orderList.length">
+				<u-list @scrolltolower="scrolltolower" :preLoadScreen="1.5">
+					<u-list-item v-for="(item, index) in orderList" :key="index">
+						<view class="order-card">
+							<view class="order-card-title">
+								<span class="type" v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
+								<span class="type fixed" v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span>
+								<span class="type fixed" v-if="item.orderType == '5'">{{ $t('order.plan') }}</span>
+								<text class="info">{{ item.tenantName || '' }}</text>
+								<view class="out-type" v-if="item.backFlag == '1'">
+									{{item.vehicleType=='101'?$t('order.isBackOut'):$t('order.return')}}
+								</view>
+								<template v-if="item.orderType != '4'">
+									<span class="status bad-status" v-if="item.enabledMarkType == '1'">已作废</span>
+									<span class="status" v-else-if="item.orderStatus == '0'">未进厂</span>
+									<span class="status"
+										v-else-if="item.orderStatus == '1' && item.weighingStatus == '0'">已进厂</span>
+									<span class="status" v-else-if="item.orderStatus == '2'">已完成</span>
+									<span class="status"
+										v-else-if="item.orderStatus == '1' && item.weighingStatus != '0'">已过磅</span>
+								</template>
+								<template v-if="item.orderType == '4'">
+									<span class="status" v-if="item.orderStatus == '0'">未接单</span>
+									<span class="status" v-if="item.orderStatus == '1'">接单中</span>
+									<span class="status" v-if="item.orderStatus == '2'">已完成</span>
+									<span class="status bad-status"
+										v-if="item.enabledMarkType =='1' || item.orderStatus == '4'">已作废</span>
+								</template>
+							</view>
+							<view class="order-card-info">
+								<view class="order-type">
+									<u-tag :text="$t('order.suppOrder')" type="error" v-if="item.isMain == 1"></u-tag>
+									<u-tag :text="$t('order.mixed')" type="success" v-if="item.isMain == 2"></u-tag>
+								</view>
+								<view class="row">
+									<p class="cell">
+										<!-- <text class="label">{{ $t('order.companyName') }}</text> -->
+										<text class="info">{{ item.companyName || '' }}</text>
+									</p>
+								</view>
+								<view class="row">
+									<p class="cell">
+										<!-- <text class="label">{{ $t('order.orderDate') }}</text> -->
+										<text class="info">{{ item.setDate || '' }}</text>
+									</p>
+									<p class="cell">
+										<!-- <text class="label">{{ $t('order.vehicleType') }}</text> -->
+										<text class="info"
+											v-if="item.vehicleType == '101'">{{ $t('order.saleOrder') }}</text>
+										<text class="info"
+											v-if="item.vehicleType == '102'">{{ $t('order.purchaseOrder') }}</text>
+										<!-- <span class="tag tag-ls"
+											v-if="item.orderType == '1'">{{ $t('order.temp') }}</span>
+										<span class="tag tag-gd"
+											v-if="item.orderType == '2'">{{ $t('order.fixed') }}</span> -->
+									</p>
+								</view>
+								<view class="row">
+									<p class="cell">
+										<!-- <text class="label">{{ $t('order.materialName') }}</text> -->
+										<text class="info">{{ item.materialName || '' }}</text>
+									</p>
+									<p class="cell">
+										<!-- <text class="label">{{ $t('order.orderNumber') }}</text> -->
+										<text
+											 
+											class="info">{{ item.orderNumber || '' }}{{item.materialKind=='101' && item.companyClientType=='109'?$t('customer_meter.unitB')  :(item.orderType ==
+											'4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT')) }}</text>
+									</p>
+								</view>
+								<view class="row">
+									<p class="cell">
+										<!-- <text class="label">{{ $t('order.vehicle') }}</text> -->
+										<text class="info">{{ item.vehicle || '' }}</text>
+									</p>
+								</view>
+								<!-- 							<view class="row" v-if="item.isMain == 1 || item.isMain == 2">
+									<p class="cell">
+										 <text
+											class="label">{{ item.isMain == 1 ? $t('order.mainOrder') : $t('order.suppOrder') }}</text>
+										<text class="info used">{{ item.relationOrderCode || '' }}</text>
+									</p>
+								</view> -->
+								<view class="qrcode-logo" @click="drawQrcode(item)">
+									<image class="img" src="/subpages/static/czzn-img/state/qrcode.png"
+										mode="scaleToFill" />
+								</view>
+								<!-- <view class="row" v-if="item.orderStatus != 0 && item.weighingStatus != 0">
+									<p class="cell">
+										<text class="label">{{ $t('order.tareWeight') }}</text>
+										<text class="info">{{ item.tareWeight || '0' }}</text>
+									</p>
+									<p class="cell">
+										<text class="label">{{ $t('order.grossWeight') }}</text>
+										<text class="info">{{ item.grossWeight || '0' }}</text>
+									</p>
+								</view>
+								<view class="row">
+									<p class="cell">
+										<text class="label">{{ $t('order.netWeight') }}</text>
+										<text class="info">{{ item.netWeight || '0' }}</text>
+									</p>
+								</view>
+								<view class="row" v-if="item.orderStatus != 0 && item.weighingStatus == 1">
+									<p class="cell">
+										<text class="label">{{ $t('order.inTime') }}</text>
+										<text class="info">{{ item.inTime || '' }}</text>
+									</p>
+								</view>
+								<view class="row" v-if="item.orderStatus != 0 && item.weighingStatus == 2">
+									<p class="cell">
+										<text class="label">{{ $t('order.outTime') }}</text>
+										<text class="info">{{ item.outTime || '' }}</text>
+									</p>
+								</view>
+								<view class="row" v-if="item.orderStatus == 2">
+									<p class="cell">
+										<text class="label">{{ $t('order.outDate') }}</text>
+										<text class="info">{{ item.outDoorTime || '' }}</text>
+									</p>
+								</view> -->
+							</view>
+							<view class="code">
+								<view class="label">{{$t('order.orderCode')}}</view>
+								<view class="info">{{ item.code || '' }}</view>
+								<view class="label">{{$t('order.source')}}</view>
+								<view class="info"> {{$t('order.mini')}}</view>
+							</view>
+							<view class="order-card-bottom">
+
+								<view class="btn">
+									<button class="oper-btn" type='error' shape="circle"
+										size="small" @click="setVehicle(item)">{{ $t('order.chooseVehicle') }}
+									</button>
+								</view>
+								<view class="btn">
+									<button class="oper-btn" type='primary' shape="circle" color='#4680F9' size="small"
+										@click="onOrderInfoClick(item)">
+										{{ $t('mine.detail') }}
+									</button>
+								</view>
+							</view>
+						</view>
+					</u-list-item>
+				</u-list>
+			</template>
+			<template v-else>
+				<u-empty mode="orderTypeList" icon="https://cdn.uviewui.com/uview/empty/list.png">
+				</u-empty>
+			</template>
+		</view>
+
+		<u-popup :show="showSearch" :round="16" @close="showSearch = false" mode="bottom">
+			<view class="search-dialog">
+				<p class="dialog-title">{{ $t('base.common.condition') }}</p>
+				<view class="condition-wrap">
+					<view class="row">
+						<uni-datetime-picker :end='maxDate' :clear-icon="false" :value="searchOption.range"
+							type="daterange" @change="confirm" />
+					</view>
+					<!-- 输入内容 -->
+					<view class="row">
+						<p class="p-title">{{ $t('base.common.placeholder') }}</p>
+						<u-search class="p-input" bgColor='#fff' :showAction='false'
+							:placeholder="$t('base.common.inputPlaceholder')" v-model="keyword">
+						</u-search>
+					</view>
+					<!-- 选择业务类型 -->
+					<!-- <view class="row">
+						<p class="p-title">{{ $t('order.vehicleType') }}</p>
+						<u-radio-group v-model="form.vehicleType" @change="onVehicleTypeChange" placement="row"
+							class="p-input">
+							<u-radio :customStyle="{ marginRight: '10px' }" v-for="item in searchOption.vehicleTypeList"
+								:key="item.value" :label="item.text" :name="item.value">
+							</u-radio>
+						</u-radio-group>
+					</view> -->
+					<!-- 选择客商 -->
+
+					<view @click="showPopup('popupCompany')" class="row">
+						<p class="p-title">{{ $t('order.transporter') }}</p>
+						<u--input readonly class="p-input"
+							:placeholder="`${$t('base.common.placeholderS') + $t('order.transporter')}`" border="none"
+							v-model="form.companyName"></u--input>
+					</view>
+					<!-- 选择物料 -->
+
+					<view @click="showPopup('popupMaterial')" class="row last-one">
+						<p class="p-title">{{ $t('order.materialName') }}
+						</p>
+						<u--input readonly :placeholder="`${$t('base.common.placeholderS') + $t('order.materialName')}`"
+							border="none" v-model="form.materialName" class="p-input"></u--input>
+					</view>
+				</view>
+
+				<view class="sure-btn">
+					<button class="btn" @click="bindOrderList">{{ $t('base.common.submit') }}</button>
+				</view>
+			</view>
+
+			<!-- 选择供应商/客户 -->
+			<PopupSelect ref="popupCompany" :hasSearch='false' :option="companyOption" @onConfirm="onCompanyConfirm" />
+			<!-- 选择物料/产品 -->
+
+			<PopupSelect ref="popupMaterial" :hasSearch='false' :option="materialOption"
+				@onConfirm="onMaterialConfirm" />
+		</u-popup>
+		<u-loading-page color="#666" loading-mode="semicircle" :loading="loading">
+		</u-loading-page>
+		<u-popup :show="showQrcode" :round="16" @close="showQrcode = false" mode="center"
+			:overlayStyle="{ background: '#fff' }">
+			<view class="qrcode-wrap" @click="showQrcode = false">
+				<uqrcode ref='ordercode' canvas-id="order-canvas" :value="currentOrder.id"
+					:start="false" />
+				<view class="info-line">
+					{{ $t('mine.customer') }} : {{ currentOrder.companyName || '' }}
+				</view>
+				<view class="info-line">
+					{{ $t('mine.mater') }} : {{ currentOrder.materialName || '' }}
+				</view>
+				<view class="info-line" v-if="currentOrder.vehicle">
+					{{ $t('order.vehicle') }} : {{ currentOrder.vehicle || '' }}
+				</view>
+				<view class="info-line" v-if="currentOrder.password">
+					{{ $t('order.password') }} : {{ currentOrder.password || '' }}
+				</view>
+
+			</view>
+		</u-popup>
+
+		<u-toast ref="loadingToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		getOrderPage,
+		cancelOrder,
+		getCustomerList,
+		getMeterList,
+		getOption,
+		getPlanOrderVehicleList
+	} from "../../api/order";
+
+	import PopupSelect from '../../components/popup-select/index'
+	import {
+		getTenantCacheList,
+		getOrderType,
+		isPermission,
+		getLabel
+	} from '../../utils/util.js'
+	import {
+		getDealerTenantList,
+	} from "../../api/tenant.js";
+	import dayjs from 'dayjs'
+	export default {
+		components: {
+			PopupSelect
+		},
+		data() {
+			return {
+				getLabel,
+				maxDate: dayjs().format('YYYY-MM-DD'),
+				searchOption: {
+					range: [dayjs().add(-30, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')],
+					vehicleTypeList: [{
+						name: this.$t("mine.all"),
+						disabled: false,
+						value: '0',
+					}, ],
+				},
+				loading: true, //页面加载状态
+				showQrcode: false, // 二维码展示
+				currentOrder: {}, //订单id
+				form: {
+					type: "0",
+					orderType: '',
+					vehicleType: '101',
+					orderStatus: 0,
+					tenantId: '',
+					tenantName: '',
+					companyId: "", //客商
+					materialId: "", //物料
+					companyName: "", //客商
+					materialName: "", //物料
+				},
+				currentOrderType: 0,
+				orderTypeList: [{
+						name: this.$t("mine.all"),
+						isShow: true,
+						value: '',
+						index: 0,
+						key: "all",
+					},
+					{
+						name: this.$t("order.temp"),
+						isShow: true,
+						value: '1',
+						index: 1,
+						key: "add_temp_order",
+					},
+					{
+						name: this.$t("order.fixed"),
+						isShow: true,
+						value: '2',
+						index: 2,
+						key: "add_fixed_order",
+					},
+					{
+						name: this.$t("order.plan"),
+						isShow: true,
+						value: '5',
+						index: 3,
+						key: "add_plan_order",
+					},
+					{
+						name: this.$t("order.share"),
+						isShow: true,
+						value: '4',
+						index: 3,
+						key: "add_share_order",
+					},
+
+				],
+				orderStatusList: [{
+						name: this.$t("mine.reviewed"),
+						value: '0'
+					},
+					{
+						name: this.$t("mine.unpaid"),
+						value: '1'
+					}, 
+					{
+						name: this.$t("mine.ongoing"),
+						value: '2'
+					},
+					{
+						name: this.$t("mine.weigh"),
+						value: '3'
+					},
+					{
+						name: this.$t("mine.invalid"),
+						value: '4'
+					},
+				],
+				orderSourceList: [{
+						name: this.$t("order.pc"), //PC端
+						value: '1'
+					},
+					{
+						name: this.$t("order.mini"), //小程序
+						value: '2'
+					}, {
+						name: this.$t("order.fixed"), //固定订单生成
+						value: '3'
+					},
+					{
+						name: this.$t("order.special"), //由特殊订单生成
+						value: '4'
+					},
+
+					{
+						name: this.$t("order.handWeigh"), //由手工过磅生成
+						value: '5'
+					},
+					{
+						name: this.$t("order.repair"), //由补录生成
+						value: '6'
+					},
+					{
+						name: this.$t("order.bath"), //由批量订单生成
+						value: '7'
+					},
+					{
+						name: this.$t("order.third"), //第三方生成
+						value: '8'
+					},
+					{
+						name: this.$t("order.share"), //共享订单
+						value: '12'
+					},
+					{
+						name: this.$t("order.plan"), //计划订单
+						value: '13'
+					},
+				],
+				shareOrderStatusList: [{
+						name: this.$t("order.waitOrderReceive"),
+						value: '0'
+					},
+					{
+						name: this.$t("order.orderReceiving"),
+						value: '1'
+					},
+					{
+						name: this.$t("order.orderReceiveComplete"),
+						value: '2'
+					},
+					{
+						name: this.$t("mine.invalid"),
+						value: '4'
+					}
+				],
+				page: {
+					pages: 1,
+					size: 5,
+				},
+
+				orderList: [],
+				showSearch: false,
+				keyword: '',
+				hasMore: false,
+				tenantOption: [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}], //企业选项
+				companyOption: [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}], //客户选项
+				materialOption: [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}], //物料选项
+				//业务对应的客户信息
+				vehicleTypeCompanyList: [],
+				//客户对应的物料信息
+				companyMaterialList: [],
+				//业务类型对应的物料信息
+				appAllMaterial: [],
+				isAuditUser: false,
+				isDealerUser: false,
+				isDriverUser: false,
+				//是否启用追溯功能
+				isRetrospect: false,
+				language:'zh-Hans'
+			};
+		},
+		mounted() {
+			console.log("order list mounted");
+		},
+		onShow() {
+			console.log("开始onShow");
+			this.searchList();
+		},
+		onLoad(options) {
+			this.language = uni.getStorageSync('CURRENT_LANG')
+			this.isAuditUser = uni.getStorageSync('isAuditUser')
+			this.isDealerUser = uni.getStorageSync('isDealerUser')
+			this.isDriverUser = uni.getStorageSync('isDriverUser')
+			this.bindTenant()
+			this.form.orderStatus = options.orderStatus || '0';
+			this.orderTypeList = getOrderType(this.orderTypeList);
+			this.isRetrospect = isPermission("add_retrospect_order")
+			console.log("允许操作的订单类型、", this.orderTypeList);
+		},
+
+		methods: {
+			//分配车辆
+			setVehicle(item){
+				uni.navigateTo({
+					url: `/subpages/order/transVehicle?orderInfo=${JSON.stringify(item)}`
+				})
+			},	
+			//二维码弹窗
+			drawQrcode(item) {
+				this.currentOrder = item
+				this.showQrcode = true
+				console.log(this.$refs.ordercode);
+				setTimeout(() => {
+					this.$refs.ordercode.make()
+				}, 100)
+			},
+			//切换订单类型
+			onChangeOrderType(item) {
+				this.currentOrderType = item.index;
+				var value = this.orderTypeList[item.index].value;
+				if (this.form.orderType == value) {
+					return
+				} else {
+					this.form.orderStatus = "";
+					this.form.orderType = value
+					this.searchList()
+				}
+			},
+			//切换订单状态
+			changeOrderStatus(item) {
+				if (item.value == this.form.orderStatus) {
+					this.form.orderStatus = "";
+				} else {
+					this.form.orderStatus = item.value
+				}
+				this.searchList()
+			},
+			//获取企业选项
+			bindTenant() {
+				this.tenantOption = getTenantCacheList();
+				if (this.tenantOption.length > 0) {
+					this.form.tenantId = this.tenantOption[0].value
+					this.form.tenantName = this.tenantOption[0].text
+				} else {
+					this.loading = false;
+					return;
+				}
+				this.bindOption();
+				// this.searchList();
+			},
+
+			//选择订单类型后加载选项 //获取品种信息 101:销售,102:采购
+			bindOption() {
+				this.clear();
+				console.log("订单租户信息、", this.form.tenantId);
+				if (!this.form.tenantId) {
+					console.log("订单业务租户信息");
+					return;
+				}
+				var that = this;
+				console.log("当前租户ID、", that.form.tenantId);
+				if (that.form.tenantId) {
+					let data = JSON.parse(JSON.stringify(that.form))
+					data.appUserType = "3"
+					this.orderList = [];
+					getOption(data).then(res => {
+						console.log("查询基础数据返回、", res);
+						if (res.statusCode === 200) {
+							console.log("用户业务类型、", res.data.data.appVehicleType)
+							console.log("用户客户信息、", res.data.data.appCompany)
+							console.log("用户品种信息、", res.data.data.appMaterial)
+							that.searchOption.vehicleTypeList = res.data.data.appVehicleType;
+							if(that.language == 'zh-Hans'){
+								that.searchOption.vehicleTypeList = res.data.data.appVehicleType;
+							}else{
+								that.searchOption.vehicleTypeList = res.data.data.appVehicleType.map(item=>{
+									return{
+										text:item.language,
+										value:item.value
+									}
+								});
+							}
+							uni.removeStorageSync('vehicleType-' + that.form.tenantId)
+							uni.setStorageSync('vehicleType-' + that.form.tenantId, that.searchOption
+								.vehicleTypeList)
+
+							if (that.searchOption.vehicleTypeList && that.searchOption.vehicleTypeList.length >
+								0) {
+								that.searchOption.vehicleTypeList.unshift({
+									text: this.$t('mine.all'),
+									value: null
+								})
+								that.form.vehicleType = that.searchOption.vehicleTypeList[0].value
+								that.form.vehicleTypeName = that.searchOption.vehicleTypeList[0].text
+								that.vehicleTypeCompanyList = res.data.data.appCompany
+								that.companyMaterialList = res.data.data.appMaterial;
+								that.appAllMaterial = res.data.data.appAllMaterial;
+								that.bindCompany();
+								that.bindMaterial();
+								// that.bindOrderList();
+							}
+						}
+					})
+				}
+			},
+
+			bindCompany() {
+				var vehicleType = this.form.vehicleType;
+				if (vehicleType && this.vehicleTypeCompanyList) {
+					this.companyOption = [{
+						text: this.$t('order.notSelected'),
+						value: null
+					}] //物料选项
+					var companyInfos = this.vehicleTypeCompanyList.filter(function(company) {
+						return company.vehicleType == vehicleType;
+					});
+					if (companyInfos && companyInfos.length > 0) {
+						companyInfos[0].companyList.forEach(item => {
+							this.companyOption.push({
+								text: item.companyName,
+								value: item.companyId
+							})
+						})
+					}
+					console.log("客户信息、", this.companyOption);
+				}
+			},
+			bindMaterial() {
+				this.materialOption = [{
+					text: this.$t('order.notSelected'),
+					value: null
+				}] //物料选项
+				var companyId = this.form.companyId;
+				if (companyId && this.companyMaterialList) {
+					var materialInfos = this.companyMaterialList.filter(function(material) {
+						return material.companyId == companyId;
+					});
+					if (materialInfos && materialInfos.length > 0) {
+						materialInfos[0].materialList.forEach(item => {
+							this.materialOption.push({
+								text: item.name,
+								value: item.id
+							})
+						})
+					}
+				} else {
+					var vehicleType = this.form.vehicleType;
+					var materialInfos = this.appAllMaterial.filter(function(material) {
+						return material.vehicleType == vehicleType;
+					});
+					if (materialInfos && materialInfos.length > 0) {
+						materialInfos[0].materialList.forEach(item => {
+							this.materialOption.push({
+								text: item.name,
+								value: item.id
+							})
+						})
+					}
+				}
+				console.log("品种信息、", this.materialOption);
+			},
+
+			//去订单详情
+			onOrderInfoClick(item) {
+				if (item.orderType == '1') {
+					if (item.isMain == "2") {
+						uni.navigateTo({
+							url: `/subpages/order/mixedOrderInfo?userType=3&orderId=${item.id}&tenantId=${item.tenantId}&orderStatus=${item.orderStatus}`
+						})
+					} else {
+						uni.navigateTo({
+							url: `/subpages/order/orderInfo?orderId=${item.id}&tenantId=${item.tenantId}&orderStatus=${item.orderStatus}`
+						})
+					}
+				} else if (item.orderType == '2') {
+					uni.navigateTo({
+						url: `/subpages/order/fixedOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}&orderStatus=${item.orderStatus}`
+					})
+				} else if (item.orderType == '4') {
+					uni.navigateTo({
+						url: `/subpages/order/shareOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}&orderStatus=${item.orderStatus}`
+					})
+				} else if (item.orderType == '5') {
+					uni.navigateTo({
+						url: `/subpages/order/planOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}`
+					})
+				}
+			},
+			
+			//拼车
+			onMixedOrderClick(item) {
+				uni.navigateTo({
+					url: `/subpages/order/mixed?orderId=${item.id}&tenantId=${item.tenantId}`
+				})
+			},
+			//确定选择日期
+			confirm(item) {
+				this.searchOption.range = item
+			},
+			//点击右侧筛选
+			onClickRight() {
+				this.showSearch = true
+			},
+			//搜索列表
+			searchList() {
+				this.page.pages = 1
+				this.hasMore = false
+				this.bindOrderList()
+			},
+			//获取订单列表
+			bindOrderList() {
+				var that = this;
+				if (!that.form.tenantId) {
+					uni.showToast({
+						title: that.$t('base.common.placeholderS') + that.$t('base.common.tenant'),
+						icon: 'none',
+						duration: 2000
+					})
+					return;
+				}
+				that.showSearch = false
+				let data = {
+					appUserType: "7",
+					current: that.page.pages,
+					size: that.page.size,
+					orderStatus: that.form.orderStatus,
+					keywords: that.keyword || '',
+					startDate: that.searchOption.range[0] || '',
+					endDate: that.searchOption.range[1] || '',
+					vehicleType: that.form.vehicleType,
+					orderType: that.form.orderType || '',
+					tenantId: that.form.tenantId || '',
+					companyId: that.form.companyId,
+					materialId: that.form.materialId,
+					noOrderType:'1',//用来区分扫码获取计划单
+				};
+				getOrderPage(data).then((res) => {
+					if (res.statusCode == 200) {
+						// that.orderList = res.data.data.records;
+						if (res.data.data.records.length == 0) {
+							that.orderList = [];
+						}
+						if (that.hasMore) {
+							that.orderList = [
+								...that.orderList,
+								...res.data.data.records,
+							];
+						} else {
+							that.orderList = res.data.data.records;
+						}
+						that.total = res.data.data.total;
+						if (that.orderList.length >= that.total) {
+							that.hasMore = false;
+						} else {
+							that.hasMore = true;
+						}
+						console.log("当前订单信息、", that.orderList);
+					}
+					that.loading = false;
+				});
+			},
+			//加载更多
+			scrolltolower() {
+				console.log("1111111111111111");
+				if (this.hasMore) {
+					this.page.pages += 1;
+					this.bindOrderList();
+				}
+			},
+			// tab栏切换
+			orderStatusChange(item) {
+				this.orderStatus = item.orderStatus;
+				this.page.pages = 1;
+				this.hasMore = false;
+				this.bindOrderList();
+			},
+			//订单作废
+			onCancelOrder(item) {
+				let _this = this
+				uni.showModal({
+					content: this.$t('order.isCancelOrder'),
+					showCancell: true,
+					success: function(res) {
+						if (res.confirm) {
+							let data = {
+								tenantId: item.tenantId,
+								orderId: item.id
+							};
+							_this.$refs.loadingToast.show({
+								type: "loading",
+								message: _this.$t('base.common.loading'),
+								duration: "1000000"
+							})
+							cancelOrder(data).then(res => {
+								_this.$refs.loadingToast.hide()
+								if (res.statusCode == 200) {
+									uni.showToast({
+										title: _this.$t('mine.operateOk'),
+										icon: 'none',
+										duration: 2000
+									})
+									_this.page.pages = 1
+									_this.hasMore = false
+									_this.bindOrderList()
+								}
+							}).catch(res => {
+								_this.$refs.loadingToast.hide()
+								console.log("调用异常返回、", res);
+							});
+							console.log('用户点击确定');
+						} else if (res.cancell) {
+							console.log('用户点击取消');
+							_this.$refs.loadingToast.hide()
+						}
+					}
+				});
+			},
+			onRetrospectOrder(item) {
+			uni.navigateTo({
+					url: `/substaticpages/trace/index?orderId=${item.id}&tenantId=${item.tenantId}`
+				})
+			},
+			onShareOrderClick(item) {
+				uni.navigateTo({
+					url: `/subpages/order/shareOrderInfo?orderId=${item.id}&tenantId=${item.tenantId}&isShare=1`
+				})
+			},
+			onAdjustOrderClick(item) {
+				let obj = {
+					orderId: item.id,
+					tenantId: item.tenantId
+				}
+				console.log("获取到调整时的订单信息、", obj);
+				getPlanOrderVehicleList(obj).then(res => {
+					if (res.statusCode == 200 && res.data.code == 0) {
+
+						var vehicles = '';
+						if (res.data.data) {
+							res.data.data.forEach(item => {
+								if (vehicles) {
+									vehicles += ','
+								}
+								vehicles += item.vehicle
+							});
+						}
+						uni.navigateTo({
+							url: `/subpages/order/multipleVehicle?tenantId=${item.tenantId}&orderId=${item.id}&vehicles=${vehicles}&isAdjust=1&vehicleType=${item.vehicleType}`
+						})
+					}
+				})
+
+
+			},
+			//显示选择
+			showPopup(refs) {
+				this.$refs[refs].showPicker = true
+			},
+			//选择企业和订单类型后
+			onVehicleTypeChange() {
+				this.vehicleTypeClear();
+				if (this.form.tenantId && this.form.vehicleType) {
+					console.log('开始根据业务类型选择数据信息,租户和业务为、', this.form.tenantId, this.form.vehicleType);
+					this.bindCompany();
+					this.bindMaterial();
+				}
+			},
+
+			//选择企业
+			onTenantConfirm(value) {
+				this.form.tenantId = ''
+				this.form.tenantName = ''
+				if (value.value) {
+					this.form.tenantId = value.value
+					this.form.tenantName = value.text
+				}
+				this.bindOption();
+			},
+			//选择客户
+			onCompanyConfirm(value) {
+				this.form.companyId = ''
+				this.form.companyName = ''
+				if (value.value) {
+					this.form.companyId = value.value
+					this.form.companyName = value.text
+				}
+				this.bindMaterial();
+			},
+			//选择物料
+			onMaterialConfirm(value) {
+				this.form.materialId = ''
+				this.form.materialName = ''
+				if (value.value) {
+					this.form.materialId = value.value
+					this.form.materialName = value.text
+				}
+			},
+			formatOption(data) {
+				let arr = []
+				data.forEach(item => {
+					arr.push({
+						text: item.name || item.label,
+						value: item.value || item.id
+					})
+				})
+				arr.unshift({
+					text: this.$t('order.notSelected'),
+					value: null
+				})
+				return arr
+			},
+			clear() {
+				this.searchOption.vehicleTypeList = [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}]
+				this.companyOption = [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}] //客户选项
+				this.materialOption = [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}] //物料选项
+				this.form.vehicleType = ''
+				this.form.vehicleTypeName = ''
+				this.form.companyId = ''
+				this.form.materialId = ''
+				this.form.companyName = ''
+				this.form.materialName = ''
+			},
+			vehicleTypeClear() {
+				this.companyOption = [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}] //客户选项
+				this.materialOption = [{
+					text: this.$t('base.common.noData'),
+					value: null
+				}] //物料选项
+				this.form.companyId = ''
+				this.form.materialId = ''
+				this.form.companyName = ''
+				this.form.materialName = ''
+			},
+		},
+	};
+</script>
+<style>
+	/* #ifndef H5 */
+	page {
+		/* height: 100%; */
+		background-color: #f2f2f2;
+	}
+
+	/* #endif */
+</style>
+<style lang="scss" scoped>
+	@import '../../common/css/public.scss';
+
+
+</style>

+ 222 - 0
subpages/order/transVehicle.vue

@@ -0,0 +1,222 @@
+<template>
+	<view class="enterprise-list">
+		<view class="list-wrap">
+			<u-sticky bgColor="#fff" class="main-sticky">
+				<view class="search-wrap">
+					<view class="input-wrap">
+						<u-search bgColor='#fff' :showAction='false' :placeholder="$t('base.common.inputPlaceholder')"
+							@search="searchList" @clear='searchList' v-model="keyword">
+						</u-search>
+						<view class="sx-btn" @click="searchList">{{ $t("customer_meter.search") }}</view>
+					</view>
+				</view>
+				<view class="order-card" v-if="orderInfo">
+					<view class="order-card-title">
+						<span class="type" v-if="orderInfo.orderType == '1'">{{ $t('order.temp') }}</span>
+						<span class="type fixed" v-if="orderInfo.orderType == '2'">{{ $t('order.fixed') }}</span>
+						<span class="type fixed" v-if="orderInfo.orderType == '5'">{{ $t('order.plan') }}</span>
+						<text class="info">{{ orderInfo.tenantName || '' }}</text>
+						<view class="out-type" v-if="orderInfo.backFlag == '1'">
+							{{ orderInfo.vehicleType == '101' ? $t('order.isBackOut') : $t('order.return') }}
+						</view>
+						<template v-if="orderInfo.orderType != '4'">
+							<span class="status bad-status" v-if="orderInfo.enabledMarkType == '1'">已作废</span>
+							<span class="status" v-else-if="orderInfo.orderStatus == '0'">未进厂</span>
+							<span class="status" v-else-if="orderInfo.orderStatus == '1' && orderInfo.weighingStatus == '0'">已进厂</span>
+							<span class="status" v-else-if="orderInfo.orderStatus == '2'">已完成</span>
+							<span class="status" v-else-if="orderInfo.orderStatus == '1' && orderInfo.weighingStatus != '0'">已过磅</span>
+						</template>
+						<template v-if="orderInfo.orderType == '4'">
+							<span class="status" v-if="orderInfo.orderStatus == '0'">未接单</span>
+							<span class="status" v-if="orderInfo.orderStatus == '1'">接单中</span>
+							<span class="status" v-if="orderInfo.orderStatus == '2'">已完成</span>
+							<span class="status bad-status" v-if="orderInfo.enabledMarkType == '1' || orderInfo.orderStatus == '4'">已作废</span>
+						</template>
+					</view>
+					<view class="order-card-info">
+						<view class="order-type">
+							<u-tag :text="$t('order.suppOrder')" type="error" v-if="orderInfo.isMain == 1"></u-tag>
+							<u-tag :text="$t('order.mixed')" type="success" v-if="orderInfo.isMain == 2"></u-tag>
+						</view>
+						<view class="row">
+							<p class="cell">
+								<text class="info">{{ orderInfo.companyName || '' }}</text>
+							</p>
+						</view>
+						<view class="row">
+							<p class="cell">
+								<text class="info">{{ orderInfo.setDate || '' }}</text>
+							</p>
+							<p class="cell">
+								<text class="info" v-if="orderInfo.vehicleType == '101'">{{ $t('order.saleOrder') }}</text>
+								<text class="info" v-if="orderInfo.vehicleType == '102'">{{ $t('order.purchaseOrder') }}</text>
+							</p>
+						</view>
+						<view class="row">
+							<p class="cell">
+								<text class="info">{{ orderInfo.materialName || '' }}</text>
+							</p>
+							<p class="cell">
+								<text class="info">{{ orderInfo.orderNumber || '' }}{{ orderInfo.materialKind == '101' &&
+									orderInfo.companyClientType == '109' ? $t('customer_meter.unitB') : (orderInfo.orderType ==
+										'4' ? $t('customer_meter.unitN') : $t('customer_meter.unitT')) }}</text>
+							</p>
+						</view>
+						<view class="row">
+							<p class="cell">
+								<text class="info">{{ orderInfo.vehicle || '' }}</text>
+							</p>
+						</view>
+						<view class="qrcode-logo" @click="drawQrcode(orderInfo)">
+							<image class="img" src="/subpages/static/czzn-img/state/qrcode.png" mode="scaleToFill" />
+						</view>
+					</view>
+					<view class="code">
+						<view class="label">{{ $t('order.orderCode') }}</view>
+						<view class="info">{{ orderInfo.code || '' }}</view>
+						<view class="label">{{ $t('order.source') }}</view>
+						<view class="info"> {{ $t('order.mini') }}</view>
+					</view>
+				</view>
+			</u-sticky>
+			<template v-if="driverList.length">
+				<view class="business-card" v-for="(item, index) in driverList" :key="index">
+					<view class="business-card-info" @click="onClickDriver(item)">
+						<view class="info-line" v-if="item.vehicleType != 1">
+							<text class="lebel">{{ item.driver }} {{ item.vehicle || '' }}</text>
+						</view>
+						<view class="info-line" v-if="item.vehicleType == 1">
+							<text class="lebel">{{ item.vehicle }} {{ item.driver || '' }}</text>
+							<text class="info">{{ $t("driver.fleet") }} {{ item.fleetName || '' }}</text>
+						</view>
+						<view class="businessStatus-info">
+							<u--image width="100rpx" height="88rpx"
+								:src="item.vehicleType == 1 ? '/subpages/static/czzn-img/state/fleet_vehicle.png' : '/subpages/static/czzn-img/state/private-vehicle.png'">
+							</u--image>
+						</view>
+					</view>
+
+				</view>
+			</template>
+			<template v-else>
+				<u-empty mode="list" icon="https://cdn.uviewui.com/uview/empty/list.png">
+				</u-empty>
+			</template>
+		</view>
+		<uni-fab ref="fab" buttonColor="#3c9cff" @trigger="trigger" @fabClick="onClickRight" />
+	</view>
+</template>
+
+<script>
+import {
+	getDealerVehicleList,
+} from '../../api/dealer'
+import { setVehicleToOrder } from '../../api/order'
+export default {
+	data() {
+		return {
+			driverList: [],
+			keyword: '',
+			status: undefined,
+			orderInfo: null
+		}
+	},
+	onShow() {
+		this.bindDriver()
+	},
+	onLoad(option) {
+		this.orderInfo = JSON.parse(option.orderInfo)
+		this.status = option.status;
+	},
+	methods: {
+		//点击司机返回
+		onClickDriver(item) {
+			let that = this
+			uni.showModal({
+				title: "分配车辆",
+				content: `确认分配车号 '${item.vehicle}' 到当前订单`,
+				success: function (res) {
+					//用户点击确定
+					if (res.confirm) {
+						let data = {
+							orderId:'',
+							vehicle:item.vehicle,
+						}
+						setVehicleToOrder().then(res=>{
+							if (res.statusCode == 200) {
+								uni.showToast({
+									title:"分配成功",
+									icon: 'none',
+									duration: 2000
+								})
+								setTimeout(()=>{
+									uni.navigateBack()
+								})
+							}
+						})
+					}
+				},
+			});
+			// let pages = getCurrentPages();
+			// console.log("获取到司机信息、", item, this.status);
+			// let prevPage = pages[pages.length - 2]; //上一个页面
+			// debugger
+			// if (this.status == 1) {
+			// 	prevPage.$vm.orderForm.batchOrderList[prevPage.$vm.index].vehicle = item.vehicle; //重点$vm
+			// 	prevPage.$vm.orderForm.batchOrderList[prevPage.$vm.index].driver = item.driver; //重点$vm
+			// 	prevPage.$vm.orderForm.batchOrderList[prevPage.$vm.index].phone = item.phone; //重点$vm
+			// 	prevPage.$vm.orderForm.batchOrderList[prevPage.$vm.index].driverId = item.driverVehicleId; //重点$vm
+			// }
+			// else if (this.status == 2) {
+			// 	prevPage.$vm.vehicle = item.vehicle; //重点$vm
+			// }
+			// else {
+			// 	prevPage.$vm.orderForm.vehicle = item.vehicle; //重点$vm
+			// 	prevPage.$vm.orderForm.driver = item.driver; //重点$vm
+			// 	prevPage.$vm.orderForm.phone = item.phone; //重点$vm
+			// 	prevPage.$vm.orderForm.driverId = item.driverVehicleId; //重点$vm
+			// 	prevPage.$vm.orderForm.idcard = item.idCard; //重点$vm
+			// }
+			// uni.navigateBack();
+		},
+		//获取车辆选项列表
+		bindDriver() {
+			var that = this;
+			let json = {
+				vehicleType: "0",
+				keyword: this.keyword,
+				appUserType: 3
+			};
+			getDealerVehicleList(json).then(res => {
+				if (res.statusCode == 200) {
+					that.driverList = res.data.data
+					console.log("获取到司机列表", that.driverList);
+				}
+			})
+		},
+		//搜索列表
+		searchList() {
+			this.bindDriver()
+		},
+		//跳转添加司机表单
+		onClickRight() {
+			uni.navigateTo({
+				url: '/subpages/driver/dealerAddVehicle?vehicleType=0'
+			})
+		}
+	},
+
+}
+</script>
+<style>
+/* #ifndef H5 */
+page {
+	/* height: 100%; */
+	background-color: #f2f2f2;
+}
+
+/* #endif */
+</style>
+<style lang="scss" scoped>
+@import '../../common/css/public.scss';
+</style>

+ 8 - 0
subpages/order/vehicle.vue

@@ -111,7 +111,15 @@
 
 	}
 </script>
+<style>
+/* #ifndef H5 */
+page {
+	/* height: 100%; */
+	background-color: #f2f2f2;
+}
 
+/* #endif */
+</style>
 <style lang="scss" scoped>
 	@import '../../common/css/public.scss';
 </style>

+ 30 - 0
uni_modules/uview-ui/package-lock.json

@@ -0,0 +1,30 @@
+{
+	"name": "uview-ui",
+	"version": "2.0.33",
+	"lockfileVersion": 2,
+	"requires": true,
+	"packages": {
+		"": {
+			"name": "uview-ui",
+			"version": "2.0.33",
+			"dependencies": {
+				"uview-ui": "file:"
+			},
+			"engines": {
+				"HBuilderX": "^3.1.0"
+			}
+		},
+		"node_modules/uview-ui": {
+			"resolved": "",
+			"link": true
+		}
+	},
+	"dependencies": {
+		"uview-ui": {
+			"version": "file:",
+			"requires": {
+				"uview-ui": "file:"
+			}
+		}
+	}
+}

+ 11 - 8
uni_modules/uview-ui/package.json

@@ -5,14 +5,14 @@
 	"version": "2.0.33",
 	"description": "uView UI已完美兼容nvue,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
 	"keywords": [
-        "uview",
-        "uview",
-        "ui",
-        "ui",
-        "uni-app",
-        "uni-app",
-        "ui"
-    ],
+		"uview",
+		"uview",
+		"ui",
+		"ui",
+		"uni-app",
+		"uni-app",
+		"ui"
+	],
 	"repository": "https://github.com/umicro/uView2.0",
 	"engines": {
 		"HBuilderX": "^3.1.0"
@@ -83,5 +83,8 @@
 				}
 			}
 		}
+	},
+	"dependencies": {
+		"uview-ui": "file:"
 	}
 }

+ 2 - 1
utils/config.js

@@ -4,7 +4,8 @@
 //let publicUrl="https://saas.createtobest.com" //本地地址2 _Zt1
 // let publicUrl="https://tgcc.com.cn:88/"
 let publicUrl="https://saas.createtobest.com" 
-let configUrl="http://5.63.101.254:3755"
+// let configUrl="http://5.63.101.254:3755"
+let configUrl="http://192.168.124.23:3755"
 // let configUrl="http://192.168.3.55:9999"
 //let publicUrl="http://192.168.1.9:9999"
 let serverAddress = uni.getStorageSync('serverAddress')