From 1e9fa82cb2fe2c15f46bd1dd73f5c878c74b83b8 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 04 八月 2022 15:35:50 +0800
Subject: [PATCH] 1.系统多账号登录问题2.采购订单页面样式修改及数据渲染

---
 src/views/zzmx/gxdy.vue |  104 +++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 74 insertions(+), 30 deletions(-)

diff --git a/src/views/zzmx/gxdy.vue b/src/views/zzmx/gxdy.vue
index a198963..7ab483b 100644
--- a/src/views/zzmx/gxdy.vue
+++ b/src/views/zzmx/gxdy.vue
@@ -17,7 +17,13 @@
               <el-input v-model="form.stepname" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
             <el-form-item label="鍚敤鐘舵��" style=" display: flex;">
-              <el-select v-model="form.enable" :popper-append-to-body="false" style="width: 200px" placeholder="璇烽�夋嫨">
+              <el-select
+                v-model="form.enable"
+                filterable
+                :popper-append-to-body="false"
+                style="width: 200px"
+                placeholder="璇烽�夋嫨"
+              >
                 <el-option
                   v-for="item in enableArr"
                   :key="item.code"
@@ -29,6 +35,7 @@
             <el-form-item label="宸ュ簭绫诲瀷" style=" display: flex;">
               <el-select
                 v-model="form.steptypecode"
+                filterable
                 :popper-append-to-body="false"
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
@@ -54,7 +61,7 @@
       <el-divider />
       <div style="margin-left: 10px;display: flex">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
-        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>
+        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
       </div>
       <el-divider />
       <div class="elTableDiv">
@@ -77,19 +84,23 @@
             prop="RowNum"
             width="50"
             label="搴忓彿"
+            fixed
           />
           <el-table-column
             prop="stepcode"
             label="宸ュ簭缂栫爜"
+            min-width="150"
             sortable="custom"
           />
           <el-table-column
             prop="stepname"
+            min-width="150"
             label="宸ュ簭鍚嶇О"
             sortable="custom"
           />
           <el-table-column
             prop="flwtype"
+            min-width="150"
             label="宸ュ簭绫诲瀷"
             sortable="custom"
           >
@@ -102,12 +113,14 @@
           <el-table-column
             prop="descr"
             label="宸ュ簭鎻忚堪"
+            min-width="180"
             sortable="custom"
           />
           <el-table-column
             prop="enable"
             label="鍚敤鐘舵��"
             sortable="custom"
+            width="110"
           >
             <template slot-scope="{row}">
               <div v-if="row.enable==='Y'">鏄�</div>
@@ -117,37 +130,46 @@
           <el-table-column
             prop="lm_user"
             label="鍒涘缓浜哄憳"
+            width="110"
             sortable="custom"
           />
           <el-table-column
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
+            width="160"
             sortable="custom"
           />
           <el-table-column
             label="鍏宠仈宸ヤ綔绔�"
+            prop="is_eqp"
+            width="110"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <i class="el-icon-share" @click="workClick(row)" />
+                <i v-if="row.is_eqp==='Y'" class="el-icon-share" @click="workClick(row)" />
+                <i v-if="row.is_eqp==='N'" class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="workClick(row)" />
               </div>
             </template>
           </el-table-column>
           <el-table-column
             label="鍏宠仈缂洪櫡"
+            prop="is_defect"
+            width="110"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <i class="el-icon-share" @click="defectClick(row)" />
+                <i v-if="row.is_defect==='Y'" class="el-icon-share" @click="defectClick(row)" />
+                <i v-if="row.is_defect==='N'" class="el-icon-share" style="color:rgb(180 ,181, 185);" @click="defectClick(row)" />
               </div>
             </template>
           </el-table-column>
           <el-table-column
             label="鎿嶄綔"
+            fixed="right"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <el-button type="text" @click="edit('edit',row)">淇敼</el-button>
+                <el-button type="text" @click="edit('edit',row)">缂栬緫</el-button>
                 <el-button type="text" @click="del(row)">鍒犻櫎</el-button>
               </div>
             </template>
