From b8b16d90fd13bcad5881a4562b5bbe96e576bd6b Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 03 八月 2022 16:27:56 +0800
Subject: [PATCH] 1.解决工单手动打印大二维码问题

---
 src/views/zlgl/gxjyxm.vue |  101 +++++++++++++++++---------------------------------
 1 files changed, 35 insertions(+), 66 deletions(-)

diff --git a/src/views/zlgl/gxjyxm.vue b/src/views/zlgl/gxjyxm.vue
index c7bf002..798e448 100644
--- a/src/views/zlgl/gxjyxm.vue
+++ b/src/views/zlgl/gxjyxm.vue
@@ -11,12 +11,11 @@
         >
           <div class="elForm">
             <el-form-item label="椤圭洰缂栫爜" style=" display: flex;">
-              <el-input v-model="form.defectcode" placeholder="璇疯緭鍏�" style="width: 200px" />
+              <el-input v-model="form.itemcode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
             <el-form-item label="椤圭洰鍚嶇О" style=" display: flex;">
               <el-input v-model="form.itemname" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-
             <el-form-item label="椤圭洰鎻忚堪" style=" display: flex;">
               <el-input v-model="form.itemdescr" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
@@ -55,31 +54,18 @@
             label="搴忓彿"
           />
           <el-table-column
-            prop="org_code"
-            label="缁勭粐缂栫爜"
+            prop="code"
+            label="椤圭洰浠g爜"
             sortable="custom"
           />
           <el-table-column
-            prop="org_name"
-            label="缁勭粐鍚嶇О"
+            prop="name"
+            label="椤圭洰鍚嶇О"
             sortable="custom"
           />
           <el-table-column
-            prop="description"
-            label="缁勭粐绫诲瀷"
-            sortable="custom"
-          >
-            <template slot-scope="{row}">
-              <div v-if="row.description==='F'">宸ュ巶</div>
-              <div v-if="row.description==='D'">閮ㄩ棬</div>
-              <div v-if="row.description==='W'">杞﹂棿</div>
-              <div v-if="row.description==='K'">绉戝</div>
-              <div v-if="row.description==='L'">鐢熶骇绾�</div>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="parentorg_name"
-            label="涓婄骇鍗曚綅"
+            prop="descr"
+            label="椤圭洰鎻忚堪"
             sortable="custom"
           />
           <el-table-column
@@ -121,19 +107,20 @@
       :title="operation==='add'?'鏂板':'缂栬緫'"
       :visible.sync="dialogVisible"
       width="800px"
+      :close-on-click-modal="false"
       top="15vh"
       @closed="handleClose"
       @close="handleClose"
     >
       <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
-        <el-form-item label="椤圭洰绫诲瀷" prop="OrgCode">
-          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
+        <el-form-item label="椤圭洰缂栫爜" prop="checkitemcode">
+          <el-input v-model="dialogForm.checkitemcode" :disabled="operation!=='add'" style="width: 200px" />
         </el-form-item>
-        <el-form-item label="椤圭洰鍚嶇О" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
+        <el-form-item label="椤圭洰鍚嶇О" prop="checkitemname">
+          <el-input v-model="dialogForm.checkitemname" style="width: 200px" />
         </el-form-item>
-        <el-form-item label="椤圭洰鎻忚堪" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" />
+        <el-form-item label="椤圭洰鎻忚堪" prop="checkitemdescr">
+          <el-input v-model="dialogForm.checkitemdescr" type="textarea" style="width: 200px" />
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -148,9 +135,7 @@
 
 <script>
 import Pagination from '@/components/Pagination'
-import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
-import { getCookie } from '@/utils/auth'
-import { DedectSearch } from '@/api/zlgl'
+import { AddUpdateStepCheckItem, DeleteStepCheckItem, StepCheckItemSearch } from '@/api/zlgl'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -182,37 +167,23 @@
         page: 1, // 绗嚑椤�
         rows: 20 // 姣忛〉澶氬皯鏉�
       },
-      OrgTypeArr: [
-        { label: '宸ュ巶', value: 'F' },
-        { label: '閮ㄩ棬', value: 'D' },
-        { label: '杞﹂棿', value: 'W' },
-        { label: '绉戝', value: 'K' },
-        { label: '鐢熶骇绾�', value: 'L' }
-      ],
-
       total: 10,
       tableData: [],
       dialogVisible: false,
       dialogForm: {
-        OrgType: '',
-        OrgCode: '',
-        OrgName: '',
-        SupUnit: ''// 涓婄骇鍗曚綅
+        checkitemcode: '', // 宸ュ簭妫�楠岄」鐩紪鐮�
+        checkitemname: '', // 宸ュ簭妫�楠岄」鐩悕绉�
+        checkitemdescr: '' // 宸ュ簭妫�楠岄」鐩弿杩�
       },
       operation: '',
       dialogFormRules: {
-        OrgType: [
-          { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
-        ],
-        OrgCode: [
+        checkitemcode: [
           { required: true, validator: validateName, trigger: ['blur', 'change'] }
         ],
-        OrgName: [
+        checkitemname: [
           { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
         ]
-
       }
-
     }
   },
   created() {
@@ -250,10 +221,9 @@
     },
     // 閲嶇疆
     reset() {
-      this.form.OrgCode = ''
-      this.form.OrgName = ''
-      this.form.OrgType = ''
-      this.form.UserName = ''
+      this.form.itemcode = ''
+      this.form.itemname = ''
+      this.form.itemdescr = ''
       this.getStepCheckItemSearch()
     },
 
@@ -268,9 +238,9 @@
       this.dialogVisible = true
 
       this.$nextTick(() => {
-        this.dialogForm.OrgCode = row.org_code
-        this.dialogForm.OrgName = row.org_name
-        this.dialogForm.SupUnit = row.parent_id
+        this.dialogForm.checkitemcode = row.code
+        this.dialogForm.checkitemname = row.name
+        this.dialogForm.checkitemdescr = row.descr
       })
     },
     // 鍒犻櫎鎸夐挳
@@ -280,7 +250,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        DeleteOrganization({ orgid: row.code }).then(res => {
+        DeleteStepCheckItem({ checkitemcode: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
             this.getStepCheckItemSearch()
@@ -292,10 +262,9 @@
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
     handleClose() {
-      this.dialogForm.OrgType = ''
-      this.dialogForm.OrgCode = ''
-      this.dialogForm.OrgName = ''
-      this.dialogForm.SupUnit = ''
+      this.dialogForm.checkitemcode = ''
+      this.dialogForm.checkitemname = ''
+      this.dialogForm.checkitemdescr = ''
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -307,12 +276,12 @@
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
-            OrganCode: this.dialogForm.OrgCode,
-            OrganName: this.dialogForm.OrgName,
-            OperType: this.operation === 'add' ? 'Add' : 'Update',
-            Operator: getCookie('admin')
+            checkitemcode: this.dialogForm.checkitemcode,
+            checkitemname: this.dialogForm.checkitemname,
+            checkitemdescr: this.dialogForm.checkitemdescr,
+            OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-          AddUpdateOrganization(data).then(res => {
+          AddUpdateStepCheckItem(data).then(res => {
             if (res.code === '200') {
               this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false

--
Gitblit v1.9.3