From 1772fc5e211f9e9e0ab4cdc6c29b436aac178c2a Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期五, 23 二月 2024 12:19:55 +0800
Subject: [PATCH] 修改

---
 web/src/views/modules/configItemOutbound/ConfigItemOutbound-AddOrUpdate.vue |   70 ++++++++++++++++++++++------------
 1 files changed, 45 insertions(+), 25 deletions(-)

diff --git a/web/src/views/modules/configItemOutbound/ConfigItemOutbound-AddOrUpdate.vue b/web/src/views/modules/configItemOutbound/ConfigItemOutbound-AddOrUpdate.vue
index 3b0098c..8af0f48 100644
--- a/web/src/views/modules/configItemOutbound/ConfigItemOutbound-AddOrUpdate.vue
+++ b/web/src/views/modules/configItemOutbound/ConfigItemOutbound-AddOrUpdate.vue
@@ -1,7 +1,7 @@
 <template>
   <zt-dialog ref="dialog" column="3" :title="title" :stepMarker="stepMarker" @confirm="formSubmit">
     <el-form ref="dataForm" style="padding-top: 0" :inline="true" :disabled="dataForm.disabled" :model="dataForm"
-             label-width="120px" class="configChangeFormAuto">
+             label-width="120px" class="configOutFormAuto">
       <div>
         <el-form-item label-width="60px" label="缂栧彿:" style="width:100%;margin-bottom: -5px">
           <span>{{dataForm.configItemOutbound.code || '缂栧彿鑷姩鐢熸垚'}}</span>
@@ -27,20 +27,27 @@
               placeholder="璇烽�夋嫨鐢宠鏃ユ湡">
             </el-date-picker>
           </el-form-item>
+        </div>
           <div class="el-configChangeDialog el-border-bottom">
             <div style="width: 120px;text-align: center;font-weight: 600">
               鍑哄簱鍘熷洜
             </div>
             <div class="el-border-left acceptDate" style="width: 90%;">
               <el-form-item style="width: 100%;padding-left:20px;margin:0;">
-                <el-input v-if="stepMarker=='pzxck_first'" v-model="dataForm.configItemOutbound.outboundReason" placeholder="鍑哄簱鍘熷洜..."></el-input>
-                <span v-else>{{dataForm.configItemOutbound.outboundReason}}</span>
+                <el-input :disabled="stepMarker!=='pzxck_first'" type="textarea" :rows="2" v-model="dataForm.configItemOutbound.outboundReason" placeholder="鍑哄簱鍘熷洜..."></el-input>
+<!--                <span v-else>{{dataForm.configItemOutbound.outboundReason}}</span>-->
               </el-form-item>
             </div>
           </div>
-          <el-form-item class="marginTopAndMarginBottom2" label="搴撶被鍨�" style="width: 99%">
-            <zt-dict :disabled="stepMarker!=='pzxck_first'" v-model="dataForm.configItemOutbound.libraryType" :radio="true" dict="library_type"></zt-dict>
-          </el-form-item>
+        <div class="el-configChangeDialog el-border-bottom">
+          <div style="width: 120px;text-align: center;font-weight: 600">
+            搴撶被鍨�
+          </div>
+          <div style="width: calc(100% - 120px)" class="el-border-left">
+            <el-form-item label-width="20px" style="width: 85%;margin-left: 20px">
+              <zt-dict :disabled="stepMarker!=='pzxck_first'" v-model="dataForm.configItemOutbound.libraryType" :radio="true" dict="library_type"></zt-dict>
+            </el-form-item>
+          </div>
         </div>
         <div class="el-configChangeDialog el-border-bottom">
           <div class="DFormWidth DAlign DHold">
@@ -90,13 +97,6 @@
                     </zt-table-button>
                   </template>
                 </el-table-column>
-                <el-table-column fixed="right" prop="files" label="涓婁紶闄勪欢" width="240" align="center">
-                  <template v-slot="{ row }">
-                    <!--                    <zt-table-button @click="files(row.id)">涓婁紶闄勪欢</zt-table-button>-->
-                    <table-uploader busi-type="config_item_warehouse" model-name="row" :dataForm="row"
-                                    v-model="row.files"/>
-                  </template>
-                </el-table-column>
               </el-table>
               <div v-if="showAddAndEdit && !dataForm.disabled"  class="icon-container" @click="handleCommand">
                 <!-- 鏀剧疆鍥哄畾鐨勫浘鏍� -->
@@ -129,9 +129,7 @@
           </div>
           <div style="width: calc(100% - 120px)" class="el-border-left">
             <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px">