@@ -169,9 +191,9 @@
 
     <!--鏂板淇敼瀵硅瘽妗�-->
     <el-dialog
-      :title="operation==='add'?'鏂板':'淇敼'"
+      :title="operation==='add'?'鏂板':'缂栬緫'"
       :visible.sync="dialogVisible"
-      width="50%"
+      width="800px"
       :close-on-click-modal="false"
       top="15vh"
       @closed="handleClose"
@@ -179,30 +201,44 @@
     >
       <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
         <el-form-item label="宸ュ簭缂栫爜" prop="stepcode">
-          <el-input v-model="dialogForm.stepcode" :disabled="operation!=='add'" style="width: 220px" />
+          <el-input v-model="dialogForm.stepcode" :disabled="operation!=='add'" style="width: 200px" />
         </el-form-item>
         <el-form-item label="宸ュ簭鍚嶇О" prop="stepname">
-          <el-input v-model="dialogForm.stepname" style="width: 220px" />
+          <el-input v-model="dialogForm.stepname" style="width: 200px" />
         </el-form-item>
+
         <el-form-item prop="steptypecode" label="宸ュ簭绫诲瀷">
-          <el-select
+          <el-radio-group
             v-model="dialogForm.steptypecode"
-            style="width: 220px"
-            placeholder="璇烽�夋嫨"
-            :popper-append-to-body="false"
+            style="width: 200px"
           >
-            <el-option
+            <el-radio
               v-for="item in steptypeArr"
               :key="item.code"
-              :label="item.name"
               :value="item.code"
+              :label="item.name"
             />
-          </el-select>
+          </el-radio-group>
+          <!--          <el-select-->
+          <!--            v-model="dialogForm.steptypecode"-->
+          <!--            filterable-->
+          <!--            style="width: 200px"-->
+          <!--            placeholder="璇烽�夋嫨"-->
+          <!--            :popper-append-to-body="false"-->
+          <!--          >-->
+          <!--            <el-option-->
+          <!--              v-for="item in steptypeArr"-->
+          <!--              :key="item.code"-->
+          <!--              :label="item.name"-->
+          <!--              :value="item.code"-->
+          <!--            />-->
+          <!--          </el-select>-->
         </el-form-item>
         <el-form-item prop="enable" label="鍚敤鐘舵��">
           <el-select
             v-model="dialogForm.enable"
-            style="width: 220px"
+            filterable
+            style="width: 200px"
             placeholder="璇烽�夋嫨"
             :popper-append-to-body="false"
           >
@@ -215,7 +251,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="宸ュ簭鎻忚堪" prop="description">
-          <el-input v-model="dialogForm.description" type="textarea" style="width: 220px" />
+          <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" />
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -232,6 +268,7 @@
       :visible.sync="workDialogVisible"
       width="50%"
       top="15vh"
+      :fullscreen="isFullscreen"
       :close-on-click-modal="false"
       class="workDialogVisible"
       @closed="workHandleClose"
@@ -278,6 +315,7 @@
           :data="workDialogForm.workTreeArr"
           show-checkbox
           node-key="code"
+          style="height: 300px;"
           default-expand-all
           :props="workTreeDefaultProps"
           @check="checkBoxClick"
@@ -299,6 +337,7 @@
       :visible.sync="defectDialogVisible"
       width="50%"
       top="15vh"
+      :fullscreen="isFullscreen"
       :close-on-click-modal="false"
       class="defectDialogVisible"
       @closed="defectHandleClose"
@@ -319,7 +358,7 @@
           :data="defectTree"
           show-checkbox
           node-key="code"
-          style="height: 400px;"
+          style="height: 500px;"
           default-expand-all
           :props="workTreeDefaultProps"
         />
@@ -340,8 +379,6 @@
 
 <script>
 import Pagination from '@/components/Pagination'
