2
3
huahaiyan 6 лет назад
Родитель
Сommit
1be62a0716

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

@@ -19,6 +19,77 @@ type SupplierfileController struct {
 	BaseController
 }
 
+// @Title 文件上传
+// @Description get user by tokenaddsubfile
+// @Success 200 {object} models.Userblood
+// @router /filelistall [get]
+func (this *SupplierfileController) AllFileList() {
+	page := this.GetPageInfoForm()
+	var list []supplierfile.OilSupplierFile
+	svc := supplierfile.GetSupplierfileService(utils.DBE)
+	where := " 1=1"
+	orderby := "Id"
+	asc := true
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierId := this.GetString("SupplierId")
+	if SupplierId != "" {
+		where = where + " and SupplierId = '" + SupplierId + "'"
+	}
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
+	if SupplierTypeCode != "" {
+		where = where + " and SupplierTypeCode in ( '000', '" + SupplierTypeCode + "')"
+	}
+	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 文件上传
+// @Description get user by tokenaddsubfile
+// @Success 200 {object} models.Userblood
+// @router /filelistappend [get]
+func (this *SupplierfileController) FileListAppend() {
+	page := this.GetPageInfoForm()
+	var list []supplierfile.OilSupplierFile
+	svc := supplierfile.GetSupplierfileService(utils.DBE)
+	where := " 1=1"
+	orderby := "Id"
+	asc := true
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierId := this.GetString("SupplierId")
+	if SupplierId != "" {
+		where = where + " and SupplierId = '" + SupplierId + "'"
+	}
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
+	if SupplierTypeCode != "" {
+		where = where + " and SupplierTypeCode in ( '000', '" + SupplierTypeCode + "')"
+	}
+	where = where + " and SupType != 1"
+	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 文件上传
 // @Description get user by tokenaddsubfile
 // @Success 200 {object} models.Userblood
@@ -46,6 +117,7 @@ func (this *SupplierfileController) FileList() {
 	if SupplierTypeCode != "" {
 		where = where + " and SupplierTypeCode in ( '000', '" + SupplierTypeCode + "')"
 	}
+	where = where + " and SupType != 2"
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -474,7 +474,7 @@
           _currentPage: 1,
           _size: 1000,
         }
-        _this.$axios.get('supplierfile/filelist', {
+        _this.$axios.get('supplierfile/filelistall', {
             params
           })
           .then(res => {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -565,7 +565,7 @@
           _currentPage: 1,
           _size: 1000,
         }
-        _this.$axios.get('supplierfile/filelist', {
+        _this.$axios.get('supplierfile/filelistall', {
             params
           })
           .then(res => {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -539,7 +539,7 @@
           _currentPage: 1,
           _size: 1000,
         }
-        _this.$axios.get('supplierfile/filelist', {
+        _this.$axios.get('supplierfile/filelistall', {
             params
           })
           .then(res => {