Qukatie 1 vuosi sitten
vanhempi
commit
c2fb44e9d5

+ 9 - 1
src/components/tradeAgency/businessReports.vue

@@ -43,6 +43,10 @@ export default {
       type: String,
       default: ''
     },
+    itemIds: {
+      type: String,
+      default: null
+    }
   },
   data() {
     return {
@@ -67,7 +71,7 @@ export default {
         height: 400,
         calcHeight: 30,
         tip: false,
-        searchShow: true,
+        searchShow: false,
         searchMenuSpan: 6,
         border: true,
         index: true,
@@ -469,6 +473,7 @@ export default {
         billId: this.id,
         reportCode: this.form.code,
         groupCode: this.form.groupCode,
+        itemIds:this.itemIds,
         type:this.businessValue
       })
       // 获取的数据赋值
@@ -512,10 +517,13 @@ export default {
     },
     // 打印报表获取数据
     reportsGetReportDatafun(url, row) {
+      if(row.groupCode=='首款'&&this.itemIds==null) return    this.$message.error("请选择明细");
+      if(row.groupCode=='尾款'&&this.itemIds==null) return    this.$message.error("请选择明细");
       reportsGetReportData({
         billId: this.id,
         reportCode: row.classifyCode,
         groupCode: row.groupCode,
+        itemIds:this.itemIds,
         type:this.businessValue
       }).then(res => {
         this.handleReportPreview(url, res.data.data.data)

+ 3 - 2
src/components/tradeAgency/reports.vue

@@ -75,7 +75,7 @@ export default {
     groupCode: {
       type: String,
       default: ''
-    }
+    },
   },
   data() {
     return {
@@ -97,7 +97,8 @@ export default {
         height:400,
         calcHeight: 30,
         tip: false,
-        searchShow: true,
+        search:false,
+        searchShow:false,
         searchMenuSpan: 6,
         border: true,
         index: true,

+ 13 - 2
src/views/tradeAgency/tradeAgency/detailsPage.vue

@@ -116,6 +116,7 @@
                     </tempalte>
                 </avue-form>
             </trade-card>
+            {{ itemIds }}
             <trade-card title="货物明细">
                 <avue-crud :option="option" :data="form.agentItemsList" id="out-table" ref="crud"
                     @selection-change="selectionChange" @select="selectHandle"
@@ -251,7 +252,7 @@
             <c-upload :data="form.filesCenterList" :enumerationValue="76"
                 deleteUrl="/blade-purchase-sales/orderfiles/update" display :disabled="editDisabled"></c-upload>
         </div>
-        <business-reports :id="form.id"  ref="print" businessValue="MYDL"></business-reports>
+        <business-reports :id="form.id" :itemIds="itemIds" ref="print" businessValue="MYDL"></business-reports>
         <reports :id="form.id" :assemblyForm="form" businessValue="MYDL" ref="report"></reports>
         <!--审核弹窗-->
         <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
@@ -853,7 +854,8 @@ export default {
                         prop: 'remarks'
                     }
                 ]
-            }
+            },
+            itemIds:null
         }
     },
     components: {
@@ -1083,6 +1085,15 @@ export default {
             });
         },
         selectionChange(list) {
+            let ids=[]
+            list.forEach(e=>{
+                ids.push(e.id)
+            })
+            if(ids.length){
+                this.itemIds=ids.join(',')
+            }else{
+                this.itemIds=null
+            }
             this.selectionList = list;
         },
         selectHandle(selection, row) {