From 711f1644225a5ff10afa24dec8cafb1eb5343e6a Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期三, 22 十一月 2023 10:13:14 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before

---
 src/views/product/workbench/operation-task-pane.vue |    2 
 src/views/plan/masterproductionschedule/index.vue   |    2 
 src/views/plan/manufacturingorder/index.vue         |    9 ----
 src/views/product/workbench/feed-pane.vue           |   12 ++---
 src/views/quality/exception/exception.vue           |   26 +++++++++++--
 vue.config.js                                       |    3 +
 src/api/product/personboard.js                      |    8 ++++
 7 files changed, 40 insertions(+), 22 deletions(-)

diff --git a/src/api/product/personboard.js b/src/api/product/personboard.js
index 39dbfe5..d3b39bd 100644
--- a/src/api/product/personboard.js
+++ b/src/api/product/personboard.js
@@ -94,6 +94,14 @@
   })
 }
 
+export function getFeed2(query, workstationId) {
+  return request({
+    url: '/mes/stock/getFeedingStock2/' + workstationId,
+    method: 'get',
+    params: query
+  })
+}
+
 export function getTodoStock(query) {
   return request({
     url: '/mes/stock/getToDealStockByWorkstationId',
diff --git a/src/views/plan/manufacturingorder/index.vue b/src/views/plan/manufacturingorder/index.vue
index 99db548..3e3d4fc 100644
--- a/src/views/plan/manufacturingorder/index.vue
+++ b/src/views/plan/manufacturingorder/index.vue
@@ -823,14 +823,7 @@
           }
         ],
         toolbar: [],
-        operator: [
-          // {
-          //   text: '鏌ョ湅搴撳瓨',
-          //   type: 'text',
-          //   size: 'small',
-          //   fun: this.searchStock
-          // }
-        ],
+        operator: null,
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue
index 927b1ff..97410ce 100644
--- a/src/views/plan/masterproductionschedule/index.vue
+++ b/src/views/plan/masterproductionschedule/index.vue
@@ -626,7 +626,7 @@
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
-          width: 240,
+          width: 140,
           minWidth: 100
         }
       },
diff --git a/src/views/product/workbench/feed-pane.vue b/src/views/product/workbench/feed-pane.vue
index 7b41bbb..52b123f 100644
--- a/src/views/product/workbench/feed-pane.vue
+++ b/src/views/product/workbench/feed-pane.vue
@@ -1487,11 +1487,11 @@
 </template>
 
 <script>
-import { getStock, getFeed, getTodoStock, submitInsPart, inputHandle } from '@/api/product/personboard'
+import { getStock, getFeed,getFeed2, getTodoStock, submitInsPart, inputHandle } from '@/api/product/personboard'
 import { getMaterial } from '@/api/plan/operationtask'
 import {
   getERPStockListByPart,
-  fetchList
+  fetchList,
 } from '@/api/warehouse/joinstockorder'
 import feedFormDialog from './feed-form'
 import returnMaterialFormDialog from './returnmaterial-form'
@@ -1814,7 +1814,7 @@
           this.paramObject,
           this.queryParamThree
         )
