ソースを参照

bug
Signed-off-by: lijunqing <lijunqing@dashoo.cn>

lijunqing 6 年 前
コミット
879089bde2

+ 2 - 2
src/dashoo.cn/backend/api/business/oilsupplier/paymentselect/paymentselectService.go

@@ -32,7 +32,7 @@ func (s *PaymentSelectService) GetPaymentselectList(pageIndex, itemsPerPage int6
 		"FROM OilPaymentInfo p " +
 		"LEFT JOIN OilSupplier s ON p.SupplierId = s.Id "+
 		"LEFT JOIN OilSupplierCert c ON p.SupplierCertId = c.Id " +
-		"group by c.AccessCardNo,s.SupplierName,c.SupplierTypeName,p.PayDate " +
+		"group by c.AccessCardNo,s.SupplierName,c.SupplierTypeName,p.PayDate,s.CommercialNo " +
 		"having " + where +
 		" Order By " + order + asc + " Limit " + strconv.Itoa(int(itemsPerPage)) +" OFFSET " + strconv.Itoa((int(pageIndex)-1)*int(itemsPerPage))
 
@@ -62,7 +62,7 @@ func (s *PaymentSelectService) GetPaymentselectSumList( order string, asc string
 		"sum(p.Amount) as Sums " +
 		"FROM OilPaymentInfo p " +
 		"LEFT JOIN OilSupplier s ON p.SupplierId = s.Id "+
-		"LEFT JOIN OilSupplierCert c ON p.SupplierCertId = c.Id " +
+		"LEFT JOIN OilSupplierCert c ON p.SupplierCertId = c.Id " + where +
 		"group by c.SupplierTypeName " +
 		" Order By " + order + asc
 

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

@@ -464,7 +464,7 @@ func (this *BadRecordController) SerachGoodsCertByCompany() {
 	var tempEntity suppliercertsub.OilSupplierCertSub
 
 	var goodslist []map[string]string
-	sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ sqlAdd +" order by Id asc limit "+ye+","+size+""
+	sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ sqlAdd +" order by CertSubStatus desc,Id asc limit "+ye+","+size+""
 	goodslist, _ = svc.DBE.QueryString(sql)
 
 	goodsTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ sqlAdd +"")
@@ -499,7 +499,7 @@ func (this *BadRecordController) SerachBasisCertByCompany() {
 	var tempEntity suppliercertsub.OilSupplierCertSub
 
 	var basislist []map[string]string
-	sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ sqlAdd +" order by Id asc limit "+ye+","+size+""
+	sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ sqlAdd +" order by CertSubStatus desc,Id asc limit "+ye+","+size+""
 	basislist, _ = svc.DBE.QueryString(sql)
 
 	basisTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ sqlAdd +"")
@@ -533,7 +533,7 @@ func (this *BadRecordController) SerachTCCertByCompany() {
 	var tempEntity suppliercertsub.OilSupplierCertSub
 
 	var tclist []map[string]string
-	sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ sqlAdd +" order by Id asc limit "+ye+","+size+""
+	sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ sqlAdd +" order by CertSubStatus desc,Id asc limit "+ye+","+size+""
 	tclist, _ = svc.DBE.QueryString(sql)
 
 	tcTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ sqlAdd +"")

+ 17 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/paymentselect.go

@@ -2,6 +2,7 @@ package oilsupplier
 
 import (
 	"dashoo.cn/backend/api/business/oilsupplier/paymentselect"
+	"dashoo.cn/backend/api/business/register"
 	. "dashoo.cn/backend/api/controllers"
 	"dashoo.cn/utils"
 	"strings"
@@ -26,6 +27,7 @@ func (this *PaymentSelectController) GetEntityList() {
 	SupplierTypeName := this.GetString("SupplierTypeName")
 	SupplierName := this.GetString("SupplierName")
 	CreateOn := this.GetString("CreateOn")
+	svc := paymentselect.GetPaymentSelectService(utils.DBE)
 
 	if SupplierTypeName != "" {
 		where = where + " and c.SupplierTypeName like '%" + SupplierTypeName + "%'"
@@ -41,11 +43,17 @@ func (this *PaymentSelectController) GetEntityList() {
 			where = where + " and p.PayDate>='" + minDate + "' and p.PayDate<='" + maxDate + "'"
 		}
 	}
+	var registerUser register.OilCorporateInfo
+	sql := " UserName='" + this.User.Username + "'"
+	svc.GetEntity(&registerUser,sql)
+	if this.User.IsCompanyUser == 1 {
+		where= where +" and s.CommercialNo='"+registerUser.CommercialNo+"'"
+	}
 
 
 	//svc := suppliercert.GetOilSupplierCertService(utils.DBE)
 	//var list []suppliercert.OilSupplierCert
-	svc := paymentselect.GetPaymentSelectService(utils.DBE)
+
 	var list []paymentselect.PaymentselectList
 
 
@@ -69,10 +77,16 @@ func (this *PaymentSelectController) GetEntityList() {
 func (this *PaymentSelectController) GetEntitySumList() {
 
 	orderby := "c.SupplierTypeName"
-	where := " 1=1 "
+	where := " where 1=1 "
 	asc := " DESC"
-
 	svc := paymentselect.GetPaymentSelectService(utils.DBE)
+	var registerUser register.OilCorporateInfo
+	sql := " UserName='" + this.User.Username + "'"
+	svc.GetEntity(&registerUser,sql)
+	if this.User.IsCompanyUser == 1 {
+		where= where +" and s.CommercialNo='"+registerUser.CommercialNo+"' "
+	}
+
 	var list []paymentselect.PaymentselectList
 
 

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

@@ -431,9 +431,9 @@ func (this *SelectController) ZrfwSelect() {
 	}
 
 	if company.SupplierName!=""{
-		sql2:="select distinct(Code),Name,SupplierId from OilSupplierCert2File where SupplierId='"+strconv.Itoa(company.Id)+"' and SupplierTypeCode='"+supplierTypeCode+"' order by Code limit "+strconv.FormatInt(limitCurrent,10)+","+strconv.FormatInt(page.Size,10)+""
+		sql2:="select distinct(Code),Name,SupplierId,CertSubStatus from OilSupplierCertSub where SupplierId='"+strconv.Itoa(company.Id)+"' and SupplierTypeCode='"+supplierTypeCode+"' order by CertSubStatus desc,Code asc limit "+strconv.FormatInt(limitCurrent,10)+","+strconv.FormatInt(page.Size,10)+""
 		result,_:=svc.DBE.QueryString(sql2)
-		sql3:="select count(distinct(Code)) total from OilSupplierCert2File where SupplierId='"+strconv.Itoa(company.Id)+"' and SupplierTypeCode='"+supplierTypeCode+"'"
+		sql3:="select count(distinct(Code)) total from OilSupplierCertSub where SupplierId='"+strconv.Itoa(company.Id)+"' and SupplierTypeCode='"+supplierTypeCode+"'"
 		result1,_:=svc.DBE.QueryString(sql3)
 
 		total,_:= strconv.ParseInt(result1[0]["total"], 10, 64)

ファイルの差分が大きいため隠しています
+ 604 - 181
src/dashoo.cn/frontend_web/src/pages/select/badrecordselect/index.vue


+ 61 - 50
src/dashoo.cn/frontend_web/src/pages/select/zrfwselect/basislist.vue

@@ -7,6 +7,17 @@
       <el-table :data="basisList" border size="mini">
         <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
         <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+       <el-table-column label="状态"
+                         align="center"
+                         width="100px">
+          <template slot-scope="scope">
+            <span v-if="scope.row.CertSubStatus=='1'"
+                  style="color:#67C23A">准入</span>
+            <span v-else-if="scope.row.CertSubStatus=='2'"
+                  style="color:#E6A23C">暂停</span>
+            <span v-else>——</span>
+          </template>
+        </el-table-column>
       </el-table>
       <el-pagination
         @size-change="handleSizeChange"
@@ -22,75 +33,75 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import dataapi from "@/api/oilsupplier/dataentry";
+import { mapGetters } from 'vuex'
+import dataapi from '@/api/oilsupplier/dataentry'
 export default {
   computed: {
     ...mapGetters({
-      authUser: "authUser"
+      authUser: 'authUser'
     })
   },
-  name: "BasisList",
+  name: 'BasisList',
   components: {},
   props: {},
   watch: {},
-  data() {
+  data () {
     return {
       basisList: [],
       size: 10,
       currentPage: 1,
       currentItemCount: 0,
-      SupplierTypeCode: "",
-      SupplierId:""
-    };
+      SupplierTypeCode: '',
+      SupplierId: ''
+    }
   },
   methods: {
-    initData() {
-      let _this = this;
+    initData () {
+      let _this = this
       const params = {
         SupplierTypeCode: this.SupplierTypeCode,
         _currentPage: this.currentPage,
         _size: this.size
-      };
+      }
       this.$axios
-        .get("/select/zrfwselect", {
+        .get('/select/zrfwselect', {
           params
         })
         .then(res => {
           if (res.data.items != null) {
-            _this.SupplierId = res.data.items[0].SupplierId;
-            _this.basisList = res.data.items;
-            _this.currentItemCount = res.data.currentItemCount;
+            _this.SupplierId = res.data.items[0].SupplierId
+            _this.basisList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
           }
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     },
 
-    getvalue(SupplierTypeCode) {
-      this.SupplierTypeCode = SupplierTypeCode;
-      this.initData();
+    getvalue (SupplierTypeCode) {
+      this.SupplierTypeCode = SupplierTypeCode
+      this.initData()
     },
-    handleSizeChange(value) {
-      this.size = value;
-      this.currentPage = 1;
-      this.initData();
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initData()
     },
-    handleCurrentChange(value) {
-      this.currentPage = value;
-      this.initData();
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initData()
     },
-    toPdf() {
-      if (this.SupplierId == "") {
+    toPdf () {
+      if (this.SupplierId == '') {
         this.$message({
-          type: "warning",
-          message: "请先准入申请"
-        });
-        return;
+          type: 'warning',
+          message: '请先准入申请'
+        })
+        return
       }
       dataapi
-        .pdfexport(this.SupplierId, "02", this.$axios)
+        .pdfexport(this.SupplierId, '02', this.$axios)
         .then(res => {
           // response
           if (res.data.code === 0) {
@@ -98,43 +109,43 @@ export default {
             //   type: 'success'
             //   message: res.data.message
             // })
-            let docurl = res.data.item;
-            let pdfurl;
+            let docurl = res.data.item
+            let pdfurl
             // 内网服务器专用
             if (process.client && docurl.indexOf('upfile') === 0) {
-              const myDomain = window.location.host;
+              const myDomain = window.location.host
               // location.href = 'http://' + myDomain + '/' + docurl
               pdfurl = 'http://' + process.env.LOCAL_IP + '/' + docurl
               let requestParams = {
                 pdfUrl: pdfurl,
                 watermark: this.authUser.Profile.Realname
-              };
+              }
               this.$axios
-                .post("supplierdataentry/word-to-pdf-watermark", requestParams)
-                .then(function(res) {
-                  window.open('http://' + myDomain + '/' + res.data);
-                });
+                .post('supplierdataentry/word-to-pdf-watermark', requestParams)
+                .then(function (res) {
+                  window.open('http://' + myDomain + '/' + res.data)
+                })
             } else {
               // location.href = 'http://' + docurl
               pdfurl = 'http://' + docurl
               let requestParams = {
                 pdfUrl: pdfurl,
                 watermark: this.authUser.Profile.Realname
-              };
+              }
               this.$axios
-                .post("supplierdataentry/word-to-pdf-watermark", requestParams)
-                .then(function(res) {
-                  window.open('http://' + res.data);
-                });
+                .post('supplierdataentry/word-to-pdf-watermark', requestParams)
+                .then(function (res) {
+                  window.open('http://' + res.data)
+                })
             }
           }
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     }
   }
-};
+}
 </script>
 
 <style>

+ 55 - 44
src/dashoo.cn/frontend_web/src/pages/select/zrfwselect/goodslist.vue

@@ -7,6 +7,17 @@
       <el-table :data="goodsList" border size="mini">
         <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
         <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+            <el-table-column label="状态"
+                         align="center"
+                         width="100px">
+          <template slot-scope="scope">
+            <span v-if="scope.row.CertSubStatus=='1'"
+                  style="color:#67C23A">准入</span>
+            <span v-else-if="scope.row.CertSubStatus=='2'"
+                  style="color:#E6A23C">暂停</span>
+            <span v-else>——</span>
+          </template>
+        </el-table-column>
       </el-table>
       <el-pagination
         @size-change="handleSizeChange"
@@ -22,75 +33,75 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import dataapi from "@/api/oilsupplier/dataentry";
+import { mapGetters } from 'vuex';
+import dataapi from '@/api/oilsupplier/dataentry';
 export default {
   computed: {
     ...mapGetters({
-      authUser: "authUser"
+      authUser: 'authUser'
     })
   },
-  name: "GoodsList",
+  name: 'GoodsList',
   components: {},
   props: {},
   watch: {},
-  data() {
+  data () {
     return {
       goodsList: [],
       size: 10,
       currentPage: 1,
       currentItemCount: 0,
-      SupplierTypeCode: "",
-      SupplierId:""
-    };
+      SupplierTypeCode: '',
+      SupplierId: ''
+    }
   },
   methods: {
-    initData() {
-      let _this = this;
+    initData () {
+      let _this = this
       const params = {
         SupplierTypeCode: this.SupplierTypeCode,
         _currentPage: this.currentPage,
         _size: this.size
-      };
+      }
       this.$axios
-        .get("/select/zrfwselect", {
+        .get('/select/zrfwselect', {
           params
         })
         .then(res => {
           if (res.data.items != null) {
-            _this.SupplierId = res.data.items[0].SupplierId;
-            _this.goodsList = res.data.items;
-            _this.currentItemCount = res.data.currentItemCount;
+            _this.SupplierId = res.data.items[0].SupplierId
+            _this.goodsList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
           }
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     },
 
-    getvalue(SupplierTypeCode) {
-      this.SupplierTypeCode = SupplierTypeCode;
-      this.initData();
+    getvalue (SupplierTypeCode) {
+      this.SupplierTypeCode = SupplierTypeCode
+      this.initData()
     },
-    handleSizeChange(value) {
-      this.size = value;
-      this.currentPage = 1;
-      this.initData();
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initData()
     },
-    handleCurrentChange(value) {
-      this.currentPage = value;
-      this.initData();
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initData()
     },
-    toPdf() {
-      if (this.SupplierId == "") {
+    toPdf () {
+      if (this.SupplierId == '') {
         this.$message({
-          type: "warning",
-          message: "请先准入申请"
-        });
+          type: 'warning',
+          message: '请先准入申请'
+        })
         return;
       }
       dataapi
-        .pdfexport(this.SupplierId, "01", this.$axios)
+        .pdfexport(this.SupplierId, '01', this.$axios)
         .then(res => {
           // response
           if (res.data.code === 0) {
@@ -98,11 +109,11 @@ export default {
             //   type: 'success'
             //   message: res.data.message
             // })
-            let docurl = res.data.item;
-            let pdfurl;
+            let docurl = res.data.item
+            let pdfurl
             // 内网服务器专用
-            if (process.client && docurl.indexOf("upfile") === 0) {
-              const myDomain = window.location.host;
+            if (process.client && docurl.indexOf('upfile') === 0) {
+              const myDomain = window.location.host
               // location.href = 'http://' + myDomain + '/' + docurl
               pdfurl = 'http://' + process.env.LOCAL_IP + '/' + docurl
               let requestParams = {
@@ -111,9 +122,9 @@ export default {
               }
               this.$axios
                 .post('supplierdataentry/word-to-pdf-watermark', requestParams)
-                .then(function(res) {
-                  window.open('http://' + myDomain + '/' + res.data);
-                });
+                .then(function (res) {
+                  window.open('http://' + myDomain + '/' + res.data)
+                })
             } else {
               // location.href = 'http://' + docurl
               pdfurl = 'http://' + docurl
@@ -123,18 +134,18 @@ export default {
               }
               this.$axios
                 .post('supplierdataentry/word-to-pdf-watermark', requestParams)
-                .then(function(res) {
+                .then(function (res) {
                   window.open('http://' + res.data)
                 })
             }
           }
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     }
   }
-};
+}
 </script>
 
 <style>

+ 53 - 42
src/dashoo.cn/frontend_web/src/pages/select/zrfwselect/techlist.vue

@@ -7,6 +7,17 @@
       <el-table :data="techList" border size="mini">
         <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
         <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+            <el-table-column label="状态"
+                         align="center"
+                         width="100px">
+          <template slot-scope="scope">
+            <span v-if="scope.row.CertSubStatus=='1'"
+                  style="color:#67C23A">准入</span>
+            <span v-else-if="scope.row.CertSubStatus=='2'"
+                  style="color:#E6A23C">暂停</span>
+            <span v-else>——</span>
+          </template>
+        </el-table-column>
       </el-table>
       <el-pagination
         @size-change="handleSizeChange"
@@ -22,75 +33,75 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import dataapi from "@/api/oilsupplier/dataentry";
+import { mapGetters } from 'vuex';
+import dataapi from '@/api/oilsupplier/dataentry';
 export default {
   computed: {
     ...mapGetters({
-      authUser: "authUser"
+      authUser: 'authUser'
     })
   },
-  name: "TechList",
+  name: 'TechList',
   components: {},
   props: {},
   watch: {},
-  data() {
+  data () {
     return {
       techList: [],
       size: 10,
       currentPage: 1,
       currentItemCount: 0,
-      SupplierTypeCode: "",
-      SupplierId:""
-    };
+      SupplierTypeCode: '',
+      SupplierId: ''
+    }
   },
   methods: {
-    initData() {
-      let _this = this;
+    initData () {
+      let _this = this
       const params = {
         SupplierTypeCode: this.SupplierTypeCode,
         _currentPage: this.currentPage,
         _size: this.size
-      };
+      }
       this.$axios
-        .get("/select/zrfwselect", {
+        .get('/select/zrfwselect', {
           params
         })
         .then(res => {
           if (res.data.items != null) {
-            _this.SupplierId = res.data.items[0].SupplierId;
-            _this.techList = res.data.items;
-            _this.currentItemCount = res.data.currentItemCount;
+            _this.SupplierId = res.data.items[0].SupplierId
+            _this.techList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
           }
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     },
 
-    getvalue(SupplierTypeCode) {
-      this.SupplierTypeCode = SupplierTypeCode;
-      this.initData();
+    getvalue (SupplierTypeCode) {
+      this.SupplierTypeCode = SupplierTypeCode
+      this.initData()
     },
-    handleSizeChange(value) {
-      this.size = value;
-      this.currentPage = 1;
-      this.initData();
+    handleSizeChange (value) {
+      this.size = value
+      this.currentPage = 1
+      this.initData()
     },
-    handleCurrentChange(value) {
-      this.currentPage = value;
-      this.initData();
+    handleCurrentChange (value) {
+      this.currentPage = value
+      this.initData()
     },
-    toPdf() {
-      if (this.SupplierId == "") {
+    toPdf () {
+      if (this.SupplierId == '') {
         this.$message({
-          type: "warning",
-          message: "请先准入申请"
-        });
+          type: 'warning',
+          message: '请先准入申请'
+        })
         return;
       }
       dataapi
-        .pdfexport(this.SupplierId, "03", this.$axios)
+        .pdfexport(this.SupplierId, '03', this.$axios)
         .then(res => {
           // response
           if (res.data.code === 0) {
@@ -98,11 +109,11 @@ export default {
             //   type: 'success'
             //   message: res.data.message
             // })
-            let docurl = res.data.item;
-            let pdfurl;
+            let docurl = res.data.item
+            let pdfurl
             // 内网服务器专用
-            if (process.client && docurl.indexOf("upfile") === 0) {
-              const myDomain = window.location.host;
+            if (process.client && docurl.indexOf('upfile') === 0) {
+              const myDomain = window.location.host
               // location.href = 'http://' + myDomain + '/' + docurl
               pdfurl = 'http://' + process.env.LOCAL_IP + '/' + docurl
               let requestParams = {
@@ -111,7 +122,7 @@ export default {
               }
               this.$axios
                 .post('supplierdataentry/word-to-pdf-watermark', requestParams)
-                .then(function(res) {
+                .then(function (res) {
                   window.open('http://' + myDomain + '/' + res.data)
                 })
             } else {
@@ -123,18 +134,18 @@ export default {
               }
               this.$axios
                 .post('supplierdataentry/word-to-pdf-watermark', requestParams)
-                .then(function(res) {
+                .then(function (res) {
                   window.open('http://' + res.data)
                 })
             }
           }
         })
         .catch(err => {
-          console.error(err);
-        });
+          console.error(err)
+        })
     }
   }
-};
+}
 </script>
 
 <style>

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません