2
3
فهرست منبع

增项列表修改

huahaiyan 6 سال پیش
والد
کامیت
f547c1c414

+ 17 - 15
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -49,7 +49,7 @@ func (this *OilSupplierCertAppendController) GetList() {
 	//获取分页信息
 	page := this.GetPageInfoForm()
 	where := " 1=1 "
-	orderby := "Id"
+	orderby := "b.Id"
 	asc := false
 	Order := this.GetString("Order")
 	Prop := this.GetString("Prop")
@@ -70,31 +70,31 @@ func (this *OilSupplierCertAppendController) GetList() {
 	CreateOn := this.GetString("CreateOn")
 
 	if ApplyDate != "" {
-		where = where + " and ApplyDate like '%" + ApplyDate + "%'"
+		where = where + " and b.ApplyDate like '%" + ApplyDate + "%'"
 	}
 
 	if RecUnitId != "" {
-		where = where + " and RecUnitId like '%" + RecUnitId + "%'"
+		where = where + " and b.RecUnitId like '%" + RecUnitId + "%'"
 	}
 
 	if RecUnitName != "" {
-		where = where + " and RecUnitName like '%" + RecUnitName + "%'"
+		where = where + " and b.RecUnitName like '%" + RecUnitName + "%'"
 	}
 
 	if AppendType != "" {
-		where = where + " and AppendType like '%" + AppendType + "%'"
+		where = where + " and b.AppendType like '%" + AppendType + "%'"
 	}
 
 	if DenyReason != "" {
-		where = where + " and DenyReason like '%" + DenyReason + "%'"
+		where = where + " and b.DenyReason like '%" + DenyReason + "%'"
 	}
 
 	if AuditDate != "" {
-		where = where + " and AuditDate like '%" + AuditDate + "%'"
+		where = where + " and b.AuditDate like '%" + AuditDate + "%'"
 	}
 
 	if Remark != "" {
-		where = where + " and Remark like '%" + Remark + "%'"
+		where = where + " and b.Remark like '%" + Remark + "%'"
 	}
 
 	if CreateOn != "" {
@@ -102,25 +102,27 @@ func (this *OilSupplierCertAppendController) GetList() {
 		if len(dates) == 2 {
 			minDate := dates[0]
 			maxDate := dates[1]
-			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+			where = where + " and b.CreateOn>='" + minDate + "' and b.CreateOn<='" + maxDate + "'"
 		}
 	}
+	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
+	var registerUser register.OilCorporateInfo
+	sql := " UserName='" + this.User.Username + "'"
+	svc.GetEntity(&registerUser,sql)
 	//企业用户必须加创建人条件
 	if this.User.IsCompanyUser == 1 {
-		where = where + " and CreateUserId = '" + this.User.Id + "'"
+		where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='"+registerUser.CommercialNo+"')"
 	} else {
 		//超级管理员和有查看所有数据权限的用户不加条件
 		svcPerm := permission.GetPermissionService(utils.DBE)
 		isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.marketAccess.AllRecord")
 		if !svcPerm.IsAdmin(this.User.Id) && !isauth {
-			where = where + " and CreateUserId = '" + this.User.Id + "'"
+			where = where + " and (b.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='"+registerUser.CommercialNo+"')"
 		}
 	}
-
-	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 	var list []suppliercertappend.OilSupplierCertAppend
-	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
-
+	//total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/basislist.vue

@@ -154,7 +154,7 @@
           Prop: ''
         },
         //查询起始时间(一月前开始)
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         searchForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/goodslist.vue

@@ -154,7 +154,7 @@
           Prop: ''
         },
         //查询起始时间(一月前开始)
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         searchForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/techlist.vue

@@ -179,7 +179,7 @@
           Prop: ''
         },
         //查询起始时间(一月前开始)
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         searchForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/annualfistaudit.vue

@@ -203,7 +203,7 @@
           instance: '',
         },
         //查询时间
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         entityForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/basicindex.vue

@@ -262,7 +262,7 @@
           instance: '',
         },
         //查询时间
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         entityForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/goodsindex.vue

@@ -261,7 +261,7 @@
           instance: '',
         },
         //查询时间
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         entityForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -258,7 +258,7 @@
           instance: '',
         },
         //查询时间
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         entityForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/techindex.vue

@@ -261,7 +261,7 @@
           instance: '',
         },
         //查询时间
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         entityForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue

@@ -197,7 +197,7 @@
           Prop: ''
         },
         //查询时间
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         entityForm: {

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/infoaudit.vue

@@ -165,7 +165,7 @@
           Prop: ''
         },
         //查询时间
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         entityForm: {

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

@@ -203,7 +203,7 @@
           Prop: ''
         },
         //查询起始时间(一月前开始)
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         searchForm: {

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

@@ -203,7 +203,7 @@
           Prop: ''
         },
         //查询起始时间(一月前开始)
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         searchForm: {

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

@@ -212,7 +212,7 @@
           Prop: ''
         },
         //查询起始时间(一月前开始)
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         searchForm: {

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

@@ -206,7 +206,7 @@
           Prop: ''
         },
         //查询起始时间(一月前开始)
