From e01af6d359c42b57550957d0108bb23d14088cd0 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期一, 08 四月 2024 15:19:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1
---
wx/pages/new_report/new_report.vue | 170 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 159 insertions(+), 11 deletions(-)
diff --git a/wx/pages/new_report/new_report.vue b/wx/pages/new_report/new_report.vue
index 4a0a7a6..08f04f3 100644
--- a/wx/pages/new_report/new_report.vue
+++ b/wx/pages/new_report/new_report.vue
@@ -11,9 +11,13 @@
<view class="box_list">
<view class="box_list_Label">鍩烘湰淇℃伅</view>
<view class="box_list_from">
- <u-form-item label="鍑洪櫓浜猴細" prop="memberName" borderBottom required @click="show4 = true" v-if="!id">
- <u--input v-model="model.memberName" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鍑洪櫓浜�" border="none"></u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
+ <u-form-item label="鍑洪櫓浜猴細" prop="memberName" borderBottom required v-if="!id">
+ <u--input v-model="model.memberName" placeholder="璇烽�夋嫨鍑洪櫓浜�" @input="changeSearch" border="none"></u--input>
+ <scroll-view scroll-y class="box_list_data" v-if="model.memberName && columns2.length > 0">
+ <view class="box_list_data_item" v-for="(item, index) in columns2" :key="index" @click="clickItem(item)">
+ {{item.name}} - {{item.idcardNo}}
+ </view>
+ </scroll-view>
</u-form-item>
<u-form-item label="淇濋櫓鏂规锛�" prop="solutionName" borderBottom required @click="openFA" v-if="!id">
<u--input v-model="model.solutionName" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨淇濋櫓鏂规" border="none"></u--input>
@@ -23,7 +27,7 @@
<u--input v-model="model.informantName" placeholder="璇疯緭鍏ユ姤妗堜汉濮撳悕" border="none"></u--input>
</u-form-item>
<u-form-item label="鎶ユ浜鸿仈绯绘柟寮忥細" prop="informantPhone" required>
- <u--input v-model="model.informantPhone" placeholder="璇疯緭鍏ユ姤妗堜汉鑱旂郴鏂瑰紡" border="none"></u--input>
+ <u--input v-model="model.informantPhone" maxlength="11" placeholder="璇疯緭鍏ユ姤妗堜汉鑱旂郴鏂瑰紡" border="none"></u--input>
</u-form-item>
</view>
</view>
@@ -62,14 +66,28 @@
</u-form-item>
<u-form-item label="浜嬫晠瑙嗛/鍥剧墖锛�" prop="name" v-if="!id">
<view style="width: 100%; height: 15rpx;"></view>
- <u-upload
+ <!-- <u-upload
:fileList="fileList"
@afterRead="afterRead"
@delete="deletePic"
multiple
:maxCount="10"
accept="media"
- ></u-upload>
+ ></u-upload> -->
+ <view class="meade">
+ <view class="meade_content" v-for="(item,index) in model.reportFileList" :key="index">
+ <image class="dele" src="@/static/icon/ic_delete@2x.png" mode="widthFix" @click="deletePic(index)"></image>
+ <image class="image" :src="item.url" mode="widthFix" v-if="item.type === 0"></image>
+ <video class="video" :src="item.url" controls v-if="item.type === 1"></video>
+ </view>
+ <view class="meade_upload" @click="upload">
+ <u-icon name="plus" color="#999999" size="20"></u-icon>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="meade_zw"></view>
+ <view class="meade_zw"></view>
+ <view class="meade_zw"></view>
+ </view>
</u-form-item>
</view>
</view>
@@ -96,7 +114,7 @@
data() {
return {
id: null,
- show: true,
+ show: false,
show1: false,
show2: false,
show3: false,
@@ -188,11 +206,31 @@
this.id = option.id
if (this.id) {
this.getDetails()
+ this.getArea()
+ this.getUser()
+ return
}
+ this.show = true
this.getArea()
this.getUser()
},
methods: {
+ clickItem(item) {
+ this.model.memberName = item.name
+ this.model.memberId = item.id
+ this.columns2 = []
+ },
+ // 鎼滅储
+ changeSearch(name) {
+ this.columns2 = []
+ this.$u.api.memberFindListByDTO({
+ name
+ }).then(res => {
+ if (res.code === 200) {
+ this.columns2 = res.data
+ }
+ })
+ },
getDetails() {
this.$u.api.settleClaimsById(this.id)
.then(res => {
@@ -308,6 +346,50 @@
}
})
},
+ upload() {
+ var that = this
+ uni.chooseMedia({
+ count: 9,
+ mediaType: ['image','video'],
+ sourceType: ['album', 'camera'],
+ camera: 'back',
+ success(res) {
+ uni.showLoading({
+ title: '涓婁紶涓�',
+ mask: true
+ });
+ for (let i = 0; i < res.tempFiles.length; i++) {
+ uni.uploadFile({
+ url: `${that.$baseUrl}public/upload`,
+ filePath: res.tempFiles[i].tempFilePath,
+ name: 'file',
+ header: {
+ 'doumee-auth-token': that.$store.state.cookies
+ },
+ formData: {
+ folder: 'settle'
+ },
+ success: (uploadFileRes) => {
+ let res = JSON.parse(uploadFileRes.data)
+ console.log(res)
+ that.fileList.push({ ...res.data })
+ that.model.reportFileList.push({
+ fileurl: res.data.imgaddr,
+ name: res.data.originname,
+ type: res.data.type,
+ url: res.data.url
+ })
+ },
+ complete() {
+ if (i === res.tempFiles.length - 1) {
+ uni.hideLoading();
+ }
+ }
+ });
+ }
+ }
+ })
+ },
afterRead(e) {
uni.showLoading({
title: '涓婁紶涓�',
@@ -326,7 +408,6 @@
},
success: (uploadFileRes) => {
let res = JSON.parse(uploadFileRes.data)
- this.fileList.push({ ...res.data })
this.model.reportFileList.push({
fileurl: res.data.imgaddr,
name: res.data.originname,
@@ -341,9 +422,8 @@
});
}
},
- deletePic(e) {
- this.model.reportFileList.splice(e.index, 1)
- this.fileList.splice(e.index, 1)
+ deletePic(index) {
+ this.model.reportFileList.splice(index, 1)
},
getTreeName(list, id){
let _this = this
@@ -439,6 +519,74 @@
.u-textarea {
padding: 9px 0 !important;
}
+ .box_list_data {
+ width: 100%;
+ max-height: 400rpx;
+ margin-top: 10rpx;
+ .box_list_data_item {
+ width: 100%;
+ height: 80rpx;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ line-height: 80rpx;
+ border-bottom: 1px solid #dfdfdf;
+ &:last-child {
+ border: none;
+ }
+ }
+ }
+ .meade {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ flex-wrap: wrap;
+ .meade_zw {
+ width: 140rpx;
+ height: 0;
+ }
+ .meade_content {
+ width: 140rpx;
+ height: 140rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ overflow: hidden;
+ position: relative;
+ .video {
+ width: 100%;
+ }
+ .dele {
+ width: 50rpx;
+ height: 50rpx;
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 9;
+ }
+ .image {
+ width: 100%;
+ }
+ }
+ .meade_upload {
+ width: 140rpx;
+ height: 140rpx;
+ background: #FFFFFF;
+ border-radius: 8rpx;
+ border: 1rpx solid #E5E5E5;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ text {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #666666;
+ font-style: normal;
+ margin-top: 5rpx;
+ }
+ }
+ }
.list {
width: 100%;
display: flex;
--
Gitblit v1.9.3