From ff76b3ed3494474e9301c49cf635f1553d49ecc5 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 17 六月 2023 14:58:03 +0800
Subject: [PATCH] 1.生产管理、报表管理引入分车间概念

---
 src/views/qualityManager/processCheckItem.vue |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/src/views/qualityManager/processCheckItem.vue b/src/views/qualityManager/processCheckItem.vue
index b85c0cd..b65b5a0 100644
--- a/src/views/qualityManager/processCheckItem.vue
+++ b/src/views/qualityManager/processCheckItem.vue
@@ -119,6 +119,21 @@
         <el-form-item label="椤圭洰鍚嶇О" prop="checkitemname">
           <el-input v-model="dialogForm.checkitemname" style="width: 200px" />
         </el-form-item>
+        <el-form-item label="鎵�灞炶溅闂�" prop="workshopcode">
+          <el-select
+            v-model="dialogForm.workshopcode"
+            filterable
+            style="width: 200px"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in WorkShopArr"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="椤圭洰鎻忚堪" prop="checkitemdescr">
           <el-input v-model="dialogForm.checkitemdescr" type="textarea" style="width: 200px" />
         </el-form-item>
@@ -146,6 +161,7 @@
 import elDragDialog from '@/directive/el-drag-dialog'
 import waves from '@/directive/waves'
 import TableColumnSettings from '@/components/TableColumnSettings'
+import { WorkShopSelect } from '@/api/deviceManager'
 
 export default {
   name: 'Xxxx',
@@ -192,11 +208,30 @@
           sortable: true
         },
         {
+          minWidth: 110,
+          width: false,
+          prop: 'org_code',
+          label: '鎵�灞炶溅闂寸紪鐮�',
+          id: 5,
+          show: false,
+          fixed: false,
+          sortable: true
+        }, {
+          minWidth: 110,
+          width: false,
+          prop: 'org_name',
+          label: '鎵�灞炶溅闂�',
+          id: 6,
+          show: true,
+          fixed: false,
+          sortable: true
+        },
+        {
           minWidth: 330,
           width: false,
           prop: 'descr',
           label: '鏍囧噯鎻忚堪',
-          id: 5,
+          id: 7,
           show: true,
           fixed: false,
           sortable: true
@@ -206,7 +241,7 @@
           width: false,
           prop: 'lm_user',
           label: '鍒涘缓浜哄憳',
-          id: 6,
+          id: 8,
           show: true,
           fixed: false,
           sortable: true
@@ -216,7 +251,7 @@
           width: false,
           prop: 'lm_date',
           label: '鍒涘缓鏃堕棿',
-          id: 7,
+          id: 9,
           show: true,
           fixed: false,
           sortable: true
@@ -237,18 +272,28 @@
         ],
         checkitemname: [
           { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
+        ],
+        workshopcode: [
+          { required: true, message: '璇烽�夋嫨鎵�灞炶溅闂�', trigger: ['blur', 'change'] }
         ]
-      }
+      },
+      WorkShopArr: [] // 鎵�灞炶溅闂存暟缁�
     }
   },
   created() {
     this.getStepCheckItemSearch()
+    this.getWorkShopSelect()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
+    // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
+    async getWorkShopSelect() {
+      const { data: res } = await WorkShopSelect()
+      this.WorkShopArr = res
+    },
     tableColumnUpdate(val, isCopyTrue) {
       if (isCopyTrue) {
         this.tableColumnSettingsArray = val
@@ -302,6 +347,7 @@
       this.$nextTick(() => {
         this.dialogForm.checkitemcode = row.code
         this.dialogForm.checkitemname = row.name
+        this.dialogForm.workshopcode = row.org_code
         this.dialogForm.checkitemdescr = row.descr
       })
     },
@@ -330,6 +376,7 @@
       this.dialogForm.checkitemcode = ''
       this.dialogForm.checkitemname = ''
       this.dialogForm.checkitemdescr = ''
+      this.dialogForm.workshopcode = ''
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -345,6 +392,7 @@
             checkitemcode: this.dialogForm.checkitemcode,
             checkitemname: this.dialogForm.checkitemname,
             checkitemdescr: this.dialogForm.checkitemdescr,
+            wkshopcode: this.dialogForm.workshopcode,
             OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
           AddUpdateStepCheckItem(data).then(res => {

--
Gitblit v1.9.3