fan преди 2 години
родител
ревизия
3956f6e6d8
променени са 3 файла, в които са добавени 267 реда и са изтрити 32 реда
  1. 2 0
      public/static/views/incomeTemplateExcel.html
  2. 64 6
      src/pages/main/incomeExcel/incomeExcelInfo.vue
  3. 201 26
      src/pages/main/incomeExcel/incomeExcelIssued.vue

+ 2 - 0
public/static/views/incomeTemplateExcel.html

@@ -247,6 +247,8 @@
                         findAndReplace: showToolBar, // '查找替换'
                         protection: showToolBar, // '工作表保护'
                         print: showToolBar, // '打印'
+                        border: false, // '边框'
+                        function: false, // '公式'
                     },
                     showinfobar: true, // 顶部信息 文件名称 按钮
                     allowUpdate: false, // 是否允许操作表格后的后台更新 在线文档websocket时为true

+ 64 - 6
src/pages/main/incomeExcel/incomeExcelInfo.vue

@@ -68,21 +68,25 @@
                     <div class="info-line">
                         <span style="margin-right: 20px;margin-left: 40px">选择路径:</span>
                         <el-select v-model="auditForm.authType" placeholder="选择路径">
-                            <el-option v-for="(item,index) in auditBoxList" :key="index" :label="item.name" :value="item.value"></el-option>
+                            <el-option v-for="(item,index) in auditBoxList" :key="index" :label="item.name"
+                                       :value="item.value"></el-option>
                         </el-select>
-                    </div><br/>
+                    </div>
+                    <br/>
                     <div class="info-line" v-if="auditForm.authType == 1">
                         <span style="margin-right: 20px;margin-left: 40px">下一步处理人:</span>
                         <el-button type="primary" @click="auditUserAdd()">选择处理人</el-button>
                         <span style="width: 80px;margin-right: 20px;margin-left: 20px">{{ auditUserName }}</span>
-                    </div><br/>
+                    </div>
+                    <br/>
                     <div class="info-line">
                         <span style="margin-right: 20px;margin-left: 40px;">意见内容:</span>
                         <el-input type="textarea" v-model="auditForm.auditRemark" style="width: 400px"></el-input>
-                    </div><br/>
+                    </div>
+                    <br/>
                     <div slot="footer" style="text-align: right;padding-bottom: 20px;padding-top: 20px">
                         <el-button @click="authDialog = false">取 消</el-button>
-                        <el-button type="primary" @click="authDialog = false">确 定</el-button>
+                        <el-button type="primary" @click="processAudit()">确 定</el-button>
                     </div>
                 </div>
             </el-form>
