liyuanpeng 3 年之前
父節點
當前提交
e3697f8e0e

+ 2 - 2
public/index.html

@@ -18,9 +18,9 @@
   <div id="app"></div>
   <!-- built files will be auto injected -->
   <script type="text/javascript">
-    // window.staticHost = 'http://10.230.26.15:8000/spfm';
+    window.staticHost = 'http://10.230.26.15:8000/spfm';
     // window.staticHost = 'http://114.215.71.182:29600';
-    window.staticHost = 'http://192.168.2.143:9600/';
+    // window.staticHost = 'http://192.168.2.143:9600/';
   </script>
 </body>
 

+ 50 - 33
public/static/views/publiAccount.html

@@ -120,7 +120,11 @@
                 if (window.luckysheet) {
                     window.luckysheet.destroy();
                 }
-                util.ajaxJson("数据加载中", ctx + '/market/cadvLedger/load', {
+				var url = '/market/cadvLedger/load';
+				if(lockFlag == 'updata'){
+					url = '/market/cadvLedger/loadProv';
+				}
+                util.ajaxJson("数据加载中", ctx + url, {
                     "id": id ? id : '',
                     "opMonth": "",
                     "sts": '0',
@@ -134,13 +138,15 @@
 							$('#excelPosition').val(res.body[0].colHeaderNum)
 							$('#tempType').val(res.body[0].tempType)
 							form.render();
-							excelId = res.body[0].id
+							excelId = res.body[0].id;
+							// res.body[0].calcChain = [];
 							initExcel(res.body)
 						}else{
 							initExcel()
 						}
                     }
                 });
+				initExcel()
             }
             // 表格初始化
             function initExcel(data) {
@@ -204,38 +210,49 @@
 						    },//绑定鼠标事件
 						    cellUpdateBefore: function (r, c) {
 						        // c坐标 r行坐标
-								if(lockFlag == 'updata'){
-									return true
-								}
-						        if (c == luckysheet.getSheet().data[r].length - 1) {
-									if(luckysheet.getSheet().data[r][c] != null ){
-										return false
-									}
-						        }
-								if(c<15){
+								// if(lockFlag == 'updata'){
+								// 	return true
+								// }
+						   //      if (c == luckysheet.getSheet().data[r].length - 1) {
+									// if(luckysheet.getSheet().data[r][c] != null ){
+									// 	return false
+									// }
+						   //      }
+								if(r == 0){
 									window.top.$vm.$message({
-									    message: '您无权修改当前',
+									    message: '您无权修改当前',
 									    type: 'info'
 									})
 									return false
 								}
-						        if (luckysheet.getSheet().readOnly != '') {
-						            if (luckysheet.getSheet().data[r][luckysheet.getSheet().data[r].length - 1] != null && luckysheet.getSheet().data[r][luckysheet.getSheet().data[r].length - 1].v !== userId) {
-						                window.top.$vm.$message({
-						                    message: '您无权修改当前行',
-						                    type: 'info'
-						                })
-						                return false
-						            }
-						        } else {
-						            if (luckysheet.getSheet().data[r][luckysheet.getSheet().data[r].length - 1] != null) {
-						                window.top.$vm.$message({
-						                    message: '您无权修改当前行',
-						                    type: 'info'
-						                })
-						                return false
-						            }
-						        }
+								// if(c<15){
+								// 	if(luckysheet.getSheet().data[r][c] == null){
+								// 		return true
+								// 	}
+								// 	window.top.$vm.$message({
+								// 	    message: '您无权修改当前列',
+								// 	    type: 'info'
+								// 	})
+								// 	return false
+								// }
+								
+						        // if (luckysheet.getSheet().readOnly != '') {
+						        //     if (luckysheet.getSheet().data[r][luckysheet.getSheet().data[r].length - 1] != null && luckysheet.getSheet().data[r][luckysheet.getSheet().data[r].length - 1].v !== userId) {
+						        //         window.top.$vm.$message({
+						        //             message: '您无权修改当前行',
+						        //             type: 'info'
+						        //         })
+						        //         return false
+						        //     }
+						        // } else {
+						        //     if (luckysheet.getSheet().data[r][luckysheet.getSheet().data[r].length - 1] != null) {
+						        //         window.top.$vm.$message({
+						        //             message: '您无权修改当前行',
+						        //             type: 'info'
+						        //         })
+						        //         return false
+						        //     }
+						        // }
 						    },
 						},
                     })
@@ -244,11 +261,11 @@
                 }
                 if (lockFlag == 'see') { // 查看预算跳转过来
                     // $('#saves').hide()
-                    $('#imports').hide()
+                  
                     $('#monthSelect').hide()
-                }
-				if (lockFlag == 'add') { // 查看预算跳转过来
-                    $('#imports').hide()
+                }else if (lockFlag == 'add') { // 查看预算跳转过来
+                  
+					$('#monthSelect').hide()
                 }
                 initHandel()
             }

+ 1 - 0
src/pages/main/achievements/achievementsIndex.vue

