Jelajahi Sumber

文档列表获取条件

shihang 6 tahun lalu
induk
melakukan
3c8a0b5130

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierfile.go

@@ -37,7 +37,7 @@ func (this *SupplierfileController) FileList() {
 	}
 	SupplierCertSubId := this.GetString("SupplierCertSubId")
 	if SupplierCertSubId != "" {
-		where = where + " and SupplierCertSubId in ( '" + SupplierCertSubId + "')"
+		where = where + " and SupplierCertSubId in (" + SupplierCertSubId + ")"
 	}
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo

+ 6 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -148,7 +148,11 @@
             _this.businessList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
             if (_this.businessList && _this.businessList.length > 0) {
-              _this.cersubId = _this.businessList[0].Id + ''
+              for(var i = 0; i < _this.businessList.length; i ++){
+                _this.selectId.push(_this.businessList[i].Id)
+              }
+              _this.cersubId = _this.selectId.join(",")
+              this.$refs["subfileList"].initData(_this.cersubId)
             }
           })
           .catch(err => {
@@ -302,7 +306,7 @@
       },
       getfilelist() {
         this.cersubId = this.selectId.join(",")
-        this.$refs["subfileList"].initData()
+        this.$refs["subfileList"].initData(this.cersubId)
       },
 
       seachdata() {

+ 3 - 5
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -111,9 +111,7 @@
         default: []
       },
     },
-    created() {
-      this.initData()
-    },
+    created() {},
     computed: {
       ...mapGetters({
         session: 'session'
@@ -157,10 +155,10 @@
       }
     },
     methods: {
-      initData() {
+      initData(val) {
         let _this = this
         const params = {
-          SupplierCertSubId: this.SupplierCertSubId,
+          SupplierCertSubId: val,
           _currentPage: this.currentPage,
           _size: this.size,
         }