浏览代码

待办处理

dudm 3 年之前
父节点
当前提交
c8e90f8153
共有 3 个文件被更改,包括 213 次插入7 次删除
  1. 9 0
      front-vue/src/api/system/notice.js
  2. 19 7
      front-vue/src/views/home.vue
  3. 185 0
      front-vue/src/views/workDeal.vue

+ 9 - 0
front-vue/src/api/system/notice.js

@@ -9,6 +9,15 @@ export function listNotice(query) {
   })
 }
 
+// 处理待办
+export function dealWork(data) {
+  return request({
+    url: '/system/ownNotice/dealWork',
+    method: 'post',
+    data: data
+  })
+}
+
 // 查询公告详细
 export function getNotice(noticeId) {
   return request({

+ 19 - 7
front-vue/src/views/home.vue

@@ -203,7 +203,7 @@
                                             size="mini"
                                             type="text"
                                             @click="handleDetail(scope.row)"
-                                        >去审批</el-button>
+                                        >去办理</el-button>
                                             <!-- v-if="scope.row.openUrl" -->
                                     </template>
                                 </el-table-column>
@@ -364,7 +364,7 @@
                                             type="text"
                                             icon="el-icon-info"
                                             @click="handleDetail(scope.row)"
-                                        >去审批</el-button>
+                                        >去办理</el-button>
                                     </template>
                                 </el-table-column>
                             </el-table>
@@ -439,8 +439,8 @@
                 </div>
             </el-card>
         </div>
-        <el-dialog title="我的待办" :visible.sync="openWork" width="1200px" append-to-body>
-            <iframe :src="workUrl" width='1150px' height='8000px' frameborder='1' />
+        <el-dialog title="待办处理" :visible.sync="openWork" width="500px" append-to-body>
+            <work-deal :tableId="tableId" :workType="workType" :noticeId="noticeId" @cancelOpen="cancel"></work-deal>
         </el-dialog>
     </div>
 </template>
@@ -455,10 +455,12 @@ import { amtformat } from "@/utils/amtCommon"
 import  EchartPie  from '@/components/Echart/pie/index'
 import  EchartBar  from '@/components/Echart/bar/index'
 import { EventBus } from '@/util/event-bus.js'
+import WorkDeal from "@/views/workDeal";
 export default {
   components: {
     EchartPie,
-    EchartBar
+    EchartBar,
+    WorkDeal
   },
     data() {
         return {
@@ -571,7 +573,10 @@ export default {
             activeName:'first',
             company:{},
             openWork:false,
-            workUrl:null
+            workUrl:null,
+            workType:null,
+            tableId:null,
+            noticeId:null
         }
     },
     created: function () {
@@ -942,13 +947,20 @@ export default {
         },
         /** 详情按钮操作 */
         handleDetail(row) {
+            console.log(row)
             if(row.openType == '00'){
-                this.workUrl = row.openUrl
                 this.openWork = true
+                this.noticeId = row.noticeId
+                this.workType = row.workType
+                this.tableId = row.tableId
             }else if(row.openType == '01'){
                 this.$router.push({ path: row.openUrl });
             }
         },
+        // 取消按钮
+        cancel() {
+            this.openWork = false;
+        },
     },
 };
 </script>

+ 185 - 0
front-vue/src/views/workDeal.vue

@@ -0,0 +1,185 @@
+<template >
+    <div id="">
+        <!-- 还款 -->
+        <div v-if="workType == '06'">
+            <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+                <el-form-item label="上传附件">
+                    <el-upload
+                        ref="upload"
+                        class="upload-demo"
+                        action=""
+                        :class="{showUoload:showBtnImg,uoloadSty:noneBtnImg}"
+                        :on-change="dealImgChange"
+                        accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
+                        :http-request="httpRequest"
+                        :on-preview="handlePictureCardPreview"
+                        :on-remove="handleRemove"
+                        multiple
+                        :limit="1"
+                        :on-exceed="handleExceed"
+                        list-type="picture-card"
+                        :file-list="fileList"
+                        :auto-upload="true">
+                        <el-button slot="trigger" size="small" type="primary">点击选择</el-button>
+                    </el-upload>
+                </el-form-item>
+                <el-form-item label="融资id" prop="zfrId" label-width="90px" v-if="false">
+                    <el-input v-model="form.zfrId"  style="width:284px"/>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="submitForm">确 定</el-button>
+                <el-button @click="cancel">取 消</el-button>
+            </div>
+        </div>
+
+        <!-- 内部审批 -->
+        <div v-if="workType == '07'">
+                <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+                    <el-form-item label="备注">
+                        <el-input type="textarea" placeholder="请输入内容" v-model="form.remark" :row="3"></el-input>
+                    </el-form-item>
+                </el-form>
+                <div slot="footer" class="dialog-footer">
+                    <el-button type="primary" @click="submit">确 定</el-button>
+                    <el-button @click="cancel">取 消</el-button>
+                </div>
+        </div>
+    </div>
+</template>
+<script>
+import { RepaymentRegistration } from "@/api/service/repayment/repayment";
+import { uploadFileNew } from "@/api/common/file";
+import { dealWork } from '@/api/system/notice'
+export default {
+    components: {
+    },
+    props: {
+        // 正常的业务数据,对应echarts饼图配置中series[0].data
+        tableId: {
+            type: String,
+            required: true,
+            default: () => "",
+        },
+        workType: {
+            type: String,
+            required: true,
+            default: () => "",
+        },
+        noticeId: {
+            type: String,
+            required: true,
+            default: () => "",
+        },
+    },
+    data() {
+        return {
+            // 表单参数
+            form: {
+                
+            },
+            // 表单校验
+            rules: {
+                //  pptName:[
+                //   { required: true, message: "项目类型不能为空", trigger: "blur" },
+                // ]
+            },
+            //附件地址
+            fileList:[],
+            //附件按钮
+            showBtnImg:true,
+            noneBtnImg:false,
+            limitCountImg:1,
+        }
+    },
+    created: function () {
+        this.form.zfrId = this.tableId
+    },
+    activated () {
+    }, 
+    mounted() {
+    },
+    methods: {
+        handleExceed(files, fileList) {
+            this.$message.warning(`当前限制选择 1 个文件`);
+        },
+        //文件移除提示
+        handleRemove(file, fileList) {
+            console.log(file)
+            for(let i = 0;i< this.fileList.length;i++){
+                if(file.uid == this.fileList[i].uid){
+                this.fileList.splice(i, 1);
+                break;
+                }
+            }
+            this.noneBtnImg = fileList.length >= this.limitCountImg;
+            //return this.$confirm(`确定移除 ${ file.name }?`);
+        },
+        handlePictureCardPreview(file) {
+            this.dialogImageUrl = file.url;
+            this.dialogVisible = true;
+        },
+        //手动上传文件触发
+        httpRequest(param) {
+            let fileObj = param.file // 相当于input里取得的files
+            let fd = new FormData()// FormData 对象
+            fd.append('file', fileObj)// 文件对象
+            fd.append('fileType','00')//文件类型
+            const loading = this.$loading({
+                lock: true,
+                text: 'Loading',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0, 0, 0, 0.7)'
+            });
+            uploadFileNew(fd).then(response => {
+                if(response){
+                // this.form.eeiImgUrl = response.url
+                this.fileList.push({uid : response.fileId,url:response.url+'/'+getToken()})
+                console.log(response.url)
+                setTimeout(() => {
+                    loading.close();
+                }, 2000);
+                }
+            }).catch(response => {
+                    loading.close();
+            })
+        },
+        dealImgChange(file, fileList){
+            this.noneBtnImg = fileList.length >= this.limitCountImg;
+        },
+         /** 提交按钮 */
+        submitForm() {
+            this.$refs["form"].validate(valid => {
+                if (valid) {
+                    if (this.form.zfrId != null) {
+                        this.form.zfrApplyFile = this.fileList;
+                        RepaymentRegistration(this.form).then(response => {
+                            this.msgSuccess("登记成功");
+                        });
+                    } 
+                }
+            });
+        },
+         /** 提交按钮 */
+        submit() {
+            this.$refs["form"].validate(valid => {
+                if (valid) {
+                    if (this.form.noticeId != null) {
+                        dealWork(this.form).then(response => {
+                            this.msgSuccess("处理成功");
+                        });
+                    } 
+                }
+            });
+        },
+        cancel(){
+            this.$emit("cancelOpen");
+        }
+    },
+};
+</script>
+<style>
+.labelData .el-collapse-item__header{
+    height: 200px;
+}
+</style>