@@ -29,6 +29,7 @@ export default {
       userNo: JSON.parse(window.sessionStorage.userInfo).loginNo,
       showList: [],
       routerList: [
+        { label: "集团绩效", path: "/recallJt", name: "recallJt" },
         { label: "部门绩效", path: "/recallBm", name: "recallBm" },
         { label: "科室绩效", path: "/recallkpi", name: "recallkpi" },
         { label: "副总GS", path: "/recallGs", name: "recallGs" },

+ 424 - 554
src/pages/main/achievements/achievementsMuban.vue

@@ -1,572 +1,442 @@
 <template>
-  <div class="container" style="margin: 15px 0 0 0">
-    <fullscreen
-      :fullscreen.sync="fullscreen"
-      class="container-box"
-      style="margin: 0 !important; padding: 0 !important"
-    >
-      <div class="titbox">
-        <h2>部门绩效模板管理</h2>
-        <div>
-          <i class="el-icon-refresh" @click="iconCli(1)"></i>
-          <i class="el-icon-full-screen" @click="iconCli(2)"></i>
-        </div>
-      </div>
-      <div class="search">
-        <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
-        <el-button size="small" @click="addExcel" type="primary"
-          >新增模板</el-button
-        >
-      </div>
-      <div class="tabbox">
-        <el-table
-          height="calc(100% - 40px)"
-          v-loading="loading"
-          class="com-table"
-          ref="multipleTable"
-          :data="tableData"
-          tooltip-effect="dark"
-          size="small"
-          border
-          style="width: 100%"
-        >
-          <el-table-column
-            align="center"
-            prop="tabName"
-            label="模板名称"
-            show-overflow-tooltip
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="opTime"
-            show-overflow-tooltip
-            label="配置时间"
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="opNo"
-            show-overflow-tooltip
-            label="配置工号"
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="opName"
-            show-overflow-tooltip
-            label="配置姓名"
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="groupName"
-            show-overflow-tooltip
-            label="使用科室"
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="stsDesc"
-            show-overflow-tooltip
-            label="模板状态"
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="tempTypeDesc"
-            show-overflow-tooltip
-            label="模板类型"
-            width="150"
-          >
-          </el-table-column>
-          <el-table-column
-            align="center"
-            prop="hotline"
-            width="200"
-            label="操作"
-          >
-            <template slot-scope="scope">
-              <el-button
-                :disabled="scope.row.tempStsDesc == '作废'"
-                size="mini"
-                type="primary"
-                plain
-                @click="issue(scope.row)"
-                >下发</el-button
-              >
-              <el-button
-                size="mini"
-                type="primary"
-                plain
-                @click="detailes(scope.row)"
-                >查看</el-button
-              >
-              <!-- <el-button
+	<div class="container" style="margin: 15px 0 0 0">
+		<fullscreen :fullscreen.sync="fullscreen" class="container-box"
+			style="margin: 0 !important; padding: 0 !important">
+			<div class="titbox">
+				<h2>绩效模板管理</h2>
+				<div>
+					<i class="el-icon-refresh" @click="iconCli(1)"></i>
+					<i class="el-icon-full-screen" @click="iconCli(2)"></i>
+				</div>
+			</div>
+			<div class="search">
+				<mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+				<el-button size="small" @click="addExcel" type="primary">新增模板</el-button>
+			</div>
+			<div class="tabbox">
+				<el-table height="calc(100% - 40px)" v-loading="loading" class="com-table" ref="multipleTable"
+					:data="tableData" tooltip-effect="dark" size="small" border style="width: 100%">
+					<el-table-column align="center" prop="tabName" label="模板名称" show-overflow-tooltip>
+					</el-table-column>
+					<el-table-column align="center" prop="opTime" show-overflow-tooltip label="配置时间">
+					</el-table-column>
+					<el-table-column align="center" prop="opNo" show-overflow-tooltip label="配置工号">
+					</el-table-column>
+					<el-table-column align="center" prop="opName" show-overflow-tooltip label="配置姓名">
+					</el-table-column>
+					<el-table-column align="center" prop="groupName" show-overflow-tooltip label="使用科室">
+					</el-table-column>
+					<el-table-column align="center" prop="stsDesc" show-overflow-tooltip label="模板状态">
+					</el-table-column>
+					<el-table-column align="center" prop="tempTypeDesc" show-overflow-tooltip label="模板类型" width="150">
+					</el-table-column>
+					<el-table-column align="center" prop="hotline" width="200" label="操作">
+						<template slot-scope="scope">
+							<el-button :disabled="scope.row.tempStsDesc == '作废'" size="mini" type="primary" plain
+								@click="issue(scope.row)">下发</el-button>
+							<el-button size="mini" type="primary" plain @click="detailes(scope.row)">查看</el-button>
+							<!-- <el-button
                 size="mini"
                 type="primary"
                 plain
                 @click="updates(scope.row)"
                 >修改</el-button
               > -->
-              <el-button
-                :disabled="scope.row.tempStsDesc == '作废'"
-                size="mini"
-                type="danger"
-                plain
-                @click="deletes(scope.row)"
-                >作废</el-button
-              >
-            </template>
-          </el-table-column>
-        </el-table>
-        <el-pagination
-          class="pageBox"
-          @current-change="currchange"
-          layout="prev, pager, next"
-          background
-          :total="total"
-        >
-        </el-pagination>
-      </div>
-      <myMessage
-        :messTit="messTit"
-        @closeMessage="closeMessage"
-        :centerDialogVisible="centerDialogVisible"
-        v-if="centerDialogVisible"
-      ></myMessage>
-    </fullscreen>
-    <el-dialog
-      title="下发绩效"
-      :visible.sync="dialogStatus"
-      width="50%"
-      :close-on-press-escape="false"
-      :show-close="false"
-      :destroy-on-close="true"
-      :close-on-click-modal="false"
-      :append-to-body="true"
-    >
-      <el-form
-        ref="ruleForm"
-        :rules="rules"
-        :model="formData"
-        label-width="80px"
-      >
-        <el-form-item label="绩效标题" prop="woTitle">
-          <el-input
-            placeholder="请输入绩效标题"
-            v-model="formData.woTitle"
-          ></el-input>
-        </el-form-item>
-        <el-form-item
-          v-if="tempType == '0' || tempType == '1'"
-          label="下发月份"
-          prop="sendMonth"
-        >
-          <el-date-picker
-            style="width: 100% !important"
-            v-model="formData.sendMonth"
-            value-format="yyyy-MM"
-            type="month"
-            placeholder="选择月份"
-          >
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item v-else label="下发年份" prop="sendYear">
-          <el-date-picker
-            style="width: 100% !important"
-            v-model="formData.sendYear"
-            value-format="yyyy"
-            type="year"
-            placeholder="选择年份"
-          >
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="反馈时间" prop="requiredTime">
-          <el-date-picker
-            style="width: 100%"
-            v-model="formData.requiredTime"
-            type="datetime"
-            placeholder="选择反馈时间"
-            value-format="yyyy-MM-dd HH:mm:ss"
-          >
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="接收科室" prop="sendNoArr">
-          <el-select
-            placeholder="接收科室"
-            v-model="formData.sendNoArr"
-            style="width: 100%"
-            :disabled="tempType == '0'"
-            multiple
-          >
-            <el-option
-              v-for="items in options"
-              :key="items.value"
-              :label="items.groupName"
-              :value="items.groupId"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="resetUser('ruleForm')">取 消</el-button>
-        <el-button v-loading="loading" @click="subUser('ruleForm')"
-          >确 定</el-button
-        >
-      </div>
-    </el-dialog>
-  </div>
+							<el-button :disabled="scope.row.tempStsDesc == '作废'" size="mini" type="danger" plain
+								@click="deletes(scope.row)">作废</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+				<el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+					:total="total">
+				</el-pagination>
+			</div>
+			<myMessage :messTit="messTit" @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
+				v-if="centerDialogVisible"></myMessage>
+		</fullscreen>
+		<el-dialog title="下发绩效" :visible.sync="dialogStatus" width="50%" :close-on-press-escape="false"
+			:show-close="false" :destroy-on-close="true" :close-on-click-modal="false" :append-to-body="true">
+			<el-form ref="ruleForm" :rules="rules" :model="formData" label-width="80px">
+				<el-form-item label="绩效标题" prop="woTitle">
+					<el-input placeholder="请输入绩效标题" v-model="formData.woTitle"></el-input>
+				</el-form-item>
+				<el-form-item v-if="tempType == '0' || tempType == '1'" label="下发月份" prop="sendMonth">
+					<el-date-picker style="width: 100% !important" v-model="formData.sendMonth" value-format="yyyy-MM"
+						type="month" placeholder="选择月份">
+					</el-date-picker>
+				</el-form-item>
+				<el-form-item v-else label="下发年份" prop="sendYear">
+					<el-date-picker style="width: 100% !important" v-model="formData.sendYear" value-format="yyyy"
+						type="year" placeholder="选择年份">
+					</el-date-picker>
+				</el-form-item>
+				<el-form-item label="反馈时间" prop="requiredTime">
+					<el-date-picker style="width: 100%" v-model="formData.requiredTime" type="datetime"
+						placeholder="选择反馈时间" value-format="yyyy-MM-dd HH:mm:ss">
+					</el-date-picker>
+				</el-form-item>
+				<el-form-item label="接收科室" prop="sendNoArr">
+					<el-select placeholder="接收科室" v-model="formData.sendNoArr" style="width: 100%"
+						:disabled="tempType == '0'" multiple>
+						<el-option v-for="items in options" :key="items.value" :label="items.groupName"
+							:value="items.groupId">
+						</el-option>
+					</el-select>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="resetUser('ruleForm')">取 消</el-button>
+				<el-button v-loading="loading" @click="subUser('ruleForm')">确 定</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 <script>
-import mySearch from "../../../components/search";
-import myMessage from "../../../components/myMessage.vue";
-export default {
-  components: {
-    mySearch,
-    myMessage,
-  },
-  data() {
-    return {
-      centerDialogVisible: false,
-      messTit: "",
-      dataId: "",
-      options: [],
-      dialogStatus: false,
-      formData: {
-        woTitle: "",
-        requiredTime: "",
-        sendNoArr: [],
-        sendMonth: "",
-        sendYear: "",
-      },
-      rules: {
-        woTitle: [
-          { required: true, message: "请输入预算标题", trigger: "blur" },
-        ],
-        requiredTime: [
-          {
-            required: true,
-            message: "请选择反馈时间",
-            trigger: "change",
-          },
-        ],
-        sendNoArr: [
-          {
-            required: true,
-            message: "请选择接收科室",
-            trigger: "change",
-          },
-        ],
-        sendMonth: [
-          {
-            required: true,
-            message: "请选择下发月份",
-            trigger: "change",
-          },
-        ],
-        sendYear: [
-          {
-            required: true,
-            message: "请选择下发年份",
-            trigger: "change",
-          },
-        ],
-      },
-      fullscreen: false,
-      total: 0,
-      pageSize: 1,
-      tableData: [],
-      searchList: [
-        {
-          type: "input",
-          tit: "模板名称",
-          value: "",
-          width: "100%",
-          options: [],
-        },
-      ],
-      params: {
-        tempName: "",
-      },
-      loading: false,
-      tableCell: "",
-      tempType: "",
-    };
-  },
-  methods: {
-    // 查看详情
-    detailes(val) {
-      this.$router.push({
-        path: "seekpi",
-        query: {
-          tabCode: val.tabCode,
-          type: "see",
-        },
-      });
-    },
-    // 增加表单处理
-    async subUser(formName) {
-      let sendNoArr = [];
-      let valid = await this.$refs[formName].validate().catch((err) => err);
-      if (valid) {
-        this.options.map((row) => {
-          this.formData.sendNoArr.map((item) => {
-            if (item == row.groupId) {
-              sendNoArr.push({
-                receiveNo: row.loginNo,
-                receiveName: row.loginName,
-                receiveDeptCode: row.groupId,
-                receiveDeptName: row.groupName,
-              });
-            }
-          });
-        });
-        let data = {
-          tabName: this.tableCell.tabName,
-          tabCode: this.tableCell.tabCode,
-          requiredTime: this.formData.requiredTime,
-          receive: sendNoArr,
-          kpiMonth: this.formData.sendMonth,
-          tempType: this.tempType,
-          subType: this.tableCell.subType || "a",
-          kpiYear: this.formData.sendYear,
-        };
-        let results = await this.$http({
-          url: "/market/kpidepts/checkExists",
-          method: "post",
-          headers: {
-            "Content-Type": "application/json",
-          },
-          data: data,
-        });
-        data.kpiTitle = this.formData.woTitle;
-        if (results.data.result == 0) {
-          this.subTask(data);
-        } else {
-          let confirm = await this.$confirm(
-            "本月已下发过绩效是否覆盖下发",
-            "提示",
-            { type: "warning" }
-          ).catch(() => {
-            this.$message({
-              type: "info",
-              message: "已取消",
-            });
-          });
-          if (confirm == "confirm") {
-            this.subTask(data);
-          }
-        }
-      }
-    },
-    // 下发任务
-    subTask(data) {
-      this.$http({
-        url: "/market/kpidepts/add",
-        method: "post",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        data: data,
-      })
-        .then((res) => {
-          if (res.data.result == 0) {
-            this.$message({
-              type: "success",
-              message: "下发成功",
-            });
-          } else {
-            this.$message({
-              type: "error",
-              message: res.data.desc,
-            });
-          }
-          this.loading = false;
-          this.dialogStatus = false;
-          this.getList(this.params, this.pageSize);
-        })
-        .catch((err) => {
-          this.loading = false;
-        });
-    },
-    // 取消提交
-    resetUser(formName) {
-      this.$refs[formName].resetFields();
-      this.dialogStatus = false;
-    },
-    // 下发按钮
-    issue(val) {
-      this.tableCell = val;
-      this.dialogStatus = true;
-      this.formData.sendNoArr = [];
-      if (val.tempType == "0") {
-        this.formData.sendNoArr.push(val.groupId);
-      }
+	import mySearch from "../../../components/search";
+	import myMessage from "../../../components/myMessage.vue";
+	export default {
+		components: {
+			mySearch,
+			myMessage,
+		},
+		data() {
+			return {
+				centerDialogVisible: false,
+				messTit: "",
+				dataId: "",
+				options: [],
+				dialogStatus: false,
+				formData: {
+					woTitle: "",
+					requiredTime: "",
+					sendNoArr: [],
+					sendMonth: "",
+					sendYear: "",
+				},
+				rules: {
+					woTitle: [{
+						required: true,
+						message: "请输入预算标题",
+						trigger: "blur"
+					}, ],
+					requiredTime: [{
+						required: true,
+						message: "请选择反馈时间",
+						trigger: "change",
+					}, ],
+					sendNoArr: [{
+						required: true,
+						message: "请选择接收科室",
+						trigger: "change",
+					}, ],
+					sendMonth: [{
+						required: true,
+						message: "请选择下发月份",
+						trigger: "change",
+					}, ],
+					sendYear: [{
+						required: true,
+						message: "请选择下发年份",
+						trigger: "change",
+					}, ],
+				},
+				fullscreen: false,
+				total: 0,
+				pageSize: 1,
+				tableData: [],
+				searchList: [{
+					type: "input",
+					tit: "模板名称",
+					value: "",
+					width: "100%",
+					options: [],
+				}, ],
+				params: {
+					tempName: "",
+				},
+				loading: false,
+				tableCell: "",
+				tempType: "",
+			};
+		},
+		methods: {
+			// 查看详情
+			detailes(val) {
+				this.$router.push({
+					path: "seekpi",
+					query: {
+						tabCode: val.tabCode,
+						type: "see",
+					},
+				});
+			},
+			// 增加表单处理
+			async subUser(formName) {
+				let sendNoArr = [];
+				let valid = await this.$refs[formName].validate().catch((err) => err);
+				if (valid) {
+					this.options.map((row) => {
+						this.formData.sendNoArr.map((item) => {
+							if (item == row.groupId) {
+								sendNoArr.push({
+									receiveNo: row.loginNo,
+									receiveName: row.loginName,
+									receiveDeptCode: row.groupId,
+									receiveDeptName: row.groupName,
+								});
+							}
+						});
+					});
+					let data = {
+						tabName: this.tableCell.tabName,
+						tabCode: this.tableCell.tabCode,
+						requiredTime: this.formData.requiredTime,
+						receive: sendNoArr,
+						kpiMonth: this.formData.sendMonth,
+						tempType: this.tempType,
+						subType: this.tableCell.subType || "a",
+						kpiYear: this.formData.sendYear,
+					};
+					let results = await this.$http({
+						url: "/market/kpidepts/checkExists",
+						method: "post",
+						headers: {
+							"Content-Type": "application/json",
+						},
+						data: data,
+					});
+					data.kpiTitle = this.formData.woTitle;
+					if (results.data.result == 0) {
+						this.subTask(data);
+					} else {
+						let confirm = await this.$confirm(
+							"本月已下发过绩效是否覆盖下发",
+							"提示", {
+								type: "warning"
+							}
+						).catch(() => {
+							this.$message({
+								type: "info",
+								message: "已取消",
+							});
+						});
+						if (confirm == "confirm") {
+							this.subTask(data);
+						}
+					}
+				}
+			},
+			// 下发任务
+			subTask(data) {
+				this.$http({
+						url: "/market/kpidepts/add",
+						method: "post",
+						headers: {
+							"Content-Type": "application/json",
+						},
+						data: data,
+					})
+					.then((res) => {
+						if (res.data.result == 0) {
+							this.$message({
+								type: "success",
+								message: "下发成功",
+							});
+						} else {
+							this.$message({
+								type: "error",
+								message: res.data.desc,
+							});
+						}
+						this.loading = false;
+						this.dialogStatus = false;
+						this.getList(this.params, this.pageSize);
+					})
+					.catch((err) => {
+						this.loading = false;
+					});
+			},
+			// 取消提交
+			resetUser(formName) {
+				this.$refs[formName].resetFields();
+				this.dialogStatus = false;
+			},
+			// 下发按钮
+			issue(val) {
+				this.tableCell = val;
+				this.dialogStatus = true;
+				this.formData.sendNoArr = [];
+				if (val.tempType == "0") {
+					this.formData.sendNoArr.push(val.groupId);
+				}
 
-      this.tempType = val.tempType;
-    },
-    // 删除模板
-    deletes(val) {
-      this.centerDialogVisible = true;
-      this.messTit = "即将作废绩效模板, 是否确定?";
-      this.dataId = val.id;
-      // this.$confirm("即将作废绩效模板, 是否确定?", "提示", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      //   .then(() => {
-      // this.$http({
-      //   url: "/market/kpitemps/delKpiTemp",
-      //   method: "post",
-      //   headers: {
-      //     "Content-Type": "application/json",
-      //   },
-      //   data: { id: val.id },
-      // }).then((res) => {
-      //   this.$message({
-      //     message: "删除成功",
-      //     type: "success",
-      //   });
-      //   this.getList(this.params, this.pageSize);
-      // });
-      //   })
-      //   .catch(() => {});
-    },
-    closeMessage(v) {
-      this.centerDialogVisible = false;
-      if (v === 1) {
-        this.$http({
-          url: "/market/kpitemps/delKpiTemp",
-          method: "post",
-          headers: {
-            "Content-Type": "application/json",
-          },
-          data: { id: this.dataId },
-        }).then((res) => {
-          if (res.data.result == "0") {
-            this.$message({
-              message: "删除成功",
-              type: "success",
-            });
-          }
-          this.getList(this.params, this.pageSize);
-        });
-      }
-    },
-    // 新增模板
-    addExcel() {
-      this.$router.push("/initKpi?status=add");
-    },
-    // 修改模板 --废弃
-    updates(val) {
-      this.$router.push({
-        path: "seekpi",
-        query: {
-          tabCode: val.tabCode,
-          type: "update",
-        },
-      });
-    },
-    //搜索数据
-    searchInfo(v) {
-      this.params = {};
-      v[0] ? (this.params.tempName = v[0]) : "";
-      this.getList(this.params, this.pageSize);
-    },
-    //获取列表
-    getList(v, n) {
-      this.loading = true;
-      this.pageSize = n;
-      this.$http({
-        url: "/market/kpitemp/queryPage",
-        method: "post",
-        headers: {
-          "Content-Type": "application/json",
-          page: '{"pageNo":"' + n + '","pageSize":"10"}',
-        },
-        data: v,
-      }).then((res) => {
-        this.loading = false;
-        this.tableData = res.data.data;
-        this.total = res.data.totalRecord;
-      });
-    },
-    //功能栏
-    iconCli(v) {
-      if (v === 1) {
-        this.getList(this.params, this.pageSize);
-      }
-      if (v === 2) {
-        this.fullscreen = !this.fullscreen;
-      }
-    },
-    // 分页
-    currchange(v) {
-      this.pageSize = v;
-      this.getList(this.params, this.pageSize);
-    },
-    //  获取科室信息
-    getOpations() {
-      this.$http({
-        url: "/sysmgr/sys/mk/offices/queryList",
-        method: "post",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        data: {},
-      }).then((res) => {
-        this.options = res.data.body;
-      });
-    },
-  },
-  mounted() {
-    this.getOpations();
-    this.getList(this.params, this.pageSize);
-  },
-  watch: {
-    $route() {
-      this.getList(this.params, this.pageSize);
-    },
-  },
-};
+				this.tempType = val.tempType;
+			},
+			// 删除模板
+			deletes(val) {
+				this.centerDialogVisible = true;
+				this.messTit = "即将作废绩效模板, 是否确定?";
+				this.dataId = val.id;
+				// this.$confirm("即将作废绩效模板, 是否确定?", "提示", {
+				//   confirmButtonText: "确定",
+				//   cancelButtonText: "取消",
+				//   type: "warning",
+				// })
+				//   .then(() => {
+				// this.$http({
+				//   url: "/market/kpitemps/delKpiTemp",
+				//   method: "post",
+				//   headers: {
+				//     "Content-Type": "application/json",
+				//   },
+				//   data: { id: val.id },
+				// }).then((res) => {
+				//   this.$message({
+				//     message: "删除成功",
+				//     type: "success",
+				//   });
+				//   this.getList(this.params, this.pageSize);
+				// });
+				//   })
+				//   .catch(() => {});
+			},
+			closeMessage(v) {
+				this.centerDialogVisible = false;
+				if (v === 1) {
+					this.$http({
+						url: "/market/kpitemps/delKpiTemp",
+						method: "post",
+						headers: {
+							"Content-Type": "application/json",
+						},
+						data: {
+							id: this.dataId
+						},
+					}).then((res) => {
+						if (res.data.result == "0") {
+							this.$message({
+								message: "删除成功",
+								type: "success",
+							});
+						}
+						this.getList(this.params, this.pageSize);
+					});
+				}
+			},
+			// 新增模板
+			addExcel() {
+				this.$router.push("/initKpi?status=add");
+			},
+			// 修改模板 --废弃
+			updates(val) {
+				this.$router.push({
+					path: "seekpi",
+					query: {
+						tabCode: val.tabCode,
+						type: "update",
+					},
+				});
+			},
+			//搜索数据
+			searchInfo(v) {
+				this.params = {};
+				v[0] ? (this.params.tempName = v[0]) : "";
+				this.getList(this.params, this.pageSize);
+			},
+			//获取列表
+			getList(v, n) {
+				this.loading = true;
+				this.pageSize = n;
+				this.$http({
+					url: "/market/kpitemp/queryPage",
+					method: "post",
+					headers: {
+						"Content-Type": "application/json",
+						page: '{"pageNo":"' + n + '","pageSize":"10"}',
+					},
+					data: v,
+				}).then((res) => {
+					this.loading = false;
+					this.tableData = res.data.data;
+					this.total = res.data.totalRecord;
+				});
+			},
+			//功能栏
+			iconCli(v) {
+				if (v === 1) {
+					this.getList(this.params, this.pageSize);
+				}
+				if (v === 2) {
+					this.fullscreen = !this.fullscreen;
+				}
+			},
+			// 分页
+			currchange(v) {
+				this.pageSize = v;
+				this.getList(this.params, this.pageSize);
+			},
+			//  获取科室信息
+			getOpations() {
+				this.$http({
+					url: "/sysmgr/sys/mk/offices/queryList",
+					method: "post",
+					headers: {
+						"Content-Type": "application/json",
+					},
+					data: {},
+				}).then((res) => {
+					this.options = res.data.body;
+				});
+			},
+		},
+		mounted() {
+			this.getOpations();
+			this.getList(this.params, this.pageSize);
+		},
+		watch: {
+			$route() {
+				this.getList(this.params, this.pageSize);
+			},
+		},
+	};
 </script>
 <style scoped>
-.el-upload-list {
-  float: right;
-}
-.el-input__suffix {
-  cursor: pointer;
-}
-.container .el-upload {
-  width: auto !important;
-}
+	.el-upload-list {
+		float: right;
+	}
+
+	.el-input__suffix {
+		cursor: pointer;
+	}
+
+	.container .el-upload {
+		width: auto !important;
+	}
 </style>
 <style scoped lang="scss">
-.btn-default {
-  display: inline;
-  margin-left: 10px;
-}
-.titbox {
-  div {
-    float: right;
+	.btn-default {
+		display: inline;
+		margin-left: 10px;
+	}
+
+	.titbox {
+		div {
+			float: right;
 
-    i {
-      font-size: 22px;
-      margin-left: 20px;
-      cursor: pointer;
-    }
-  }
-}
+			i {
+				font-size: 22px;
+				margin-left: 20px;
+				cursor: pointer;
+			}
+		}
+	}
 
-.tabbox {
-  margin-top: 15px;
-}
+	.tabbox {
+		margin-top: 15px;
+	}
 
-.pageBox {
-  text-align: right;
-  margin-top: 10px;
-}
+	.pageBox {
+		text-align: right;
+		margin-top: 10px;
+	}
 </style>

+ 334 - 390
src/pages/main/achievements/initMuban.vue

@@ -1,401 +1,345 @@
 <template>
-  <div
-    id="select-dom"
-    class="container"
-    style="margin: 15px 0 0 0"
-    v-loading="loading"
-  >
-    <fullscreen
-      :fullscreen.sync="fullscreen"
-      class="container-box"
-      style="margin: 0 !important; padding: 0 !important"
-    >
-      <div class="titbox">
-        <h2>绩效模板</h2>
-        <div>
-          <i class="el-icon-refresh" @click="iconCli(1)"></i>
-          <i class="el-icon-full-screen" @click="iconCli(2)"></i>
-        </div>
-      </div>
-      <div style="overflow: hidden">
-        <el-select
-          placeholder="选择接模板类型"
-          v-model="tempType"
-          filterable
-          clearable
-          style="float: left; margin-top: 20px"
-          @change="selectType"
-        >
-          <el-option value="0" label="科室绩效"> </el-option>
-          <el-option value="1" label="部门绩效"> </el-option>
-          <el-option value="2" label="副总GS"> </el-option>
-        </el-select>
-        <el-select
-          v-if="tempType == '1'"
-          placeholder="选择接模板种类"
-          v-model="subType"
-          filterable
-          clearable
-          style="float: left; margin-top: 20px"
-        >
-          <el-option value="0" label="KPI"> </el-option>
-          <el-option value="1" label="GS"> </el-option>
-        </el-select>
-        <el-select
-          v-if="tempType == '2'"
-          placeholder="选择接模板种类"
-          v-model="subType"
-          filterable
-          clearable
-          style="float: left; margin-top: 20px"
-        >
-          <el-option value="0" label="考核目标"> </el-option>
-          <el-option value="1" label="考核项目"> </el-option>
-          <el-option value="2" label="营销活动落地目标"> </el-option>
-          <el-option value="3" label="渠道销售能力目标"> </el-option>
-          <el-option value="4" label="家庭营销能力目标"> </el-option>
-          <el-option value="5" label="业务管理提升目标"> </el-option>
-          <el-option value="6" label="绩效完成情况"> </el-option>
-        </el-select>
-        <el-select
-          v-if="groupFlag"
-          placeholder="选择接部门"
-          v-model="groupId"
-          filterable
-          clearable
-          style="float: left; margin-top: 20px"
-          @change="selectHandel"
-        >
-          <el-option
-            v-for="items in options"
-            :key="items.value"
-            :label="items.groupName"
-            :value="items.groupId"
-          >
-          </el-option>
-        </el-select>
-        <div class="search" style="float: right; margin-right: 20px">
-          <el-button size="small" @click="goBack" type="primary"
-            >返回</el-button
-          >
-        </div>
-        <el-upload
-          style="float: right; margin-top: 20px"
-          class="upload-demo"
-          action="http://192.168.2.170:9600/spfm/market/kpitemps/addTemp"
-          :before-upload="beforeUploadForm"
-          :http-request="fileChange"
-          :show-file-list="false"
-          :file-list="fileList"
-          :disabled="disabled"
-        >
-          <el-button size="small" @click="isDisabled" type="primary"
-            >点击上传</el-button
-          >
-        </el-upload>
-      </div>
-      <div
-        v-if="dataBody.rows.length > 0"
-        id="tabbox"
-        cellspacing="0"
-        cellpadding="0"
-      >
-        <div style="width: 50%; margin: 0px auto">
-          <el-input v-model="dataBody.table.tabName"></el-input>
-        </div>
-        <table
-          class="dataBody-box"
-          ref="tableBox"
-          border-collapse="collapse"
-          border="1"
-        >
-          <tbody>
-            <tr v-for="(item, index) in formList" :key="index">
-              <td
-                class="cell"
-                v-for="(row, zindex) in formList[index]"
-                :key="zindex"
-                :rowspan="row.rowSpan"
-                :colspan="row.colSpan"
-              >
-                <div v-show="false">
-                  {{ (row.rowNum = index) }}
-                  {{ (row.colNum = zindex) }}
-                </div>
-                <!-- <el-tooltip :content="row.cellVal" placement="bottom" effect="light"> -->
-                <el-input
-                  autosize
-                  class="table-input"
-                  v-model="row.cellVal"
-                ></el-input>
-                <!-- </el-tooltip> -->
-                <div class="auto-dom" v-if="index == 0"></div>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <div class="center-style" v-else>等待上传模板</div>
-    </fullscreen>
-  </div>
+	<div id="select-dom" class="container" style="margin: 15px 0 0 0" v-loading="loading">
+		<fullscreen :fullscreen.sync="fullscreen" class="container-box"
+			style="margin: 0 !important; padding: 0 !important">
+			<div class="titbox">
+				<h2>绩效模板</h2>
+				<div>
+					<i class="el-icon-refresh" @click="iconCli(1)"></i>
+					<i class="el-icon-full-screen" @click="iconCli(2)"></i>
+				</div>
+			</div>
+			<div style="overflow: hidden">
+				<el-select placeholder="选择接模板类型" v-model="tempType" filterable clearable
+					style="float: left; margin-top: 20px" @change="selectType">
+					<el-option value="0" label="科室绩效"> </el-option>
+					<el-option value="1" label="部门绩效"> </el-option>
+					<el-option value="2" label="副总GS"> </el-option>
+					<el-option value="3" label="集团绩效"> </el-option>
+				</el-select>
+				<el-select v-if="tempType == '1'" placeholder="选择接模板种类" v-model="subType" filterable clearable
+					style="float: left; margin-top: 20px">
+					<el-option value="0" label="KPI"> </el-option>
+					<el-option value="1" label="GS"> </el-option>
+				</el-select>
+				<el-select v-if="tempType == '2'" placeholder="选择接模板种类" v-model="subType" filterable clearable
+					style="float: left; margin-top: 20px">
+					<el-option value="0" label="考核目标"> </el-option>
+					<el-option value="1" label="考核项目"> </el-option>
+					<el-option value="2" label="营销活动落地目标"> </el-option>
+					<el-option value="3" label="渠道销售能力目标"> </el-option>
+					<el-option value="4" label="家庭营销能力目标"> </el-option>
+					<el-option value="5" label="业务管理提升目标"> </el-option>
+					<el-option value="6" label="绩效完成情况"> </el-option>
+				</el-select>
+				<el-select v-if="groupFlag" placeholder="选择接部门" v-model="groupId" filterable clearable
+					style="float: left; margin-top: 20px" @change="selectHandel">
+					<el-option v-for="items in options" :key="items.value" :label="items.groupName"
+						:value="items.groupId">
+					</el-option>
+				</el-select>
+				<div class="search" style="float: right; margin-right: 20px">
+					<el-button size="small" @click="goBack" type="primary">返回</el-button>
+				</div>
+				<el-upload style="float: right; margin-top: 20px" class="upload-demo"
+					action="http://192.168.2.143:9600/spfm/market/kpitemps/addTemp" :before-upload="beforeUploadForm"
+					:http-request="fileChange" :show-file-list="false" :file-list="fileList" :disabled="disabled">
+					<el-button size="small" @click="isDisabled" type="primary">点击上传</el-button>
+				</el-upload>
+			</div>
+			<div v-if="dataBody.rows.length > 0" id="tabbox" cellspacing="0" cellpadding="0">
+				<div style="width: 50%; margin: 0px auto">
+					<el-input v-model="dataBody.table.tabName"></el-input>
+				</div>
+				<table class="dataBody-box" ref="tableBox" border-collapse="collapse" border="1">
+					<tbody>
+						<tr v-for="(item, index) in formList" :key="index">
+							<td class="cell" v-for="(row, zindex) in formList[index]" :key="zindex"
+								:rowspan="row.rowSpan" :colspan="row.colSpan">
+								<div v-show="false">
+									{{ (row.rowNum = index) }}
+									{{ (row.colNum = zindex) }}
+								</div>
+								<!-- <el-tooltip :content="row.cellVal" placement="bottom" effect="light"> -->
+								<el-input autosize class="table-input" v-model="row.cellVal"></el-input>
+								<!-- </el-tooltip> -->
+								<div class="auto-dom" v-if="index == 0"></div>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+			</div>
+			<div class="center-style" v-else>等待上传模板</div>
+		</fullscreen>
+	</div>
 </template>
 <script>
-export default {
-  data() {
-    return {
-      groupFlag: true,
-      user: "",
-      loading: false,
-      dataBody: {
-        rows: [],
-        table: {
-          opName: "",
-          opNo: "",
-          opTime: "",
-          opTimeFrom: "",
-          opTimeTo: "",
-          tabCode: "",
-          tabCodePks: "",
-          tabName: "",
-        },
-      },
-      fullscreen: false,
-      fileList: [],
-      closeMenu: false,
-      options: [],
-      groupId: "",
-      groupName: "",
-      tempTypeDesc: "科室绩效",
-      tempType: "",
-      disabled: true,
-      subType: "",
-    };
-  },
-  computed: {
-    formList: function () {
-      return this.dataBody.rows.map((item) => {
-        return item.filter((row) => {
-          if (row.displayFlag == "0") {
-            return row;
-          }
-        });
-      });
-    },
-  },
-  methods: {
-    selectType(val) {
-      if (!val) {
-        this.disabled = true;
-      }
-      if (val == "0") {
-        this.groupFlag = true;
-      } else {
-        this.groupFlag = false;
-      }
-      this.subType = "";
-    },
-    isDisabled() {
-      if (this.tempType == "") {
-        this.$message({
-          message: "请先选择模板类型",
-          type: "error",
-        });
-        return;
-      } else {
-        if (this.tempType == "0" && this.groupId == "") {
-          this.$message({
-            message: "请先选择部门",
-            type: "error",
-          });
-          return;
-        } else if (
-          (this.tempType == "1" || this.tempType == "2") &&
-          this.subType == ""
-        ) {
-          this.$message({
-            message: "请先选择模板种类",
-            type: "error",
-          });
-          return;
-        } else {
-          this.disabled = false;
-        }
-      }
-    },
-    selectHandel(val) {
-      this.options.map((item) => {
-        if (item.groupId == val) {
-          this.groupName = item.groupName;
-        }
-      });
-      if (this.groupId == "") {
-        this.disabled = true;
-      }
-    },
-    beforeUploadForm(file) {
-      // 验证文件类型
-      var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
-      const extension = testmsg === "xlsx";
-      if (!extension) {
-        this.$message({
-          message: "上传文件只能是excel格式!",
-          duration: 1000,
-          showClose: true,
-          type: "warning",
-        });
-        return false;
-      }
-    },
-    // 提交文件
-    fileChange(param, type) {
-      let formData = new FormData();
-      formData.append("file", param.file);
-      formData.append("tabCode", "");
-      formData.append("tempType", this.tempType);
-      formData.append("subType", this.subType);
-      formData.append(
-        "subTypeDesc",
-        this.tempType == "1" && this.subType == "0"
-          ? "KPI"
-          : this.tempType == "1" && this.subType == "1"
-          ? "GS"
-          : this.tempType == "2" && this.subType == "0"
-          ? "考核目标"
-          : this.tempType == "2" && this.subType == "1"
-          ? "营销活动落地目标"
-          : this.tempType == "2" && this.subType == "2"
-          ? "渠道销售能力目标"
-          : this.tempType == "2" && this.subType == "3"
-          ? "家庭营销能力目标"
-          : this.tempType == "2" && this.subType == "4"
-          ? "业务管理提升目标"
-          : this.tempType == "2" && this.subType == "5"
-          ? "绩效完成情况"
-          : ""
-      );
-      formData.append(
-        "tempTypeDesc",
-        this.tempType == "0"
-          ? "科室绩效"
-          : this.tempType == "1"
-          ? "部门绩效"
-          : "副总GS"
-      );
-      formData.append("groupId", this.groupId);
-      formData.append("groupName", this.groupName);
-      this.loading = true;
-      this.$http({
-        url: "/market/kpitemps/addTemp",
-        method: "post",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        data: formData,
-      })
-        .then((res) => {
-          if (res.data.result == 0) {
-            this.$message({
-              message: "上传成功",
-              type: "success",
-            });
-            this.dataBody = res.data.body;
-            this.$forceUpdate();
-          }
-          this.loading = false;
-        })
-        .catch((err) => {
-          this.loading = false;
-        });
-    },
-    goBack() {
-      this.$router.push("/kpiMuban");
-    },
-    //功能栏
-    iconCli(v) {
-      if (v === 1) {
-        this.getList(this.params, this.pageSize);
-      }
-      if (v === 2) {
-        this.fullscreen = !this.fullscreen;
-      }
-    },
-    getOpations() {
-      this.$http({
-        url: "/sysmgr/sys/mk/offices/queryList",
-        method: "post",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        data: {},
-      }).then((res) => {
-        this.options = res.data.body;
-      });
-    },
-  },
-  mounted() {
-    this.getOpations();
-  },
-};
+	export default {
+		data() {
+			return {
+				groupFlag: true,
+				user: "",
+				loading: false,
+				dataBody: {
+					rows: [],
+					table: {
+						opName: "",
+						opNo: "",
+						opTime: "",
+						opTimeFrom: "",
+						opTimeTo: "",
+						tabCode: "",
+						tabCodePks: "",
+						tabName: "",
+					},
+				},
+				fullscreen: false,
+				fileList: [],
+				closeMenu: false,
+				options: [],
+				groupId: "",
+				groupName: "",
+				tempTypeDesc: "科室绩效",
+				tempType: "",
+				disabled: true,
+				subType: "",
+			};
+		},
+		computed: {
+			formList: function() {
+				return this.dataBody.rows.map((item) => {
+					return item.filter((row) => {
+						if (row.displayFlag == "0") {
+							return row;
+						}
+					});
+				});
+			},
+		},
+		methods: {
+			selectType(val) {
+				if (!val) {
+					this.disabled = true;
+				}
+				if (val == "0") {
+					this.groupFlag = true;
+				} else {
+					this.groupFlag = false;
+				}
+				this.subType = "";
+			},
+			isDisabled() {
+				if (this.tempType == "") {
+					this.$message({
+						message: "请先选择模板类型",
+						type: "error",
+					});
+					return;
+				} else {
+					if (this.tempType == "0" && this.groupId == "") {
+						this.$message({
+							message: "请先选择部门",
+							type: "error",
+						});
+						return;
+					} else if (
+						(this.tempType == "1" || this.tempType == "2") &&
+						this.subType == ""
+					) {
+						this.$message({
+							message: "请先选择模板种类",
+							type: "error",
+						});
+						return;
+					} else {
+						this.disabled = false;
+					}
+				}
+			},
+			selectHandel(val) {
+				this.options.map((item) => {
+					if (item.groupId == val) {
+						this.groupName = item.groupName;
+					}
+				});
+				if (this.groupId == "") {
+					this.disabled = true;
+				}
+			},
+			beforeUploadForm(file) {
+				// 验证文件类型
+				var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
+				const extension = testmsg === "xlsx";
+				if (!extension) {
+					this.$message({
+						message: "上传文件只能是excel格式!",
+						duration: 1000,
+						showClose: true,
+						type: "warning",
+					});
+					return false;
+				}
+			},
+			// 提交文件
+			fileChange(param, type) {
+				let formData = new FormData();
+				formData.append("file", param.file);
+				formData.append("tabCode", "");
+				formData.append("tempType", this.tempType);
+				formData.append("subType", this.subType);
+				formData.append(
+					"subTypeDesc",
+					this.tempType == "1" && this.subType == "0" ?
+					"KPI" :
+					this.tempType == "1" && this.subType == "1" ?
+					"GS" :
+					this.tempType == "2" && this.subType == "0" ?
+					"考核目标" :
+					this.tempType == "2" && this.subType == "1" ?
+					"营销活动落地目标" :
+					this.tempType == "2" && this.subType == "2" ?
+					"渠道销售能力目标" :
+					this.tempType == "2" && this.subType == "3" ?
+					"家庭营销能力目标" :
+					this.tempType == "2" && this.subType == "4" ?
+					"业务管理提升目标" :
+					this.tempType == "2" && this.subType == "5" ?
+					"绩效完成情况" :
+					this.tempType == "3" ?
+					"绩效完成情况" :
+					""
+				);
+				formData.append(
+					"tempTypeDesc",
+					this.tempType == "0" ?
+					"科室绩效" :
+					this.tempType == "1" ?
+					"部门绩效" :
+					this.tempType == "3" ?
+					"集团绩效" :
+					"副总GS"
+				);
+				formData.append("groupId", this.groupId);
+				formData.append("groupName", this.groupName);
+				this.loading = true;
+				this.$http({
+						url: "/market/kpitemps/addTemp",
+						method: "post",
+						headers: {
+							"Content-Type": "application/json",
+						},
+						data: formData,
+					})
+					.then((res) => {
+						if (res.data.result == 0) {
+							this.$message({
+								message: "上传成功",
+								type: "success",
+							});
+							this.dataBody = res.data.body;
+							this.$forceUpdate();
+						}
+						this.loading = false;
+					})
+					.catch((err) => {
+						this.loading = false;
+					});
+			},
+			goBack() {
+				this.$router.push("/kpiMuban");
+			},
+			//功能栏
+			iconCli(v) {
+				if (v === 1) {
+					this.getList(this.params, this.pageSize);
+				}
+				if (v === 2) {
+					this.fullscreen = !this.fullscreen;
+				}
+			},
+			getOpations() {
+				this.$http({
+					url: "/sysmgr/sys/mk/offices/queryList",
+					method: "post",
+					headers: {
+						"Content-Type": "application/json",
+					},
+					data: {},
+				}).then((res) => {
+					this.options = res.data.body;
+				});
+			},
+		},
+		mounted() {
+			this.getOpations();
+		},
+	};
 </script>
 <style lang="scss" scoped>
-#tabbox {
-  height: 75%;
-  overflow-y: auto;
-}
-.dataBody-box {
-  border-collapse: collapse;
-  margin-top: 20px;
-  .cell {
-    position: relative;
-  }
-}
-.center-style {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  height: 300px;
-}
-.btn-wrapper-simple {
-  height: auto !important;
-}
-.fcous {
-  border-color: red;
-}
-.auto-dom {
-  width: 3px;
-  opacity: 0;
-  position: absolute;
-  right: 0;
-  top: 0;
-  z-index: 1000;
-  cursor: pointer;
-  height: 100%;
-}
+	#tabbox {
+		height: 75%;
+		overflow-y: auto;
+	}
+
+	.dataBody-box {
+		border-collapse: collapse;
+		margin-top: 20px;
+
+		.cell {
+			position: relative;
+		}
+	}
+
+	.center-style {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		height: 300px;
+	}
+
+	.btn-wrapper-simple {
+		height: auto !important;
+	}
+
+	.fcous {
+		border-color: red;
+	}
+
+	.auto-dom {
+		width: 3px;
+		opacity: 0;
+		position: absolute;
+		right: 0;
+		top: 0;
+		z-index: 1000;
+		cursor: pointer;
+		height: 100%;
+	}
 </style>>
 <style scoped lang="scss">
