From 392f9468875a8721c17c4e15c288333017cac4a1 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 16 七月 2022 15:11:44 +0800
Subject: [PATCH] 1.修改bug2.工序检验实现部分3.缺陷定义实现部分

---
 src/views/scgl/sckbg.vue |  304 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 282 insertions(+), 22 deletions(-)

diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 77bc27d..c7ca965 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -2,11 +2,11 @@
   <div>
     <div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}">
 
-      <el-tabs ref="elTabs" type="border-card" @tab-click="tabClick">
+      <el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick">
         <el-tab-pane label="鐢熶骇鍒楄〃">
           <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
             <div style="display: flex;align-items: center">
-              <div style="width: 70px">鎵爜锛�</div>
+              <div style="width: 90px">鎵弿鏉$爜锛�</div>
               <el-input
                 v-model="form.orderstepqrcode"
                 oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
@@ -163,7 +163,7 @@
                   :value="item.code"
                 />
               </el-select>
-              <div style="width: 70px;margin-left: 20px">鎵爜锛�</div>
+              <div style="width: 90px;margin-left: 20px">鎵弿鏉$爜锛�</div>
               <el-input
                 v-model="WXform.orderstepqrcode"
                 oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
@@ -303,7 +303,193 @@
             @pagination="getMesOrderStepSearch"
           />
         </el-tab-pane>
