From c977c9fb967a080ca56ac46b1f17ce2c57f2122e Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期四, 10 八月 2023 17:53:53 +0800
Subject: [PATCH] 	new file:   src/api/urlEnum/satisfactionSurveys.js 	modified:   src/views/CNAS/satisfactionSurveys/index.vue

---
 src/views/rawMaterials/reportForInspection/forInspectionDetail.vue |  374 +++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 348 insertions(+), 26 deletions(-)

diff --git a/src/views/rawMaterials/reportForInspection/forInspectionDetail.vue b/src/views/rawMaterials/reportForInspection/forInspectionDetail.vue
index 9729e62..28d5f75 100644
--- a/src/views/rawMaterials/reportForInspection/forInspectionDetail.vue
+++ b/src/views/rawMaterials/reportForInspection/forInspectionDetail.vue
@@ -26,14 +26,18 @@
             </div> -->
         </div>
         <div class="message">
-          <div class="message-item"><span><i class="el-icon-edit" />璇曢獙鏂规硶锛�</span></div>
+          <!-- <div class="message-item"><span><i class="el-icon-edit" />璇曢獙鏂规硶锛�</span></div> -->
           <div class="message-item">
-            <span><i class="el-icon-edit" />椤圭洰鍒嗙被锛�</span>
+            <span><i class="el-icon-edit" />妫�楠岀被鍨嬶細
+              <span v-if="inspectionDetail.type===0">鍘熸潗鏂欐楠�</span>
+              <span v-else-if="inspectionDetail.type===1">鍗婃垚鍝佹楠�</span>
+              <span v-else-if="inspectionDetail.type===2">鎴愬搧妫�楠�</span>
+            </span>
           </div>
           <div class="message-item">
-            <span><i class="el-icon-edit" />鏇存柊浜猴細</span></div>
+            <span><i class="el-icon-edit" />鐧昏浜猴細<el-tag>{{ inspectionDetail.userName }}</el-tag></span></div>
           <div class="message-item">
-            <span><i class="el-icon-edit" />鏇存柊鏃堕棿锛�</span></div>
+            <span><i class="el-icon-edit" />鐧昏鏃ユ湡锛歿{ inspectionDetail.createTime }}</span></div>
         </div>
       </div>
       <div class="card-main sample-list">
@@ -57,53 +61,58 @@
             style="width: 100%"
           >
             <el-table-column
-              prop="applicationOrdernumber"
-              label="鐢宠鍗曞彿"
+              prop="materialNum"
+              label="鐗╂枡缂栧彿"
               min-width="200"
             />
             <el-table-column
-              prop="typeofInspection"
-              label="妫�楠岀被鍨�"
+              prop="materialName"
+              label="鐗╂枡鍚嶇О"
               min-width="200"
             />
             <el-table-column
               prop="objectofInspection"
-              label="妫�楠屽璞�"
+              label="鐗╂枡灞炴��"
               min-width="200"
             />
             <el-table-column
-              prop="palceofObject"
-              label="瀵硅薄浣嶇疆"
+              prop="materialBatch"
+              label="鎵规"
               min-width="200"
             />
             <el-table-column
-              prop="name"
-              label="瀵硅薄鍚嶇О"
+              prop="materialReelNumber"
+              label="鐩樺彿"
               min-width="200"
             />
             <el-table-column
-              prop="date"
-              label="鐧昏鏃ユ湡"
+              prop="specificationsSerialNumber"
+              label="鍨嬪彿"
               min-width="200"
             />
             <el-table-column
               prop="registrant"
-              label="鐧昏浜�"
+              label="瑙勬牸"
               min-width="200"
             />
             <el-table-column
               prop="applicationTime"
-              label="鐢宠鏃堕棿"
+              label="鍏ュ簱鏁伴噺"
+              min-width="200"
+            />
+            <el-table-column
+              prop="materialNum"
+              label="閫佹牱鏁伴噺"
               min-width="200"
             />
             <el-table-column
               label="鎿嶄綔"
               min-width="200"
-              :fixed="true"
+              fixed="right"
             >
               <template slot-scope="scope">
-                <el-button type="text" size="small" @click="handleClick(scope.row)">鏌ョ湅</el-button>
-                <el-button type="text" size="small">浣滃簾</el-button>
+                <el-button type="text" size="small" @click="openChangeMaterial(scope.row)">缂栬緫</el-button>
+                <el-button type="text" size="small">鍒犻櫎</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -127,21 +136,165 @@
       size="50%"
     >
       <div class="demo-drawer__content">
