袁少华 пре 4 година
родитељ
комит
46a015e30b
4 измењених фајлова са 81 додато и 26 уклоњено
  1. BIN
      files/imgInfo.jpg
  2. 7 0
      js/service/produce-task.js
  3. 8 8
      js/service/product.js
  4. 66 18
      pages/dashboard/esop.html

BIN
files/imgInfo.jpg


+ 7 - 0
js/service/produce-task.js

@@ -520,5 +520,12 @@ var ServiceProduceTask = {
             ]
         });
         return taskList;
+    },
+    //文件列表
+    getEsopFileList:function(){
+
+        return getService.methodGet("/workingStatistics/fbsWorkingStatistics/getEsopFileList");
     }
+
+
 }

+ 8 - 8
js/service/product.js

@@ -66,15 +66,15 @@ var ServiceProduct = {
     },
     // 月成品出货统计,根据成品维度
     getMonthSend: function () {
-        // return getService.methodGet("/fbsRdrecord32/fbsRdrecords32/getMonthSend");
+        return getService.methodGet("/fbsRdrecord32/fbsRdrecords32/getMonthSend");
 
-        return {
-            "成品A": 20,
-            "成品B": 100,
-            "成品C": 80,
-            "成品D": 150,
-            "成品E": 200,
-        };
+        // return {
+        //     "成品A": 20,
+        //     "成品B": 100,
+        //     "成品C": 80,
+        //     "成品D": 150,
+        //     "成品E": 200,
+        // };
     },
     // 月项目发货统计,根据项目维度
     getMonthSendByProject: function () {

+ 66 - 18
pages/dashboard/esop.html

@@ -9,6 +9,13 @@
     <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
     <link href="/css/dashboard.css" rel="stylesheet" />
 
+    <script type="text/javascript" src="/js/service.js"></script>
+    <script type="text/javascript" src="/js/session.js"></script>
+    <script type="text/javascript" src="/js/getService.js"></script>
+
+    <script type="text/javascript" src="/js/service/method-get-service.js"></script>
+    <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
+    <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
 
 </head>
 
@@ -36,27 +43,37 @@
     <div class="my-container" id="div-main">
         <div class="row block-padding">
             <div class="col-lg-4 col-md-4">
+                <h2>任务</h2>
+                <div class="row">
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">订单号</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">物料号</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">物料编码</div>
+                </div>
+                <div class="row" v-for="task in taskList2" style="margin-bottom: 2px;">
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">{{task.orderSheetCode}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">{{task.materialCode}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">{{task.materialName}}</div>
+                </div>
+                <h2>文件</h2>
                 <div class="row">
-                    <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">产品编码</div>
-                    <div class="col-lg-2 col-md-3 center no-padding">产品名称</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">型号规格</div>
-                    <div class="col-lg-3 col-md-1 center no-padding">项目</div>
-                    <div class="col-lg-1 col-md-2 center no-padding">操作</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">文件名</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">文件类型</div>
+                    <div class="col-lg-1 col-md-2 center no-padding" style="width: 25%;">操作</div>
                 </div>
                 <div class="row" v-for="task in taskList" style="margin-bottom: 2px;">
-                    <div class="col-lg-2 col-md-2 center no-padding">{{task.orderSheetCode}}</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">{{task.materialCode}}</div>
-                    <div class="col-lg-2 col-md-3 center no-padding">{{task.materialName}}</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">{{task.specs}}</div>
-                    <div class="col-lg-3 col-md-1 center no-padding">{{task.ProjectName}}</div>
-                    <div class="col-lg-1 col-md-2 center no-padding">
-                            <button type="button" class="btn btn-xs btn-warning" @click="showfile(task.files[0])">操作</button>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 48%;">{{task.fileName}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding" style="width: 25%;">{{task.fileType}}</div>
+                    <div class="col-lg-1 col-md-2 center no-padding" style="width: 25%;">
+                            <button type="button" class="btn btn-xs btn-warning" @click="showfile(task.fileName,task.fileType)">查看</button>
                     </div>
                 </div>
             </div>
-            <div class="col-lg-8 col-md-8">
+            <div class="col-lg-8 col-md-8" >
+                <img id="imgInfo" src="/files/imgInfo.jpg" width="100%" height="100%"/> 
                 <iframe id="frameMain" width="98%" border="0" frameborder="0" v-bind:src="filepath" style="background-color:#ffffff"></iframe>
+                <img id="imgType" src="" width="auto" /> 
+                <video id="videoType" src="" controls width="auto" > </video>
+                <div id="textType" width="auto" ></div>
             </div>
         </div>
     </div>
@@ -68,19 +85,50 @@
     <script src="/lib/echarts/theme/macarons.js"></script>
     <script src="/js/service/produce-task.js"></script>
     <script type="text/javascript">
-        const taskList = ServiceProduceTask.getEsopTaskList();
-        $("#frameMain").height($(window).height()-110);
 
+        $(function () {
+            hideAll();
+            $("#imgInfo").show();
+        })
+        function hideAll(){
+            $("#frameMain").hide();
+            $("#imgType").hide();
+            $("#videoType").hide();
+            $("#imgInfo").hide();
+        }
+
+
+        const taskList = ServiceProduceTask.getEsopFileList();
+        const taskList2 = ServiceProduceTask.getEsopTaskList();
+        $("#frameMain").height($(window).height()-110);
+        $("#imgType").height($(window).height()-110);
+        $("#videoType").height($(window).height()-110);
 
         var vm = new Vue({
             el: '#div-main',
             data: {
                 taskList: taskList,
+                taskList2: taskList2,
                 filepath:""
             },
             methods: {
-                showfile: function (file) {
-                    this.filepath = "/lib/pdfjs/web/viewer.html?file="+file.path;
+                showfile: function (name,file) {
+                    if(file=='pdf'){
+                        hideAll();
+                        $("#frameMain").show();
+                        this.filepath = "/lib/pdfjs/web/viewer.html?file=/upFiles/"+name;
+                    }else if(file=='jpg' || file=='jpeg' || file=='png'){
+                        hideAll();
+                        $("#imgType").show();
+                        $("#imgType").attr('src',"/upFiles/"+name);
+                    }else if(file=='avi' || file=='mov' || file=='rmvb' || file=='rm' || file=='flv' || file=='mp4' || file=='3gp'){
+                        hideAll();
+                        $("#videoType").show();
+                        $("#videoType").attr('src',"/upFiles/"+name);
+                    }else{
+                        alert("暂时不支持该类型文件的展示");
+                    }
+                    
                 }
             },
         });