Browse Source

新需求,增加域名

wangzhuo 1 năm trước cách đây
mục cha
commit
72d8605827
6 tập tin đã thay đổi với 314 bổ sung97 xóa
  1. 8 0
      api/particulars.js
  2. 2 2
      config.js
  3. 1 2
      pages.json
  4. 10 3
      pages/listview.vue
  5. 63 23
      pages/particulars/claimExpense/index.vue
  6. 230 67
      pages/particulars/index.vue

+ 8 - 0
api/particulars.js

@@ -79,3 +79,11 @@ export function audit(data) {
     'data': data
   })
 }
+
+// 提交报账单
+export function upReceipts(orderNo) {
+  return request({
+    'url': '/order-bills-plans/up-receipts/' + orderNo,
+    'method': 'get'
+  })
+}

+ 2 - 2
config.js

@@ -1,7 +1,7 @@
 // 应用全局配置
 module.exports = {
-	// baseUrl: 'https://wms.hadexpress.com/prod-api',
-	baseUrl: 'http://121.36.212.131:8010',
+	baseUrl: 'https://yd.echepei.com/prod-api',
+	// baseUrl: 'http://121.36.212.131:8010',
 	// baseUrl: 'http://127.0.0.1:8010',
 	// 应用信息
 	appInfo: {

+ 1 - 2
pages.json

@@ -141,7 +141,6 @@
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "RuoYi",
-		"navigationBarBackgroundColor": "#FFFFFF",
-		"backgroundColor": "#c4c6c9"
+		"navigationBarBackgroundColor": "#FFFFFF"
 	}
 }

+ 10 - 3
pages/listview.vue

@@ -17,7 +17,7 @@
 		<!-- tab -->
 		<view style="background-color: #3c9cff;">
 			<u-tabs :list="tabs" lineColor="#fff" lineWidth="60" @change="change" :activeStyle="{
-					width: '140rpx',
+					width: '150rpx',
 					height: '60rpx',
 					color: '#fff',
 					backgroundColor: '#3c9cff',