-        <el-form :model="addSampleFrom">
+        <el-form label-position="top" label-width="120px" :model="addSampleFrom">
           <el-form-item>
-            <el-button>閫夋嫨鐗╂枡</el-button>
+            <el-button type="primary" @click="chooseMaterialVisible = true">閫夋嫨鐗╂枡</el-button>
           </el-form-item>
-          <el-row>
-            <el-col>
+          <div class="materialParams-card">
+            <el-row class="materialParams-top">
+              <el-col :span="12">
+                <el-form-item>
+                  <el-input placeholder="--">
+                    <template slot="prepend">鐗╂枡缂栧彿</template>
+                  </el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item>
+                  <el-input placeholder="--">
+                    <template slot="prepend">鐗╂枡鍚嶇О</template>
+                  </el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row class="materialParams-bottom">
+              <el-col :span="12">
+                <el-form-item>
+                  <el-input placeholder="--">
+                    <template slot="prepend">鐗╂枡瑙勬牸</template>
+                  </el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item>
+                  <el-input placeholder="--">
+                    <template slot="prepend">渚涘簲鍟� </template>
+                  </el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </div>
+          <el-row :gutter="100" :style="{marginTop:'24px'}">
+            <el-col :span="12">
+              <el-form-item label="鎵规">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="鏁伴噺">
+                <el-input placeholder="" />
+              </el-form-item>
             </el-col>
           </el-row>
+          <el-row :gutter="100">
+            <el-col :span="12">
+              <el-form-item label="鐩樺彿">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="瀛樻斁鍦�">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="100">
+            <el-col :span="12">
+              <el-form-item label="瑙勬牸/鍨嬪彿鍚嶇О">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="涓荤嚎蹇冩埅闈�">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="100">
+            <el-col :span="12">
+              <el-form-item label="鐢熶骇鎸囦护鍙�">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="涓荤嚎鑺姱鏁�">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="100">
+            <el-col :span="12">
+              <el-form-item label="鐢靛帇绛夌骇">
+                <el-input placeholder="" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="100" :style="{flex:'1'}">
+            <el-col :span="24">
+              <el-form-item label="澶囨敞">
+                <el-input
+                  type="textarea"
+                  rows="2"
+                  placeholder="璇疯緭鍏ュ唴瀹�"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-form-item>
+            <el-button type="primary">绔嬪嵆鍒涘缓</el-button>
+            <el-button>鍙栨秷</el-button>
+          </el-form-item>
         </el-form>
       </div>
     </el-drawer>