-        getFeed(query, stationId)
+        getFeed2(query, stationId)
           .then((response) => {
             var data = response.data
             if (data.code === 0) {
@@ -2035,8 +2035,7 @@
       getERPStockListByPart({
         partNo: part.partNo,
         partBatchNo: part.partBatchNo
-      })
-        .then((resp) => {
+      }).then((resp) => {
           const respCode = resp.data.code
           const respData = resp.data.data
           if (respCode === 0) {
@@ -2045,8 +2044,7 @@
             this.isSubmit = false
             this.$message.error('搴撳瓨鍒楄〃鏌ヨ澶辫触')
           }
-        })
-        .catch(() => {
+        }).catch(() => {
           this.isSubmit = false
           console.log('鏌ヨ闆朵欢瀵瑰簲鐨勫簱瀛樺垪琛ㄦ椂锛屽彂鐢熼敊璇�')
         })
diff --git a/src/views/product/workbench/operation-task-pane.vue b/src/views/product/workbench/operation-task-pane.vue
index 7484173..ad56dea 100644
--- a/src/views/product/workbench/operation-task-pane.vue
+++ b/src/views/product/workbench/operation-task-pane.vue
@@ -728,7 +728,7 @@
                       break
                     }
                   }
-                  console.log(this.operationTasks)
+                  // console.log(this.operationTasks)
                   // 鑻ュ綋鍓嶅伐鍗曞湪宸ュ崟鍒楄〃鏈鎵惧埌涓斿綋鍓嶅伐鍗曠姸鎬佷负宸插畬鎴愭垨宸插彇娑堟椂锛屽垯灏嗗綋鍓嶅伐鍗曢噸缃负绌哄苟鎶涘嚭浜嬩欢锛屽惁鍒欎笉绠�
                   if (isResetCurrOpertionTaskFlag) {
                     getOperationTaskById(taskId).then((res) => {
diff --git a/src/views/quality/exception/exception.vue b/src/views/quality/exception/exception.vue
index 1179697..0c49eae 100644
--- a/src/views/quality/exception/exception.vue
+++ b/src/views/quality/exception/exception.vue
@@ -31,8 +31,8 @@
             action="/mes/exception/upload"
             :headers="headers"
             :before-upload="submitUpload"
-            :on-preview="handlePreview"
             :on-remove="handleRemove"
+            :on-preview="handlePreview"
             :on-success="uploadSuccess"
             :data="paramData"
             :file-list="fileList"
@@ -41,7 +41,7 @@
           >
             <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
             <div slot="tip" class="el-upload__tip">
-              鍙兘涓婁紶jpg鍥剧墖锛屼笖涓嶈秴杩�2MB
+              鍙兘涓婁紶jpg/png鍥剧墖锛屼笖涓嶈秴杩�5MB
             </div>
           </el-upload>
         </el-col>
@@ -53,6 +53,9 @@
         @refreshDataList="getData"
       ></table-form>
     </div>
+    <el-dialog title="鍥剧墖棰勮" width="60%" :visible.sync="previewVisible" top="5vh">
+        <img style="width:100%;height: 70vh" :src="dialogImageUrl" alt="">
+    </el-dialog>
   </div>
 </template>
 <style lang="scss" scoped>
@@ -111,6 +114,8 @@
   },
   data() {
     return {
+      previewVisible: false,
+      dialogImageUrl: null,
       fileList: [],
       headers: {
         Authorization: 'Bearer ' + getStore({ name: 'access_token' })
@@ -293,7 +298,7 @@
       }
     },
     handlePreview(file) {
-      window.open(file.url)
+      this.previewVisible = true
     },
     uploadSuccess(response, file, fileList) {
       this.getFileList()
@@ -312,6 +317,7 @@
               fileEl = {}
               fileEl.name = attachment.original
               fileEl.url = attachment.url
+              this.dialogImageUrl = attachment.url
               fileEl.id = attachment.id
               fileEl.fileName = attachment.fileName
               this.fileList.push(fileEl)
@@ -320,10 +326,22 @@
         })
       }
     },
-    submitUpload() {
+    submitUpload(file) {
       console.info(this.currentRow && this.currentRow.id)
+      console.log(file);
       if (this.currentRow && this.currentRow.id) {
+        const maxSize = 5 * 1024 *1024
+        let jpgType = 'image/jpeg'
+        let pngType = 'image/png'
+        if(file.type != jpgType && file.type != pngType){
+          this.$message.error('鍙兘涓婁紶.jpg/.png绫诲瀷鐨勫浘鐗�')
+          return false
+        }
+        if(file.szie > maxSize){
+          this.$message.error('鍥剧墖澶у皬涓嶈兘瓒呰繃5MB')
+        }
         this.paramData.exceptionId = this.currentRow.id
+
       } else {
         this.$message.error('璇峰厛閫夋嫨鐢熶骇寮傚父璁板綍')
         return false
diff --git a/vue.config.js b/vue.config.js
index 1f7f4f3..b189618 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -2,10 +2,11 @@
  * 閰嶇疆鍙傝��:
  * https://cli.vuejs.org/zh/config/
  */
+// const url = 'http://192.168.0.23:9999'
 const url = 'http://192.168.83.249:9999'
 
   // const url = 'http://192.168.0.60:9999'
-  // const url = 'http://localhost:9999'
+  const url = 'http://localhost:9999'
 
 // const url = 'http://ztt-gateway:9999'
 const localUrl = 'http://localhost:8089'

--
Gitblit v1.9.3