+        <el-tab-pane label="宸ュ簭妫�楠�">
+          <div style="margin-left: 10px;margin-top:10px;display: flex;flex-direction: column">
+            <div style="margin-bottom: 10px;font-size: 14px">
+              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />鎵爜淇℃伅
+            </div>
+            <div style="display: flex;align-items: center">
+              <div style="width: 90px">鎵弿鏉$爜锛�</div>
+              <el-input
+                v-model="GXform.orderstepqrcode"
+                oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
+                name="GXproduceCode"
+                style="width: 300px"
+                @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
+              />
+            </div>
+            <!--        鍏」淇℃伅      -->
+            <div style="display:flex;margin-top: 10px;align-items: center">
+              <div style="display: flex;">
+                <div style="display: flex;margin-right: 50px">
+                  <div style="width: 90px">宸ュ崟缂栫爜锛�</div>
+                  <div style="width: 100px">PX00120012312</div>
+                </div>
+                <div style="display: flex;">
+                  <div style="width: 90px">浜у搧缂栫爜锛�</div>
+                  <div style="width: 100px">123-446-789</div>
+                </div>
+              </div>
+              <div style="display: flex;margin-left: 30px;">
+                <div style="display: flex;margin-right: 50px">
+                  <div style="width: 90px">浜у搧鍚嶇О锛�</div>
+                  <div style="width: 100px">PX00120012312</div>
+                </div>
+                <div style="display: flex;">
+                  <div style="width: 90px">浜у搧瑙勬牸锛�</div>
+                  <div style="width: 100px">123-446-789</div>
+                </div>
+              </div>
+              <div style=" display: flex;margin-left: 30px;">
+                <div style="display: flex;margin-right: 50px">
+                  <div style="width: 90px">宸ュ簭缂栫爜锛�</div>
+                  <div>PX00120012312</div>
+                </div>
+                <div style="display: flex;">
+                  <div style="width: 90px">宸ュ簭鍚嶇О锛�</div>
+                  <div>123-446-789</div>
+                </div>
+              </div>
+            </div>
+            <div style="margin: 10px 0;font-size: 14px">
+              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />妫�楠屾爣鍑嗕俊鎭�
+            </div>
+            <div style="display: flex;align-items: center">
+              <div style="width: 90px">妫�楠屾爣鍑嗭細</div>
+              <el-select
+                v-model="dialogForm.aaa"
+                style="width: 200px;"
+                placeholder="璇烽�夋嫨"
+                filterable
+              >
+                <el-option
+                  v-for="item in ARR"
+                  :key="item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
+              <div style="width: 90px;margin-left: 50px;">妫�楠屼汉鍛橈細</div>
+              <el-select
+                v-model="dialogForm.aaa"
+                style="width: 200px;"
+                placeholder="璇烽�夋嫨"
+                filterable
+              >
+                <el-option
+                  v-for="item in ARR"
+                  :key="item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
+            </div>
+            <div style="margin: 10px 0;font-size: 14px">
+              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />妫�楠岄」淇℃伅
+            </div>
+            <div>
+              <el-button type="primary" @click="add">鏂板</el-button>
+            </div>
+            <div style="margin-top: 10px">
+              <el-table
+                :data="JYTableData"
+                :height="(tableHeight-195)+'px'"
+                border
+                stripe
+                :style="{width: 100+'%',height:tableHeight+'px',}"
+                highlight-current-row
+                :header-cell-style="this.$headerCellStyle"
+                :cell-style="this.$cellStyle"
+                @sort-change="JYsortChange"
+              >
+                <el-table-column
+                  prop="RowNum"
+                  label="搴忓彿"
+                />
+                <!--                <el-table-column-->
+                <!--                  prop="bm"-->
+                <!--                  label="妫�楠岄」鐩紪鐮�"-->
+                <!--                  sortable="custom"-->
+                <!--                />-->
+                <el-table-column
+                  prop="mc"
+                  sortable="custom"
+                  label="妫�楠岄」鐩悕绉�"
+                >
+                  <!--                  <template slot-scope="{row}">-->
+                  <!--                    <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="璇疯緭鍏�" />-->
+                  <!--                    <div v-else> {{ row.group_code }}</div>-->
+                  <!--                  </template>-->
+                </el-table-column>
+                <el-table-column
+                  prop="ms"
+                  label="妫�楠屾爣鍑嗘弿杩�"
+                  sortable="custom"
+                >
+                  <!--                  <template slot-scope="{row}">-->
+                  <!--                    <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="璇疯緭鍏�" />-->
+                  <!--                    <div v-else> {{ row.group_code }}</div>-->
+                  <!--                  </template>-->
+                </el-table-column>
+                <el-table-column
+                  prop="jg"
+                  label="妫�楠岀粨鏋�"
+                  sortable="custom"
+                >
+                  <template slot-scope="{row}">
+                    <div style="justify-content: flex-start ;">
+                      <el-radio v-model="radio" label="1">澶囬�夐」</el-radio>
+                      <el-radio v-model="radio" label="2">澶囬�夐」</el-radio>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  label="鎿嶄綔"
+                >
+                  <template slot-scope="{row}">
+                    <div class="operationClass">
+                      <el-button v-if="row.isVisible===0" type="text" @click="del(row)">鍒犻櫎</el-button>
+                      <el-button v-if="row.isVisible===1" type="text" @click="confirm(row)">纭</el-button>
+                      <el-button v-if="row.isVisible===1" type="text" @click="cancel(row)">鍙栨秷</el-button>
+                    </div>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <!--   妫�楠岀粨鏋�   鍜�  妫�楠屽娉�      -->
+            <div style="display: flex;margin-top: 20px;align-items: center">
 
+              <div style="display: flex;margin-right: 50px;align-items: center">
+                <div style="width: 90px">妫�楠岀粨鏋滐細</div>
+                <el-select
+                  v-model="dialogForm.aaa"
+                  style="width: 200px;"
+                  placeholder="璇烽�夋嫨"
+                  filterable
+                >
+                  <el-option
+                    v-for="item in ARR"
+                    :key="item.code"
+                    :label="item.name"
+                    :value="item.code"
+                  />
+                </el-select>
+              </div>
+              <div style="display: flex;">
+                <div style="width: 90px">妫�楠屽娉細</div>
+                <!--                <el-input v-model="row.group_code" placeholder="璇疯緭鍏�" />-->
+              </div>
+
+            </div>
+
+            <div style="display: flex;margin: 20px 0;align-items: center">
+              <el-button type="primary">棣栨淇濆瓨</el-button>
+              <el-button type="primary" style="margin-left: 50px">宸℃淇濆瓨</el-button>
+              <el-button type="primary" style="margin-left: 50px">瀹屽伐妫�淇濆瓨</el-button>
+              <el-button type="info" style="margin-left: 50px">鍙栨秷</el-button>
+            </div>
+          </div>
+        </el-tab-pane>
       </el-tabs>
 
     </div>