@@ -25,7 +25,7 @@
 					lineHeight: '60rpx',
 					textAlign: 'center'
 					}" :inactiveStyle="{
-					width: '140rpx',
+					width: '150rpx',
 					height: '60rpx',
 					color: '#fff',
 					backgroundColor: '#3c9cff',
@@ -38,7 +38,7 @@
 		<!-- 日期 -->
 		<view style="position: sticky;top: 120rpx;">
 			<view style="background-color: white">
-				<uni-datetime-picker v-model="condition.range" type="daterange" />
+				<uni-datetime-picker v-model="condition.range" @change="datetimePickerChange" type="daterange" />
 			</view>
 		</view>
 		<view class="dataList">
@@ -169,6 +169,8 @@
                     name: '未卸车'
                 }, {
                     name: '已卸车'
+                }, {
+                    name: '已提交'
                 }]
 				this.condition.flowType = '未装车'
 			} else if (option.type == 'BX'){
@@ -198,6 +200,11 @@
 			})
 		},
 		methods: {
+			datetimePickerChange(date) {
+				console.log(date);
+				this.condition.range = date
+				this.getOrderBillsPlansList();
+			},
 			// 查询主页数据
 			getOrderBillsPlansList(type) {
 				this.loadingPageLoading = true

+ 63 - 23
pages/particulars/claimExpense/index.vue

@@ -225,43 +225,39 @@
 
 
 
-		<!-- 驾驶员 -->
-		<view v-if="button">
-			<view class="bottom" style="z-index: 4;">
+		
+		<view v-if="formData.ifStarted != 'A'">
+			<!-- 驾驶员 -->
+			<view v-if="button" class="bottom" style="z-index: 4;">
 				<view class="row">
 					<view class="button">
 						<u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="saveDisabled"
 							@click="submitShow = true" text="保存数据"></u-button>
 					</view>
 					<view class="button">
-						<u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="upDisabled"
+						<u-button iconColor="#fe8c00;" color="#fe8c00" shape="circle" type="primary" :disabled="upDisabled"
 							@click="upButtonClick('TJ')" text="提交报账单"></u-button>
 					</view>
 				</view>
 			</view>
-		</view>
-
-
-
-		<!-- 队长 -->
-		<view v-if="!button">
-			<view class="bottom" style="z-index: 4;">
+			
+			<!-- 队长 -->
+			<view v-if="!button" class="bottom" style="z-index: 4;">
 				<view class="row">
 					<view class="button">
 						<u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="sDisabled"
-							@click="auditTShow = true" text="通过"></u-button>
+							@click="auditTClick" text="通过"></u-button>
 					</view>
 					<view class="button">
 						<u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="sDisabled"
-							@click="auditFShow = true" text="驳回"></u-button>
+							@click="auditFClick" text="驳回"></u-button>
 					</view>
 				</view>
 			</view>
-
 		</view>
 
 		<!-- 遮盖罩 -->
-		<u-loading-page :loading="loading" style="z-index: 9999;"></u-loading-page>
+		<u-loading-page :loading="loading" style="z-index: 20000;"></u-loading-page>
 
 		<!-- 消息提示 -->
 		<u-toast ref="uToast"></u-toast>
@@ -272,9 +268,9 @@
 			</view>
 		</u-modal>
 
-		<u-modal :show="upAuditShow" title="提示" showCancelButton @confirm="upReview" @cancel="upAuditShow = false">
+		<u-modal :show="upAuditShow" confirmColor="#fe8c00" title="提示" showCancelButton @confirm="upReview" @cancel="upAuditShow = false">
 			<view class="slot-content">
-				<rich-text nodes="确定要提交账单吗?"></rich-text>
+				<rich-text nodes="点击确认后该业务将锁定,无法添加修改费用报销!确定要提交吗?"></rich-text>
 			</view>
 		</u-modal>
 
@@ -285,14 +281,27 @@
 		</u-modal>
 
 		<u-modal :show="auditTShow" title="提示" showCancelButton @confirm="check('T')" @cancel="auditTShow = false">
-			<view class="slot-content">
+			<view class="slot-content" style="display: flex; flex-direction: column; align-items: center;">
 				<rich-text nodes="确定要审核通过吗?"></rich-text>
+				<input style="margin-top: 20rpx;"
+					selection-start="0"
+					selection-end="9999"
+					placeholder="请输入通过意见"
+					placeholder-style="font-size: 28rpx"
+					v-model="formData.audit2Desc"
+				/>
 			</view>
 		</u-modal>
-
 		<u-modal :show="auditFShow" title="提示" showCancelButton @confirm="check('F')" @cancel="auditFShow = false">
-			<view class="slot-content">
+			<view class="slot-content" style="display: flex; flex-direction: column; align-items: center;">
 				<rich-text nodes="确定要驳回审核吗?"></rich-text>
+				<input style="margin-top: 20rpx;"
+					selection-start="0"
+					selection-end="9999"
+					placeholder="请输入驳回意见"
+					placeholder-style="font-size: 28rpx"
+					v-model="formData.audit2Desc"
+				/>
 			</view>
 		</u-modal>
 	</view>
@@ -389,6 +398,14 @@
 			change(item) {
 				this.isTabs = item.name;
 			},
+			auditTClick() {
+				this.formData.audit2Desc = "审核通过"
+				this.auditTShow = true
+			},
+			auditFClick() {
+				this.formData.audit2Desc = null
+				this.auditFShow = true
+			},
 			getData() {
 				// 报销费用下拉选
 				getGasStations().then(res => {
@@ -524,6 +541,14 @@
 						message: "没有卸车时间!",
 						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
 					})
+				} else if (this.formData.ifOrder2ed == 'F') {
+					this.upAuditShow = false;
+					this.$refs.uToast.show({
+						type: 'warning',
+						icon: false,
+						message: "装卸信息提交后才能报账!",
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+					})
 				} else {
 					if (type == 'BX') {
 						this.submitShow = true
@@ -729,15 +754,25 @@
 
 			// 提交审核
 			upReview() {
-				if (this.status376 == 6) {
+				// if (this.status376 == 6) {
+				// 	this.upAuditShow = false;
+				// 	this.$refs.uToast.show({
+				// 		type: 'warning',
+				// 		icon: false,
+				// 		message: "不允许保存!",
+				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+				// 	})
+				// } else if (this.status376 == 2 || this.status376 == 0) {
+					
+				if (this.formData.ifOrder2ed != 'O') {
 					this.upAuditShow = false;
 					this.$refs.uToast.show({
 						type: 'warning',
 						icon: false,
-						message: "不允许保存!",
+						message: "请先提交报账单!",
 						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
 					})
-				} else if (this.status376 == 2 || this.status376 == 0) {
+				} else if (this.formData.ifOrder2ed == 'O') {
 
 					let isMo = false;
 
@@ -911,9 +946,12 @@
 
 			// 审核
 			check(type) {
+				this.loading = true;
 				var data = {
 					orderNo: this.orderNo,
 					entityId: this.formData.entityId,
+					audit2Desc: this.formData.audit2Desc,
+					lineNo: this.formData.lineNo,
 					auditType: type
 				}
 
@@ -932,6 +970,7 @@
 							message: "审核成功!",
 							iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
 						})
+						this.loading = false;
 					} else {
 						// 保存失败消息
 						this.$refs.uToast.show({
@@ -939,6 +978,7 @@
 							message: "审核失败请重试!",
 							iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
 						})
+						this.loading = false;
 					}
 				})
 			},

+ 230 - 67
pages/particulars/index.vue

@@ -58,8 +58,8 @@
 
 				<view class="box-two">
 					<text class="key">装车时间</text>
-					<uni-datetime-picker class="value-two" :start="startDate" :end="new Date + ''" :disabled="disabled"
-						:hide-second="true" v-model="formData.loadDateString" :border="false" />
+					<uni-datetime-picker class="value-two" :start="startDate" :end="end" :disabled="disabled"
+						:hide-second="true" v-model="formData.loadDateString" :border="false"></uni-datetime-picker>
 						<view class="today" @click="today('ZC')"><text>今天</text></view>
 				</view>
 
@@ -71,8 +71,8 @@
 
 				<view class="box-two">
 					<text class="key">卸车时间</text>
-					<uni-datetime-picker class="value-two" :start="formData.loadDateString" :end="new Date + ''"
-						:hide-second="true" :disabled="disabled" v-model="formData.unLoadDateString" :border="false" />
+					<uni-datetime-picker class="value-two" :start="formData.loadDateString" :end="end"
+						:hide-second="true" :disabled="disabled" v-model="formData.unLoadDateString" :border="false"></uni-datetime-picker>
 						<view class="today" @click="today('XC')"><text>今天</text></view>
 				</view>
 
@@ -114,13 +114,31 @@
 					</u-checkbox>
 				</u-checkbox-group>
 				<view v-if="detour.length > 0">
+					<!-- <view class="box-two">
+						<view style="width: 48%; display: flex;">
+							<text class="key" style="width: 200rpx;">绕路里程空</text>
+							<input class="value-two" style="width: 200rpx;" selection-start="0" selection-end="9999" :disabled="disabled"
+								@input="checkUnDetourEmptyMile" v-model="formData.detourEmptyMile" />
+						</view>
+						<view style="width: 4%; height: 200rpx;"></view>
+						<view  style="width: 48%; display: flex;">
+							<text class="key" style="width: 200rpx; margin: 0 10rpx;">绕路里程重</text>
+							<input class="value-two" style="width: 200rpx;" selection-start="0" selection-end="9999" :disabled="disabled"
+								@input="checkUnDetourLoadMile" v-model="formData.detourLoadMile" />
+						</view>
+					</view> -->
 					<view class="box-two">
-						<text class="key">绕路里程</text>
+						<text class="key" style="width: 300rpx;">绕路里程空(公里)</text>
 						<input class="value-two" selection-start="0" selection-end="9999" :disabled="disabled"
-							@input="checkUnDetourMile" v-model="formData.detourMile" />
+							@input="checkUnDetourEmptyMile" v-model="formData.detourEmptyMile" />
 					</view>
 					<view class="box-two">
-						<text class="key">绕路原因</text>
+						<text class="key" style="width: 300rpx;">绕路里程重(公里)</text>
+						<input class="value-two"selection-start="0" selection-end="9999" :disabled="disabled"
+							@input="checkUnDetourLoadMile" v-model="formData.detourLoadMile" />
+					</view>
+					<view class="box-two">
+						<text class="key" style="width: 300rpx;">绕&nbsp;&nbsp;&nbsp;&nbsp;路&nbsp;&nbsp;&nbsp;&nbsp;原&nbsp;&nbsp;&nbsp;&nbsp;因</text>
 						<input class="value-two" selection-start="0" selection-end="9999" :disabled="disabled"
 							v-model="formData.detourDesc" />
 					</view>
@@ -152,7 +170,7 @@
 				<view style="color: red;"><text>注意事项:</text></view>
 				<!-- <text class="text-grey1">请查看</text>
 				<text @click="attention()" class="text-blue">注意事项</text> -->
-				{{this.formData.remarks}}
+				{{this.formData.remarks ? this.formData.remarks:''}}
 			</view>
 		</view>
 		<!-- <view v-if="isTabs == '订单信息'">
@@ -196,20 +214,19 @@
 		<view class="cushion">
 		</view>
 
-		<!-- <view class="bottom" style="z-index: 4;">
-			<view class="row">
-				<view class="button">
+		<view class="bottom" style="z-index: 4;" v-if="formData.ifStarted != 'A'">
+			<view class="row" v-if="formData.ifLoaded == 'T' && (formData.ifUnLoaded == 'T' || formData.ifUnLoaded == 'F') && formData.ifOrder2ed == 'F'">
+				<view class="button" style="width: 300rpx;">
 					<u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="disabled"
-						@click="submitShow = true" text="提交里程"></u-button>
+						@click="disabledClick" text="保存数据"></u-button>
 				</view>
-				<view class="button">
-					<u-button iconColor="#3c9cff" shape="circle" type="primary" @click="skipClaimExpense"
-						text="报销费用"></u-button>
+				<view class="button" style="width: 300rpx;">
+					<u-button iconColor="#fe8c00;" color="#fe8c00" shape="circle" type="primary" :disabled="disabled"
+						@click="upDisabledClick" text="提交报账单"></u-button>
 				</view>
 			</view>
-		</view> -->
-		<view class="bottom" style="z-index: 4;">
-			<view class="row">
+			
+			<view class="row" v-else>
 				<view class="button">
 					<u-button iconColor="#3c9cff" shape="circle" type="primary" :disabled="disabled"
 						@click="disabledClick" text="保存数据"></u-button>
@@ -246,7 +263,14 @@
 		<u-modal :show="submitShow" title="提示" showCancelButton @confirm="setOrderBillsPlansByid"
 			@cancel="submitShow = false">
 			<view class="slot-content">
-				<rich-text nodes="确定要提交里程吗?"></rich-text>
+				<rich-text nodes="确定要提交装卸信息吗?"></rich-text>
+			</view>
+		</u-modal>
+		
+		<u-modal :show="upCancel" title="提示" showCancelButton @confirm="upReceipts"
+			@cancel="upCancel = false">
+			<view class="slot-content">
+				<rich-text nodes="确定要提交报账单吗?"></rich-text>
 			</view>
 		</u-modal>
 	</view>
@@ -260,7 +284,8 @@
 		pictureUploading,
 		deleteTmsAttachMngs,
 		audit,
-		submitAudit
+		submitAudit,
+		upReceipts
 	} from "@/api/particulars"
 
 	import {
@@ -298,6 +323,8 @@
 				deleteShow: false,
 				// 提交里程弹窗
 				submitShow: false,
+				// 提交报账单弹窗
+				upCancel: false,
 				// 删除的图片
 				event: {},
 				// 输入框禁用
@@ -313,7 +340,8 @@
 				}],
 				isTabs: '装卸确认',
 				// 绕路选项