@@ -149,6 +153,7 @@ export default {
             checkexa: false,
             //审批人用到的
             treeListonly: {},
+            excelData: {},
         }
     },
     methods: {
@@ -162,7 +167,6 @@ export default {
             this.checkexa = false;
         },
         openAuditWindow(sheetName, excelData) {
-            console.log("进了B");
             this.auditBoxList = [{
                 name: '提交审核',
                 value: '1'
@@ -171,6 +175,60 @@ export default {
                 value: '2'
             }];
             this.authDialog = true;
+            this.excelData = excelData;
+        },
+        processAudit() {
+            //检查选项
+            if (this.auditForm.authType == null) {
+                this.$message({
+                    message: '请选择路径',
+                    type: 'error'
+                });
+                return;
+            }
+            if (this.auditForm.authType == '1') {
+                if (this.auditUserId == '') {
+                    this.$message({
+                        message: '请选择下一步处理人',
+                        type: 'error'
+                    });
+                    return;
+                }
+            }
+            //提交
+            var _this = this;
+            var url = '/market/cIncomeExcelIssued/excelDataProcessAuth';
+            this.loading = true;
+            this.$http({
+                url: url,
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    type: this.auditForm.authType,
+                    excelData: this.excelData,
+                    issuedUserId: this.getUrlKey("id"),
+                    nextUserId: this.auditUserId,
+                    auditRemark:this.auditForm.auditRemark
+                },
+            }).then((res) => {
+                this.loading = false;
+                if (res.data.result === 1) {
+                    _this.$message({
+                        message: res.data.desc,
+                        type: 'error'
+                    });
+                } else {
+                    this.authDialog = false;
+                    _this.$message({
+                        message: '处理成功',
+                        type: 'success'
+                    });
+                    //关闭这个窗口,得找找怎么关闭
+                }
+            });
+
         },
         addNewTemplate(sheetName, excelData, templateType) {
             //console.log(sheetName);

+ 201 - 26
src/pages/main/incomeExcel/incomeExcelIssued.vue

@@ -45,6 +45,9 @@
                             <el-button size="mini" @click="toEdit(scope.row)"
                                        v-if="scope.row.type == 2 && (scope.row.state == 0 || scope.row.state == 3)">处理
                             </el-button>
+                            <el-button size="mini" @click="toAudit(scope.row)"
+                                       v-if="scope.row.type == 3 && scope.row.state == 0">处理
+                            </el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -52,6 +55,61 @@
                                :total="total">
                 </el-pagination>
             </div>
+
+            <el-dialog :title="'收入信息处理'" :visible.sync="authDialog" width="50%" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <el-form :model="testModel" ref="addInfoList">
+                    <div>
+                        <div class="info-line">
+                            <span style="margin-right: 20px;margin-left: 40px">选择路径:</span>
+                            <el-select v-model="auditForm.authType" placeholder="选择路径">
+                                <el-option v-for="(item,index) in auditBoxList" :key="index" :label="item.name"
+                                           :value="item.value"></el-option>
+                            </el-select>
+                        </div>
+                        <br/>
+                        <div class="info-line" v-if="auditForm.authType == 1">
+                            <span style="margin-right: 20px;margin-left: 40px">下一步处理人:</span>
+                            <el-button type="primary" @click="checkexa = true;">选择处理人</el-button>
+                            <span style="width: 80px;margin-right: 20px;margin-left: 20px">{{ auditUserName }}</span>
+                        </div>
+                        <br/>
+                        <div class="info-line">
+                            <span style="margin-right: 20px;margin-left: 40px;">意见内容:</span>
+                            <el-input type="textarea" v-model="auditForm.auditRemark" style="width: 400px"></el-input>
+                        </div>
+                        <br/>
+                        <div slot="footer" style="text-align: right;padding-bottom: 20px;padding-top: 20px">
+                            <el-button @click="authDialog = false">取 消</el-button>
+                            <el-button type="primary" @click="processAudit()">确 定</el-button>
+                        </div>
+                    </div>
+                </el-form>
+            </el-dialog>
+
+            <el-dialog title="选择审批人" :visible.sync="checkexa" width="50%" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <div>
+                    <el-form :model="addInfoList" ref="addInfoList">
+                        <el-form-item prop="processUserId" class="info-line online">
+                            <span style="width: 80px">审批人员&nbsp;</span>
+                            <deptTreeOnly class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
+                                          :type="depttype" :closeList="closeList"></deptTreeOnly>
+                            <div class="tree treeUser">
+                                <p>{{ treeListonly.leaderAuditName }}
+                                    <i v-if="treeListonly.leaderAuditName" @click="treeDelete()"
+                                       class="el-icon-error"></i>
+                                </p>
+                            </div>
+                        </el-form-item>
+                    </el-form>
+
+                    <div slot="footer" style="text-align: right;padding-bottom: 20px">
+                        <el-button type="primary" @click="processAuditUser()">确 定</el-button>
+                        <el-button @click="checkexa = false">取 消</el-button>
+                    </div>
+                </div>
+            </el-dialog>
         </div>
     </fullscreen>
 </template>
@@ -61,6 +119,7 @@ import mySearch from "../../../components/search.vue";
 import myUpload from "../../../components/upload";
 import toolList from "../../../components/toolList";
 import myMessage from "../../../components/myMessage.vue"
+import deptTreeOnly from "../../../components/deptTreeOnly.vue"
 
 export default {
     components: {
@@ -68,9 +127,11 @@ export default {
         mySearch,
         toolList,
         myMessage,
+        deptTreeOnly
     },
     data() {
         return {
+            testModel: {},
             tableData: [{}],
             total: 0,
             params: {},
@@ -94,6 +155,17 @@ export default {
                 value: '',
                 width: '100%',
             },],
+            nowUserId:'',
+            auditBoxList: [{}],
+            authDialog: false,
+            auditForm: {},
+            auditUserName: '',
+            auditUserId: '',
+            //选择审批人
+            checkexa: false,
+            //审批人用到的
+            treeListonly: {},
+            excelData: {},
         }
     },
     methods: {
@@ -145,6 +217,82 @@ export default {
             var _this = this;
             _this.jumpinfop('/incomeExcelInfo', 5, '处理收入信息', row.id);
         },
+        toAudit(row) {
+            this.auditForm = {};
+            this.auditUserId = '';
+            this.auditUserName = '';
+            this.auditBoxList = [{
+                name: '提交审核',
+                value: '1'
+            }, {
+                name: '退回修改',
+                value: '3'
+            }, {
+                name: '结束',
+                value: '2'
+            }];
+            this.nowUserId = row.id;
+            this.authDialog = true;
+        },
+        processAuditUser() {
+            console.log(this.treeListonly);
+            this.auditUserId = this.treeListonly.leaderAuditNo;
+            this.auditUserName = this.treeListonly.leaderAuditName;
+            this.checkexa = false;
+        },
+        processAudit() {
+            //检查选项
+            if (this.auditForm.authType == null) {
+                this.$message({
+                    message: '请选择路径',
+                    type: 'error'
+                });
+                return;
+            }
+            if (this.auditForm.authType == '1') {
+                if (this.auditUserId == '') {
+                    this.$message({
+                        message: '请选择下一步处理人',
+                        type: 'error'
+                    });
+                    return;
+                }
+            }
+            //提交
+            var _this = this;
+            var url = '/market/cIncomeExcelIssued/issuedUserProcessAuth';
+            this.loading = true;
+            this.$http({
+                url: url,
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    issuedUserId:this.nowUserId,
+                    type: this.auditForm.authType,
+                    nextUserId: this.auditUserId,
+                    auditRemark:this.auditForm.auditRemark
+                },
+            }).then((res) => {
+                this.loading = false;
+                if (res.data.result === 1) {
+                    _this.$message({
+                        message: res.data.desc,
+                        type: 'error'
+                    });
+                } else {
+                    this.authDialog = false;
+                    _this.$message({
+                        message: '处理成功',
+                        type: 'success'
+                    });
+                    //刷新列表
+                    this.getList({}, 1);
+                }
+            });
+
+        },
         //跳转页面
         jumpinfop(p, v, n, id) {
             this.$router.push({
@@ -174,6 +322,19 @@ export default {
             this.$store.commit("setDefaultActive", params.rountPath);
             this.$store.commit("setTabList", Array.from(set));
         },
+        //填报人相关
+        deletes(val, index) {
+            this.treeList.splice(index, 1);
+            this.closeList = this.treeList;
+        },
+        treeCheckonly(v) {
+            this.treeList = v;
+            this.treeListonly = v;
+        },
+        treeDelete() {
+            this.treeListonly = {};
+            this.closeList = !this.closeList;
+        },
     },
     mounted() {
         this.getList({}, 1);
@@ -206,47 +367,61 @@ export default {
     margin-top: 10px;
 }
 
-.info-line {
+
+.online {
     width: 100%;
-    display: block;
-    padding-left: 20px;
 
-    div {
-        width: 90%;
-        display: inline-block;
+    .el-select {
+        width: calc(100% - 100px);
     }
 
     span {
-        width: 100px;
-        display: inline-block;
-        text-align: left;
-
-        i {
-            color: red;
-            display: inline-block;
-            padding-right: 5px;
-        }
+        vertical-align: top;
     }
 
-    .el-select,
-    .el-input {
-        width: calc(100% - 150px);
+    .el-textarea {
+        width: calc(100% - 100px);
     }
-}
 
-.online {
-    width: 100%;
+    .tree {
+        width: calc(50% - 60px);
+        display: inline-block;
+        margin-right: 20px;
+        height: 300px;
+        overflow-y: scroll;
 
-    .el-select {
-        width: calc(100% - 100px);
+        .el-icon-error {
+            float: right;
+            font-size: 20px;
+            margin-top: 9px;
+            cursor: pointer;
+        }
     }
 
-    span {
-        vertical-align: top;
+    .treeUser {
+        margin: 0;
+        border: 1px solid #ddd;
+
+        p {
+            background: #f4f4f4;
+            padding: 0 20px;
+            margin-bottom: 5px;
+        }
     }
 
-    .el-textarea {
+    .treeUserb {
         width: calc(100% - 100px);
+        border: 1px solid #ddd;
+        background: #f4f4f4;
+        border-radius: 3px;
+        height: auto;
+        overflow: hidden;
+
+        p {
+            display: inline-block;
+            padding: 0 20px;
+            margin-bottom: 5px;
+        }
     }
 }
 </style>