@@ -649,8 +835,6 @@
 
 <script>
 import Pagination from '@/components/Pagination'
-import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
-import { getCookie } from '@/utils/auth'
 import $ from 'jquery'
 import {
   MesOrderGroupSelectUser,
@@ -667,8 +851,8 @@
   SavaMesOrderStepStart,
   SavaMesOrderStepReport
 } from '@/api/scgl'
-import { urlAddRandomNo, webapp_ws_ajax_run } from '@/utils/grwebapp'
-import { MesOrderPrintSearch1 } from '@/api/utils'
+import { urlAddRandomNo, webapp_urlprotocol_startup, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
+import { UserGroupDelete } from '@/api/jcsz'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -712,9 +896,8 @@
       total: 10,
       tableData: [],
       WXform: { // 澶栧崗琛ㄥ崟
-        // PO202206280001_4;Step01
         orderstepqrcode: '', // 鎵弿鐨勪簩缁寸爜淇℃伅
-        prop: 'wo_code', // 鎺掑簭瀛楁
+        prop: 'wo_code', // 鎺掑簭瀛楁z
         order: 'asc', // 鎺掑簭瀛楁
         page: 1, // 绗嚑椤�
         rows: 20 // 姣忛〉澶氬皯鏉�
@@ -774,7 +957,6 @@
       UserTotal: 0,
       Userform: {},
       userIsSave: false, // 姝や汉鍛樻槸鍚﹀彲淇濇寔
-      // operation: '',
       dialogFormRules: {
         outuser: [
           { required: true, message: '璇烽�夋嫨鍙戞枡浜哄憳', trigger: ['blur', 'change'] }
@@ -806,8 +988,19 @@
         startqty: [
           { required: true, message: '璇疯緭鍏ユ姤宸ユ暟閲�', trigger: ['blur', 'change'] }
         ]
-      }
-
+      },
+      activeName: '',
+      GXform: { // 宸ュ簭
+        orderstepqrcode: '' // 鎵弿鐨勪簩缁寸爜淇℃伅
+        // prop: 'wo_code', // 鎺掑簭瀛楁z
+        // order: 'asc', // 鎺掑簭瀛楁
+        // page: 1, // 绗嚑椤�
+        // rows: 20 // 姣忛〉澶氬皯鏉�
+      },
+      JYTableData: [
+        { RowNum: 1, bm: '001', mc: '灏哄', ms: '鏃�', jg: '鎴戞槸缁撴灉', isVisible: 0 }
+      ], // 妫�楠岄」淇℃伅琛ㄦ牸
+      radio: ''
     }
   },
   created() {
@@ -821,6 +1014,8 @@
     this.$nextTick(() => {
       $("input[name='produceCode']")[0].focus()
     })
+    // webapp_urlprotocol_startup()
+    webapp_ws_autoupdate(true)
   },
   methods: {
     async getMesOrderStepSearch() {
@@ -877,14 +1072,19 @@
         this.$nextTick(() => {
           this.getMesOrderStepSearch()
           $("input[name='produceCode']")[0].focus()
-          // this.WXform.orderstepqrcode = ''
+          this.WXform.orderstepqrcode = ''
         })
       }
       if (this.$refs.elTabs.currentName === '1') {
         this.$nextTick(() => {
           this.getMesOrderWxStepSearch()
           $("input[name='WXproduceCode']")[0].focus()
-          // this.form.orderstepqrcode = ''
+          this.form.orderstepqrcode = ''
+        })
+      }
+      if (this.$refs.elTabs.currentName === '2') {
+        this.$nextTick(() => {
+          $("input[name='GXproduceCode']")[0].focus()
         })
       }
     },