-				detour: []
+				detour: [],
+				end: new Date()
 			};
 		},
 		onLoad: function(option) {
@@ -336,7 +364,8 @@
 					res.data.unLoadQty == 0 ? res.data.unLoadQty = null : res.data.unLoadQty
 					res.data.odometerstart == 0 ? res.data.odometerstart = null : res.data.odometerstart
 					res.data.odometerend == 0 ? res.data.odometerend = null : res.data.odometerend
-					res.data.loadmile == 0 ? res.data.loadmile = null : res.data.loadmile
+					res.data.detourEmptyMile == 0 ? res.data.detourEmptyMile = null : res.data.detourEmptyMile
+					res.data.detourLoadMile == 0 ? res.data.detourLoadMile = null : res.data.detourLoadMile
 
 					if (res.data.ifDetour == "T") {
 						this.detour.push("行程绕路")
@@ -363,6 +392,11 @@
 						res.data.ifStarted == "A") {
 						this.disabled = true;
 					}
+					
+					// 提交报账单
+					if (res.data.ifOrder2ed == "S" || res.data.ifOrder2ed == "O") {
+						this.disabled = true;
+					}
 
 					this.formData = res.data;
 					this.fileList1 = res.data.fileList1;
@@ -391,59 +425,65 @@
 			},
 			// 数据校验
 			dataVerify() {
-				// if (this.formData.loadQty == '' || this.formData.loadQty == null || this.formData.loadQty == '0') {
-				// 	this.$refs.uToast.show({
-				// 		type: 'warning',
-				// 		icon: false,
-				// 		message: "请输入装车吨位!",
-				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
-				// 	})
-				// } else if (this.formData.loadDateString == '' || this.formData.loadDateString == null) {
-				// 	this.$refs.uToast.show({
-				// 		type: 'warning',
-				// 		icon: false,
-				// 		message: "请选择装车时间!",
-				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
-				// 	})
-				// } else if (this.formData.unLoadQty == '' || this.formData.unLoadQty == null || this.formData.unLoadQty == '0') {
-				// 	this.$refs.uToast.show({
-				// 		type: 'warning',
-				// 		icon: false,
-				// 		message: "请输入卸车吨位!",
-				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
-				// 	})
-				// } else if (this.formData.unLoadDateString == '' || this.formData.unLoadDateString == null) {
-				// 	this.$refs.uToast.show({
-				// 		type: 'warning',
-				// 		icon: false,
-				// 		message: "请选择卸车时间!",
-				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
-				// 	})
-				// } 
-				// else if (this.fileList1.length < 2) {
-				// 	return this.$refs.uToast.show({
-				// 		type: 'warning',
-				// 		icon: false,
-				// 		message: "图片最少两张!",
-				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
-				// 	})
-				// }
-				 // else {
+				if (this.formData.loadQty == '' || this.formData.loadQty == null || this.formData.loadQty == '0') {
+					this.$refs.uToast.show({
+						type: 'warning',
+						icon: false,
+						message: "请输入装车吨位!",
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+					})
+				} else if (this.formData.loadDateString == '' || this.formData.loadDateString == null) {
+					this.$refs.uToast.show({
+						type: 'warning',
+						icon: false,
+						message: "请选择装车时间!",
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+					})
+				} else if (this.formData.unLoadQty == '' || this.formData.unLoadQty == null || this.formData.unLoadQty == '0') {
+					this.$refs.uToast.show({
+						type: 'warning',
+						icon: false,
+						message: "请输入卸车吨位!",
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+					})
+				} else if (this.formData.unLoadDateString == '' || this.formData.unLoadDateString == null) {
+					this.$refs.uToast.show({
+						type: 'warning',
+						icon: false,
+						message: "请选择卸车时间!",
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+					})
+				} 
+				else if (this.fileList1.length < 2) {
+					return this.$refs.uToast.show({
+						type: 'warning',
+						icon: false,
+						message: "图片最少两张!",
+						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+					})
+				}
+				 else {
 					return 'ok';
-				// }
+				}
 			},
 			// 提交里程点击事件
 			disabledClick() {
 				// if (this.status317 == 2 && this.dataVerify() == 'ok') {
-				if (this.dataVerify() == 'ok') {
+				// if (this.dataVerify() == 'ok') {
 					this.submitShow = true
-				} else {
+				// } else {
 					// this.$refs.uToast.show({
 					// 	type: 'warning',
 					// 	icon: false,
 					// 	message: "不允许保存!",
 					// 	iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
 					// })
+				// }
+			},
+			// 提交报账单数据校验
+			upDisabledClick() {
+				if(this.dataVerify() === 'ok') {
+					this.upCancel = true
 				}
 			},
 			// 保存订单
@@ -467,13 +507,14 @@
 				
 				this.formData.odometerstart = this.formData.odometerstart == null || this.formData.odometerstart == '' ? 0 : this.formData.odometerstart
 				this.formData.odometerend = this.formData.odometerend == null || this.formData.odometerend == '' ? 0 : this.formData.odometerend
-				this.formData.loadmile = this.formData.loadmile == null || this.formData.loadmile == '' ? 0 : this.formData.loadmile
-
+				this.formData.loadmile = this.formData.loadmile == null || this.formData.loadmile == '' ? 0 : this.formData.loadmile				
 
 
 				// 行程绕路赋值
 				if (this.detour.length > 0) {
 					this.formData.ifDetour = "T"
+					this.formData.detourEmptyMile = this.formData.detourEmptyMile == null || this.formData.detourEmptyMile == '' ? 0 : this.formData.detourEmptyMile
+					this.formData.detourLoadMile = this.formData.detourLoadMile == null || this.formData.detourLoadMile == '' ? 0 : this.formData.detourLoadMile
 				} else {
 					this.formData.ifDetour = "F"
 				}
@@ -487,6 +528,8 @@
 							res.data.odometerstart == 0 ? res.data.odometerstart = null : res.data.odometerstart
 							res.data.odometerend == 0 ? res.data.odometerend = null : res.data.odometerend
 							res.data.loadmile == 0 ? res.data.loadmile = null : res.data.loadmile
+							res.data.detourEmptyMile == 0 ? res.data.detourEmptyMile = null : res.data.detourEmptyMile
+							res.data.detourLoadMile == 0 ? res.data.detourLoadMile = null : res.data.detourLoadMile
 						
 							if (res.data.ifDetour == "T") {
 								this.detour.push("行程绕路")
@@ -510,6 +553,11 @@
 								res.data.ifStarted == "A") {
 								this.disabled = true;
 							}
+							
+							// 提交报账单
+							if (res.data.ifOrder2ed == "S" || res.data.ifOrder2ed == "O") {
+								this.disabled = true;
+							}
 						
 							this.formData = res.data;
 							this.fileList1 = res.data.fileList1;
@@ -540,6 +588,112 @@
 					}
 				})
 			},
