页面修改
This commit is contained in:
parent
f5543a12a6
commit
41d647bbc2
@ -45,6 +45,7 @@ export const upLoadImage = (data) => {
|
|||||||
|
|
||||||
export const VIDEO_URL = HTTP_REQUEST_URL_THREE + '/api/upload/video'
|
export const VIDEO_URL = HTTP_REQUEST_URL_THREE + '/api/upload/video'
|
||||||
export const FILE_URL = HTTP_REQUEST_URL_THREE + '/api/upload/file'
|
export const FILE_URL = HTTP_REQUEST_URL_THREE + '/api/upload/file'
|
||||||
|
export const IMG_URL = HTTP_REQUEST_URL_THREE + '/api/upload/image'
|
||||||
// im文件上传
|
// im文件上传
|
||||||
// export const VIDEO_URL_IM = HTTP_REQUEST_URL_THREE + '/api/upload/video'
|
// export const VIDEO_URL_IM = HTTP_REQUEST_URL_THREE + '/api/upload/video'
|
||||||
export const FILE_URL_IM = HTTP_REQUEST_URL_THREE + '/common/im/sendFileMsg'
|
export const FILE_URL_IM = HTTP_REQUEST_URL_THREE + '/common/im/sendFileMsg'
|
@ -10,10 +10,11 @@
|
|||||||
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline"
|
<map :class="mapClass" id="map" @markertap='mapFun' :enable-zoom="true" :polyline="polyline"
|
||||||
:markers='markers' :scale="scale" style="width:100%;height: 70%;background-color: red;"
|
:markers='markers' :scale="scale" style="width:100%;height: 70%;background-color: red;"
|
||||||
:latitude="markers[0].latitude" :enable-scroll="true" :longitude="markers[0].longitude">
|
:latitude="markers[0].latitude" :enable-scroll="true" :longitude="markers[0].longitude">
|
||||||
<cover-image class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
|
|
||||||
</cover-image>
|
|
||||||
<cover-view class="cover" v-if="showToast">
|
<cover-view class="cover" v-if="showToast">
|
||||||
</cover-view>
|
</cover-view>
|
||||||
|
<cover-image v-else class="map_btn" @tap="test" src="../../static/img/logistics/DH.png">
|
||||||
|
</cover-image>
|
||||||
|
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<view class="map_address">
|
<view class="map_address">
|
||||||
@ -76,7 +77,7 @@
|
|||||||
<view class="goods-tit" style="align-items: center;"
|
<view class="goods-tit" style="align-items: center;"
|
||||||
v-for="(item,index) in goodsDetil.product" :key="index">
|
v-for="(item,index) in goodsDetil.product" :key="index">
|
||||||
<u--image style="flex: 2;" radius='10' :showLoading="true" :src="item.goods_pic"
|
<u--image style="flex: 2;" radius='10' :showLoading="true" :src="item.goods_pic"
|
||||||
width="100rpx" height="100rpx" @click="click"></u--image>
|
width="100rpx" height="100rpx"></u--image>
|
||||||
<text style="flex: 6;">{{item.goods_name}}</text>
|
<text style="flex: 6;">{{item.goods_name}}</text>
|
||||||
|
|
||||||
<!-- <text style="flex: 1;">X{{item.product_num}}{{item.goods_unit}}</text> -->
|
<!-- <text style="flex: 1;">X{{item.product_num}}{{item.goods_unit}}</text> -->
|
||||||
|
@ -37,15 +37,18 @@
|
|||||||
|
|
||||||
<view class="" v-if="!file">
|
<view class="" v-if="!file">
|
||||||
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
|
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
|
||||||
style="margin-top: 28rpx;" :debug="false" :formats="'pdf'" :multiple="false" :count="1"
|
style="margin-top: 28rpx;" :debug="false" :formats="'png,jpg,jpeg,pdf,webp'" :multiple="false"
|
||||||
:instantly="true" @change="changeFile" @uploadEnd="onuploadEnd">
|
:count="1" :instantly="false" @change="changeFile" @uploadEnd="onuploadEnd">
|
||||||
<view class="change-file">请选择PDF类型的发票</view>
|
<view class="change-file">上传凭证</view>
|
||||||
</lsjUpload>
|
</lsjUpload>
|
||||||
</view>
|
</view>
|
||||||
<view class="file" v-else>
|
<view class="file" v-else>
|
||||||
<view class="">
|
<view class="">
|
||||||
<image src="@/static/img/contract/pdf.png"
|
<image :src="file" style="width: 150rpx;height: 150rpx;margin-right: 12rpx;"
|
||||||
style="width: 150rpx;height: 150rpx;margin-right: 12rpx;">
|
v-if="file_type=='image'">
|
||||||
|
</image>
|
||||||
|
<image src="@/static/img/contract/pdf.png" style="width: 150rpx;height: 150rpx;margin-right: 12rpx;"
|
||||||
|
v-else>
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view class="r-cont">
|
<view class="r-cont">
|
||||||
@ -75,8 +78,8 @@
|
|||||||
@click="navTo(`/subpkg/topUp/topUp?task_id=${task_id}`)"></mybtn>
|
@click="navTo(`/subpkg/topUp/topUp?task_id=${task_id}`)"></mybtn>
|
||||||
<mybtn v-else :text="task.status==3?'已完成任务':'任务已关闭'" :my_btn_disabled="true"></mybtn> -->
|
<mybtn v-else :text="task.status==3?'已完成任务':'任务已关闭'" :my_btn_disabled="true"></mybtn> -->
|
||||||
<mybtn v-if="!isDisabled" text="提交" @click="submitFn"></mybtn>
|
<mybtn v-if="!isDisabled" text="提交" @click="submitFn"></mybtn>
|
||||||
|
<mybtn v-else-if='task.status==3' text="已完成任务" :my_btn_disabled="true"></mybtn>
|
||||||
<mybtn v-else-if="isDisabled" text="任务已经提交" :my_btn_disabled="true"></mybtn>
|
<mybtn v-else-if="isDisabled" text="任务已经提交" :my_btn_disabled="true"></mybtn>
|
||||||
<mybtn v-else :text="task.status==3?'已完成任务':'任务已关闭'" :my_btn_disabled="true"></mybtn>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -86,17 +89,22 @@
|
|||||||
} from "@/api/task.js"
|
} from "@/api/task.js"
|
||||||
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
|
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
|
||||||
import {
|
import {
|
||||||
FILE_URL
|
FILE_URL,
|
||||||
|
IMG_URL
|
||||||
} from '@/api/file.js'
|
} from '@/api/file.js'
|
||||||
import {
|
import {
|
||||||
Toast
|
Toast
|
||||||
} from "../../libs/uniApi";
|
} from "../../libs/uniApi";
|
||||||
|
import {
|
||||||
|
nextTick
|
||||||
|
} from "vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
lsjUpload
|
lsjUpload
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
imgTypeList: ["png", "jpg", "jpeg", "webp"],
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
amount: "",
|
amount: "",
|
||||||
fileOption: {},
|
fileOption: {},
|
||||||
@ -104,6 +112,7 @@
|
|||||||
task_id: -1,
|
task_id: -1,
|
||||||
file: "",
|
file: "",
|
||||||
fileTit: "",
|
fileTit: "",
|
||||||
|
file_type: "pdf",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -121,19 +130,31 @@
|
|||||||
methods: {
|
methods: {
|
||||||
navToContract() {
|
navToContract() {
|
||||||
let fileSrc = this.file
|
let fileSrc = this.file
|
||||||
uni.navigateTo({
|
|
||||||
url: `/subpkg/pdfView/pdfView?url=${fileSrc}`
|
if (this.file_type == 'image') {
|
||||||
})
|
uni.previewImage({
|
||||||
|
urls: [fileSrc]
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/subpkg/pdfView/pdfView?url=${fileSrc}`
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async submitFn() {
|
async submitFn() {
|
||||||
if (!this.amount) return Toast("请输入金额")
|
if (!this.amount) return Toast("请输入金额")
|
||||||
if (this.amount < this.task.extend.shareholder.money) return Toast("未达到目标入股金额,无法提交")
|
if (Number(this.amount) < Number(this.task.extend.shareholder.money)) return Toast("未达到目标入股金额,无法提交")
|
||||||
let res = await commit_service_group_taskAPI({
|
let res = await commit_service_group_taskAPI({
|
||||||
id: this.task_id,
|
id: this.task_id,
|
||||||
annex: this.file,
|
annex: this.file,
|
||||||
amount: this.amount
|
amount: this.amount,
|
||||||
|
file_type: this.file_type
|
||||||
})
|
})
|
||||||
Toast("操作成功!")
|
Toast("操作成功!")
|
||||||
|
return
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
@ -164,11 +185,23 @@
|
|||||||
* 文件选择回调
|
* 文件选择回调
|
||||||
* @param {Object} files 已选择的所有文件Map集合
|
* @param {Object} files 已选择的所有文件Map集合
|
||||||
*/
|
*/
|
||||||
changeFile(files) {
|
async changeFile(files) {
|
||||||
|
let type = [...files.values()][0].name
|
||||||
|
let isImage = null
|
||||||
|
this.imgTypeList.forEach(item => {
|
||||||
|
if (type.includes(item)) {
|
||||||
|
isImage = true
|
||||||
|
this.file_type = 'image'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (isImage) {
|
||||||
|
this.$refs.lsjUpload.setData("url", IMG_URL)
|
||||||
|
}
|
||||||
|
this.$refs.lsjUpload.upload()
|
||||||
// 更新选择的文件
|
// 更新选择的文件
|
||||||
this.files = files;
|
this.files = files;
|
||||||
// 强制更新视图
|
// 强制更新视图
|
||||||
console.log('当前选择的文件列表:', JSON.stringify([...files.values()]));
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -192,9 +225,8 @@
|
|||||||
});
|
});
|
||||||
this.task = res.data;
|
this.task = res.data;
|
||||||
if (this.task.extend.is_commit == 1) {
|
if (this.task.extend.is_commit == 1) {
|
||||||
|
|
||||||
|
|
||||||
this.file = this.task.extend.annex
|
this.file = this.task.extend.annex
|
||||||
|
this.file_type = this.task.extend.file_type
|
||||||
this.amount = this.task.extend.amount || 0
|
this.amount = this.task.extend.amount || 0
|
||||||
this.fileTit = "附件"
|
this.fileTit = "附件"
|
||||||
this.isDisabled = true
|
this.isDisabled = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user