From 24a3cbbc31b8fbff1c6a3c9b9e4360dc82a05f4e Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 06 五月 2023 07:56:01 +0800
Subject: [PATCH] 1.上云路由整合

---
 src/views/reportManager/logisticsCheck.vue |  349 +++++++++++++++++++++++++++++----------------------------
 1 files changed, 179 insertions(+), 170 deletions(-)

diff --git a/src/views/reportManager/logisticsCheck.vue b/src/views/reportManager/logisticsCheck.vue
index 8855b95..8898259 100644
--- a/src/views/reportManager/logisticsCheck.vue
+++ b/src/views/reportManager/logisticsCheck.vue
@@ -17,7 +17,7 @@
             <el-form-item label="妫�楠岀被鍨�" style=" display: flex;">
               <!--              <el-input v-model="form.checktypecode" placeholder="璇疯緭鍏�" style="width: 200px" />-->
 
-              <el-select v-model="form.style" style="width: 200px" placeholder="璇烽�夋嫨">
+              <el-select v-model="form.checktypecode" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in checktypeArr"
                   :key="item.code"
@@ -120,16 +120,37 @@
             fixed
             label="搴忓彿"
           />
+          <!--          <el-table-column-->
+          <!--            prop="check_type"-->
+          <!--            label="妫�楠岀被鍨�"-->
+          <!--            width="160"-->
+          <!--            sortable="custom"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div>{{ checktypeArr.find(i=>i.code===row.check_type).name }}</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column> -->
           <el-table-column
-            prop="wo_code"
+            prop="check_typename"
             label="妫�楠岀被鍨�"
-            width="160"
+            width="110"
             sortable="custom"
           />
           <el-table-column
+            prop="sampmethod"
+            label="鎶芥牱鏂瑰紡"
+            width="110"
+            sortable="custom"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.sampmethod==='FIXED'">鍥烘椂鎶芥</div>
+              <div v-if="row.sampmethod==='SCARE'">姣斾緥鎶芥</div>
+            </template>
+          </el-table-column>
+          <el-table-column
             prop="partcode"
             label="鐗╂枡缂栫爜"
-            width="160"
+            width="110"
             show-tooltip-when-overflow
             sortable="custom"
           />
@@ -142,7 +163,7 @@
           />
           <el-table-column
             prop="partspec"
-            label="浜у搧瑙勬牸"
+            label="瑙勬牸鍨嬪彿"
             width="120"
             show-tooltip-when-overflow
             sortable="custom"
@@ -158,67 +179,80 @@
             width="110"
             show-tooltip-when-overflow
             sortable="custom"
-          />
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.hbatchno">{{ row.hbatchno }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="hbarcode"
             label="鏉$爜缂栧彿"
-            width="110"
+            width="160"
             show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="customer_name"
             label="寰�鏉ュ崟浣�"
-            width="160"
+            min-width="160"
             show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
-            prop="plan_qty"
-            label="浠诲姟鏁伴噺"
-            width="110"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="repair_qty"
-            label="缁翠慨鏁伴噺"
-            width="110"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="bad_qty"
-            label="鎶ュ簾鏁伴噺"
-            width="110"
-            sortable="custom"
-          />
-          <el-table-column
-            prop="defect_code"
-            label="缂洪櫡浠g爜"
-            width="110"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="defect_name"
-            label="鎵规鏉$爜"
-            width="110"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="lm_user"
-            label="妫�楠屼汉鍛�"
+            prop="username"
+            label="璐ㄦ浜哄憳"
             width="110"
             sortable="custom"
           />
           <el-table-column
             prop="lm_date"
-            label="妫�楠屾椂闂�"
+            label="璐ㄦ鏃堕棿"
             width="160"
             sortable="custom"
           />
+          <el-table-column
+            prop="check_result"
+            label="妫�楠岀粨鏋�"
+            width="110"
+            sortable="custom"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.check_result==='OK'" style="display: flex;align-items: center">
+                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
+                鍚堟牸
+              </div>
+              <div v-if="row.check_result==='NG'" style="display: flex;align-items: center">
+                <i class="el-icon-error" style="color: red;margin-right: 2px" />
+                涓嶅悎鏍�
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            label="妫�楠屾槑缁�"
+            width="120"
+            fixed="right"
+          >
+            <template slot-scope="{row}">
+              <div class="operationClass">
+                <el-tooltip class="item" effect="dark" content="鏌ョ湅" placement="top">
+                  <i
+                    class="el-icon-view"
+                    :style="{color:$store.state.settings.theme}"
+                    style="margin-right:15px;cursor: pointer;"
+                    @click="edit('edit',row)"
+                  />
+                </el-tooltip>
+                <!--                <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">-->
+                <!--                  <i class="el-icon-edit-outline" @click="edit('edit',row)" />-->
+                <!--                </el-tooltip>-->
+                <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">-->
+                <!--                  <i class="el-icon-delete" @click="del(row)" />-->
+                <!--                </el-tooltip>-->
+              </div>
+            </template>
+          </el-table-column>
 
         </el-table>
       </div>