-.btn-default {
-  display: inline;
-  margin-left: 10px;
-}
-.titbox {
-  div {
-    float: right;
+	.btn-default {
+		display: inline;
+		margin-left: 10px;
+	}
 
-    i {
-      font-size: 22px;
-      margin-left: 20px;
-      cursor: pointer;
-    }
-  }
-}
+	.titbox {
+		div {
+			float: right;
 
-.tabbox {
-  margin-top: 15px;
-}
+			i {
+				font-size: 22px;
+				margin-left: 20px;
+				cursor: pointer;
+			}
+		}
+	}
 
-.pageBox {
-  text-align: right;
-  margin-top: 10px;
-}
-</style>
+	.tabbox {
+		margin-top: 15px;
+	}
 
+	.pageBox {
+		text-align: right;
+		margin-top: 10px;
+	}
+</style>

+ 390 - 0
src/pages/main/achievements/recallJt.vue

@@ -0,0 +1,390 @@
+<template>
+	<div class="container" style="margin: 15px 0 0 0" v-loading="loading">
+		<fullscreen :fullscreen.sync="fullscreen" class="container-box"
+			style="margin: 0 !important; padding: 0 !important">
+			<div class="titbox">
+				<h2>集团绩效</h2>
+				<div>
+					<i class="el-icon-refresh" @click="iconCli(1)"></i>
+					<i class="el-icon-full-screen" @click="iconCli(2)"></i>
+				</div>
+			</div>
+			<el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick">
+				<el-tab-pane name="0" label="KPI"></el-tab-pane>
+				<el-tab-pane name="1" label="GS"></el-tab-pane>
+			</el-tabs>
+			<div style="height: 100%">
+				<div style="overflow: none">
+					<el-date-picker v-model="monthValue" @change="checkMonth" value-format="yyyy-MM" type="month"
+						placeholder="选择月">
+					</el-date-picker>
+					<div style="float: right">
+						<el-button v-if="dataBody.task.sts == '0' && dataBody.rows.length > 0" size="small"
+							@click="submit" type="primary">回复</el-button>
+						<el-button v-if="dataBody.task.sts == '0' && dataBody.rows.length > 0" size="small"
+							@click="save" type="primary">保存</el-button>
+						<el-button v-if="dataBody.rows.length > 0" size="small" type="primary" @click="exportExcel">导出
+						</el-button>
+						<el-button size="small" @click="goBack" type="primary">返回</el-button>
+					</div>
+				</div>
+
+				<div v-if="dataBody.rows.length > 0" id="tabbox">
+					<div style="width: 30%; margin: 15px auto">
+						<el-input readonly v-model="dataBody.table.tabName"></el-input>
+					</div>
+					<table class="dataBody-box" border-collapse="collapse" border="1">
+						<tbody>
+							<tr v-for="(item, index) in dataBody.rows" :key="index">
+								<td @contextmenu="showMenu(index, zindex)" class="cell" v-for="(row, zindex) in item"
+									:key="zindex" :rowspan="row.rowSpan" :colspan="row.colSpan"
+									v-show="row.displayFlag == '0'">
+									<div v-show="false">
+										{{ (dataBody.rows[index][zindex].colNum = zindex) }}
+										{{ (dataBody.rows[index][zindex].rowNum = index) }}
+									</div>
+									<el-input :disabled="dataBody.task.sts != '0'" class="table-input"
+										v-model="row.cellVal"></el-input>
+								</td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+				<div class="center-style" v-else>请选择需要查看的绩效</div>
+			</div>
+			<vue-context-menu :contextMenuData="contextMenuData" @deleteHang="deleteHang" @addHangUp="addHangUp">
+			</vue-context-menu>
+		</fullscreen>
+	</div>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				contextMenuData: {
+					menuName: "demo",
+					//菜单显示的位置
+					axis: {
+						x: null,
+						y: null,
+					},
+					//菜单选项
+					menulists: [{
+							fnHandler: "deleteHang", //绑定事件
+							btnName: "删除行", //菜单名称
+						},
+						{
+							fnHandler: "addHangUp", //绑定事件
+							btnName: "插入行", //菜单名称
+						},
+					],
+				},
+				activeName: "0",
+				disabled: true,
+				options: [],
+				value: "",
+				monthValue: "",
+				isMove: false,
+				autoStyle: {},
+				xindex: "",
+				yindex: "",
+				dataBody: {
+					rows: [],
+					table: {
+						opName: "",
+						opNo: "",
+						opTime: "",
+						opTimeFrom: "",
+						opTimeTo: "",
+						tabCode: "",
+						tabCodePks: "",
+						tabName: "",
+					},
+					task: {
+						sts: 0,
+					},
+				},
+				hangIndex: "",
+				lieIndex: "",
+				fullscreen: false,
+				loading: false,
+				fileList: [],
+			};
+		},
+		methods: {
+			showMenu(index, zindex) {
+				this.hangIndex = index;
+				this.lieIndex = zindex;
+				event.preventDefault();
+				var x = event.clientX;
+				var y = event.clientY;
+				// Get the current location
+				this.contextMenuData.axis = {
+					x,
+					y,
+				};
+			},
+			// 向上增加行
+			addHangUp() {
+				let itemArr = [];
+				for (let i = 0; i < this.hangIndex; i++) {
+					this.dataBody.rows[i].map((item) => {
+						if (
+							this.hangIndex <= parseInt(item.rowSpan) + i - 1 &&
+							parseInt(item.rowSpan) > 1
+						) {
+							item.rowSpan = parseInt(item.rowSpan) + 1;
+						}
+					});
+				}
+				itemArr = JSON.parse(JSON.stringify(this.dataBody.rows[this.hangIndex]));
+				itemArr.map((item) => {
+					item.rowSpan = "1";
+					item.cellVal = "";
+				});
+				this.dataBody.rows.splice(this.hangIndex, 0, itemArr);
+			},
+			// 删除行
+			deleteHang() {
+				if (
+					parseInt(this.dataBody.rows[this.hangIndex][this.lieIndex].rowSpan) > 1
+				) {
+					this.$message({
+						message: "当前行有合并项不能删除",
+						type: "wanrning",
+					});
+					return;
+				}
+				let num = 0;
+				this.dataBody.rows[this.hangIndex].map((item, index) => {
+					if (parseInt(item.rowSpan) > 1) {
+						this.dataBody.rows[parseInt(this.hangIndex) + 1][index].displayFlag =
+							"0";
+						this.dataBody.rows[parseInt(this.hangIndex) + 1][index].rowSpan =
+							parseInt(item.rowSpan) - 1;
+					} else if (item.displayFlag == "1") {
+						for (let i = this.hangIndex; i >= 0; i--) {
+							num = 0;
+							this.dataBody.rows[i].map((item, zindex) => {
+								if (item.displayFlag == "0") {
+									num++;
+								}
+								if (
+									parseInt(item.rowSpan) > 1 &&
+									zindex == index &&
+									this.hangIndex <= parseInt(item.rowSpan) + i - 1
+								) {
+									item.rowSpan = parseInt(item.rowSpan) - 1;
+								}
+							});
+							if (num == this.dataBody.rows[i].length) {
+								return;
+							}
+						}
+					}
+				});
+				this.dataBody.rows.splice(this.hangIndex, 1);
+			},
+			handleClick(val) {
+				this.getInitData();
+			},
+			// 回复
+			submit() {
+				this.loading = true;
+				this.$http({
+					url: "/market/kpidepts/saveInfo",
+					method: "post",
+					headers: {
+						"Content-Type": "application/json",
+					},
+					data: this.dataBody,
+				}).then((res) => {
+					if (res.data.result == 0) {
+						this.$message({
+							message: "回复成功",
+							type: "success",
+						});
+						this.getInitData();
+					}
+					this.loading = false;
+				});
+			},
+			exportExcel() {
+				this.$http({
+					url: "/market/kpidepts/downloadKpi",
+					method: "get",
+					headers: {
+						"Content-Type": "application/json",
+					},
+					responseType: "blob",
+					params: {
+						tabInstId: this.dataBody.tabInstId
+					},
+				}).then((response) => {
+					if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+						let blob = new Blob([response.data], {
+							type: "application/vnd.ms-excel",
+						});
+						window.navigator.msSaveOrOpenBlob(
+							blob,
+							this.dataBody.table.tabName + ".xlsx"
+						);
+					} else {
+						/* 火狐谷歌的文件下载方式 */
+						var blob = new Blob([response.data]);
+						var downloadElement = document.createElement("a");
+						var href = window.URL.createObjectURL(blob);
+						downloadElement.href = href;
+						downloadElement.download = this.dataBody.table.tabName + ".xlsx";
+						document.body.appendChild(downloadElement);
+						downloadElement.click();
+						document.body.removeChild(downloadElement);
+						window.URL.revokeObjectURL(href);
+					}
+				});
+			},
+			checkMonth(val) {
+				this.getInitData();
+			},
+			goBack() {
+				this.$router.push("/leader");
+			},
+			//功能栏
+			iconCli(v) {
+				if (v === 1) {
+					this.getList(this.params, this.pageSize);
+				}
+				if (v === 2) {
+					this.fullscreen = !this.fullscreen;
+				}
+			},
+			// 保存
+			save() {
+				this.loading = true;
+				this.$http({
+					url: "/market/kpidepts/save",
+					method: "post",
+					headers: {
+						"Content-Type": "application/json",
+					},
+					data: this.dataBody,
+				}).then((res) => {
+					if (res.data.result == 0) {
+						this.loading = false;
+						this.$message({
+							message: "操作成功",
+							type: "success",
+						});
+					}
+				});
+			},
+			getInitData(val) {
+				this.loading = true;
+				this.$http({
+					url: "/market/kpidepts/load",
+					method: "post",
+					headers: {
+						"Content-Type": "application/json",
+					},
+					data: {
+						kpiMonth: this.monthValue,
+						tempType: "3",
+						subType: this.activeName,
+						kpiYear: "",
+						receiveDeptCode: "",
+					},
+				}).then((res) => {
+					if (res.data.result == 0) {
+						this.dataBody = res.data.body;
+					} else {
+						this.$message({
+							message: "无绩效数据",
+							type: "success",
+						});
+						this.dataBody.rows = [];
+					}
+					this.loading = false;
+				});
+			},
+		},
+		mounted() {
+			this.getInitData();
+		},
+	};
+</script>
+<style>
+	#tabbox .el-input.is-disabled .el-input__inner {
+		color: black;
+		background-color: white;
+	}
+
+	.btn-wrapper-simple {
+		height: auto !important;
+	}
+</style>
+<style lang="scss" scoped>
+	#tabbox {
+		height: 65%;
+		overflow-y: auto;
+	}
+
+	.dataBody-box {
+		border-collapse: collapse;
+		margin-top: 20px;
+
+		.cell {
+			position: relative;
+		}
+	}
+
+	.fcous {
+		border-color: red;
+	}
+
+	.center-style {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		height: 100%;
+	}
+
+	.auto-dom {
+		width: 3px;
+		opacity: 0;
+		position: absolute;
+		right: 0;
+		top: 0;
+		z-index: 1000;
+		cursor: pointer;
+		height: 100%;
+	}
+</style>>
+<style scoped lang="scss">
+	.btn-default {
+		display: inline;
+		margin-left: 10px;
+	}
+
+	.titbox {
+		margin-bottom: 20px;
+
+		div {
+			float: right;
+
+			i {
+				font-size: 22px;
+				margin-left: 20px;
+				cursor: pointer;
+			}
+		}
+	}
+
+	.tabbox {
+		margin-top: 15px;
+	}
+
+	.pageBox {
+		text-align: right;
+		margin-top: 10px;
+	}
+</style>