+    <el-dialog title="閫夋嫨鐗╂枡" :visible.sync="chooseMaterialVisible">
+      <div class="dialog-content">
+        <!-- Left side tree structure -->
+        <div class="tree-container">
+          <span class="all"> 鍏ㄩ儴</span>
+          <el-tree :data="treeData" />
+        </div>
+        <!-- Right side material list -->
+        <div class="table-container">
+          <el-table
+            ref="todoListRef"
+            :data="selectedNodeMaterials"
+            style="width: 100%"
+            highlight-current-row
+            :header-row-class-name="headerBg"
+            @row-click="handleSelectionChange"
+          >
+            <el-table-column
+              label="鐗╂枡缂栧彿"
+              prop="number"
+            >
+              <template slot-scope="scope">
+                <el-radio v-model="radioSelected" :label="scope.row.number" @change.native="handleSelectionChange(scope.row)">&nbsp;  </el-radio>
+              </template>
+            </el-table-column>
+            <el-table-column prop="name" label="鐗╂枡鍚嶇О" />
+          </el-table>
+          <el-pagination
+            :current-page="pageParams.pageNo"
+            :page-sizes="[10, 20, 30, 40]"
+            :page-size="pageParams.pageSize"
+            :total="pageParams.total"
+            layout="total, sizes, prev, pager, next, jumper"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          />
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="chooseMaterialVisible = false">鍙� 娑�</el-button>
+        <el-button type="primary">纭畾閫夋嫨</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
+import { getInspectionMaterialListById } from '@/api/rawMaterials/reportForInspection'
 export default {
   data() {
     return {
@@ -152,14 +305,120 @@
         total: 3
       },
       addSampleVisible: false,
+      chooseMaterialVisible: false,
       direction: 'rtl',
-      addSampleFrom: {}
+      addSampleFrom: {},
+      treeData: [{
+        id: 1,
+        label: '涓�绾� 1',
+        children: [{
+          id: 4,
+          label: '浜岀骇 1-1',
+          children: [{
+            id: 9,
+            label: '涓夌骇 1-1-1'
+          }, {
+            id: 10,
+            label: '涓夌骇 1-1-2'
+          }]
+        }]
+      }, {
+        id: 2,
+        label: '涓�绾� 2',
+        children: [{
+          id: 4,
+          label: '浜岀骇 2-1',
+          children: [{
+            id: 9,
+            label: '涓夌骇 2-1-1'
+          }, {
+            id: 10,
+            label: '涓夌骇 2-1-2'
+          }]
+        }]
+
+      }],
+      selectedNodeMaterials: [
+        {
+          number: '12345',
+          name: '娴嬭瘯鏁版嵁1'
+        },
+        {
+          number: 'Y111111',
+          name: '娴嬭瘯鏁版嵁2'
+        }],
+      radioSelected: null,
+      multipleSelection: '',
+      inspectionDetail: {}
+    }
+  },
+  created() {
+    // console.log(this.$route.query) 浼犻�掔殑鐢宠鍗曞璞¤鎯�
+    this.inspectionDetail = JSON.parse(this.$route.query.inspectionDetail)
+    this.getMaterialList()
+  },
+  methods: {
+    openChangeMaterial(row) {
+      console.log(row)
+    },
+    async getMaterialList() {
+      const res = await getInspectionMaterialListById({ inspectionId: this.inspectionDetail.id })
+      // console.log(res)
+      this.sampleTable = res.data
+    },
+    handleSelectionChange(val) {
+      console.log(val)
+      this.radioSelected = val.number // 閫変腑琛岀殑number
+      this.multipleSelection = val // 閫変腑鐨勪竴琛屾暟鎹�
+    },
+    handleSizeChange(pageSize) {
+      this.pageParams.pageSize = pageSize
+    },
+    handleCurrentChange(pageNo) {
+      this.pageParams.pageNo = pageNo
+    },
+    headerBg({ row, rowIndex }) {
+      console.log('rowIndex', rowIndex)
+      if (rowIndex === 0) {
+        return 'headerBgClass'
+      }
     }
   }
 }
 </script>
 
 <style lang="scss" scoped>
+.dialog-content{
+  display: flex;
+  .tree-container{
+    flex: 30%;
+    // background-color: #bfa;
+    margin-right: 12px;
+    margin-left: 12px;
+    .all{
+      display: block;
+      color: #0077DB;
+      padding: 5px;
+    }
+  }
+  .table-container{
+    flex: 70%;
+    // background-color: #0077DB;
+    margin-left: 12px;
+    .el-table{
+      .el-table__header_wrapper{
+        .has-gutter{
+          .headerBgClass{
+            background-color: #606266;
+          }
+        }
+      }
+    }
+    .el-pagination{
+      margin-top: 12px;
+    }
+  }
+}
 .forInspectionDetail-main{
     min-height: calc(100vh - 88px);
     display: flex;
@@ -308,7 +567,70 @@
 }
 
 .demo-drawer__content{
-    padding: 20px;
+    padding: 24px;
+    height: 100%;
+    .el-form{
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+    }
+    ::v-deep .el-textarea__inner{
+      max-height: 100px !important;
+    }
+    ::v-deep .el-form--label-top .el-form-item__label{
+      padding: 0px !important;
+    }
+    .materialParams-card{
+      box-shadow: rgba(100, 100, 111, 0.2) 0px 5px 15px;
+      // box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
+      // box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
+     ::v-deep   .el-form-item{
+        .el-form-item__content{
+          margin-left:0px !important;
+        }
+      }
+      ::v-deep .el-input{
+          >div{
+            width: 120px;
+            text-align: center;
+          }
+      }
+    }
+    .materialParams-bottom{
+      .el-form-item{
+        margin-bottom: 0px !important;
+        ::v-deep .el-input{
+          >div,>input{
+            border-bottom: 0px !important;
+            border-left: 0px !important;
+            border-right: 0px !important;
+            // border-top: 1px solid #DCDFE6;
+            border-radius: 0px !important;
+          }
+       }
+      }
+    }
+    .materialParams-top{
+      .el-form-item{
+        margin-bottom: 0px !important;
+         ::v-deep .el-input{
+          >div,>input{
+            border: 0px !important;
+            border-radius: 0px !important;
+          }
+        }
+      }
+      .el-col:nth-child(1){
+        //
+        ::v-deep .el-input{
+          >div,>input{
+            border-bottom: 0px !important;
+            border-right: 0px !important;
+            border-radius: 0px !important;
+          }
+        }
+      }
+    }
 }
 
 </style>

--
Gitblit v1.9.3