@@ -897,12 +1097,12 @@
       // 鏀舵枡锛歝ode="200"  count=3
       // 璧板垪琛ㄥ舰寮� code="200"  count=4
       if (belong === 'produceCode') {
+        const orderstepqrcode = this.form.orderstepqrcode
         const data = {
           OperType: 'ZZ',
-          orderstepqrcode: this.form.orderstepqrcode,
+          orderstepqrcode: orderstepqrcode,
           SelectType: ''
         }
-        console.log(this.form.orderstepqrcode, 21)
         const res = await MesOrderStepStart(data)
         if (res.code === '200' && res.count === 0) {
           await this.ZZstart(res.data)
@@ -912,9 +1112,10 @@
         }
       }
       if (belong === 'WXproduceCode') {
+        const orderstepqrcode = this.WXform.orderstepqrcode
         const data = {
           OperType: 'WX',
-          orderstepqrcode: this.WXform.orderstepqrcode,
+          orderstepqrcode: orderstepqrcode,
           SelectType: this.WXSelected// OUT銆両N
         }
         const res = await MesOrderStepStart(data)
@@ -924,6 +1125,10 @@
         if (res.code === '200' && res.count === 3) {
           await this.WXback(res.data)
         }
+      }
+
+      if (belong === 'GXproduceCode') {
+        console.log('GXproduceCode')
       }
     },
     // 鏌ヨ
@@ -1245,12 +1450,12 @@
               inuser: this.dialogForm.inuser, // 鍙戞枡浜哄憳
               taskqty: this.dialogForm.planqty, // 浠诲姟鏁伴噺
               sqty: this.dialogForm.sqty, // 鏀舵枡鏁伴噺
-              ngqty: this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
+              ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
               badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
             }
             SavaMesOrderStepIn(data).then(res => {
               if (res.code === '200') {
-                // this.WXprint()
+                this.WXprint()
                 this.$message.success('鏀舵枡鎴愬姛锛�')
                 this.dialogVisible = false
                 this.tabClick()
@@ -1272,7 +1477,6 @@
             }
             SavaMesOrderStepStart(data).then(res => {
               if (res.code === '200') {
-                // this.WXprint()
                 this.$message.success('寮�宸ユ垚鍔燂紒')
                 this.dialogVisible = false
                 this.tabClick()
@@ -1310,12 +1514,12 @@
               startqty: this.dialogForm.reportqty, // 寮�宸ユ暟閲�
               // reportqty: this.dialogForm.reportqty, // 鎶ュ伐鏁伴噺
               reportqty: this.dialogForm.startqty, // 鎶ュ伐鏁伴噺
-              ngqty: this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
+              ngqty: this.dialogForm.noputqty === '' ? 0 : this.dialogForm.noputqty, // 涓嶈壇鏁伴噺
               badcode: this.dialogForm.badcode.length < 1 ? '' : this.dialogForm.badcode.join(';')// 涓嶈壇鍘熷洜
             }
             SavaMesOrderStepReport(data).then(res => {
               if (res.code === '200') {
-                // this.ZZprint()
+                this.ZZprint()
                 this.$message.success('鎶ュ伐鎴愬姛锛�')
                 this.dialogVisible = false
                 this.tabClick()
@@ -1377,6 +1581,62 @@
         this.mainHeight = window.innerHeight - 250
         this.tableHeight = this.mainHeight - 80
       })
+    },
+    /*
+  *妫�楠岄」淇℃伅
+  * */
+    JYsortChange({ column, prop, order }) {
+      if (order === 'descending') {
+        order = 'desc'
+      } else if (order === 'ascending') {
+        order = 'asc'
+      } else {
+        order = 'desc'
+      }
+      this.GXform.order = order
+      this.GXform.prop = prop
+      // this.getOrganizationSearch()
+    },
+    // 鑾峰彇宸ュ簭鍒楄〃
+    // getList(){
+    //
+    // },
+    //  鏂板
+    add() {
+      // this.JYTableData.forEach(item => {
+      //   item.isVisible = 0
+      // })
+
+      let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+      number = number === 0 ? (10 + Math.random()) : number
+
+      // const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number }
+      // this.JYTableData.unshift(data)
+    },
+    // 鍒犻櫎
+    del() {
+      this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        // UserGroupDelete({ UserGrupCode: row.group_code }).then(res => {
+        //   if (res.code === '200') {
+        //     this.$message.success('鍒犻櫎鎴愬姛!')
+        //     this.getUserGroupSearch()
+        //   }
+        // })
+      }).catch(() => {
+        this.$message.info('宸插彇娑堝垹闄�')
+      })
+    },
+    //  纭
+    confirm() {
+
+    },
+    //  鍙栨秷
+    cancel() {
+
     }
   }
 }

--
Gitblit v1.9.3