+ 5 - 8
src/pages/main/advertising/index.vue

@@ -4,17 +4,17 @@
 			
 			<h2>广告宣传费台账</h2>
 			<div class="adv-type">
-			    <div @click="jumpinfop('/publicityAccount',1,'宣传费台账')">
+			    <div @click="jumpinfop('/publicityAccount',1,'宣传费台账')" v-if="lockFlag == 'updata'">
 			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>模板管理</span>
+			        <span>创建模板</span>
 			    </div>
 				<div @click="jumpinfop('/publicityAccount',2,'宣传费台账')">
 			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>费用填报</span>
+			        <span>录入/更新</span>
 			    </div>
-				<div @click="jumpinfop('/publicityAccount',3,'宣传费台账')">
+				<div @click="jumpinfop('/publicityAccount',3,'宣传费台账')" v-if="lockFlag == 'updata'">
 			        <span><i class="el-icon-folder-opened"></i></span>
-			        <span>台账查看</span>
+			        <span>查看/下载</span>
 			    </div>
 			</div>
 			<h2 style="margin-top: 20px;">宣传物料管理</h2>
@@ -87,9 +87,6 @@
         },
         methods: {
             jumpinfop(p,v,n){
-				if(v == 1 && this.lockFlag != 'updata'){
-					return
-				}
 				this.$router.push({
 				    path: p,
 				    query:{

+ 6 - 0
src/router/index.js

@@ -219,6 +219,12 @@ const routes = [{
                     name: 'recallBm',
                     component: (resolve) => require( /* webpackChunkName: "system" */
                         ['../pages/main/achievements/recallBumen.vue'], resolve)
+                },{
+                    meta: { name:  '集团绩效', keepAlive: false },
+                    path: '/recallJt',
+                    name: 'recallJt',
+                    component: (resolve) => require( /* webpackChunkName: "system" */
+                        ['../pages/main/achievements/recallJt.vue'], resolve)
                 }, {
                     meta: { name:  '副总GS', keepAlive: false },
                     path: '/recallGs',

+ 2 - 2
vue.config.js

@@ -94,8 +94,8 @@ module.exports = {
                 // target: 'http://192.168.2.149:9600',
                 // target: 'http://10.64.42.70:8088/',
                 // target: 'http://114.215.71.182:29600',
-                // target: 'http://10.230.26.15:8000/spfm',
-                target: 'http://192.168.2.143:9600/',
+                target: 'http://10.230.26.15:8000/spfm',
+                // target: 'http://192.168.2.143:9600/',
                 // target: 'http://192.168.2.170:9600/',
                 // target: 'http://192.168.2.169:9600/',
                 changeOrigin: true