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/clockIn.vue | 42 ++++++++++++++++++++++++++++--------------
1 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/src/pages/delivergoods/clockIn.vue b/src/pages/delivergoods/clockIn.vue
index 44b9fa3..b94b257 100644
--- a/src/pages/delivergoods/clockIn.vue
+++ b/src/pages/delivergoods/clockIn.vue
@@ -9,7 +9,7 @@
</up-sticky>
<view class="c-p-b-100">
<view class="c-p-l-20 c-p-r-20" v-if="orderList&&orderList.length>0">
- <view class="listrecord c-p-t-20" v-for="(item,index) in orderList" :key="item.keyid">
+ <view class="listrecord c-p-t-20" v-for="(item,index) in orderList" :key="item.keyid" @click='goDetail(item)'>
<view class="coreshop-ff chuany-bradius20">
<view class="chuany-font26">
<view class="chuany-flex chuany-justify-between">
@@ -17,7 +17,7 @@
<view class="chuany-width13">
{{$util.formatDate(item.creatTime,'riqi')}}
</view>
- <view class="chuany-width65" @click='goDetail(item)'>
+ <view class="chuany-width65">
<u-text size='14' :text="item.carCondition" lines="1">
</u-text>
</view>
@@ -54,20 +54,20 @@
</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>
</up-form-item>
</up-form>
</up-modal>
- <up-modal :title="clockInfo.clockType=='ClockIn'?'鍑鸿溅鎵撳崱':'涓嬬彮鎵撳崱'" :show="showClockIn" showCancelButton
- :closeOnClickOverlay="true" @close="closeModal" @confirm="confirmClockSave" @cancel='cancelModal'
+ <up-modal :title="clockInfo.clockType=='ClockIn'?'鍑鸿溅鎵撳崱':'涓嬬彮鎵撳崱'" :show="showClockIn" showCancelButton :closeable='true'
+ @closemodal="closeModal" @confirm="confirmClockSave" @cancel='cancelModal'
:asyncClose="true" ref='clockInModal' cancel-text="瀛樹负鑽夌" confirm-text="鎵撳崱">
<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)">
@@ -75,7 +75,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>
@@ -94,7 +94,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)">
@@ -241,9 +241,9 @@
this.$refs.formFinishRef.setRules(this.rules1);
},
onLoad() {
- this.Getdrivers()
- this.getCustomer()
- this.GetDriversOfWithin7days()
+ // this.Getdrivers()
+ // this.getCustomer()
+ // this.GetDriversOfWithin7days()
},
onReachBottom() {
if (this.loadStatus != 'nomore') {
@@ -291,7 +291,6 @@
console.log(item,'9jh');
this.$refs.zhuanghuo.urls.push(item.planAttachment)
})
- console.log(res.data,this.clockInfo.attachments,res.data.attachments);
let length = this.$refs.zhuanghuo.urls.length
this.$refs.zhuanghuo.status = Array.from({
length
@@ -338,7 +337,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 //閲岀▼鐓х墖
@@ -550,6 +549,7 @@
// this.clockInfo.attachments = []
// }
this.clockInfo = this.$util.removeEmptyValuesRecursive(this.clockInfo)
+ console.log(this.clockInfo);
this.$refs.formClockInRef.validate().then(res => {
this.$api.Clock(this.clockInfo).then(res => {
if (res.code == 1) {
@@ -569,8 +569,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
})
@@ -604,10 +612,16 @@
this.init()
} else {
this.$util.showToast({
- title: res.error
+ title: res
})
this.$refs.clockInModal.loading = false
}
+ }).catch(err=>{
+ this.$util.showToast({
+ title: `鎵撳崱寮傚父-${err}`,
+ })
+ this.clockInfo.carConditionAttachments = this.clockInfo.carConditionAttachments||[]
+ this.$refs.clockInModal.loading = false
})
},
closeModal() {
--
Gitblit v1.9.1