USER-20230908AJ\Administrator 1 سال پیش
والد
کامیت
45b3cf93d4

+ 6 - 0
api/transfer.js

@@ -0,0 +1,6 @@
+import {request} from '@/service/ajax'
+
+const newsUrl = '/api/transfer/'
+// 获取基本信息
+export const getTransferList = (data) => request(newsUrl + 'list', 'post', { ...data },false)
+export const addTransferPdf = (data) => request(newsUrl + 'add', 'post', { ...data },true)

+ 11 - 2
common/system_popup/system_popup.vue

@@ -72,7 +72,12 @@
 					icon: "https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-phone.png",
 					name: '邀请二维码',
 					id: 4
-				}, ]
+				},
+          {
+            icon: "/static/img/index/to_excel.png",
+            name: '转换工具',
+            id: 5
+          },]
 			}
 		},
 		created() {
@@ -107,7 +112,11 @@
 					// uni.navigateTo({
 					// 	url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
 					// })
-				} else {
+				} else if (item.id === 5) {
+          uni.navigateTo({
+          	url: `/page_subpack/transition/to_excel`
+          })
+        } else {
 					uni.navigateTo({
 						url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
 					})

BIN
page_subpack/static/img/task-details/add-file.png


BIN
page_subpack/static/img/task-details/close.png


BIN
page_subpack/static/img/task-details/hint-subtract.png


BIN
page_subpack/static/img/task-details/icon-excel.png


BIN
page_subpack/static/img/task-details/icon-pdf.png


BIN
page_subpack/static/img/task-details/icon-ppt.png


BIN
page_subpack/static/img/task-details/icon-word.png


+ 227 - 0
page_subpack/transition/components/add-file.vue

@@ -0,0 +1,227 @@
+<template>
+  <view class="text-color-12">
+    <view class="p-30">
+			<textarea class="sys-from-background-color r-20 textarea p-20" name="" id="" cols="30" rows="10"
+                v-model="msgData.msg" :maxlength="999" :placeholder="placeholder"></textarea>
+      <view class="size-26 m-tb20 sys-weight-600">上传附件</view>
+      <view class="">
+        <view class="sys-from-background-color row-justify-sb center p-20 m-b16 r-20"
+              v-for="(file,fileIndex) in msgData.file_list" :key="fileIndex">
+          <view class="row-c">
+            <image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-pdf.png"
+                   v-if="file.file_type===1" mode="aspectFill"></image>
+            <image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-word.png"
+                   v-else-if="file.file_type===2" mode="aspectFill"> </image>
+            <image class="wh-60 m-r20" src="/page_subpack/static/img/task-details/icon-excel.png" v-else
+                   mode="aspectFill"> </image>
+            <text class="size-24 text-color-666"> {{file.name}}</text>
+          </view>
+          <image class="delete-iocn wh-25" src="/page_subpack/static/img/task-details/hint-subtract.png"
+                 @click.stop="delFile(fileIndex)" mode=""></image>
+        </view>
+        <view class="sys-from-background-color row-c p-20 r-20" @click.stop="uploadingWord()">
+          <image class="wh-80 m-r20" src="/page_subpack/static/img/task-details/add-file.png" mode="aspectFill">
+          </image>
+          <view class="column">
+            <text class="select-file size-24">选择文件</text>
+            <text class="size-24 text-color-666">支持上传文件:pdf</text>
+          </view>
+        </view>
+      </view>
+    </view>
+    <EnButton  @onSubmit="clickBut"></EnButton>
+
+  </view>
+</template>
+
+<script>
+import tools from "@/service/tools";
+import txUploadFile from "@/service/txOssSts";
+import {addTransferPdf} from "@/api/transfer";
+
+export default {
+  props: {
+    is_button: {
+      type: Boolean,
+      default: false
+    },
+    placeholder: {
+      default: '留个言吧~~'
+    }
+
+  },
+  data() {
+    return {
+      msgData: {
+        business_id: '',
+        msg: '',
+        reply_id: 0,
+        msg_img: [],
+        file_list: [],
+      },
+      videoUrl:'',
+      isAjax: false,
+    }
+  },
+
+  methods: {
+
+
+    clickBut() {
+      if (this.isAjax) {
+        return;
+      }
+      addTransferPdf(this.msgData).then((res) => {
+        if (res.code === 1) {
+          tools.success(res.msg)
+          this.$emit('newMsg')
+          this.msgData.msg=''
+          this.msgData.file_list=[]
+        } else {
+          tools.error(res.msg)
+          this.isAjax = false;
+        }
+
+      })
+    },
+    delFile(fileIndex) {
+      this.msgData.file_list.splice(fileIndex, 1)
+      this.fileNum = -1
+    },
+
+    uploadingWord() {
+      tools.showLoading()
+      wx.chooseMessageFile({
+        count: 5, //默认100
+        type: 'file', //默认100
+        extension: ['pdf'],
+        success: (res) => {
+          console.log('---------------------------------------------');
+          console.log(res);
+          if (res.tempFiles.length > 0) {
+            res.tempFiles.forEach((tempFilePath) => {
+              console.log(tempFilePath)
+              txUploadFile(tempFilePath.path).then((data) => {
+                if (!data) {
+                  tools.error('上传失败')
+                } else {
+                  console.log({
+                    'name': tempFilePath.name,
+                    'file_type': tools.getFileType(data
+                        .Location),
+                    'url': data.Location
+                  })
+                  this.msgData.file_list.push({
+                    'name': tempFilePath.name,
+                    'file_type': tools.getFileType(data .Location),
+                    'url': data.Location
+                  })
+                }
+              })
+            })
+           tools.hideLoading()
+          } else {
+            tools.error("请选择上传文件")
+            tools.hideLoading()
+          }
+        },
+        fail: (e) => {
+          tools.hideLoading()
+        }
+      });
+
+    },
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.nav {
+  font-size: 18px;
+  font-weight: bold;
+  text-align: center;
+  padding: 30rpx 0 15rpx;
+  background: #fff;
+}
+.textarea {
+  width: calc(100% - 40rpx);
+  max-height: 100rpx;
+}
+
+.popup-block {
+  border-radius: 20rpx 20rpx 0rpx 0rpx;
+  overflow: hidden;
+  background-color: #f5f5f5;
+
+  .popup-row {
+    height: 100rpx;
+    background-color: #fff;
+    text-align: center;
+    line-height: 100rpx;
+    border-bottom: 2rpx solid #f5f5f5;
+
+    &:nth-child(4) {
+      margin-bottom: 20rpx;
+    }
+
+    &:last-child {
+      height: 112rpx;
+      border: none;
+      line-height: 112rpx;
+    }
+
+    &:active {
+      background-color: rgb(244, 244, 244);
+    }
+  }
+}
+
+.image-content {
+  display: flex;
+  flex-wrap: wrap;
+
+  .image-box {
+    position: relative;
+
+    .image-item {
+      width: 130rpx;
+      height: 130rpx;
+      border-radius: 10rpx;
+    }
+
+    .video-icon {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%);
+    }
+
+    .delete-iocn {
+      position: absolute;
+      right: -10rpx;
+      top: -10rpx;
+    }
+  }
+
+  .add-image {
+    width: 128rpx;
+    height: 128rpx;
+    border-radius: 10rpx;
+    background: #F7F9FE;
+    border: 1rpx dashed #999999;
+  }
+}
+
+.select-file {
+  width: 132rpx;
+  height: 44rpx;
+  background: #FFFFFF;
+  border-radius: 6rpx;
+  border: 1rpx solid #DDDDDD;
+  line-height: 44rpx;
+  text-align: center;
+  display: inline-block;
+  margin-bottom: 10rpx;
+}
+</style>

+ 83 - 0
page_subpack/transition/components/credit-item.vue

@@ -0,0 +1,83 @@
+<template>
+	<view class="p-lr20 p-b40">
+		<view class="sys-background-fff r-30 text-color-12 p-20 m-t20" v-for="(item,index) in list" :key="index">
+			<view class="row-justify-sb center">
+				<view class="row-c line-30">
+					<text class="size-30 sys-weight-600">{{item.file_name}}</text>
+<!--					<image class="wh-30 m-lr16" src="/static/img/task/task-phone.png" mode="aspectFill"></image>-->
+<!--					<text class="size-26">{{item.task_sn}}</text>-->
+				</view>
+				<image class="wh-80" src="/page_task/static/img/task-details/icon-5.png" mode="aspectFill"></image>
+			</view>
+			<view class="sys-from-background-color size-24 text-color-666 p-20 r-20 m-tb20">
+				<view>
+					<text>任务编号:</text>
+					<text>{{item.task_sn}}</text>
+				</view>
+				<view class="m-t10">
+					<text>备注:</text>
+					<text> {{item.msg?item.msg:'无'}}</text>
+				</view>
+			</view>
+			<view class="row-justify-sb center">
+				<text class="size-24 text-color-999 flex">{{item.created_at}}上传</text>
+				<button class="credit-item-button sys-weight-500 size-28" type="default" hover-class="is-hover"  v-if="item.status === 3"
+					@click="downPdf(downPdf)">下载</button>
+			</view>
+		</view>
+    <en-blank v-if="list.length<=0"></en-blank>
+	</view>
+</template>
+
+<script>
+	import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
+
+  export default {
+    components: {EnBlank},
+		props: {
+      list:{
+        default:[]
+      }
+		},
+		data() {
+			return {
+
+			}
+		},
+    methods: {
+      downPdf(item) {
+        uni.downloadFile({
+          url: item.file_url,
+          success: function (res) {
+            let filePath = res.tempFilePath;
+            uni.openDocument({
+              filePath: filePath,
+              fileType: 'xlsx',
+              showMenu: true,
+              success: function (res) {
+                console.log('打开文档成功');
+              }
+            });
+            // wx.shareFileMessage({
+            //
+            // })
+          }
+        });
+      },
+    },
+	}
+</script>
+
+<style lang="scss" scoped>
+	.credit-item-button {
+		width: 173rpx;
+		color: #fff;
+		background: #0FB160;
+		line-height: 70rpx;
+		border-radius: 100rpx;
+	}
+
+	button::after {
+		border: none;
+	}
+</style>

+ 204 - 0
page_subpack/transition/to_excel.vue

@@ -0,0 +1,204 @@
+<template>
+  <view class="total-page page-box page-env-20 scroll_content task-bg">
+    <Nav title="转换工具" :genre="1" is_fixed></Nav>
+    <view class="header-filter">
+      <view class="row-justify-sb center  m-20">
+        <view class="subsection">
+          <uv-subsection :list="tabsDate" :bgColor="'#FFF'" :barBg="'#0FB160'" :activeColor="'#fff'"
+                         :inactiveColor="'#0FB160'" :fontSize="14" custom-style="height: 70rpx;border-radius: 30rpx;"
+                         custom-item-style="border-radius: 30rpx;" :current="subCurrent"
+                         @change="onSubChange"></uv-subsection>
+        </view>
+        <view class="row credit_earch center sys-background-fff r-30 p-l16">
+          <uni-icons type="search" size="18" color="#999"></uni-icons>
+          <input class="flex m-l10 m-r20 size-28 sys-background-fff" type="text" placeholder="搜索文件名称"
+                 placeholder-style="font-size:28rpx;color:#999" v-model="value" />
+        </view>
+      </view>
+      <view style="height: 100rpx;">
+        <z-tabs ref="tabs" :list="tabsList" :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'28rpx'}"
+                :bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
+                :current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
+      </view>
+    </view>
+    <EnScroll ref="scroll" :navHeight="navHeight" is_tabHeight @onRefresh="onRefresh"
+              @onScrollBottom="onScrollBottom">
+      <CreditItem :list="list"></CreditItem>
+    </EnScroll>
+    <view class="fixed-button p-t20 p-lr30">
+      <button class="en-button button-background sys-weight-500 row-justify-c center" type="default"
+              hover-class="is-hover" @click="addPdf">
+        <image class="wh-36 m-lr16" src="/static/img/task/task-phone.png" mode="aspectFill"></image>
+        添加转换文件
+      </button>
+    </view>
+    <uni-popup ref="popup" type="bottom">
+      <view class="page-env-160 sys-background-fff r-20">
+        <view class="row-justify-sb center p-lr30 p-t30">
+          <view class="wh-25"></view>
+          <text class="size-30 sys-weight-600">添加文件</text>
+          <image class="wh-25" src="/page_subpack/static/img/task-details/close.png" mode="" @click="endAdd(true)">
+          </image>
+        </view>
+        <add-file @newMsg="endAdd"></add-file>
+      </view>
+
+    </uni-popup>
+  </view>
+</template>
+<script>
+import CreditItem from "./components/credit-item.vue";
+import {getTransferList} from "@/api/transfer";
+import tools from "@/service/tools";
+import AddFile from "@/page_subpack/transition/components/add-file.vue";
+
+export default {
+  components: {
+    AddFile,
+    CreditItem,
+  },
+  data() {
+    return {
+      value: '',
+      current: 0,
+      navHeight: 0,
+      swiperCurrent: 0,
+      tabsList: [{
+        name: '全部',
+        dot_color: 'red',
+        disabled: false,
+        'id': 0,
+      }, {
+        name: '待转换',
+        dot_color: 'yellow',
+        disabled: false,
+        'id': 1,
+      }, {
+        'id': 2,
+        name: '转换中',
+        dot_color: '',
+        disabled: false
+      }, {
+        'id': 3,
+        name: '已完成',
+        dot_color: '',
+        disabled: false
+      }, {
+        'id': 4,
+        name: '已完成',
+        dot_color: '',
+        disabled: false
+      }],
+      subCurrent: 0,
+      tabsDate: ['全部', '当日', '本周'],
+      list: [],
+      page: 1,
+      total: null,
+      isAjax: false,
+
+    }
+  },
+  onReady() {
+    this.getFilterHeight()
+  },
+  onLoad() {},
+  mounted() {
+    this.startList()
+  },
+  methods: {
+    addPdf(){
+      this.$refs.popup.open('bottom')
+    },
+    endAdd(type){
+      this.$refs.popup.close('bottom')
+      if(!type)this.startList()
+    },
+    startList() {
+      this.list = []
+      this.page = 1
+      this.scrollTop = 0
+      this.total = null
+      this.isAjax = false
+      this.getTransferList()
+    },
+    getTransferList() {
+      if (this.isAjax || this.list.length === this.total) {
+        return
+      }
+      getTransferList({
+        'status': this.tabId
+      }).then(res => {
+        if (res.code === 1) {
+          this.list.push(...res.data.items)
+          this.total = res.data.total
+        } else {
+          tools.error(res.msg)
+        }
+        this.isAjax = false
+      })
+    },
+    tabsChange(index) {
+      if (index !== this.current) {
+        this.current = index;
+        this.startList()
+      }
+    },
+    onSubChange(current) {
+      this.subCurrent = current
+    },
+    // 下拉刷新
+    onRefresh() {
+      console.log('下拉刷新');
+      setTimeout(() => {
+        this.$refs.scroll.onEndPulling()
+      }, 500)
+    },
+    // 滚动到底部
+    onScrollBottom() {
+      console.log('滚动到底部');
+    },
+    getFilterHeight() {
+      const query = uni.createSelectorQuery().in(this);
+      query.select('.header-filter').boundingClientRect(data => {
+        if (data) {
+          console.log(data.height);
+          this.navHeight = data.height
+        }
+      }).exec();
+    }
+  },
+}
+</script>
+<style lang="scss" scoped>
+.subsection {
+  width: 430rpx;
+}
+
+.credit_earch {
+  width: 250rpx;
+  height: 69rpx;
+}
+
+.en-button {
+  border: none;
+  color: #fff;
+  font-size: 30rpx;
+  border: 1rpx solid #0FB160 !important;
+  line-height: 80rpx;
+  border-radius: 100rpx;
+  background-color: #0FB160;
+}
+
+.fixed-button {
+  position: fixed;
+  bottom: 0;
+  z-index: 10;
+  background: #fff;
+  width: calc(100% - 60rpx);
+  padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+}
+
+button::after {
+  border: none;
+}
+</style>

+ 1 - 1
page_task/task_details/module/send_chat.vue

@@ -35,7 +35,7 @@
 						<text class="size-24 text-color-666"> {{file.name}}</text>
 					</view>
 					<image class="delete-iocn wh-25" src="/page_task/static/img/information/hint-subtract.png"
-						@click.stop="delFile(delFile)" mode=""></image>
+						@click.stop="delFile(fileIndex)" mode=""></image>
 				</view>
 				<view class="sys-from-background-color row-c p-20 r-20" @click.stop="uploadingFile(5)">
 					<image class="wh-80 m-r20" src="/page_task/static/img/task-details/add-file.png" mode="aspectFill">

+ 24 - 15
pages.json

@@ -62,18 +62,16 @@
       }
     },
     {
-    	"path" : "pages/loan/module/rate_compare",
-    	"style" : 
-    	{
-    		"navigationBarTitleText" : ""
-    	}
+      "path": "pages/loan/module/rate_compare",
+      "style": {
+        "navigationBarTitleText": ""
+      }
     },
     {
-    	"path" : "pages/loan/module/perfect_rate",
-    	"style" : 
-    	{
-    		"navigationBarTitleText" : ""
-    	}
+      "path": "pages/loan/module/perfect_rate",
+      "style": {
+        "navigationBarTitleText": ""
+      }
     }
   ],
   "subPackages": [
@@ -97,6 +95,13 @@
           "style": {
             "navigationBarTitleText": ""
           }
+        },
+        {
+          "path": "transition/to_excel",
+          "style": {
+            "navigationBarTitleText": "",
+            "enablePullDownRefresh": false
+          }
         }
       ]
     },
@@ -198,11 +203,10 @@
           }
         },
         {
-        	"path" : "credit_report/credit_report",
-        	"style" : 
-        	{
-        		"navigationBarTitleText" : ""
-        	}
+          "path": "credit_report/credit_report",
+          "style": {
+            "navigationBarTitleText": ""
+          }
         }
       ]
     }
@@ -251,6 +255,11 @@
   "condition": {
     "current": 0,
     "list": [
+      {
+        "name": "转换工具",
+        "path": "/page_subpack/transition/to_excel",
+        "query": "productId=1"
+      },
       {
         "name": "审核",
         "path": "/pages/login/await-audit",

+ 5 - 5
pages/index/index.vue

@@ -96,11 +96,11 @@
 					value: "0"
 				}, ],
 				memberData: {
-          draftNum: "0",
-          creditNum: "0",
-          noticeNum: "0",
-          take_num: "0",
-          unreadNum: "0",
+          draftNum: 0,
+          creditNum: 0,
+          noticeNum: 0,
+          take_num: 0,
+          unreadNum: 0,
         },
 				statisticsData: {
 					endNum: 0,

BIN
static/img/index/to_excel.png