-              <el-input v-if="stepMarker=='pzxck_cmcz'" type="textarea" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�"
-                        v-model="dataForm.configItemOutbound.CmOperations"></el-input>
-              <span v-else>{{dataForm.configItemOutbound.CmOperations}}</span>
+              <el-button v-if="stepMarker=='pzxck_cmcz'" type="primary" @click="download()">鍑哄簱</el-button>
             </el-form-item>
             <el-form-item label-width="80%" label="鎿嶄綔浜猴細" style="width: 65%">
               <span>{{dataForm.configItemOutbound.operator}}</span>
@@ -164,7 +162,7 @@
 
 <script>
   import AddOrUpdateCheck from '../testCheckOrder/TestCheckOrder-AddOrUpdate'
-  import ConfigItemList from './configItemList.vue'
+  import ConfigItemList from '../configItemChange/configItemList.vue'
   import qs from "qs";
   import Cookies from "js-cookie";
 
@@ -213,10 +211,10 @@
     },
     created() {
       const roleName = localStorage.getItem('roleName')
-      if (roleName && roleName.includes('QA')) {
+      if (roleName && roleName.includes('瀹℃牳浜哄憳')) {
         this.showColumn = true;
       }
-      if (roleName && roleName.includes('娴嬭瘯鍛�')) {
+      if (roleName && roleName.includes('妫�娴嬩汉鍛�')) {
         this.showAddAndEdit = true;
       }
     },
@@ -261,8 +259,8 @@
       handleCommand() {
         this.$nextTick(()=>{
           console.log(this.dataForm.projectId,'this.dataForm.projectId')
-          this.ids = this.dataForm.configOutboundList.map(item=>item.outboundSelectId).join(',')
-          this.$refs.configItemList.$refs.dialog.init(this.dataForm.projectId,this.ids)
+          this.ids = this.dataForm.configOutboundList.map(item=>item.selectId).join(',')
+          this.$refs.configItemList.$refs.dialog.init(this.dataForm.projectId,{ids:this.ids,pageCode:this.pageCode})
         })
         // this.dataForm.configItemList.push({})
         // this.$nextTick(() => {
@@ -301,10 +299,18 @@
         let apiURL = `/configItemOutbound/ConfigItemOutbound/exportConfigOutbound`
         window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}`
       },
+      download(){
+        let params = qs.stringify({
+          token: Cookies.get('token'),
+          id:this.dataForm.id
+        })
+        let apiURL = `/configItemOutbound/ConfigItemOutbound/outbound`
+        window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}`
+      },
       // 鑾峰彇淇℃伅
       async getInfo() {
         let params = {
-          changeId: this.dataForm.id,
+          outboundId: this.dataForm.id,
           projectId: this.dataForm.projectId
         }
         let res = await this.$http.get(`/configItemOutbound/ConfigItemOutbound/getDto`, {params: params})
@@ -325,6 +331,17 @@
       },
       // 琛ㄥ崟鎻愪氦
       async formSubmit(submitType) {
+        let flag = true;
+        console.log(this.dataForm, "this.dataForm11111")
+        this.dataForm.configOutboundList.forEach(item => {
+          if (parseInt(item.secretClass) > localStorage.getItem('userSecretClass')) {
+            this.$alert("褰撳墠椤圭洰璁剧疆鐨勫瘑绾ч珮浜庡綋鍓嶇敤鎴风殑瀵嗙骇锛岃閲嶆柊璁剧疆")
+            flag =false
+          }
+        })
+        if (!flag){
+          return
+        }
         if (this.showColumn && submitType == 'bl') {
           for (let item of this.dataForm.configItemList) {
             if (item) {
@@ -426,16 +443,19 @@
   .configChangeContentWidth > .el-form-item.lastChild > .el-form-item__content {
     width: calc(100% - 142px);
   }
-  .configChangeFormAuto .acceptDate > .el-form-item > .el-form-item__content {
+  .configOutFormAuto .acceptDate > .el-form-item > .el-form-item__content {
     width: 100%;
   }
-  .configChangeFormAuto .marginTopAndMarginBottom {
+  .configOutFormAuto .marginTopAndMarginBottom {
     margin-top: 10px !important;
     margin-bottom: 0 !important;
   }
 
-  .configChangeFormAuto .marginTopAndMarginBottom2 {
+  .configOutFormAuto .marginTopAndMarginBottom2 {
     margin-top: -10px !important;
     margin-bottom: 0 !important;
   }
+  .configOutFormAuto .el-textarea{
+    vertical-align: middle
+  }
 </style>

--
Gitblit v1.9.1