fan 2 سال پیش
والد
کامیت
5c962f6c81

+ 10 - 71
public/static/views/incomeTemplateExcel.html

@@ -169,6 +169,11 @@
                                 '<button id="exitFullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;display:none">退出全屏</button>';
                             showToolBar = false;
                         }
+                        if (type == '5') {
+                            toolBar =  '<button id="fullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;">全屏显示</button>' +
+                                '<button id="exitFullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;display:none">退出全屏</button>';
+                            toolBar += '<button id="toAudit" class="btn btn-primary btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;">提交</button>';
+                        }
                         //toolBar += '<button id="saves" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">保存</button>';
                         var eJson = res.body.excelJson;
                         var cellData = luckysheet.transToCellData(eJson[0].data);
@@ -223,7 +228,6 @@
                         underline: showToolBar, // '下划线 (Alt+Shift+6)'
                         textColor: showToolBar, // '文本颜色'
                         fillColor: showToolBar, // '单元格颜色'
-                        border: showToolBar, // '边框'
                         mergeCell: showToolBar, // '合并单元格'
                         horizontalAlignMode: showToolBar, // '水平对齐方式'
                         verticalAlignMode: showToolBar, // '垂直对齐方式'
@@ -234,7 +238,6 @@
                         chart: showToolBar, // '图表'(图标隐藏,但是如果配置了chart插件,右击仍然可以新建图表)
                         postil: showToolBar, //'批注'
                         pivotTable: showToolBar,  //'数据透视表'
-                        function: showToolBar, // '公式'
                         frozenMode: showToolBar, // '冻结方式'
                         sortAndFilter: showToolBar, // '排序和筛选'
                         conditionalFormat: showToolBar, // '条件格式'
@@ -295,8 +298,7 @@
 
                         },
                         rangePasteBefore: function (range, data) {
-                            //禁止选区粘贴
-                            return false;
+
                         },
                     },
                 })
@@ -363,77 +365,14 @@
                 //调用vue页面方法执行新增/修改
                 window.parent['addNewTemplate'](excelName, excelData, templateType);
             });
