瀏覽代碼

质保书调整

qymljy 4 天之前
父節點
當前提交
51f112b338
共有 1 個文件被更改,包括 18 次插入8 次删除
  1. 18 8
      src/HDrpManagement/dispatch/modules/printMaterials.vue

+ 18 - 8
src/HDrpManagement/dispatch/modules/printMaterials.vue

@@ -87,16 +87,18 @@ export default {
   methods:{
     addBtn(type){
       if (type == '质保书'){
-        this.list = [
-          {
-            name:'质保书'
-          }
-        ]
         this.nowSelect = type
         this.idName = 'sa_dispatchid'
         this.dataid = this.$route.query.id
         this.drawerTitle = '打印质保书'
         this.drawer = true
+        this.param.id = 2025111813494102
+        this.param.content.pageNumner = 1
+        this.loading = true
+        this.param.content.size = 15
+        this.heightTable = 'calc(100vh - 160px)'
+        this.listData()
+
       }else if (type == '检验报告'){
         this.nowSelect = type
         this.idName = 'sa_dispatch_itemsid'
@@ -146,6 +148,14 @@ export default {
             endid:item.endid
           }
         })
+      }else if(this.nowSelect == '质保书'){
+        tableData = res.data.map((item,index)=>{
+          return {
+            name:index == 0?'质保书' + (index + 1)+'-'+(index + this.param.content.size):'质保书' + ((index * this.param.content.size) + 1)+'-'+(((index + 1 ) * this.param.content.size)),
+            startid:item.startid,
+            endid:item.endid
+          }
+        })
       }else {
         tableData = res.data.map(item=>{
           return {
@@ -205,9 +215,9 @@ export default {
 
         })
       }else {
-        if (this.nowSelect == '合格证'){
-          // window.open(this.tool.getBaseUrl() + res.data + `&${this.idName}=${this.dataid}`  + `&startid=${data.startid}`  + `&endid=${data.endid}`)
-          window.open('http://61.164.207.46:8000' + res.data + `&${this.idName}=${this.dataid}`  + `&startid=${data.startid}`  + `&endid=${data.endid}`)
+        if (this.nowSelect == '合格证' || this.nowSelect == '质保书'){
+          window.open(this.tool.getBaseUrl() + res.data + `&${this.idName}=${this.dataid}`  + `&startid=${data.startid}`  + `&endid=${data.endid}`)
+          // window.open('http://61.164.207.46:8000' + res.data + `&${this.idName}=${this.dataid}`  + `&startid=${data.startid}`  + `&endid=${data.endid}`)
         }else {
           window.open(this.tool.getBaseUrl() + res.data + `&${this.idName}=${this.dataid}`)
         }