+			// 提交单据
+			upReceipts() {
+				this.loading = true;
+				this.formData.loadQty = this.formData.loadQty == null || this.formData.loadQty == '' ? 0 : this.formData.loadQty
+				this.formData.unLoadQty = this.formData.unLoadQty == null || this.formData.unLoadQty == '' ? 0 : this.formData.unLoadQty
+				
+				if(this.formData.loadDateString != null && this.formData.loadDateString != '') {
+					this.formData.loadDateString = this.dateToStringS("yyyy-MM-dd HH:mm:ss", new Date(this.formData.loadDateString))
+				} else {
+					this.formData.loadDateString = null
+				}
+				// 
+				if(this.formData.unLoadDateString != null && this.formData.unLoadDateString != '') {
+					this.formData.unLoadDateString = this.dateToStringS("yyyy-MM-dd HH:mm:ss", new Date(this.formData.unLoadDateString))
+				} else {
+					this.formData.unLoadDateString = null
+				}
+							
+				
+				this.formData.odometerstart = this.formData.odometerstart == null || this.formData.odometerstart == '' ? 0 : this.formData.odometerstart
+				this.formData.odometerend = this.formData.odometerend == null || this.formData.odometerend == '' ? 0 : this.formData.odometerend
+				this.formData.loadmile = this.formData.loadmile == null || this.formData.loadmile == '' ? 0 : this.formData.loadmile
+				
+				// 行程绕路赋值
+				if (this.detour.length > 0) {
+					this.formData.ifDetour = "T"
+					this.formData.detourEmptyMile = this.formData.detourEmptyMile == null || this.formData.detourEmptyMile == '' ? 0 : this.formData.detourEmptyMile
+					this.formData.detourLoadMile = this.formData.detourLoadMile == null || this.formData.detourLoadMile == '' ? 0 : this.formData.detourLoadMile
+				} else {
+					this.formData.ifDetour = "F"
+				}
+				
+				putOrderBillsPlansByid(this.formData).then(ress => {
+					if (ress.code == 200) {
+						getOrderBillsPlansByid(this.orderNo).then(res => {
+						
+							res.data.loadQty == 0 ? res.data.loadQty = null : res.data.loadQty
+							res.data.unLoadQty == 0 ? res.data.unLoadQty = null : res.data.unLoadQty
+							res.data.odometerstart == 0 ? res.data.odometerstart = null : res.data.odometerstart
+							res.data.odometerend == 0 ? res.data.odometerend = null : res.data.odometerend
+							res.data.loadmile == 0 ? res.data.loadmile = null : res.data.loadmile
+							res.data.detourEmptyMile == 0 ? res.data.detourEmptyMile = null : res.data.detourEmptyMile
+							res.data.detourLoadMile == 0 ? res.data.detourLoadMile = null : res.data.detourLoadMile
+						
+							if (res.data.ifDetour == "T") {
+								this.detour.push("行程绕路")
+							}
+						
+							for (let role of res.data.roleList) {
+								if (role.roleKey == 'DZ') {
+									this.disabled = true;
+								}
+							}
+						
+							// 审核中
+							if (res.data.ifLoaded == "T" &&
+								res.data.ifUnLoaded == "T" &&
+								res.data.ifStarted == "S") {
+								this.disabled = true;
+							}
+							// 审核完成
+							if (res.data.ifLoaded == "T" &&
+								res.data.ifUnLoaded == "T" &&
+								res.data.ifStarted == "A") {
+								this.disabled = true;
+							}
+							
+							// 提交报账单
+							if (res.data.ifOrder2ed == "S" || res.data.ifOrder2ed == "O") {
+								this.disabled = true;
+							}
+						
+							this.formData = res.data;
+							this.fileList1 = res.data.fileList1;
+							this.loading = false;
+						
+							if (this.status317 == 6) {
+								this.disabled = true;
+							}
+							this.startDate = this.GetTime(60)
+							
+							this.upCancel = false
+							
+							upReceipts(this.orderNo).then(res => {
+							
+								// 提交报账单成功
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "提交报账单成功!",
+									iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
+								})
+							})
+							
+						})
+						
+					} else {
+						// 提交报账单失败
+						this.$refs.uToast.show({
+							icon: false,
+							message: "提交失败请重试!",
+							iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
+						})
+					}
+				})
+				this.loading = false;
+			},
 			// 点击拨打电话
 			telFun() {
 				if (this.formData.driver1mobile != null && this.formData.driver1mobile != '') {
@@ -773,14 +927,23 @@
 				})
 
 			},
-			checkUnDetourMile(e) {
+			checkUnDetourEmptyMile(e) {
 				//正则表达试
 				e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
 				//重新赋值给input
 				this.$nextTick(() => {
-					this.formData.detourMile = e.target.value
+					this.formData.detourEmptyMile = e.target.value
 				})
 
+			},
+			checkUnDetourLoadMile(e) {
+				//正则表达试
+				e.target.value = (e.target.value.match(/^\d*(\.?\d{0,3})/g)[0]) || null
+				//重新赋值给input
+				this.$nextTick(() => {
+					this.formData.detourLoadMile = e.target.value
+				})
+			
 			}
 		}
 	}