-        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        CreateOn: '',
         //查询项
         searchFormReset: {},
         searchForm: {

+ 223 - 0
src/dashoo.cn/frontend_web/src/pages/select/suppsubselect/index.vue

@@ -0,0 +1,223 @@
+<template>
+  <div>
+    <!--顶部显示-->
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item>业务申请上报情况</el-breadcrumb-item>
+    </el-breadcrumb>
+
+    <!--内框顶部显示-->
+    <el-card class="box-card" style="height: calc(100vh - 115px);position:relative">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 业务申请上报情况
+        </span>
+
+        <el-form
+          :model="searchForm"
+          ref="searchformRef"
+          :inline="true"
+          style="float: right;position:absolute;right:15px;top:10.5px"
+        >
+          <el-form-item label="推荐单位">
+            <el-input size="mini" v-model="searchForm.FullName" placeholder="请输入内容"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown
+              split-button
+              type="primary"
+              size="mini"
+              @click="initDatas($event)"
+              @command="searchCommand"
+            >
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" size="mini" @click="exportExcel">导出</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!--内框表格显示-->
+      <el-table
+        id="rebateSetTable"
+        :data="entityList"
+        size="mini"
+        border
+        height="calc(100vh - 243px)"
+        style="width: 100%"
+        :span-method="cellMerge"
+        @sort-change="orderby"
+      >
+        <!--内框表格剩余栏显示-->
+        <el-table-column label="推荐单位" prop="FullName" align="center"></el-table-column>
+        <el-table-column label="准入类别" prop="SupplierTypeName" align="center"></el-table-column>
+        <el-table-column label="上报数量" prop="ZongShu" align="center"></el-table-column>
+        <el-table-column label="合格数量" prop="HeGe" align="center"></el-table-column>
+        <el-table-column label="不合格数量" prop="BuHeGe" align="center"></el-table-column>
+        <el-table-column label="不合格原因" prop="Reason" align="center"></el-table-column>
+      </el-table>
+
+      <!-- 分页 -->
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[10, 15, 20, 25]"
+        :page-size="size"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount"
+      ></el-pagination>
+    </el-card>
+  </div>
+</template>
+
+
+
+
+
+<script>
+import api from "@/api/oilsupplier/select";
+import FileSaver from "file-saver";
+import XLSX from "xlsx";
+import oapi from "@/api/oilsupplier/supplier";
+export default {
+  created() {
+    this.initDatas();
+  },
+  data() {
+    return {
+      // 定义列表数据
+      entityList: [],
+      // 分页参数
+      size: 10,
+      currentPage: 1,
+      currentItemCount: 0,
+      searchForm: {
+        FullName: ""
+      },
+      //列表排序
+      Column: {
+        Order: "",
+        Prop: ""
+      },
+      spanArr: [],
+      pos: 0
+    };
+  },
+
+  methods: {
+    getSpanArr(data) {
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].FullName === data[i - 1].FullName) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+          }
+        }
+      }
+    },
+
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+
+    exportExcel() {
+      /* generate workbook object from table */
+      let wb = XLSX.utils.table_to_book(
+        document.querySelector("#rebateSetTable")
+      );
+      /* get binary string as output */
+      let wbout = XLSX.write(wb, {
+        bookType: "xlsx",
+        bookSST: true,
+        type: "array"
+      });
+      try {
+        FileSaver.saveAs(
+          new Blob([wbout], { type: "application/octet-stream" }),
+          "SupplierSituation.xlsx"
+        );
+      } catch (e) {
+        if (typeof console !== "undefined") console.log(e, wbout);
+      }
+      return wbout;
+    },
+
+    //列表排序功能
+    orderby(column) {
+      if (column.order == "ascending") {
+        this.Column.Order = "asc";
+      } else if (column.order == "descending") {
+        this.Column.Order = "desc";
+      }
+      this.Column.Prop = column.prop;
+      this.initDatas();
+    },
+    //初始化列表方法
+    initDatas(event) {
+       this.spanArr= []
+      if (event != null) {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+      }
+      let params = {
+        _size: this.size,
+        _currentPage: this.currentPage,
+        Order: "desc",
+        Prop: "Fullname"
+      };
+
+      console.log(params);
+      api
+        .up(params, this.searchForm, this.$axios)
+        .then(res => {
+          this.entityList = res.data.items;
+          console.log("----this.entityList--",this.entityList)
+          this.getSpanArr(res.data.items);
+          this.currentItemCount = res.data.currentItemCount;
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    //分页方法
+    handleCurrentChange(value) {
+      this.currentPage = value;
+      this.initDatas();
+    },
+    handleSizeChange(value) {
+      this.size = value;
+      this.currentPage = 1;
+      this.initDatas();
+    },
+    searchCommand(command) {
+      if (command == "clear") {
+        this.clearSearch();
+      }
+    },
+    clearSearch() {
+      this.searchForm.FullName = "";
+      this.initDatas();
+    }
+  }
+};
+</script>