zhongtianhaoyuan 2 年之前
父节点
当前提交
68bdf5a277
共有 3 个文件被更改,包括 76 次插入29 次删除
  1. 12 7
      pages/fuelfilling/apply_for_reimbursement.vue
  2. 21 3
      pages/fuelfilling/apply_see_reimbursement.vue
  3. 43 19
      pages/task/audit/refuel.vue

+ 12 - 7
pages/fuelfilling/apply_for_reimbursement.vue

@@ -60,7 +60,9 @@
 				</view>
 				</view>
 				<view class="c-row">
 				<view class="c-row">
 					<view class="title">加油凭证</view>
 					<view class="title">加油凭证</view>
-					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+				</view>
+				<view class="voucher">
+					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9"
 						:size-type="['compressed']" @on-success="getImgUrl($event,index)" @on-error="onError"
 						:size-type="['compressed']" @on-success="getImgUrl($event,index)" @on-error="onError"
 						@on-remove="onRemove($event,index)" @on-uploaded="isAdd = true" :before-upload="filterFileType"
 						@on-remove="onRemove($event,index)" @on-uploaded="isAdd = true" :before-upload="filterFileType"
 						@on-progress="onProgress"></upload>
 						@on-progress="onProgress"></upload>
@@ -94,7 +96,7 @@
 		data() {
 		data() {
 			return {
 			return {
 				detailData: {
 				detailData: {
-					carNo: '辽A11111',
+					carNo: '',
 					destinationProvince: "",
 					destinationProvince: "",
 					destinationCity: "",
 					destinationCity: "",
 					destinationArea: "",
 					destinationArea: "",
@@ -233,16 +235,16 @@
 						return
 						return
 					}
 					}
 				}
 				}
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				});
 				uni.showModal({
 				uni.showModal({
 					content: "确定提交申请信息?",
 					content: "确定提交申请信息?",
 					showCancel: true,
 					showCancel: true,
 					confirmText: '提交',
 					confirmText: '提交',
 					success: function(res) {
 					success: function(res) {
 						if (res.confirm) {
 						if (res.confirm) {
+							uni.showLoading({
+								title: '加载中',
+								mask: true
+							});
 							that.fillingDetail.tfc = that.tfc
 							that.fillingDetail.tfc = that.tfc
 							that.fillingDetail.totalCost = that.totalCost
 							that.fillingDetail.totalCost = that.totalCost
 							for (let i = 0; i < that.fillingDetail.fillingDetailInfoList.length; i++) {
 							for (let i = 0; i < that.fillingDetail.fillingDetailInfoList.length; i++) {
@@ -421,7 +423,7 @@
 		}
 		}
 
 
 		.upload {
 		.upload {
-			margin-left: 157px;
+			/* margin-left: 157px; */
 		}
 		}
 	}
 	}
 
 
@@ -488,4 +490,7 @@
 		background: #F9F9FA;
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
 		border: 1px solid #EEEEEE;
 	}
 	}
+	.voucher{
+		margin-left: 20rpx;
+	}
 </style>
 </style>

+ 21 - 3
pages/fuelfilling/apply_see_reimbursement.vue

@@ -54,8 +54,11 @@
 				</view>
 				</view>
 				<view class="c-row" style="justify-content: space-between;">
 				<view class="c-row" style="justify-content: space-between;">
 					<view class="title">加油凭证</view>
 					<view class="title">加油凭证</view>
-					<image :src="item.addressUrl" mode="widthFix" style="width: 200rpx;" v-if='item.addressUrl'
-						@click="previewImage(item.addressUrl)"></image>
+					<!-- <image :src="item.addressUrl" mode="widthFix" style="width: 200rpx;" v-if='item.addressUrl'
+						@click="previewImage(item.addressUrl)"></image> -->
+				</view>
+				<view class="voucher">
+					<u-upload :action="action" :file-list="item.urlList" max-count="1" :deletable="false" :show-progress="false"></u-upload>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="footer">
 			<view class="footer">
@@ -126,6 +129,18 @@
 				}).then(res => {
 				}).then(res => {
 					if (res.data.code == 200) {
 					if (res.data.code == 200) {
 						this.detailData = res.data.data
 						this.detailData = res.data.data
+						for (let i = 0; i < this.detailData.fillingDetailInfoList.length; i++) {
+							let urlList = []
+							if (this.detailData.fillingDetailInfoList[i].addressUrl) {
+								let datalist = this.detailData.fillingDetailInfoList[i].addressUrl.split(",")
+								for (let j = 0; j < datalist.length; j++) {
+									urlList.push({
+										url: datalist[j]
+									})
+								}
+								this.detailData.fillingDetailInfoList[i].urlList = urlList
+							}
+						}
 					}
 					}
 				})
 				})
 			},
 			},
@@ -229,7 +244,7 @@
 
 
 <style lang='scss' scoped>
 <style lang='scss' scoped>
 	.center {
 	.center {
-		padding-bottom: 330rpx;
+		padding-bottom: 220rpx;
 	}
 	}
 
 
 	page {
 	page {
@@ -443,4 +458,7 @@
 		background: #F9F9FA;
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
 		border: 1px solid #EEEEEE;
 	}
 	}
+	.voucher{
+		margin-left: 20rpx;
+	}
 </style>
 </style>

+ 43 - 19
pages/task/audit/refuel.vue

