|
@@ -24,7 +24,11 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class='content1'>
|
|
|
- <view class="title">上传企业授权书</view>
|
|
|
+ <view class="flex">
|
|
|
+ <view class="title">上传企业授权书</view>
|
|
|
+ <view class="title title_css" @click="formWork">授权书模板</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- {{show}} -->
|
|
|
<!-- <button type="default" @click="()=>{show = true}" style="width: 80%;background-color: #007AFF;color: #fff;margin-top: 60rpx;">选择文件</button>
|
|
|
<view class="textStyle" v-for="(item,index) in pathArr" :key="index">
|
|
@@ -39,8 +43,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<nk-select-file v-model="show" @confirm="getPath"></nk-select-file> -->
|
|
|
- <u-upload class="uview-upload" :fileList="fileList1" @beforeRead='beforeRead($event)' @afterRead="afterRead($event)" @delete="deletePic"
|
|
|
- name="1" multiple :maxCount="9"></u-upload>
|
|
|
+ <u-upload class="uview-upload" :fileList="fileList1" @beforeRead='beforeRead($event)'
|
|
|
+ @afterRead="afterRead($event)" @delete="deletePic" name="1" multiple :maxCount="9"></u-upload>
|
|
|
<!-- <view style='position:relative;'>
|
|
|
<view v-if='!dataDetails.certificateAddressUrl' @click="uploadImg(1)" class="picture picture7">
|
|
|
<image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
|
|
@@ -89,6 +93,8 @@
|
|
|
提交
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-picker :show="formWorkShow" @cancel="formWorkShow = false" @close="formWorkShow = false"
|
|
|
+ :columns="formWorkColumns" @confirm="formWorkSubmit"></u-picker>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -120,7 +126,12 @@
|
|
|
uploadType: '',
|
|
|
index: 0,
|
|
|
fileList1: [],
|
|
|
- urlList:[]
|
|
|
+ urlList: [],
|
|
|
+ formWorkShow: false,
|
|
|
+ formWorkColumns: [
|
|
|
+ ["复制下载链接", "预览模板"]
|
|
|
+ ]
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -151,21 +162,59 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ formWork() {
|
|
|
+ this.formWorkShow = true
|
|
|
+ },
|
|
|
+ formWorkSubmit(e) {
|
|
|
+ let that = this
|
|
|
+ console.log(e.value[0])
|
|
|
+ if (e.value[0] == "复制下载链接") {
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
|
|
|
+ success: function() {
|
|
|
+ uni.showToast({
|
|
|
+ title: '复制成功',
|
|
|
+ });
|
|
|
+ that.formWorkShow = false
|
|
|
+ },
|
|
|
+ fail: function() {
|
|
|
+ uni.showToast({
|
|
|
+ title: '复制失败',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.downloadFile({
|
|
|
+ url: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
|
|
|
+ success: function(res) {
|
|
|
+ var filePath = res.tempFilePath;
|
|
|
+ uni.openDocument({
|
|
|
+ filePath: filePath,
|
|
|
+ showMenu: true,
|
|
|
+ success: function(res) {
|
|
|
+ console.log('打开文档成功');
|
|
|
+ that.formWorkShow = false
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
async get_camera_permission() {
|
|
|
- var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
|
|
|
- if(photol == false){
|
|
|
+ var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
|
|
|
+ if (photol == false) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '您已经关闭相机权限,去设置',
|
|
|
- success: function (res) {
|
|
|
+ success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
permision.gotoAppPermissionSetting()
|
|
|
- // plus.runtime.openURL("app-settings:");
|
|
|
+ // plus.runtime.openURL("app-settings:");
|
|
|
} else if (res.cancel) {
|
|
|
console.log('用户点击取消');
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
getPath(event) {
|
|
@@ -173,7 +222,7 @@
|
|
|
this.pathArr = event;
|
|
|
},
|
|
|
uploadFilePromise(file, url) {
|
|
|
- uploadImage('image',url, 'appData/',
|
|
|
+ uploadImage('image', url, 'appData/',
|
|
|
result => {
|
|
|
// 上传成功回调函数
|
|
|
this.urlList.push(result)
|
|
@@ -182,7 +231,7 @@
|
|
|
},
|
|
|
// 删除图片
|
|
|
deletePic(event) {
|
|
|
- this.urlList=this.urlList.splice(event.index,1)
|
|
|
+ this.urlList = this.urlList.splice(event.index, 1)
|
|
|
this[`fileList${event.name}`].splice(event.index, 1)
|
|
|
},
|
|
|
// 新增图片
|
|
@@ -210,21 +259,21 @@
|
|
|
}
|
|
|
},
|
|
|
async beforeRead(event) {
|
|
|
- console.log(1221212,event)
|
|
|
- var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
|
|
|
- if(photol == false){
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '您已经关闭相机权限,去设置',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- plus.runtime.openURL("app-settings:");
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('用户点击取消');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ console.log(1221212, event)
|
|
|
+ var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
|
|
|
+ if (photol == false) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '您已经关闭相机权限,去设置',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ plus.runtime.openURL("app-settings:");
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
consent() {
|
|
|
this.checked = !this.checked
|
|
@@ -308,7 +357,7 @@
|
|
|
// })
|
|
|
// return true
|
|
|
// }
|
|
|
- if(this.urlList.length == 0){
|
|
|
+ if (this.urlList.length == 0) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: "企业授权书不能为空!",
|
|
@@ -332,7 +381,7 @@
|
|
|
}
|
|
|
},
|
|
|
submit() {
|
|
|
- if(this.validate()){
|
|
|
+ if (this.validate()) {
|
|
|
return
|
|
|
}
|
|
|
uni.showLoading({
|
|
@@ -448,9 +497,17 @@
|
|
|
}
|
|
|
|
|
|
.title {
|
|
|
+ width: 50%;
|
|
|
color: #999999;
|
|
|
margin: 20rpx 0;
|
|
|
}
|
|
|
+
|
|
|
+ .title_css {
|
|
|
+ text-align: right;
|
|
|
+ color: #2772FB;
|
|
|
+ margin: 20rpx 0;
|
|
|
+ font-size: 30rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.u-input {
|
|
@@ -486,6 +543,6 @@
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
</style>
|