lining пре 6 година
родитељ
комит
5437eef30d

+ 11 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/badrecord.go

@@ -4,8 +4,8 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"encoding/json"
-	"fmt"
 	"strconv"
+	"strings"
 	"time"
 
 	"dashoo.cn/backend/api/business/oilsupplier/badrecord"
@@ -24,13 +24,14 @@ type BadRecordController struct {
 // @router /getlist [post]
 func (this *BadRecordController) GetTList() {
 
-	fmt.Print("进入")
 	var model BadRecord.BadRecord
 	var jsonBlob = this.Ctx.Input.RequestBody
 	json.Unmarshal(jsonBlob, &model)
 
 	//获取分页信息
 	page := this.GetPageInfoForm() //包括当前页、每页书数量
+	CreateOn := this.GetString("CreateOn")
+
 
 	var where string = " 1=1"
 
@@ -44,6 +45,14 @@ func (this *BadRecordController) GetTList() {
 	if this.User.IsCompanyUser==1{
 		where= where + " and CompanyName='"+this.User.Realname +"'"
 	}
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
 	orderby := "Id"
 	asc := false
 

+ 10 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -434,11 +434,21 @@ func (this *InfoChangeController) GetAllEntityList() {
 	}
 
 	SupplierName := this.GetString("SupplierName")
+	CreateOn := this.GetString("CreateOn")
 
 	if SupplierName != "" {
 		where = where + " and a.SupplierName like '%" + SupplierName + "%'"
 	}
 
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and b.CreateOn>='" + minDate + "' and b.CreateOn<='" + maxDate + "'"
+		}
+	}
+
 	svc := infochange.GetInfoChangeService(utils.DBE)
 	var list []infochange.OilUsedName
 	total := svc.GetUsedNameWithOrderBytbl(OilSupplierName, OilInfoChangeName, page.CurrentPage, page.Size, orderby, asc, &list, where)

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

@@ -12,6 +12,7 @@ import (
 	"fmt"
 	"sort"
 	"strconv"
+	"strings"
 	"time"
 
 	// "fmt"
@@ -175,6 +176,15 @@ func (this *SelectController) GetTList() {
 	if model.BusinessScope != "" {
 		where = where + " and a.BusinessScope like '%" + model.BusinessScope + "%'"
 	}
+	CreateOn := this.GetString("CreateOn")
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
+		}
+	}
 
 	a := model.InStyle
 	fmt.Println(a)
@@ -242,12 +252,20 @@ func (this *SelectController) Up() {
 	asc := false
 	Order := this.GetString("Order")
 	Prop := this.GetString("Prop")
+	CreateOn := this.GetString("CreateOn")
 	if Order != "" && Prop != "" {
 		if Order == "asc" {
 			asc = true
 		}
 	}
-
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
 	if model.FullName != "" {
 		where = where + " and (select FullName from Base_Organize where Id = a.CommitComId) like '%" + model.FullName + "%'"
 	}

+ 25 - 3
src/dashoo.cn/frontend_web/src/pages/select/badrecordselect/index.vue

@@ -17,6 +17,15 @@
                  ref="searchformRef"
                  :inline="true"
                  style="float: right; margin-top: -5px">
+          <el-form-item label="录入时间">
+            <el-date-picker size="mini"
+                            style="width: 220px"
+                            v-model="CreateOn"
+                            type="daterange"
+                            range-separator="至"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
           <el-form-item label="企业名称">
             <el-input size="mini"
                       v-model="searchForm.Companyname"
@@ -937,6 +946,7 @@ export default {
       tcTemp: '',
       yChooseCert: '',
       activeName: 'first',
+      CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
       goodsSelection: [],
       basisSelection: [],
       tcSelection: [],
@@ -1574,11 +1584,11 @@ export default {
         })
     },
     showBackReasonList (row) {
-      //分页及列表条件
+      // 分页及列表条件
       let params = {
         CertSubId: row.Id
       }
-      //访问接口
+      // 访问接口
       backReasonApi.getNoPageList(params, this.$axios).then(res => {
         this.backReasonList = res.data.items
         this.showBackReason = true
@@ -1591,9 +1601,21 @@ export default {
       if (event != null) {
         this.currentPage = 1
       }
+
+      let myCreateOn = []
+      // 解析时间
+      if (this.CreateOn != null && this.CreateOn.length === 2) {
+        this.CreateOn[1].setHours(23)
+        this.CreateOn[1].setMinutes(59)
+        this.CreateOn[1].setSeconds(59)
+        myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+        myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+      }
+
       let params = {
         _size: this.size,
-        _currentPage: this.currentPage
+        _currentPage: this.currentPage,
+        CreateOn: myCreateOn.join(',')
       }
 
       setapi

+ 38 - 3
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -669,6 +669,19 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="申请时间">
+              <el-date-picker size="mini"
+                              style="width: 220px"
+                              v-model="CreateOn"
+                              type="daterange"
+                              range-separator="至"
+                              start-placeholder="开始日期"
+                              end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
@@ -841,6 +854,7 @@ export default {
       currentPage: 1,
       currentItemCount: 0,
       SetupTime: '', // 成立时间
+      CreateOn: [],
       searchForm: {
         AccessCardNo: '',
         SupplierName: '',
@@ -1089,12 +1103,22 @@ export default {
         this.currentPage = 1
         this.dialogVisible = false
       }
+      let myCreateOn = []
+      // 解析时间
+      if (this.CreateOn != null && this.CreateOn.length === 2) {
+        this.CreateOn[1].setHours(23)
+        this.CreateOn[1].setMinutes(59)
+        this.CreateOn[1].setSeconds(59)
+        myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+        myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+      }
       let params = {
         _size: this.size,
         _currentPage: this.currentPage,
         Order: this.Column.Order,
         Prop: this.Column.Prop,
-        SetupTime: this.SetupTime
+        SetupTime: this.SetupTime,
+        CreateOn: myCreateOn.join(',')
       }
       api
         .getCompanyList(params, this.searchForm, this.$axios)
@@ -1127,9 +1151,9 @@ export default {
       this.initDatas()
     },
     searchCommand (command) {
-      if (command == 'search') {
+      if (command === 'search') {
         this.dialogVisible = true
-      } else if (command == 'clear') {
+      } else if (command === 'clear') {
         this.clearSearch()
       }
     },
@@ -1139,6 +1163,17 @@ export default {
       this.SetupTime = '';
       (this.LinkCityAry = []), (this.currentPage = 1)
       this.initDatas()
+    },
+    formatDateTime (date) {
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? ('0' + m) : m
+      var d = date.getDate()
+      d = d < 10 ? ('0' + d) : d
+      var h = date.getHours()
+      var minute = date.getMinutes()
+      minute = minute < 10 ? ('0' + minute) : minute
+      return y + '-' + m + '-' + d + ' ' + h + ':' + minute
     }
   }
 }

+ 80 - 50
src/dashoo.cn/frontend_web/src/pages/select/informationreporting/index.vue

@@ -19,6 +19,15 @@
           :inline="true"
           style="float: right;position:absolute;right:15px;top:10.5px"
         >
+          <el-form-item label="申请时间">
+            <el-date-picker size="mini"
+                            style="width: 220px"
+                            v-model="CreateOn"
+                            type="daterange"
+                            range-separator="至"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
           <el-form-item label="推荐单位">
             <el-input size="mini" v-model="searchForm.FullName" placeholder="请输入内容"></el-input>
           </el-form-item>
@@ -81,33 +90,33 @@
 
 
 <script>
-import api from "@/api/oilsupplier/select";
-import FileSaver from "file-saver";
-import XLSX from "xlsx";
-import oapi from "@/api/oilsupplier/supplier";
+import api from '@/api/oilsupplier/select'
+import FileSaver from 'file-saver'
+import XLSX from 'xlsx'
 export default {
-  created() {
-    this.initDatas();
+  created () {
+    this.initDatas()
   },
-  data() {
+  data () {
     return {
       // 定义列表数据
       entityList: [],
+      CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
       // 分页参数
       size: 10,
       currentPage: 1,
       currentItemCount: 0,
       searchForm: {
-        FullName: ""
+        FullName: ''
       },
-      //列表排序
+      // 列表排序
       Column: {
-        Order: "",
-        Prop: ""
+        Order: '',
+        Prop: ''
       },
       spanArr: [],
       pos: 0
-    };
+    }
   },
 
   methods: {
@@ -164,62 +173,83 @@ export default {
       return wbout;
     },
 
-    //列表排序功能
-    orderby(column) {
-      if (column.order == "ascending") {
-        this.Column.Order = "asc";
-      } else if (column.order == "descending") {
-        this.Column.Order = "desc";
+    // 列表排序功能
+    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();
+      this.Column.Prop = column.prop
+      this.initDatas()
     },
-    //初始化列表方法
-    initDatas(event) {
-       this.spanArr= []
+    // 初始化列表方法
+    initDatas (event) {
+      this.spanArr = []
       if (event != null) {
-        this.currentPage = 1;
-        this.dialogVisible = false;
+        this.currentPage = 1
+        this.dialogVisible = false
+      }
+      let myCreateOn = []
+      // 解析时间
+      if (this.CreateOn != null && this.CreateOn.length === 2) {
+        this.CreateOn[1].setHours(23)
+        this.CreateOn[1].setMinutes(59)
+        this.CreateOn[1].setSeconds(59)
+        myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+        myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
       }
       let params = {
         _size: this.size,
         _currentPage: this.currentPage,
-        Order: "desc",
-        Prop: "Fullname"
-      };
+        Order: 'desc',
+        Prop: 'Fullname',
+        CreateOn: myCreateOn.join(',')
+      }
 
-      console.log(params);
+      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;
+          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);
-        });
+          console.error(err)
+        })
     },
-    //分页方法
-    handleCurrentChange(value) {
-      this.currentPage = value;
-      this.initDatas();
+    // 分页方法
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initDatas()
     },
-    handleSizeChange(value) {
-      this.size = value;
-      this.currentPage = 1;
-      this.initDatas();
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initDatas()
     },
-    searchCommand(command) {
-      if (command == "clear") {
-        this.clearSearch();
+    searchCommand (command) {
+      if (command === 'clear') {
+        this.clearSearch()
       }
     },
-    clearSearch() {
-      this.searchForm.FullName = "";
-      this.initDatas();
+    clearSearch () {
+      this.searchForm.FullName = ''
+      this.initDatas()
+    },
+    formatDateTime (date) {
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? ('0' + m) : m
+      var d = date.getDate()
+      d = d < 10 ? ('0' + d) : d
+      var h = date.getHours()
+      var minute = date.getMinutes()
+      minute = minute < 10 ? ('0' + minute) : minute
+      return y + '-' + m + '-' + d + ' ' + h + ':' + minute
     }
   }
 };
-</script>
+</script>

+ 69 - 37
src/dashoo.cn/frontend_web/src/pages/select/usednameselect/index.vue

@@ -15,6 +15,15 @@
 
         <el-form :model="searchForm" ref="searchformRef" :inline="true"
           style="float: right;position:absolute;right:15px;top:10.5px">
+          <el-form-item label="申请时间">
+            <el-date-picker size="mini"
+                            style="width: 220px"
+                            v-model="CreateOn"
+                            type="daterange"
+                            range-separator="至"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
           <el-form-item label="企业名称">
             <el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入内容"></el-input>
           </el-form-item>
@@ -56,56 +65,68 @@
   export default {
     created() {
       // 执行初始化方法
-      this.initDatas();
+      this.initDatas()
     },
-    data() {
+    data () {
       return {
         // 定义列表数据
         entityList: [],
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
         // 分页参数
         size: 10,
         currentPage: 1,
         currentItemCount: 0,
         searchForm: {
-          SupplierName: "",
+          SupplierName: '',
+          CreateOn: ''
         },
-        //列表排序
+        // 列表排序
         Column: {
           Order: "",
           Prop: ""
         }
-      };
+      }
     },
 
     methods: {
-      //初始化列表方法
-      initDatas(event) {
+      // 初始化列表方法
+      initDatas (event) {
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn != null && this.CreateOn.length === 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+
+        this.searchForm.CreateOn = myCreateOn.join(',')
+
         if (event != null) {
-          this.currentPage = 1;
+          this.currentPage = 1
         }
-        
         let params = {
           _size: this.size,
           _currentPage: this.currentPage,
           Order: this.Column.Order,
           Prop: this.Column.Prop
-        };
-       
-       //查询条件
+        }
+
+        // 查询条件
         Object.assign(params, this.searchForm)
-        
         api.getNameList(params, this.$axios)
           .then(res => {
-            console.log(res.data.items);
-            this.entityList = res.data.items;
-            this.currentItemCount = res.data.currentItemCount;
+            console.log(res.data.items)
+            this.entityList = res.data.items
+            this.currentItemCount = res.data.currentItemCount
           })
           .catch(err => {
-            console.error(err);
-          });
+            console.error(err)
+          })
       },
 
-      exportExcel() {
+      exportExcel () {
         /* generate workbook object from table */
         let wb = XLSX.utils.table_to_book(
           document.querySelector("#rebateSetTable")
@@ -129,7 +150,18 @@
         return wbout;
       },
 
-      //列表排序功能
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      },
+      // 列表排序功能
       orderby(column) {
         if (column.order == "ascending") {
           this.Column.Order = "asc";
@@ -140,30 +172,30 @@
         this.initDatas();
       },
 
-      //分页方法
-      handleCurrentChange(value) {
-        this.currentPage = value;
-        this.initDatas();
+      // 分页方法
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
       },
-      handleSizeChange(value) {
-        this.size = value;
-        this.currentPage = 1;
-        this.initDatas();
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
       },
-      searchCommand(command) {
-        if (command == "clear") {
-          this.clearSearch();
+      searchCommand (command) {
+        if (command === 'clear') {
+          this.clearSearch()
         }
       },
 
-      clearSearch() {
-        this.searchForm.SupplierName = "";
-        this.currentPage = 1;
-        this.initDatas();
+      clearSearch () {
+        this.searchForm.SupplierName = ''
+        this.CreateOn = []
+        this.currentPage = 1
+        this.initDatas()
       }
     }
-  };
-
+  }
 </script>
 
 <style>

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/select/zrfwselect/index.vue

@@ -15,7 +15,7 @@
         <span style="float: right;">
           <el-form ref="form" :inline="true" style="margin-top: -10px">
             <el-form-item>
-              <el-input size="mini" v-model="searchForm.certsub" placeholder="请输入资质名称或编码" style="width: 100%"></el-input>
+              <el-input size="mini" v-model="searchForm.certsub" placeholder="请输入名称或编码" style="width: 100%"></el-input>
             </el-form-item>
             <el-form-item>
               <el-button type="primary" size="mini" style="margin-left: 8px" @click="search">查询</el-button>