From b7ae3f69ae6706a692284d2f12835d213debfb1a Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期二, 07 四月 2026 17:21:41 +0800
Subject: [PATCH] -

---
 src/pages/delivergoods/clockInRecord.vue |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/pages/delivergoods/clockInRecord.vue b/src/pages/delivergoods/clockInRecord.vue
index 825b32a..8997b6e 100644
--- a/src/pages/delivergoods/clockInRecord.vue
+++ b/src/pages/delivergoods/clockInRecord.vue
@@ -65,7 +65,7 @@
 				</up-form-item>
 
 				<up-form-item label="閫佽揣鍗�" prop="attachments" required>
-					<tem-upload-file immediate :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" ref="uploadB"
+					<tem-upload-file immediate :sourceType="['camera']" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" ref="uploadB"
 						:isSource='true' fileType="all" @success="success('File',$event)" @error="errorInvoice"
 						@complete="completeInvoice('',$event)">
 					</tem-upload-file>
@@ -78,7 +78,7 @@
 			<up-form labelPosition="left" :model="clockInfo" ref="formClockInRef" labelWidth='140rpx'>
 				<up-form-item label="杞﹁締妫�鏌�" prop="carConditionAttachments" v-if="clockInfo.clockType=='ClockIn'"
 					required>
-					<tem-upload-file immediate btnText="涓婁紶鐓х墖" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`"
+					<tem-upload-file immediate btnText="涓婁紶鐓х墖" :sourceType="['camera']" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`"
 						ref="carCondition" :isSource='true' fileType="all"
 						@success="successClock('carCondition',$event)" @error="errorInvoice"
 						@complete="completeInvoice('carCondition',$event)">
@@ -86,7 +86,7 @@
 				</up-form-item>
 				<template v-else>
 					<up-form-item label="瑁呰揣鐓х墖" prop="attachments" required v-if='!clockInfo.emptyCause'>
-						<tem-upload-file immediate btnText="涓婁紶鐓х墖" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`"
+						<tem-upload-file immediate btnText="涓婁紶鐓х墖" :sourceType="['camera']" :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`"
 							ref="zhuanghuo" :isSource='true' fileType="all" @success="successClock('zhuanghuo',$event)"
 							@error="errorInvoice" @complete="completeInvoice('zhuanghuo',$event)">
 						</tem-upload-file>
@@ -105,7 +105,7 @@
 					</up-input>
 				</up-form-item>
 				<up-form-item label="閲岀▼鐓х墖" required prop="mileageImg" :borderBottom='false' ref="item1">
-					<tem-upload-file immediate max="1" btnText="涓婁紶鐓х墖"
+					<tem-upload-file immediate max="1" btnText="涓婁紶鐓х墖" :sourceType="['camera']"
 						:url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" ref="licheng" :isSource='true'
 						fileType="all" @success="successClock('licheng',$event)" @error="errorInvoice"
 						@complete="completeInvoice('licheng',$event)">
@@ -331,6 +331,7 @@
 				//e.res 涓烘湇鍔″櫒杩斿洖鏁版嵁
 				//涓婁紶鎴愬姛鍥炶皟锛屽鐞嗘湇鍔″櫒杩斿洖鏁版嵁銆愭澶勬牴鎹疄闄呰繑鍥炴暟鎹繘琛屽鐞嗐��
 				let res = e.res
+				console.log(res,'000000000000鈥�');
 				// let res = JSON.parse(e.res.data.replace(/\ufeff/g, "") || "{}")
 				if (res.statusCode == 200) {
 					if (res.data && text == 'carCondition') {
@@ -341,7 +342,7 @@
 						})
 						this.$refs.carCondition.status.push('success')
 						this.$refs.carCondition.status.length = this.$refs.carCondition.urls.length
-						console.log(this.$refs.carCondition.status);
+						console.log(this.$refs.carCondition.status,this.clockInfo.carConditionAttachments);
 						this.clockInfo.carConditionAttachments.push(obj)
 					} else if (res.data && text == 'licheng') {
 						this.clockInfo.mileageImg = res.data //閲岀▼鐓х墖
@@ -470,6 +471,7 @@
 			},
 			//閫夋嫨鍥剧墖鎴栦笂浼犲畬鎴愭椂瑙﹀彂
 			completeInvoice(val, e) {
+				console.log(val,e);
 				if (e.action == 'delete') {
 					if (val == 'licheng') {
 						this.clockInfo.mileageImg = ''
@@ -572,8 +574,16 @@
 							})
 							this.$refs.clockInModal.loading = false
 						}
+					}).catch(err=>{
+						this.$util.showToast({
+							title: `鎵撳崱寮傚父-${err}`,
+						})
 					})
 				}).catch(errors => {
+					this.$util.showToast({
+						title: `鎵撳崱寮傚父-${errors[0].message}`,
+					})
+					this.clockInfo.carConditionAttachments=this.clockInfo.carConditionAttachments||[]
 					this.$refs.clockInModal.loading = false
 				})
 
@@ -611,7 +621,13 @@
 						})
 						this.$refs.clockInModal.loading = false
 					}
+				}).catch(err=>{
+					this.$util.showToast({
+						title: `鎵撳崱寮傚父-${err}`,
+					})
+					this.$refs.cancelModal.loading = false
 				})
+				
 			},
 			closeModal() {
 				this.showClockIn = false

--
Gitblit v1.9.1