fan 2 lat temu
rodzic
commit
80721e976c
1 zmienionych plików z 41 dodań i 1 usunięć
  1. 41 1
      src/pages/main/onlineExcel/index.vue

+ 41 - 1
src/pages/main/onlineExcel/index.vue

@@ -131,7 +131,7 @@
         </el-dialog>
         <el-dialog :title="'分享选项'" :visible.sync="shareStatus" width="500px" :destroy-on-close="true"
                    :modal-append-to-body="false" :close-on-click-modal="false">
-            <div style="margin-left: 30px;padding-bottom: 20px">
+            <div style="margin-left: 30px;padding-bottom: 20px" v-loading = 'shareLoading'>
                 <el-button type="primary" @click="processExcelShare(1)" plain>仅我可编辑</el-button>
                 <el-button type="primary" @click="openOADialog(2)" plain>所有人可编辑</el-button>
                 <el-button type="primary" @click="checkexa = true" plain>指定人可编辑</el-button>
@@ -254,9 +254,43 @@ export default {
             moveStatus: false,
             //移动文件夹tree相关
             nowMoveFolder: {},
+            shareLoading : false,
+            woNo: ''
         }
     },
     methods: {
+        processWoNo() {
+            console.log(this.woNo);
+            var _this = this;
+            this.$http({
+                url: '/market/cOnlineExcel/processWoNo',
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    id: _this.woNo,
+                },
+            }).then((res) => {
+                if (res.data.result === 1) {
+                    if (res.data.result != 'WONOEMPTY') {
+                        _this.$message({
+                            message: res.data.desc,
+                            type: 'error'
+                        });
+                    }
+                } else {
+                    _this.$message({
+                        message: '成功',
+                        type: 'success'
+                    });
+                    var id = res.data.desc;
+                    //放入id,切换到excel模式
+                    document.getElementById('excelId').setAttribute("value", id);
+                    _this.showExcel = true;
+                }
+            });
+        },
         moveExcel() {
             var _this = this;
             var folderId = "";
@@ -330,6 +364,7 @@ export default {
         processExcelShare(shareType) {
             var deptList = [];
             var _this = this;
+            _this.shareLoading = true;
             if (shareType == 3) {
                 this.treeList.map((o) => {
                     deptList.push(o.receiveNo);
@@ -360,6 +395,7 @@ export default {
                     shareType: _this.shareType
                 },
             }).then((res) => {
+                _this.shareLoading = false;
                 if (res.data.result === 1) {
                     _this.$message({
                         message: res.data.desc,
@@ -680,6 +716,10 @@ export default {
         },
     },
     mounted() {
+        this.woNo = this.$route.query.woNo
+        if (this.woNo != null) {
+            this.processWoNo();
+        }
         this.getList({}, 1);
         this.getTreeData();
     },