gjy 2 years ago
parent
commit
ca2dc7fb15

+ 5 - 6
components/mehaotian-search-revision.vue

@@ -4,11 +4,10 @@
 			<!-- HM修改 增加进入输入状态的点击范围 -->
 			<view class="content-box" @click="getFocus">
 				<text class="icon icon-serach"></text>
-					<input class="uni-input" focus placeholder="自动获得焦点" />
 				<!-- HM修改 增加placeholder input confirm-type confirm-->
-				<!-- <input ref='myInput' :placeholder="placeholder" placeholder-style='font-size:28rpx' @input="inputChange"
+				<input ref='myInput' :placeholder="placeholder" placeholder-style='font-size:28rpx' @input="inputChange"
 					confirm-type="search" @confirm="triggerConfirm" class="input" focus  v-model="inputVal"
-					 @blur="blur" /> -->
+					 @blur="blur" />
 				<!-- <view v-if="!active && mode === 2" class="input sub" @click="getFocus">请输入搜索内容</view> -->
 				<!-- HM修改 @click换成@click.stop阻止冒泡 -->
 				<text v-if="isDelShow" class="icon icon-del" @click.stop="clear"></text>
@@ -107,7 +106,7 @@
 			},
 			clear() {
 				//HM修改 收起键盘
-				uni.hideKeyboard();
+				// uni.hideKeyboard();
 				this.isFocus = false;
 				this.inputVal = '';
 				this.active = false;
@@ -120,7 +119,7 @@
 				this.isFocus = true;
 			},
 			setFocus() {
-				uni.hideKeyboard()
+				// uni.hideKeyboard()
 				this.$nextTick(() => {
 					// this.isFocus = true;
 				// 	console.log(this.$refs)
@@ -137,7 +136,7 @@
 				//HM修改 增加点击取消时候退出输入状态,内容为空时,输入默认关键字
 				if (!this.inputVal) {
 					if (!this.show && this.searchName == '取消') {
-						uni.hideKeyboard();
+						// uni.hideKeyboard();
 						this.isFocus = false;
 						this.active = false;
 						return;

+ 2 - 2
config/index.js

@@ -6,11 +6,11 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.9:9888/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.67:9888/',
-	// baseUrlNew: 'http://192.168.110.138:8090/',
+	baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.9:9888/',
 	// baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8090/',
-	baseUrlNew: 'http://192.168.110.202:8090/',
+	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
 	// baseUrlNew: 'https://api2.eliangeyun.com/',

+ 0 - 1
pages/erpbusiness/bleConnect.vue

@@ -119,7 +119,6 @@
 										})
 										return;
 									}
-			
 									//获取蓝牙设备信息
 									that.getBluetoothDevices()
 			

+ 1 - 2
pages/erpbusiness/customer.vue

@@ -15,7 +15,6 @@
 		</view>
 		 <view class="content">
 			<!-- <view style='padding-left:20px;color:#AFB3BF;font-size:14px;' v-if='show==false'>近期客户</view> -->
-
 			<view v-for='item in gridList'>
 				<view v-if='searchKeyWord.length>0&&show==true' class='searchwrap' @click='checkcustomer(item)'>
 					<view v-if="item.supplier"> {{item.customerName}}({{item.bankCard}})-{{item.supplier}} </view>
@@ -207,7 +206,7 @@
 					this.recentCustomers.push(item)
 					uni.setStorageSync('recentCustomers', this.recentCustomers)
 				} else {
-					let _copyList = this.$u.deepClone(this.recentCustomers);
+					let _copyList = this.$u.deepClone(this.recentCustomers)
 					for (let i = 0; i < this.recentCustomers.length; i++) {
 						if (this.recentCustomers[i].customerPhone != item.shipperPhone) {
 							_copyList.push(item)

+ 101 - 173
pages/reimbursement/request_funds.vue

@@ -22,13 +22,10 @@
 					</view>
 				</view>
 			</view>
-			<view class="c-row" v-if="(detailData.purpose == '库点费用'&&reType == 2) || (detailData.purpose == '库点费用'&&expensesType == 2)">
+			<view class="c-row" v-if="detailData.purpose == '库点费用'&&reType == 2">
 				<view class="title">仓储费</view>
 				<view class="con-list">
-					<view @click='show3=true' v-if="detailData.storageFeeFlag == 1">是
-						<u-icon name="arrow-right" color=""></u-icon>
-					</view>
-					<view @click='show3=true' v-else>否
+					<view @click='show3=true'>{{detailData.flag}}
 						<u-icon name="arrow-right" color=""></u-icon>
 					</view>
 				</view>
@@ -44,7 +41,8 @@
 					</view>
 				</view>
 			</view>
-			<u-picker :range="typeList" range-key="value" @confirm='typeCheck($event)' v-model="show2" mode="selector">
+			<u-picker :range="typeList" range-key="value" @confirm='typeCheck($event)' v-model="show2"
+				mode="selector">
 			</u-picker>
 			<view class="c-row" v-if="detailData.purpose == '合同费用'">
 				<view class="title">合同编号</view>
@@ -66,8 +64,7 @@
 					<input v-model='detailData.payerHeader' maxlength='25' placeholder="输入付款方名头"></input>
 				</view>
 			</view>
-			<view v-show="reType == 2&&detailData.purpose=='经营性费用' || expensesType == '2'&&detailData.purpose=='经营性费用'"
-				class="c-row">
+			<view v-show="reType == 2&&detailData.purpose=='经营性费用' || expensesType == '2'&&detailData.purpose=='经营性费用'" class="c-row">
 				<view class="title">所属名头</view>
 				<view class="con-list">
 					<view @click='show1=true'>{{detailData.belongName?detailData.belongName:"请选择所属名头"}}
@@ -75,7 +72,8 @@
 					</view>
 				</view>
 			</view>
-			<u-picker :range="namelist" range-key="name" @confirm='confirmname($event)' v-model="show1" mode="selector">
+			<u-picker :range="namelist" range-key="name" @confirm='confirmname($event)' v-model="show1"
+				mode="selector">
 			</u-picker>
 			<view class="c-row">
 				<view class="title">金额(元)</view>
@@ -117,7 +115,7 @@
 			</view>
 		</view>
 		<view v-if="reType == 2 || expensesType == '2'" class='wrap margin-bottom'>
-			<view class="xinxi" style="font-size: 28rpx; ">收款账户信息</view>
+			<view class="xinxi"  style="font-size: 28rpx; ">收款账户信息</view>
 			<view class="c-row">
 				<view class="title">收款方</view>
 				<view class="con-list">
@@ -156,13 +154,13 @@
 		data() {
 			return {
 				show: false,
-				show2: false,
+				show2:false,
 				showWare: false,
 				detailData: {
-					storageFeeFlag: 0,
+					flag:'否',
 					purpose: '库点费用',
 					remark: "",
-					wareExpenseType: '杂费',
+					wareExpenseType:'杂费',
 					warehouseName: '选择仓库',
 					expenseName: '',
 					amountMoney: '',
@@ -176,11 +174,11 @@
 					totalDistribution: '0',
 				},
 				fileList1: [],
-				show1: false,
+				show1:false,
 				warehouseType: '1',
 				typeRemark: 'textarea',
 				border: true,
-				show3: false,
+				show3:false,
 				imglist: [], //存
 				imglist2: [], //展示
 				height: 150,
@@ -195,109 +193,44 @@
 						purpose: "经营性费用"
 					},
 				],
-				typeList1: [{
-						value: "是",
-						key: 1
-					},
-					{
-						value: "否",
-						key: 0
-					},
+				typeList1:[
+					{value: "是"},
+					{value: "否"},
 				],
-				typeList: [{
-						value: "杂费"
-					},
-					{
-						value: "电费"
-					},
-					{
-						value: "煤费"
-					},
-					{
-						value: "人工费"
-					},
+				typeList:[
+					{value: "杂费"},
+					{value: "电费"},
+					{value: "煤费"},
+					{value: "人工费"},
 				],
-				namelist: [{
-						name: "黑龙江中天昊元贸易有限公司"
-					},
-					{
-						name: "中天昊元-建发合营"
-					},
-					{
-						name: "中天昊元-六水香合营"
-					},
-					{
-						name: "中天昊元-昊友合营"
-					},
-					{
-						name: "黑龙江中天昊元贸易有限公司辽宁分公司"
-					},
-					{
-						name: "黑龙江众利合粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江欣洋粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江启兴粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江鑫满仓粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江谷香粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江益储益运粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江海天粮食农业发展有限公司"
-					},
-					{
-						name: "黑龙江中天绿粮供应链管理有限公司"
-					},
-					{
-						name: "中天昊元(海南)国际贸易有限公司"
-					},
-					{
-						name: "克东县嘉达建筑装潢有限责任公司"
-					},
-					{
-						name: "克东县金博粮食有限公司"
-					},
-					{
-						name: "克东县安正商贸有限公司"
-					},
-					{
-						name: "克东县万祥农业科技开发有限公司"
-					},
-					{
-						name: "克东县万润运输有限公司"
-					},
-					{
-						name: "黑龙江大金仓农业科技有限公司"
-					},
-					{
-						name: "克东县华祥通讯管线工程有限公司"
-					},
-					{
-						name: "黑龙江峰海粮食贸易有限公司(季度报 增值税季度)"
-					},
-					{
-						name: "黑龙江鑫宝仓粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江中仓粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江晟鸿泰粮食贸易有限公司"
-					},
-					{
-						name: "黑龙江新粮仓粮食贸易有限公司"
-					},
-					{
-						name: "齐齐哈尔米林设备制造有限公司"
-					},
+				namelist:[
+					{name: "黑龙江中天昊元贸易有限公司"},
+					{name: "中天昊元-建发合营"},
+					{name: "中天昊元-六水香合营"},
+					{name: "中天昊元-昊友合营"},
+					{name: "黑龙江中天昊元贸易有限公司辽宁分公司"},
+					{name: "黑龙江众利合粮食贸易有限公司"},
+					{name: "黑龙江欣洋粮食贸易有限公司"},
+					{name: "黑龙江启兴粮食贸易有限公司"},
+					{name: "黑龙江鑫满仓粮食贸易有限公司"},
+					{name: "黑龙江谷香粮食贸易有限公司"},
+					{name: "黑龙江益储益运粮食贸易有限公司"},
+					{name: "黑龙江海天粮食农业发展有限公司"},
+					{name: "黑龙江中天绿粮供应链管理有限公司"},
+					{name: "中天昊元(海南)国际贸易有限公司"},
+					{name: "克东县嘉达建筑装潢有限责任公司"},
+					{name: "克东县金博粮食有限公司"},
+					{name: "克东县安正商贸有限公司"},
+					{name: "克东县万祥农业科技开发有限公司"},
+					{name: "克东县万润运输有限公司"},
+					{name: "黑龙江大金仓农业科技有限公司"},
+					{name: "克东县华祥通讯管线工程有限公司"},
+					{name: "黑龙江峰海粮食贸易有限公司(季度报 增值税季度)"},
+					{name: "黑龙江鑫宝仓粮食贸易有限公司"},
+					{name: "黑龙江中仓粮食贸易有限公司"},
+					{name: "黑龙江晟鸿泰粮食贸易有限公司"},
+					{name: "黑龙江新粮仓粮食贸易有限公司"},
+					{name: "齐齐哈尔米林设备制造有限公司"},
 				],
 				reType: "",
 				flag: "",
@@ -308,10 +241,8 @@
 		onLoad(options) {
 			this.reType = options.reType
 			this.expensesType = options.expensesType
-			if (this.reType == 2 || this.expensesType == 2) {
-				uni.setNavigationBarTitle({
-					title: '请款'
-				});
+			if(this.reType==2||this.expensesType==2){
+				uni.setNavigationBarTitle({title: '请款'});
 			}
 			this.id = options.id
 			if (this.id) {
@@ -333,13 +264,12 @@
 				this.$api.doRequest('get', 'customerInfo/getPayeeInfo', {
 					contractNo: this.detailData.contractNo
 				}).then(res => {
-					this.detailData.payee = res.customerType == "企业客户" ? res.compName : res.customerName
-					this.detailData.accountNumber = res.bankCard
-					this.detailData.bank = res.bankDeposit
-					this.detailData.bankBranch = res.bankDepositBranch
+					this.detailData.payee=res.customerType=="企业客户"?res.compName:res.customerName
+					this.detailData.accountNumber=res.bankCard
+					this.detailData.bank=res.bankDeposit
+					this.detailData.bankBranch=res.bankDepositBranch
 					this.$forceUpdate()
 				})
-
 			}
 		},
 		watch: {
@@ -355,11 +285,11 @@
 			}
 		},
 		methods: {
-			typeCheck(e) {
-				this.detailData.wareExpenseType = this.typeList[e[0]].value
+			typeCheck(e){
+				this.detailData.wareExpenseType=this.typeList[e[0]].value
 			},
-			typeCheck1(e) {
-				this.detailData.storageFeeFlag = this.typeList1[e[0]].key
+			typeCheck1(e){
+				this.detailData.flag=this.typeList1[e[0]].value
 			},
 			afterRead(e) {
 				console.log(e)
@@ -367,58 +297,58 @@
 			async uploadClick() {
 				let baseUrlNew = config.def().baseUrlNew
 				let pcUserInfo = uni.getStorageSync('pcUserInfo')
-				console.log('baseUrlNew', baseUrlNew)
-				if (!pcUserInfo) {
+				console.log('baseUrlNew',baseUrlNew)
+				if(!pcUserInfo){
 					uni.showToast({
-						title: "登录已失效,请重新登录"
+						title:"登录已失效,请重新登录"
 					})
-					return
+					return 
 				}
 				uni.chooseImage({
-					count: 10,
+					count:10,
 					success: (chooseImageRes) => {
-						console.log('chooseImageRes', chooseImageRes)
+						console.log('chooseImageRes',chooseImageRes)
 						let files = []
 						for (let item of chooseImageRes.tempFiles) {
 							files.push({
 								name: 'fileName',
-								url: item.path
+								url : item.path
 							});
 						}
 						console.log(files)
 						for (let i = 0; i < files.length; i++) {
 							uni.uploadFile({
-								url: baseUrlNew + 'appendix/api/uploadFiles',
-								// url: baseUrlNew+'appendix/api/uploadFiles', //仅为示例,非真实的接口地址
-								// files: files[i],
-								filePath: files[i].url,
-								name: files[i].name,
-								formData: {
-									// fileName: chooseImageRes.tempFiles[0],
-									companyId: pcUserInfo.compId,
-									modelId: '',
-									vesselId: '',
-								},
-								success: (uploadFileRes) => {
-									console.log(JSON.parse(uploadFileRes.data))
-									var data = JSON.parse(uploadFileRes.data).data
-									data.compId = pcUserInfo.compId
-									this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
-										newAppendixs: [data],
-										oldAppendixIds: ""
-									}).then(res => {
-										this.imglist.push(res.data.data[0])
-										console.log(res)
-									})
-									console.log(uploadFileRes.data);
-								},
-								fail(res) {
-
-									console.log(res);
-								}
-							});
+							url: baseUrlNew + 'appendix/api/uploadFiles',
+							// url: baseUrlNew+'appendix/api/uploadFiles', //仅为示例,非真实的接口地址
+							// files: files[i],
+							filePath:files[i].url,
+							name:files[i].name,
+							formData: {
+								// fileName: chooseImageRes.tempFiles[0],
+								companyId: pcUserInfo.compId,
+								modelId: '',
+								vesselId: '',
+							},
+							success: (uploadFileRes) => {
+								console.log(JSON.parse(uploadFileRes.data))
+								var data = JSON.parse(uploadFileRes.data).data
+								data.compId = pcUserInfo.compId
+								this.$api.doRequest('post', '/appendix/api/saveFilesApp', {
+									newAppendixs: [data],
+									oldAppendixIds: ""
+								}).then(res => {
+									this.imglist.push(res.data.data[0])
+									console.log(res)
+								})
+								console.log(uploadFileRes.data);
+							},
+							fail(res) {
+								
+								console.log(res);
+							}
+						});
 						}
-
+						
 					}
 				});
 			},
@@ -444,10 +374,10 @@
 					this.detailData.expensesPurpose = "5"
 					delete this.detailData.warehouseName
 					delete this.detailData.contractNo
-					if (this.reType == 2) {
+					if(this.reType == 2){
 						this.show1 = true
 					}
-
+					
 				}
 				console.log(this.detailData)
 			},
@@ -478,7 +408,7 @@
 					return
 				}
 				if (this.expensesType == '2') {
-					if (!this.detailData.payerHeader) {
+					if(!this.detailData.payerHeader){
 						this.$api.msg('付款方不能为空')
 						return
 					}
@@ -511,7 +441,6 @@
 							that.detailData.agent = uni.getStorageSync('userInfo').userName
 							that.detailData.identification = that.detailData.identification
 							that.detailData.costType = that.detailData.costType
-							that.detailData.flag = 4
 							that.detailData.expensesType = that.reType
 							that.detailData.fieldName = uni.getStorageSync('userInfo').userName
 							that.detailData.totalDistribution = that.detailData.totalDistribution
@@ -710,8 +639,7 @@
 		display: flex;
 		justify-content: center;
 	}
-
-	.margin-bottom {
-		margin-bottom: 84px;
+	.margin-bottom{
+		margin-bottom:84px;
 	}
 </style>

+ 1 - 1
pages/reimbursement/the_reimbursement.vue

@@ -15,7 +15,7 @@
 							{{item.approveStatus}}
 						</view>
 						<view class="wenzi audit2" v-else-if="item.approveStatus == null ">{{item.status}}</view>
-						<view class="wenzi audit3" v-else="item.status == '已驳回' ">{{item.status}}</view>
+						<view class="wenzi audit3" v-else-if="item.status == '已驳回' ">{{item.status}}</view>
 					</view>
 				</view>
 				<view class="c-row" style="color: #777e7d;">

+ 0 - 1
pages/task/audit/Issueandreceipt_task_approval.vue

@@ -367,7 +367,6 @@
 			<u-button @click='pass' type="success" class="btn2">通过</u-button>
 		</view>
 	</view>
-
 </template>
 
 <script>

+ 34 - 10
pages/task/audit/acquisitioncontract.vue

@@ -213,6 +213,7 @@
 						</view>
 						<view class="" style="width: 70%;">
 							<view class="char_css">{{item.appendixName}}</view>
+							<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 							<view class="img_size">{{item.appendixSize}}</view>
 						</view>
 						<view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
@@ -421,20 +422,41 @@
 			onRemove(index) {
 				this.fileUrl.splice(index, 1)
 			},
-			openDocument(src) {
-				uni.downloadFile({
-					url: src.appendixPath,
+			openDocument(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
 					success: function(res) {
 						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
-							}
-						});
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
 					}
 				});
+				downloadTask.onProgressUpdate((res) => {
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
+				});
 			},
 			shadeshow(url) {
 				this.imgShow = true
@@ -467,6 +489,8 @@
 						}).then(res1 => {
 							that.imglist = res1.data.data
 							for (let i = 0; i < that.imglist.length; i++) {//获取后缀
+							that.imglist[i].progressstatus=false
+							that.imglist[i].progress=0
 								if (that.imglist[i].appendixName) {
 									let index = that.imglist[i].appendixName.lastIndexOf(".") 
 									that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)

+ 39 - 16
pages/task/audit/charge_against_revenue.vue

@@ -162,6 +162,7 @@
 							</view>
 							<view class="" style="width: 70%;">
 								<view class="char_css">{{item.appendixName}}</view>
+								<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 								<view class="img_size">{{item.appendixSize}}</view>
 							</view>
 							<view class="img_dowload" @click="openDocument(item)">下载</view>
@@ -361,6 +362,8 @@
 					}).then(res => {
 						this.imglist2 = res.data.data
 						for (let i = 0; i < this.imglist2.length; i++) {
+							that.imglist2[i].progressstatus=false
+							that.imglist2[i].progress=0
 							if (this.imglist2[i].appendixName) {//获取文件的后缀名
 								let index = that.imglist2[i].appendixName.lastIndexOf(".")//获取最后出现.的下标
 								that.imglist2[i].type = that.imglist2[i].appendixName.substring(index+1)
@@ -402,22 +405,42 @@
 			onRemove(index) {
 				this.fileUrl.splice(index, 1)
 			},
-			openDocument(src) {
-				console.log(src)
-				uni.downloadFile({
-					url: src.appendixPath,
-					success: function(res) {
-						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
-							}
-						});
-					}
-				});
-			},
+			openDocument(item) {
+							this.$set(item,'progressstatus',true)
+							this.$forceUpdate()
+							const downloadTask =uni.downloadFile({
+								url: item.appendixPath,
+								success: function(res) {
+									var filePath = res.tempFilePath;
+									if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+										uni.openDocument({
+											filePath: filePath,
+											showMenu: true,
+											success: function(res) {
+												console.log('打开文档成功');
+											}
+										});
+									}else{
+										uni.previewImage({
+											current: 0, //预览图片的下标
+											urls: [item.appendixPath]
+										})
+									}
+									
+								}
+							});
+							downloadTask.onProgressUpdate((res) => {
+								this.$set(item,'progress',res.progress)
+								this.$forceUpdate()
+								console.log('下载进度' + res.progress);
+								console.log('已经下载的数据长度' + res.totalBytesWritten);
+								console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+								// 满足测试条件,取消下载任务。
+								// if (res.progress > 50) {
+								// 	downloadTask.abort();
+								// }
+							});
+						},
 			previewImageFn(index) {
 				/* 预览图片 */
 				uni.previewImage({

+ 30 - 12
pages/task/audit/charge_against_revenue_detail.vue

@@ -163,6 +163,7 @@
 							<view style='justify-content: space-between;width: 81%;' class="flex">
 								<view>
 									<view class="char_css">{{item.appendixName}}</view>
+									<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 									<view class="img_size">{{item.appendixSize}}</view>
 								</view>
 								<view class="img_dowload" @click="openDocument(item)">下载</view>
@@ -317,6 +318,8 @@
 					}).then(res => {
 						this.imglist2 = res.data.data
 						for (let i = 0; i < this.imglist2.length; i++) {
+							that.imglist2[i].progressstatus=false
+							that.imglist2[i].progress=0
 							if (this.imglist2[i].appendixName) {
 								let index = this.imglist2[i].appendixName.lastIndexOf(".")//获取最后出现.的下标
 								this.imglist2[i].type = this.imglist2[i].appendixName.substring(index+1)
@@ -390,21 +393,36 @@
 					}
 				});
 			},
-			openDocument(src) {
-				console.log(src)
-				uni.downloadFile({
-					url: src.appendixPath,
+			openDocument(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
 					success: function(res) {
 						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
 							}
-						});
-					}
-				});
+						}
+					});
+					downloadTask.onProgressUpdate((res) => {
+						this.$set(item,'progress',res.progress)
+						this.$forceUpdate()
+						console.log('下载进度' + res.progress);
+						console.log('已经下载的数据长度' + res.totalBytesWritten);
+						console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					});
 			},
 			openXls() {
 				if (this.url && this.url != "ng") {

+ 39 - 0
pages/task/audit/daichu_details.vue

@@ -153,6 +153,7 @@
 								</view>
 								<view class="" style="width: 70%;">
 									<view class="char_css">{{item.appendixName}}</view>
+									<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 									<view class="img_size">{{item.appendixSize}}</view>
 								</view>
 								<view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
@@ -311,6 +312,42 @@
 
 		},
 		methods: {
+			openDocument(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
+					}
+				});
+				downloadTask.onProgressUpdate((res) => {
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
+				});
+			},
 			shadeshow(url) {
 				this.imgShow = true
 				this.url = url
@@ -332,6 +369,8 @@
 						}).then(res1 => {
 							that.imglist=res1.data.data
 							for (let i = 0; i < that.imglist.length; i++) {//获取后缀
+							that.imglist[i].progressstatus=false
+							that.imglist[i].progress=0
 								if (that.imglist[i].appendixName) {
 									let index = that.imglist[i].appendixName.lastIndexOf(".") 
 									that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)

+ 39 - 0
pages/task/audit/daishou_details.vue

@@ -130,6 +130,7 @@
 							</view>
 							<view class="" style="width: 70%;">
 								<view class="char_css">{{item.appendixName}}</view>
+								<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 								<view class="img_size">{{item.appendixSize}}</view>
 							</view>
 							<view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
@@ -288,6 +289,42 @@
 
 		},
 		methods: {
+			openDocument(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
+					}
+				});
+				downloadTask.onProgressUpdate((res) => {
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
+				});
+			},
 			shadeshow(url) {
 				this.imgShow = true
 				this.url = url
@@ -309,6 +346,8 @@
 						}).then(res1 => {
 							that.imglist=res1.data.data
 							for (let i = 0; i < that.imglist.length; i++) {//获取后缀
+							that.imglist[i].progressstatus=false
+							that.imglist[i].progress=0
 								if (that.imglist[i].appendixName) {
 									let index = that.imglist[i].appendixName.lastIndexOf(".") 
 									that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)

+ 35 - 10
pages/task/audit/freight_settlement_approvalcopy.vue

@@ -71,6 +71,7 @@
 								</view>
 									<view class="" style="width: 70%;">
 										<view class="char_css">{{item.appendixName}}</view>
+										<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 										<view class="">{{item.appendixSize}}</view>
 									</view>
 									<view class="img_dowload" @click="openDocument(item)">下载</view>
@@ -300,7 +301,10 @@
 						appendixIds: this.imglist.toString()
 					}).then(res => {
 						this.imglist2 = res.data.data
+						
 						for (let i = 0; i < this.imglist2.length; i++) {
+							this.imglist2[i].progressstatus=false
+							this.imglist2[i].progress=0
 							if (this.imglist2[i].appendixName) {
 								this.imglist2[i].type = this.imglist2[i].appendixName.split(".")[1]
 							}
@@ -311,20 +315,41 @@
 			}
 		},
 		methods: {
-			openDocument(src) {
-				uni.downloadFile({
-					url: src.appendixPath,
+			openDocument(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
 					success: function(res) {
 						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
-							}
-						});
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
 					}
 				});
+				downloadTask.onProgressUpdate((res) => {
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
+				});
 			},
 			getList() {
 				var that = this

+ 34 - 10
pages/task/audit/freight_settlement_detailscopy.vue

@@ -70,6 +70,7 @@
 									</view>
 									<view class="" style="width: 70%;">
 										<view class="char_css">{{item.appendixName}}</view>
+										<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 										<view class="">{{item.appendixSize}}</view>
 									</view>
 									<view class="img_dowload" @click="openDocument(item)">下载</view>
@@ -283,6 +284,8 @@
 					}).then(res => {
 						this.imglist2 = res.data.data
 						for (let i = 0; i < this.imglist2.length; i++) {
+							this.imglist2[i].progressstatus=false
+							this.imglist2[i].progress=0
 							if (this.imglist2[i].appendixName) {
 								this.imglist2[i].type = this.imglist2[i].appendixName.split(".")[1]
 							}
@@ -293,20 +296,41 @@
 			}
 		},
 		methods: {
-			openDocument(src) {
-				uni.downloadFile({
-					url: src.appendixPath,
+			openDocument(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
 					success: function(res) {
 						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
-							}
-						});
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
 					}
 				});
+				downloadTask.onProgressUpdate((res) => {
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
+				});
 			},
 			getList() {
 				var that = this

+ 0 - 1
pages/task/audit/leave_approve.vue

@@ -231,7 +231,6 @@
 								} else {
 									this.$api.msg('驳回失败!')
 								}