@@ -236,7 +270,7 @@
 
     <el-dialog
       v-el-drag-dialog
-      :title="operation==='add'?'鏂板':'浜哄憳鏄庣粏'"
+      :title="operation==='add'?'鏂板':'妫�楠屾槑缁�'"
       :visible.sync="dialogVisible"
       width="800px"
       :close-on-click-modal="false"
@@ -244,16 +278,89 @@
       @closed="handleClose"
       @close="handleClose"
     >
-      <div style="height: 300px;width: 100%;background-color: aliceblue;padding:20px">
-        <el-tag
-          v-for="tag in tagArr"
-          :key="tag.name"
-          type="success"
-          style="margin-right: 15px;min-width: 80px;text-align: center"
+
+      <el-table
+        ref="tableDataRef2"
+        class="tableFixed"
+        :data="dialogTableData"
+        height="500"
+        style="height:500px"
+        border
+        :row-class-name="tableRowClassName"
+        highlight-current-row
+        :header-cell-style="this.$headerCellStyle"
+        :cell-style="this.$cellStyle"
+      >
+        <el-table-column
+          type="index"
+          width="50"
+          fixed
+          label="搴忓彿"
+        />
+
+        <el-table-column
+          prop="stepcheckitem_code"
+          width="150"
+          label="妫�楠岄」鐩�"
         >
-          {{ tag }}
-        </el-tag>
-      </div>
+          <template slot-scope="{row}">
+            <el-select
+              v-if="row.isVisible===1"
+              v-model="row.stepcheckitem_code"
+              filterable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%;"
+            >
+              <!--              @change="val=>tableChange(val,row)"-->
+              <el-option
+                v-for="item in CheckItemSelectArr"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              />
+            </el-select>
+            <div v-else>{{
+              CheckItemSelectAllArr.find(i => i.code === row.stepcheckitem_code).name
+            }}
+            </div>
+          </template>
+        </el-table-column>
+
+        <el-table-column
+          prop="stepcheckitem_desc"
+          label="鏍囧噯瑕佹眰"
+          show-tooltip-when-overflow
+        >
+          <template slot-scope="{row}">
+            <el-input
+              v-if="row.isVisible===1"
+              v-model="row.stepcheckitem_desc"
+              placeholder="璇疯緭鍏�"
+            />
+            <div v-else>{{ row.stepcheckitem_desc ? row.stepcheckitem_desc : '/' }}</div>
+          </template>
+        </el-table-column>
+
+        <!--        杩欓噷鍐檉or寰幆閬嶅巻璇彞-->
+
+        <el-table-column
+          v-if="operation!=='check'"
+          label="鎿嶄綔"
+          width="120"
+          fixed="right"
+        >
+          <template slot-scope="{row}">
+            <div class="operationClass">
+              <el-button v-if="row.isVisible===1" v-waves type="text" @click="saveZjlbRow(row)">纭</el-button>
+              <el-button v-if="row.isVisible===1&&isCancel" v-waves type="text" @click="cancelZjlbRow(row)">鍙栨秷
+              </el-button>
+              <el-button v-if="row.isVisible!==1" v-waves type="text" @click="editZjlbRow(row)">缂栬緫</el-button>
+              <el-button v-if="row.isVisible!==1" v-waves type="text" @click="delZjlbRow(row)">鍒犻櫎</el-button>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
           <el-button v-waves @click="dialogVisible=false">杩� 鍥�</el-button>
@@ -263,30 +370,20 @@
       </span>
     </el-dialog>
 
-    <!--瀵煎叆缁勪欢-->
-    <import-picker
-      ref="importPickerFunc"
-      class="importPickerClass"
-      :shows.sync="shows"
-      :title="title_value"
-      :colos="colos"
-      :code="code"
-    />
-
   </div>
 </template>
 
 <script>
 import Pagination from '@/components/Pagination'
-import { getCookie } from '@/utils/auth'
+
 import ImportPicker from '@/components/ImportPicker'
-import { handleDatetime, validateCode } from '@/utils/global'
+import { handleDatetime } from '@/utils/global'
 import {
-  GroupSalaryReportSearchUser, MaintenanceDetailsReportExcelSearch, LogisticsCheckSearch
+  MaintenanceDetailsReportExcelSearch, LogisticsCheckSearch
 } from '@/api/reportManager'
 import elDragDialog from '@/directive/el-drag-dialog'
 import waves from '@/directive/waves'