@@ -7,11 +7,15 @@
 				label="车牌号">
 				label="车牌号">
 				<u-input v-model="list.carNo" input-align="right" placeholder="--" disabled />
 				<u-input v-model="list.carNo" input-align="right" placeholder="--" disabled />
 			</u-form-item>
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="起点">
-				{{list.originProvince}}{{list.originCity}}{{list.originArea}}{{list.originAddress}}
+			<u-form-item v-if='list.strokeType==1' label-width='150' :borderBottom="false" label="起点">
+				<view class="place">
+					{{list.originProvince}}{{list.originCity}}{{list.originArea}}{{list.originAddress}}
+				</view>
 			</u-form-item>
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="终点">
-				{{list.destinationProvince}}{{list.destinationCity}}{{list.destinationArea}}{{list.destinationAddress}}
+			<u-form-item v-if='list.strokeType==1' label-width='150' :borderBottom="false" label="终点">
+				<view class="place">
+					{{list.destinationProvince}}{{list.destinationCity}}{{list.destinationArea}}{{list.destinationAddress}}
+				</view>
 			</u-form-item>
 			</u-form-item>
 			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="总油耗(升)">
 			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="总油耗(升)">
 				<u-input v-model="list.tfc" input-align="right" placeholder="--" disabled />
 				<u-input v-model="list.tfc" input-align="right" placeholder="--" disabled />
@@ -50,13 +54,19 @@
 					<!-- {{item.currentConsumption}} -->
 					<!-- {{item.currentConsumption}} -->
 					<u-input v-model="item.currentConsumption" disabled inputAlign="right" />
 					<u-input v-model="item.currentConsumption" disabled inputAlign="right" />
 				</u-form-item>
 				</u-form-item>
-				<u-form-item label="凭证">
+				<!-- <u-form-item label="凭证"> -->
 					<!-- <img :src="item.addressUrl" alt="" mode="aspectFill"> -->
 					<!-- <img :src="item.addressUrl" alt="" mode="aspectFill"> -->
-					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					<!-- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
 						:size-type="['compressed']" :deletable="false" @on-uploaded="isAdd = true"
 						:size-type="['compressed']" :deletable="false" @on-uploaded="isAdd = true"
 						:before-upload="filterFileType" @on-progress="onProgress" :fileList="item.urlList">
 						:before-upload="filterFileType" @on-progress="onProgress" :fileList="item.urlList">
-					</upload>
-				</u-form-item>
+					</upload> -->
+				<!-- </u-form-item> -->
+				<view class="voucher">
+					<view class="voucher_tips">加油凭证</view>
+					<view >
+						<u-upload :action="action" :file-list="item.urlList" max-count="1" :deletable="false" :show-progress="false"></u-upload>
+					</view>
+				</view>
 			</u-form>
 			</u-form>
 		</view>
 		</view>
 		<view v-if="list.shortFillingInfoList">
 		<view v-if="list.shortFillingInfoList">
@@ -256,21 +266,22 @@
 					title: '加载中',
 					title: '加载中',
 					mask: true
 					mask: true
 				})
 				})
-				this.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
-					id: this.id
+				that.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
+					id: that.id
 				}).then(res => {
 				}).then(res => {
 					if (res.data.code == 200) {
 					if (res.data.code == 200) {
-						this.list = res.data.data
-						for (let i = 0; i < this.list.fillingDetailInfoList.length; i++) {
-							console.log(this.list.fillingDetailInfoList[i].addressUrl)
+						that.list = res.data.data
+						for (let i = 0; i < that.list.fillingDetailInfoList.length; i++) {
 							let urlList = []
 							let urlList = []
-							if (this.list.fillingDetailInfoList[i].addressUrl) {
-								urlList.push({
-									url: this.list.fillingDetailInfoList[i]
-										.addressUrl
-								})
+							if (that.list.fillingDetailInfoList[i].addressUrl) {
+								let datalist = that.list.fillingDetailInfoList[i].addressUrl.split(",")
+								for (let j = 0; j < datalist.length; j++) {
+									urlList.push({
+										url: datalist[j]
+									})
+								}
+								that.list.fillingDetailInfoList[i].urlList = urlList
 							}
 							}
-							this.list.fillingDetailInfoList[i].urlList = urlList
 						}
 						}
 						// this.$api.doRequest('get', '/appendix/query/getFileList', {
 						// this.$api.doRequest('get', '/appendix/query/getFileList', {
 						// 	appendixIds: that.list.addressUrl
 						// 	appendixIds: that.list.addressUrl
@@ -915,6 +926,11 @@
 		font-size: 30rpx;
 		font-size: 30rpx;
 		font-weight: 600;
 		font-weight: 600;
 	}
 	}
+	.place{
+		margin: auto;
+		margin-right: 0px;
+		text-align: right;
+	}
 
 
 	.form_view {
 	.form_view {
 		margin: 20rpx 0;
 		margin: 20rpx 0;
@@ -1047,6 +1063,14 @@
 			text-align: right;
 			text-align: right;
 		}
 		}
 	}
 	}
+	//凭证
+	.voucher{
+		.voucher_tips{
+			margin-top: 20rpx;
+			color: #878C9C;
+		}
+	}
+	
 
 
 	.upload {
 	.upload {
 	   margin: auto;
 	   margin: auto;