-            // 保存
-            $('#saves').off("click").click(function () {
-                //  当前工作表名
+            $('#toAudit').off("click").click(function () {
                 var excelId = $(window.parent.document).find("#excelId").attr("value");
                 var sheetName = luckysheet.getSheet().name;
                 var excelData = luckysheet.getSheet(sheetName);
-                var urlsave = '/market/cOnlineExcel/saveExcel';
-                var editFrom = $("#editFrom").val();
-                var editTo = $("#editTo").val();
-                var editStatus = $("#editStatus").val();
                 var excelName = luckysheet.toJson().title;
-                if ($.trim(editFrom) == '' && $.trim(editTo) == '') {
-
-                } else if (/^\d*$/.test(editFrom) && /^\d*$/.test(editTo)) {
-                    if (editFrom == 0) {
-                        window.top.$vm.$message({
-                            message: '可编辑列开始不能为0',
-                            type: 'info'
-                        })
-                        return;
-                    }
-                    if (editFrom > editTo) {
-                        window.top.$vm.$message({
-                            message: '可编辑列的起始列不能大于结束列',
-                            type: 'info'
-                        })
-                        return;
-                    }
-                } else if (/^[a-zA-Z]+$/.test(editFrom) && /^[a-zA-Z]+$/.test(editTo)) {
-
-                } else {
-                    window.top.$vm.$message({
-                        message: '可编辑列必须全部为字母或数字',
-                        type: 'info'
-                    });
-                    return;
-                }
-                util.ajaxJson("正在加载中", ctx + '/market/cOnlineExcel/checkExcelEmpty', {
-                    data: excelData,
-                }, function (data) {
-                    if (data.result == 1) {
-                        window.top.$vm.$message({
-                            message: data.desc,
-                            type: 'error'
-                        });
-                    } else {
-                        util.ajaxJson("正在加载中", ctx + urlsave, {
-                            data: excelData,
-                            id: excelId,
-                            editConStart: editFrom,
-                            editConEnd: editTo,
-                            excelName: excelName,
-                            editStatus: editStatus
-                        }, function (data) {
-                            if (data.result == 1) {
-                                window.top.$vm.$message({
-                                    message: data.desc,
-                                    type: 'error'
-                                })
-                            } else {
-                                window.top.$vm.$message({
-                                    message: '保存成功',
-                                    type: 'info'
-                                });
-                                console.log(data);
-                                getData()
-                            }
-                        });
-                    }
-                });
-            })
+                //调用vue页面方法执行提审
+                window.parent['openAuditWindow'](excelName, excelData);
+            });
             // 导出
             $('#exports').click(function () {
                 var excelName = luckysheet.toJson().title;

+ 89 - 1
src/pages/main/incomeExcel/incomeExcelInfo.vue

@@ -61,16 +61,67 @@
                 </div>
             </div>
         </el-dialog>
+        <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="auditUserAdd()">选择处理人</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="authDialog = false">确 定</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>
 </template>
 <script>
 import myMessage from "../../../components/myMessage.vue"
 import deptTreeUserNew from "../../../components/deptTreeUserNew";
+import deptTreeOnly from "../../../components/deptTreeOnly.vue"
 
 export default {
     components: {
         myMessage,
         deptTreeUserNew,
+        deptTreeOnly,
     },
     data() {
         return {
@@ -88,10 +139,39 @@ export default {
             limitUserIndex: -1,
             limitList: [{}],
             type: '',
-            loading: false
+            loading: false,
+            auditBoxList: [{}],
+            authDialog: false,
+            auditForm: {},
+            auditUserName: '',
+            auditUserId: '',
+            //选择审批人
+            checkexa: false,
+            //审批人用到的
+            treeListonly: {},
         }
     },
     methods: {
+        auditUserAdd() {
+            this.checkexa = true;
+        },
+        processAuditUser() {
+            console.log(this.treeListonly);
+            this.auditUserId = this.treeListonly.leaderAuditNo;
+            this.auditUserName = this.treeListonly.leaderAuditName;
+            this.checkexa = false;
+        },
+        openAuditWindow(sheetName, excelData) {
+            console.log("进了B");
+            this.auditBoxList = [{
+                name: '提交审核',
+                value: '1'
+            }, {
+                name: '结束',
+                value: '2'
+            }];
+            this.authDialog = true;
+        },
         addNewTemplate(sheetName, excelData, templateType) {
             //console.log(sheetName);
             //console.log(excelData);
@@ -332,6 +412,11 @@ export default {
         },
         treeCheckonly(v) {
             this.treeList = v;
+            this.treeListonly = v;
+        },
+        treeDelete() {
+            this.treeListonly = {};
+            this.closeList = !this.closeList;
         },
         getUrlKey(name) {
             return (
@@ -356,6 +441,9 @@ export default {
         window['setAuth'] = (id) => {
             this.setAuth(id);
         };
+        window['openAuditWindow'] = (sheetName, excelData) => {
+            this.openAuditWindow(sheetName, excelData);
+        };
     }
 }
 </script>

+ 13 - 5
src/pages/main/incomeExcel/incomeExcelIssued.vue

@@ -22,9 +22,10 @@
                     </el-table-column>
                     <el-table-column label="接收人" align="center">
                         <template slot-scope="scope">
-                            <span v-if="scope.row.userList == null" style="color: #0b82ff;cursor: pointer">{{scope.row.userName}}</span>
+                            <span v-if="scope.row.userList == null"
+                                  style="color: #0b82ff;cursor: pointer">{{ scope.row.userName }}</span>
                             <div v-else v-for="item in scope.row.userList">
-                                <span style="color: #0b82ff;cursor: pointer">{{item.userName}}&nbsp;</span>
+                                <span style="color: #0b82ff;cursor: pointer">{{ item.userName }}&nbsp;</span>
                             </div>
                         </template>
                     </el-table-column>
@@ -41,6 +42,9 @@
                     <el-table-column label="操作" width="220px" align="center" fixed="right">
                         <template slot-scope="scope">
                             <el-button size="mini" @click="toView(scope.row)">查看</el-button>
+                            <el-button size="mini" @click="toEdit(scope.row)"
+                                       v-if="scope.row.type == 2 && (scope.row.state == 0 || scope.row.state == 3)">处理
+                            </el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -63,7 +67,7 @@ export default {
         myUpload,
         mySearch,
         toolList,
-        myMessage
+        myMessage,
     },
     data() {
         return {
@@ -79,7 +83,7 @@ export default {
                 tit: '模板名称',
                 value: '',
                 width: '100%',
-            },{
+            }, {
                 type: 'input',
                 tit: '截止时间',
                 value: '',
@@ -135,7 +139,11 @@ export default {
         },
         toView(row) {
             var _this = this;
-            _this.jumpinfop('/incomeExcelInfo', 4, '查看收入信息', row.issuedId);
+            _this.jumpinfop('/incomeExcelInfo', 4, '查看收入信息', row.id);
+        },
+        toEdit(row) {
+            var _this = this;
+            _this.jumpinfop('/incomeExcelInfo', 5, '处理收入信息', row.id);
         },
         //跳转页面
         jumpinfop(p, v, n, id) {