浏览代码

fix: 调整

zh 2 年之前
父节点
当前提交
688e6bfc02

+ 21 - 15
src/views/commercialEngineering/components/examine.vue

@@ -14,13 +14,13 @@
             </el-radio-group>
           </div>
         </el-col>
-        <el-col :xs="24" :sm="24" :lg="24" class="item">
+        <el-col v-if="formData.loginStatus === 'FAIL'" :xs="24" :sm="24" :lg="24" class="item">
           <div class="label" style="height: auto">选择登录成功项目</div>
           <div class="value" style="height: 100%; display: block">
             <el-col :span="7" class="flex-box">
               <div class="flex-box-title">项目编号{{ formData.loginStatus === 'REJECT'?'*': '' }}</div>
-              <el-input  v-model="formData.successLoginProject" class="my-input" placeholder="请填写" size="mini" clearable >
-                <el-button @click="handleFocus" slot="append">引入</el-button>
+              <el-input v-model="formData.successLoginProject" class="my-input" placeholder="请填写" size="mini" clearable>
+                <el-button slot="append" @click="handleFocus">引入</el-button>
               </el-input>
             </el-col>
             <el-col :span="7" class="flex-box">
@@ -82,7 +82,7 @@
               width: 120px;
               height: 120px;align-items: center;
     justify-content: center;"
-                  @click="openPdf(item.fileUrl)"
+                  @click="openPdf(item)"
                 >
                   <img v-if="checkFileType(item.fileUrl) == 'word'" class="file" src="@/assets/common/word.png">
                   <img v-if="checkFileType(item.fileUrl) == 'excel'" class="file" src="@/assets/common/excel.png">
@@ -105,7 +105,7 @@
     </div>
 
     <!--  -->
-    <LoginSuccess :pageType='pageType' :formData='formData' :showDialog="showDialog" @success='handleSuccess' @cancel='handleCancel'/>
+    <LoginSuccess :page-type="pageType" :form-data="formData" :show-dialog="showDialog" @success="handleSuccess" @cancel="handleCancel" />
   </div>
 </template>
 
@@ -148,27 +148,26 @@ export default {
         { label: '登录不成功', value: 'FAIL' },
         { label: '驳回', value: 'REJECT' }
       ],
-      showDialog:false
+      showDialog: false
     }
   },
   created() {
-      console.log(this.formData,this.module,8888);
+    console.log(this.formData, this.module, 8888)
   },
   methods: {
-    handleSuccess(val){
-      console.log(val);
-      let res = val[0]
+    handleSuccess(val) {
+      console.log(val)
+      const res = val[0]
       this.formData.successLoginProject = res.projectNo
       this.formData.customerNumber = res.customerNumber
       this.formData.customerName = res.customerName
       this.formData.serviceName = res.serviceName
       this.formData.serviceNumber = res.serviceNumber
-
     },
-    handleCancel(){
+    handleCancel() {
       this.showDialog = false
     },
-    handleFocus(){
+    handleFocus() {
       this.showDialog = true
     },
     onSbumit() {},
@@ -193,8 +192,15 @@ export default {
         return ''
       }
     },
-    openPdf(pdfUrl) {
-      window.open(this.$imageUrl + pdfUrl)
+    openPdf(item) {
+      console.log(item, 999)
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = this.$imageUrl + item.fileUrl
+      link.download = item.fileName
+      document.body.appendChild(link)
+      link.click()
+      document.body.removeChild(link)
     }
   }
 }

+ 9 - 7
src/views/commercialEngineering/components/loginSuccess.vue

@@ -11,19 +11,19 @@
   >
     <div v-if="showDialog" style="height: 60vh">
       <template-page
-        :pofx="true"
         ref="pageRefTable"
+        :pofx="true"
         :get-list="getList"
         :column-parsing="columnParsing"
         :operation-column-width="200"
         :table-attributes="tableAttributes"
         :table-events="tableEvents"
         :replace-or-not-map="false"
-      ></template-page>
+      />
     </div>
     <div slot="footer" class="dialog-footer">
       <el-button size="mini" @click="cancel">取 消</el-button>
-      <el-button size="mini" @click="confirm" type="primary">确 定</el-button>
+      <el-button size="mini" type="primary" @click="confirm">确 定</el-button>
     </div>
   </el-dialog>
 </template>
@@ -34,8 +34,8 @@ import { getLoginHomeDecorationList } from '@/api/homeDecoration'
 import { getLoginCrossDistrictList } from '@/api/crossDistrict'
 import { getLoginFrockList } from '@/api/frock'
 export default {
-  mixins: [],
   components: { TemplatePage },
+  mixins: [],
   props: {
     pageType: {
       type: String,
@@ -69,7 +69,7 @@ export default {
       recordSelected: []
     }
   },
-  created() {},
+  computed: {},
   watch: {
     showDialog: {
       handler(nl, ol) {
@@ -77,7 +77,7 @@ export default {
       }
     }
   },
-  computed: {},
+  created() {},
   methods: {
     selectable(row, index) {
       if (this.formData.id == row.id) {
@@ -96,7 +96,9 @@ export default {
     },
     getList(...p) {
       this.recordSelected = []
-      p[0].params = [...p[0].params, { param: 'a.order_status', compare: '=', value: 'OK' }]
+      if (['home', 'frock'].includes(this.pageType)) {
+        p[0].params = [...p[0].params, { param: 'a.order_status', compare: '=', value: 'OK' }]
+      }
       if (this.pageType === 'home') {
         return getLoginHomeDecorationList(...p)
       }

+ 6 - 5
src/views/supply/engin/components/engin_form.vue

@@ -497,7 +497,8 @@
             :columns="columns"
             :table-data="tableData"
             :table-attributes="{
-              border: true
+              border: true,
+              maxHeight: '600px'
             }"
           />
           <div class="fr">
@@ -633,15 +634,15 @@ export default {
       return [
         {
           columnAttributes: {
-            label: '',
-            prop: '操作'
+            label: '操作',
+            width: 45
           },
           render: (h, { row, column, index }) => {
             return (
               <div>
-                <el-radio value={this.current} label={row.id} onChange={(val)=>{
+                <el-radio style='margin-left:20px' value={this.current} label={row.id} onChange={(val) => {
                   this.current = row.id
-                }}></el-radio>
+                }}>{}</el-radio>
               </div>
             )
           }