-
 							})
 						}
 					})

+ 37 - 13
pages/task/audit/purchasecontract.vue

@@ -244,6 +244,7 @@
 						</view>
 						<view class="" style="width: 70%;">
 							<view class="char_css">{{item.appendixName}}</view>
+							<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 							<view class="img_size">{{item.appendixSize}}</view>
 						</view>
 						<view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
@@ -443,19 +444,40 @@
 				this.imgShow = true
 				this.url = url
 			},
-			openDocument(src){
-				uni.downloadFile({
-				  url: src.appendixPath,
-				  success: function (res) {
-				    var filePath = res.tempFilePath;
-				    uni.openDocument({
-				      filePath: filePath,
-				      showMenu: true,
-				      success: function (res) {
-				        console.log('打开文档成功');
-				      }
-				    });
-				  }
+			openDocument(item){
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
+					}
+				});
+				downloadTask.onProgressUpdate((res) => {
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
 				});
 			},
 			showcontent(item){
@@ -484,6 +506,8 @@
 						}).then(res1 => {
 							that.imglist=res1.data.data
 							for (let i = 0; i < that.imglist.length; i++) {//获取后缀
+							that.imglist[i].progressstatus=false
+							that.imglist[i].progress=0
 								if (that.imglist[i].appendixName) {
 									let index = that.imglist[i].appendixName.lastIndexOf(".") //获取最后出现.的字符
 									that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)

+ 34 - 10
pages/task/audit/salecontract.vue

@@ -252,6 +252,7 @@
 						</view>
 						<view class="" style="width: 70%;">
 							<view class="char_css">{{item.appendixName}}</view>
+							<u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
 							<view class="img_size">{{item.appendixSize}}</view>
 						</view>
 						<view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
@@ -458,20 +459,41 @@
 			onRemove(index) {
 				this.fileUrl.splice(index, 1)
 			},
-			openDocument(src) {
-				uni.downloadFile({
-					url: src.appendixPath,
+			openDocument(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
+				const downloadTask =uni.downloadFile({
+					url: item.appendixPath,
 					success: function(res) {
 						var filePath = res.tempFilePath;
-						uni.openDocument({
-							filePath: filePath,
-							showMenu: true,
-							success: function(res) {
-								console.log('打开文档成功');
-							}
-						});
+						if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}else{
+							uni.previewImage({
+								current: 0, //预览图片的下标
+								urls: [item.appendixPath]
+							})
+						}
+						
 					}
 				});
+				downloadTask.onProgressUpdate((res) => {
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
+					console.log('下载进度' + res.progress);
+					console.log('已经下载的数据长度' + res.totalBytesWritten);
+					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
+					// 满足测试条件,取消下载任务。
+					// if (res.progress > 50) {
+					// 	downloadTask.abort();
+					// }
+				});
 			},
 			shadeshow(url) {
 				this.imgShow = true
@@ -501,6 +523,8 @@
 						}).then(res1 => {
 							that.imglist = res1.data.data
 							for (let i = 0; i < that.imglist.length; i++) {//获取后缀
+							that.imglist[i].progressstatus=false
+							that.imglist[i].progress=0
 								if (that.imglist[i].appendixName) {
 									let index = that.imglist[i].appendixName.lastIndexOf(".") 
 									that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)

+ 4 - 3
pages/task/audit/universalityAudit.vue

@@ -214,6 +214,8 @@
 		},
 		methods: {
 			openDownload(item) {
+				this.$set(item,'progressstatus',true)
+				this.$forceUpdate()
 				const downloadTask =uni.downloadFile({
 					url: item.appendixPath,
 					success: function(res) {
@@ -236,12 +238,11 @@
 					}
 				});
 				downloadTask.onProgressUpdate((res) => {
-					item.progressstatus=true
-					item.progress=res.progress
+					this.$set(item,'progress',res.progress)
+					this.$forceUpdate()
 					console.log('下载进度' + res.progress);
 					console.log('已经下载的数据长度' + res.totalBytesWritten);
 					console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
-				
 					// 满足测试条件,取消下载任务。
 					// if (res.progress > 50) {
 					// 	downloadTask.abort();