-import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
-import { getCookie } from '@/utils/auth'
 import {
   AddUpdateStep,
   DeleteStep, SaveStepAssociationDefect,
@@ -354,7 +391,7 @@
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
-  name: 'Zzjg',
+  name: 'GXDY',
   components: {
     Pagination
   },
@@ -371,6 +408,7 @@
       }
     }
     return {
+      isFullscreen: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -400,8 +438,8 @@
         'id': '',
         'stepcode': '',
         'stepname': '',
-        'steptypecode': '',
-        'enable': '',
+        'steptypecode': '鑷埗',
+        'enable': 'Y',
         'description': '',
         'OperType': ''
       },
@@ -499,7 +537,7 @@
         this.dialogForm.id = row.id
         this.dialogForm.stepcode = row.stepcode
         this.dialogForm.stepname = row.stepname
-        this.dialogForm.steptypecode = row.flwtype
+        this.dialogForm.steptypecode = this.steptypeArr.find(item => item.code === row.flwtype).name
         this.dialogForm.description = row.descr
         this.dialogForm.enable = row.enable
       })
@@ -525,8 +563,8 @@
     handleClose() {
       this.dialogForm.stepcode = ''
       this.dialogForm.stepname = ''
-      this.dialogForm.steptypecode = ''
-      this.dialogForm.enable = ''
+      this.dialogForm.steptypecode = '鑷埗'
+      this.dialogForm.enable = 'Y'
       this.dialogForm.description = ''
       this.$refs.dialogForm.clearValidate()
     },
@@ -542,7 +580,7 @@
             id: this.dialogForm.id,
             stepcode: this.dialogForm.stepcode,
             stepname: this.dialogForm.stepname,
-            steptypecode: this.dialogForm.steptypecode,
+            steptypecode: this.steptypeArr.find(item => item.name === this.dialogForm.steptypecode).code,
             enable: this.dialogForm.enable,
             description: this.dialogForm.description,
             OperType: this.operation === 'add' ? 'Add' : 'Update'
@@ -564,6 +602,10 @@
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 250
         this.tableHeight = this.mainHeight - 100
+        // this.isFullscreen = window.innerHeight < 800
+        if (window.innerHeight < 800) {
+          this.tableHeight = this.tableHeight - 50
+        }
       })
     },
     /* 鍏宠仈宸ヤ綔绔欐ā鍧�*/
@@ -794,7 +836,7 @@
         console.log('3.绗笁绉嶆儏鍐�  鍗婂彾涓洪浂  鍏ㄥ彾涓嶄负闆�')
         console.log(obj.code, 12)
         this.workDialogForm.workGatherArr.forEach((item, index) => {
-          if (item.code === obj.code) {
+          if (item.code === checkedFatherCode) {
             this.workDialogForm.workGatherArr[index].isSelected2 = true
             this.workDialogForm.workCodeSelectedGatherArr.push(obj.code)
             this.$nextTick(() => {
@@ -851,6 +893,7 @@
       const res = await SaveStepAssociationEqp(this.workDialogForm.stepcode, data)
       if (res.code === '200') {
         this.$message.success('淇濆瓨鎴愬姛锛�')
+        await this.getStepSearch()
         this.workDialogVisible = false
       }
     },
@@ -885,7 +928,7 @@
       this.defectDialogVisible = false
     },
     // 纭
-    async  defectDialogVisibleConfirm() {
+    async defectDialogVisibleConfirm() {
       const nodeKey = this.$refs.defectTree.getCheckedKeys()
       const data = []
       this.defectTree[0].children.forEach(item => {
@@ -897,6 +940,7 @@
       const res = await SaveStepAssociationDefect(this.defectTreeCode, data)
       if (res.code === '200') {
         this.$message.success('淇濆瓨鎴愬姛锛�')
+        await this.getStepSearch()
         this.defectDialogVisible = false
       }
     }

--
Gitblit v1.9.3