-import { MesOrderStepReportSelectUserGroup } from '@/api/produceManager'
+import { PurchSupplierSelect } from '@/api/basicInfo'
 
 export default {
   name: 'Zzjg',
@@ -327,40 +424,13 @@
       total: 10,
       tableData: [],
       dialogVisible: false,
-      tagArr: [], //
-      dialogForm: {
-        OrgType: '',
-        OrgCode: '',
-        OrgName: '',
-        SupUnit: ''// 涓婄骇鍗曚綅
-      },
+
       operation: '',
-      dialogFormRules: {
-        OrgType: [
-          { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
-        ],
-        OrgCode: [
-          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
-        ],
-        OrgName: [
-          { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
-        ]
-
-      },
-
-      title_value: '鏁版嵁瀵煎叆 / 鐐规閮ㄤ綅',
-      code: '4',
-      shows: false
+      dialogTableData: []
 
     }
   },
-  watch: {
-    shows() {
-      if (!this.shows) {
-        this.getLogisticsCheckSearch()
-      }
-    }
-  },
+
   created() {
     this.handleRequest()
   },
@@ -446,14 +516,7 @@
     search() {
       this.getLogisticsCheckSearch()
     },
-    // 瀵煎叆鎸夐挳
-    upload() {
-      this.shows = true
-      this.$refs.importPickerFunc.newDataFunc()
-    },
-    colos() {
-      this.shows = false
-    },
+
     // 閲嶇疆
     reset() {
       this.form.checktypecode = ''
@@ -469,77 +532,22 @@
     },
 
     // 鏂板鎸夐挳
-    add(operation) {
-      this.operation = operation
-      this.dialogVisible = true
-    },
+    // add(operation) {
+    //   this.operation = operation
+    //   this.dialogVisible = true
+    // },
     // 淇敼鎸夐挳
     async edit(operation, row) {
       this.operation = operation
       this.dialogVisible = true
-
-      const res = await GroupSalaryReportSearchUser({ id: row.id })
-      this.tagArr = res.data.map(r => r.checkuser)
-      // this.tagArr = ['妤兼潕淇�', '寮犱笁', '鏉庡洓']
-      // this.$nextTick(() => {
-      //   this.dialogForm.OrgCode = row.org_code
-      //   this.dialogForm.OrgName = row.org_name
-      //   this.dialogForm.SupUnit = row.parent_id
-      // })
-    },
-    // 鍒犻櫎鎸夐挳
-    async del(row) {
-      // this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
-      //   confirmButtonText: '纭畾',
-      //   cancelButtonText: '鍙栨秷',
-      //   type: 'warning'
-      // }).then(() => {
-      //   DeleteOrganization({ orgid: row.code }).then(res => {
-      //     if (res.code === '200') {
-      //       this.$message.success('鍒犻櫎鎴愬姛!')
-      //       if (this.form.page > 1 && this.tableData.length === 1) {
-      //         this.form.page--
-      //       }
-      //       this.getLogisticsCheckSearch()
-      //     }
-      //   })
-      // }).catch(() => {
-      //   this.$message.info('宸插彇娑堝垹闄�')
-      // })
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
     handleClose() {
-      this.dialogForm.OrgType = ''
-      this.dialogForm.OrgCode = ''
-      this.dialogForm.OrgName = ''
-      this.dialogForm.SupUnit = ''
-      this.$refs.dialogForm.clearValidate()
+
     },
     // 瀵硅瘽妗嗗彇娑�
     dialogVisibleCancel() {
       this.dialogVisible = false
-    },
-    // 瀵硅瘽妗嗙‘璁�
-    dialogVisibleConfirm() {
-      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')
-          }
-          // AddUpdateOrganization(data).then(res => {
-          //   if (res.code === '200') {
-          //     this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
-          //     this.dialogVisible = false
-          //     this.getLogisticsCheckSearch()
-          //   } else {
-          //     this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
-          //   }
-          // })
-        }
-      })
     },
     // 鑾峰彇椤甸潰楂樺害
     getHeight() {
@@ -677,11 +685,12 @@
   justify-content: center;
 }
 
-.tableFixed{
-  ::v-deep .el-table__fixed-right{
+.tableFixed {
+  ::v-deep .el-table__fixed-right {
     height: 100% !important;
   }
-  ::v-deep .el-table__fixed{
+
+  ::v-deep .el-table__fixed {
     height: 100% !important;
   }
 }

--
Gitblit v1.9.3