From bd3410da8a13682ec0bc888539dc35209a2196ba Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 14 七月 2022 16:10:58 +0800
Subject: [PATCH] 1.生产开报工页面开发

---
 src/views/scgl/gd.vue |   39 +++++++++++++++++++++++++++++++++------
 1 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 0710533..f1325f4 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -424,10 +424,11 @@
       <el-dialog
         title="宸ュ簭"
         :visible.sync="dialogVisibleSearch"
-        width="540px"
-        top="25vh"
+        width="840px"
+        top="20vh"
         class="dialogVisibleSearch"
         append-to-body
+        :close-on-click-modal="false"
       >
         <el-table
           :data="searchTableData"
@@ -470,7 +471,8 @@
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
           <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button v-else type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -563,6 +565,9 @@
 import { WorkShopSelect } from '@/api/sbgl'
 import { PartSelect, PartSelectRpute } from '@/api/zzmx'
 import { handleDatetime } from '@/utils/global'
+import { getCookie } from '@/utils/auth'
+import { MesOrderPrintSearch1 } from '@/api/utils'
+import { urlAddRandomNo, webapp_ws_ajax_run } from '@/utils/grwebapp'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -787,7 +792,7 @@
       this.dialogForm.wkshopcode = ''
     },
     // 宸ヨ壓璺嚎鍊兼敼鍙�
-    async   routecodeChange(val) {
+    async routecodeChange(val) {
       const data = {
         partcode: this.dialogForm.partcode,
         routecode: this.dialogForm.routecode
@@ -798,7 +803,7 @@
       this.dialogForm.wkshopcode = ''
     },
     // 宸ュ簭浠诲姟
-    async  check(row) {
+    async check(row) {
       this.dialogVisibleTask = true
       const { data: res } = await SearchWorkStep({ wo_code: row.wo_code })
       this.taskTableData = res
@@ -956,9 +961,11 @@
             orderlev: this.dialogForm.orderlev, // 宸ュ崟绛夌骇
             OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-          console.log(data, 1)
           AddUpdateMesOrder(data).then(res => {
             if (res.code === '200') {
+              if (this.operation !== 'add') {
+                // this.sendPrint()
+              }
               this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
               this.dialogVisible = false
               this.getMesOrderSearch()
@@ -968,6 +975,25 @@
           })
         }
       })
+    },
+    // 娲惧彂鎵撳嵃
+    async sendPrint() {
+      const data = {
+        username: getCookie('admin'),
+        mesordercode: this.dialogForm.mesordercode
+      }
+      const res = await MesOrderPrintSearch1(data)
+      if (res.code === '200') {
+        // 鍙傛暟鍏蜂綋璇存槑璇峰弬鑰冨府鍔╂枃妗d腑鐨勨�淲EB鎶ヨ〃(B/S鎶ヨ〃)->WEB鎶ヨ〃瀹㈡埛绔�->鍚姩鍙傛暟璇存槑鈥濋儴鍒�
+        var args = {
+          type: 'print', // preview  print
+          showOptionDlg: false, // 濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
+          report: urlAddRandomNo('./static/grf/浜у搧娴佷紶鍗旳4.grf'),
+          data: res.data
+        }
+
+        webapp_ws_ajax_run(args)
+      }
     },
     // 鑾峰彇椤甸潰楂樺害
     getHeight() {
@@ -1048,6 +1074,7 @@
 ::v-deep .el-dialog__body {
   padding: 20px 100px !important;
 }
+
 .dialogVisibleSearch ::v-deep .el-dialog__body {
   padding: 20px 20px !important;
 }

--
Gitblit v1.9.3