Просмотр исходного кода

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

zhouy 7 лет назад
Родитель
Сommit
0d684c089b
36 измененных файлов с 647 добавлено и 301 удалено
  1. 4 0
      applications/commons/commons-api/pom.xml
  2. 2 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonService.java
  3. 2 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java
  4. 2 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java
  5. 2 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/SystemRemindApi.java
  6. 4 0
      applications/document/document-api/pom.xml
  7. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/EmployeeApi.java
  8. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java
  9. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/VendorApi.java
  10. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/WarehouseApi.java
  11. 4 0
      applications/purchase/purchase-api/pom.xml
  12. 2 1
      applications/purchase/purchase-api/src/main/java/com/usoftchina/saas/purchase/api/PurchaseService.java
  13. 1 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDTO.java
  14. 1 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchase.java
  15. 11 1
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  16. 2 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java
  17. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java
  18. 10 0
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  19. 1 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml
  20. 1 1
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  21. 29 21
      frontend/saas-portal-web/src/components/conenter/addenterprise.vue
  22. 12 12
      frontend/saas-portal-web/src/components/conenter/company.vue
  23. 1 2
      frontend/saas-portal-web/src/components/conenter/details.vue
  24. 102 38
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  25. 12 10
      frontend/saas-portal-web/static/css/gongsi.css
  26. BIN
      frontend/saas-portal-web/static/img/nodata.png
  27. 8 3
      frontend/saas-web/app/view/core/chart/EChartsBase.js
  28. 11 0
      frontend/saas-web/app/view/home/charts/MonthSale.js
  29. 6 0
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  30. 6 0
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  31. 98 53
      frontend/saas-web/app/view/sys/account/DataList.js
  32. 3 0
      frontend/saas-web/app/view/sys/finish/DataList.js
  33. 91 51
      frontend/saas-web/app/view/sys/invitation/DataList.js
  34. 97 48
      frontend/saas-web/app/view/sys/maxnumbers/DataList.js
  35. 110 50
      frontend/saas-web/app/view/sys/messagelog/DataList.js
  36. 2 2
      frontend/saas-web/ext/packages/ux/src/plugin/MenuClipboard.js

+ 4 - 0
applications/commons/commons-api/pom.xml

@@ -28,5 +28,9 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 2 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonService.java

@@ -1,9 +1,10 @@
 package com.usoftchina.saas.commons.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
-@FeignClient("commons-server")
+@FeignClient(name = "commons-server", configuration = ServiceFeignInterceptor.class)
 public interface CommonService {
 
     @PostMapping("/action/audit")

+ 2 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java

@@ -1,4 +1,5 @@
 package com.usoftchina.saas.commons.api;
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 
 import org.springframework.cloud.openfeign.FeignClient;
@@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @Author: guq
  * @Date: 2018/10/20
  */
-@FeignClient(name = "commons-server", fallback = MaxnumberServiceFallback.class)
+@FeignClient(name = "commons-server", fallback = MaxnumberServiceFallback.class, configuration = ServiceFeignInterceptor.class)
 public interface MaxnumberService {
     /**
      * @Description: 更新并获取最大编号

+ 2 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.commons.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.po.Operation;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -13,7 +14,7 @@ import org.springframework.web.context.request.async.DeferredResult;
 * @Author: guq
 * @Date: 2018/10/20
 */
-@FeignClient("commons-server")
+@FeignClient(name = "commons-server", configuration = ServiceFeignInterceptor.class)
 public interface MessageLogService {
 
     @RequestMapping("/messagelog/save")

+ 2 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/SystemRemindApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.commons.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.AddApplyDTO;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -8,7 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient("commons-server")
+@FeignClient(name = "commons-server", configuration = ServiceFeignInterceptor.class)
 public interface SystemRemindApi {
 
     @PostMapping("/remind/apply/save")

+ 4 - 0
applications/document/document-api/pom.xml

@@ -26,6 +26,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/EmployeeApi.java

@@ -1,11 +1,12 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 
 import java.util.Map;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface EmployeeApi {
 
     @GetMapping("/employee/getEmployeeByAccount")

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface ProductApi {
 
     /**

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/VendorApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.page.PageRequest;
@@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface VendorApi {
 
     /**

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/WarehouseApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -8,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 
 import java.util.Map;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface WarehouseApi {
 
     @PostMapping("/warehouse/post")

+ 4 - 0
applications/purchase/purchase-api/pom.xml

@@ -26,5 +26,9 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 2 - 1
applications/purchase/purchase-api/src/main/java/com/usoftchina/saas/purchase/api/PurchaseService.java

@@ -1,11 +1,12 @@
 package com.usoftchina.saas.purchase.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
-@FeignClient("purchase-server")
+@FeignClient(name = "purchase-server", configuration = ServiceFeignInterceptor.class)
 public interface PurchaseService {
 
     @PostMapping("/purchase/getPurchaseCode")

+ 1 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDTO.java

@@ -73,4 +73,5 @@ public class PurchaseDTO extends CommonBaseDTO implements Serializable{
 
     private String pu_sacode;
 
+    private String pu_currency;
 }

+ 1 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/Purchase.java

@@ -67,4 +67,5 @@ public class Purchase extends CommonBaseEntity implements Serializable {
 
     private String pu_sacode;
 
+    private String pu_currency;
 }

+ 11 - 1
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -36,6 +36,7 @@
     <result column="pu_text3" property="pu_text3" jdbcType="VARCHAR" />
     <result column="pu_text4" property="pu_text4" jdbcType="VARCHAR" />
     <result column="pu_text5" property="pu_text5" jdbcType="VARCHAR" />
+    <result column="pu_currency" property="pu_currency" jdbcType="VARCHAR" />
   </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.Purchase" extends="BaseResultMap" >
     <result column="PU_SHIPADDRESSCODE" property="pu_shipaddresscode" jdbcType="LONGVARCHAR" />
@@ -46,7 +47,7 @@
     PU_BUYERNAME, PU_DELIVERY, PU_TAXTOTAL, PU_TOTAL, PU_REMARK, PU_TOTALUPPER,
     PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, PU_ACCEPTSTATUS, PU_STATUSCODE, 
     PU_STATUS, companyid, updaterId,updaterName,updateTime,creatorid,creatorName,createtime, pu_text1, pu_text2, pu_text3, pu_text4,
-    pu_text5,pu_auditman,pu_auditdate
+    pu_text5,pu_auditman,pu_auditdate,pu_currency
   </sql>
   <sql id="Blob_Column_List" >
     PU_SHIPADDRESSCODE
@@ -166,6 +167,9 @@
       <if test="pu_shipaddresscode != null" >
         PU_SHIPADDRESSCODE,
       </if>
+      <if test="pu_currency != null" >
+      pu_currency,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="pu_code != null" >
@@ -264,6 +268,9 @@
       <if test="pu_shipaddresscode != null" >
         #{pu_shipaddresscode,jdbcType=LONGVARCHAR},
       </if>
+      <if test="pu_currency != null" >
+        #{pu_currency,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
@@ -362,6 +369,9 @@
       <if test="pu_auditdate != null" >
         pu_auditdate = #{pu_auditdate,jdbcType=TIMESTAMP},
       </if>
+      <if test="pu_currency != null" >
+        pu_currency = #{pu_currency,jdbcType=VARCHAR},
+      </if>
     </set>
     where pu_id = #{id,jdbcType=INTEGER}
   </update>

+ 2 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java

@@ -61,4 +61,6 @@ public class SaleDTO extends CommonBaseDTO{
     private String sa_sellercode;
 
     private Integer sa_sellerid;
+
+    private String sa_currency;
 }

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java

@@ -60,4 +60,6 @@ public class Sale extends CommonBaseEntity{
     private String sa_sellercode;
 
     private Integer sa_sellerid;
+
+    private String sa_currency;
 }

+ 10 - 0
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -34,6 +34,7 @@
     <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP"/>
     <result column="sa_sellerid" property="sa_sellerid" jdbcType="INTEGER" />
+    <result column="sa_currency" property="sa_currency" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     sa_id, sa_code, sa_custid, sa_custcode, sa_custname, sa_toplace, sa_total, sa_totalupper, 
@@ -151,6 +152,9 @@
       <if test="sa_sellerid != null">
         sa_sellerid,
       </if>
+      <if test="sa_currency != null">
+        sa_currency,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="sa_code != null" >
@@ -231,6 +235,9 @@
       <if test="sa_sellerid != null" >
         #{sa_sellerid,jdbcType=INTEGER},
       </if>
+      <if test="sa_currency != null" >
+        #{sa_currency,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.sale.po.Sale" >
@@ -320,6 +327,9 @@
       <if test="sa_sellerid != null" >
         sa_sellerid = #{sa_sellerid,jdbcType=INTEGER},
       </if>
+      <if test="sa_currency != null" >
+        sa_currency = #{sa_currency,jdbcType=VARCHAR},
+      </if>
     </set>
     where sa_id = #{id,jdbcType=INTEGER}
   </update>

+ 1 - 0
applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml

@@ -56,6 +56,7 @@
         and  companyid = #{companyId}
       </if>
     </where>
+    order by pd_prodcode,pi_date desc
   </select>
 
 

+ 1 - 1
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -65,7 +65,7 @@ public class AuthController {
     @Value("${auth.header:Authorization}")
     private String authHeader;
 
-    @Value("${auth.expire:1800000}")
+    @Value("${auth.expire:18000}")
     private int expire;
 
     @Value("${auth.max-errors:5}")

+ 29 - 21
frontend/saas-portal-web/src/components/conenter/addenterprise.vue

@@ -8,7 +8,7 @@
             <div class="gs-worp qy-worp tj-up">
                 <div class="qy-title" style="position: relative;">
                     <ul class="over">
-                        <li style="width:100%" class="left xs" v-for="(d, i) in tab" :key="i" :class= "{qyactive:nowindex == i}" @click="tabwith(i)">{{d.name}}</li>
+                        <li class="left xs" v-for="(d, i) in tab" :key="i" :class= "{qyactive:nowindex == i}" @click="tabwith(i)">{{d.name}}</li>
                     </ul>
                 </div>
                 <div class="qy-conent" :class= "{showqiye:nowindex == 0}" style="padding-top: 60px;">
@@ -16,7 +16,7 @@
                         <li style="margin: 0">
                             <span class="qy-biaoti"><span class="xingxing">*</span>企业名称</span>
                             <input class="inpind" ref="qyname" @change= "spaceName" type="text" placeholder="请填写企业全称">
-                            <dir class="qy-Tips"><span ref="qyno" style="color:red"></span></dir>
+                            <div class="qy-Tips Tips-buttom"><span ref="qyno" style="color:red"></span></div>
                         </li>
                         <li>
                             <span class="qy-biaoti">所属行业</span>
@@ -83,9 +83,9 @@
                             <div class="lookup">
                                 <ul>
                                     <li v-for="(d, i) in arr" :key="i" @click="qylist(i)" :class="{'hui':newindex === i}">
-                                        <span>企业名称:</span><span>{{d.name}}</span>
-                                        <span class="saasguanli">SaaS管理员:</span><span>{{d.admin}}</span>
-                                        <span>联系方式:</span><span>{{d.adminMobile}}</span>
+                                        <span class="maxtxt">{{d.name}}</span>
+                                        <span class="maxtxt">{{d.admin}}</span>
+                                        <span>{{d.adminMobile}}</span>
                                     </li>
                                 </ul>
                             </div>
@@ -134,7 +134,7 @@ import { setTimeout } from 'timers';
                 // placeholde:{province:"", city:"", area:""},
                 tab:[
                     {name:'创建新企业'},
-                    // {name:'加入企业'},
+                    {name:'加入企业'},
                 ],
                 nowindex:0,
                 newindex:'',
@@ -190,9 +190,6 @@ import { setTimeout } from 'timers';
                                 this.qymingzi = false;
                             }
                         })
-                        .catch(err=>{
-                            // console.log("请求错误",err);
-                        })
                     }
                 }
             },
@@ -205,7 +202,7 @@ import { setTimeout } from 'timers';
                     this.islookup = false;
                 } else {
                     this.$ajax({
-                        url: "http://192.168.253.41:8560/api/account/accountCenter/company/isOpen",//http://192.168.253.41:8560
+                        url: this.$url.api+"/api/account/accountCenter/company/isOpen",//http://192.168.253.41:8560
                         method:'GET',
                         params: {
                             companyName: qyname
@@ -216,16 +213,16 @@ import { setTimeout } from 'timers';
                     })
                     .then(res=>{
                         if (res.data.success) {
-                            this.arr = res.data.data
+                            this.newindex = '';
+                            this.arr = res.data.data;
                             this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/ok.png" alt="">';
                             this.islookup = true;   
-                        } else if (res.data.success = false && res.data.message != null){
+                        } else if (res.data.success == false && res.data.message == '公司不存在') {
                             this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/warning.png" alt=""> 该企业不存在';
                         } else {
                             this.$message.error('请求失败,请重试');
                         }
                     })
-                    
                 }
             },
             //验证个人姓名1
@@ -268,7 +265,6 @@ import { setTimeout } from 'timers';
             //加入企业提交按钮
             Submission(){
                 let token = this.mytoken.token;
-                let qyname = this.$refs.lookupqyname.value.replace(/\s+/g, "");//企业名字
                 let username = this.$refs.lookupname.value.replace(/\s+/g, "");//姓名过滤空格
                 if (!this.islookup) {
                     this.$message.error('企业或管理员不能为空');
@@ -278,7 +274,7 @@ import { setTimeout } from 'timers';
                     this.$message.error('姓名不能包含符号、数字等非法字符');
                 } else if (this.companyId){
                     this.$ajax({
-                        url:'http://192.168.253.41:8560/api/account/accountCenter/company/join',
+                        url: this.$url.api+'/api/account/accountCenter/company/join',
                         method:'POST',
                         data:{
                             username:username,
@@ -295,7 +291,10 @@ import { setTimeout } from 'timers';
                             this.$store.state.ishongdian = true;//显示红点
                             setTimeout(()=>{
                                 this.$router.push({name:'company'});
+                                document.documentElement.scrollTop = 0;
                             },3000)
+                        } else {
+                            this.$message.error(res.data.message);
                         }
                     })
                 } else {
@@ -343,10 +342,9 @@ import { setTimeout } from 'timers';
                 let address = this.$refs.address.value.replace(/\s+/g, "");//公司详细地址
                 let name = this.$refs.name.value.replace(/\s+/g, "");//个人姓名
                 let email = this.$refs.email.value;//邮箱
-                let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
-                let token = String(mytoken.token);
-                let uu = mytoken.account.uu;
-                let mobile = mytoken.account.mobile;//手机号
+                let token = this.mytoken.token;
+                let uu = this.mytoken.account.uu;
+                let mobile = this.mytoken.account.mobile;//手机号
                 let company = {'name':qyname,'address':address,'type':qyindustry};
                 let account = {'realname':name,'email':email,'mobile':mobile, 'uu':uu};
                 // console.log('姓名',name)//个人姓名
@@ -380,7 +378,7 @@ import { setTimeout } from 'timers';
                                 this.isadd = true;//添加成功弹窗
                                 setTimeout(()=>{
                                     document.documentElement.scrollTop = 0;
-                                    let session = JSON.parse(window.localStorage.getItem('app-state-session'));
+                                    let session = Session.get();
                                     session.account.realname = name;
                                     Session.set(session);
                                     // this.$router.push({name:'company'})
@@ -496,6 +494,16 @@ import { setTimeout } from 'timers';
     margin-right: 5px;
 }
 .hui {
-    background: #c5c5c5;
+    background: #c5c5c5 !important;
+}
+.lookup > ul > li:hover {
+    background: #f5f4f4
+}
+.lookup > ul {
+    height: 300px;
+    overflow-y: scroll;
+}
+.maxtxt {
+    font-size: 16px !important;
 }
 </style>

+ 12 - 12
frontend/saas-portal-web/src/components/conenter/company.vue

@@ -142,7 +142,7 @@
             let token = String(mytoken.token);
             //企业列表
             this.$ajax({
-                    url: this.$url.api+"/api/account/accountCenter/company/list",//http://192.168.253.29:8560
+                    url: this.$url.api+"/api/account/accountCenter/company/list",//http://192.168.253.41:8560
                     method: 'get',
                     params: {
                         mobile: mytoken.account.mobile
@@ -315,21 +315,21 @@
                 .then(res=>{
                     // console.log('请求成功',res)
                     if (res.data.success) {
-                        this.saasid = res.data.data
+                        this.saasid = res.data.data;
                         this.ktsass = false;
-                        let id = res.data.data
-                        let name = qyname
-                        let logoUrl = null
-                        let addenterprise = {'id':id, 'logoUrl': logoUrl, 'name': name}
-                        let session = JSON.parse(window.localStorage.getItem('app-state-session'))
-                        session.account.companies.push(addenterprise)
+                        let id = res.data.data;
+                        let name = qyname;
+                        let logoUrl = null;
+                        let addenterprise = {'id':id, 'logoUrl': logoUrl, 'name': name};
+                        let session = Session.get();
+                        session.account.companies.push(addenterprise);
                         Session.set(session);
                         this.$router.go(0);
                     } else {
-                        let msg = res.data.message
-                        let name = msg.split(" ")[1]
-                        this.admin = name.split('(')[0]
-                        this.adminMobile = name.split('(')[1].split(')')[0]
+                        let msg = res.data.message;
+                        let name = msg.split(" ")[1];
+                        this.admin = name.split('(')[0];
+                        this.adminMobile = name.split('(')[1].split(')')[0];
                         this.isokopensaas = true;
                     }
                 })

+ 1 - 2
frontend/saas-portal-web/src/components/conenter/details.vue

@@ -173,7 +173,7 @@
                     let company = {'name':qyname,'address':address, 'id':companyId, 'type':qyindustry};
                     let account = {'realname':name,'email':email,'mobile':mobile, 'uu':uu};
                     this.$ajax({
-                        url: this.$url.api+"/api/account/accountCenter/companyAccount/update",//http://192.168.253.31:8560
+                        url: this.$url.api+"/api/account/accountCenter/companyAccount/update",//http://192.168.253.41:8560
                         method: 'post',
                         data: {
                             companyRegDTO:company,
@@ -184,7 +184,6 @@
                         }
                     })
                     .then(res=>{
-                        // console.log("请求成功",res)
                         if (res.data.success) {
                             document.documentElement.scrollTop = 0;
                             this.modify = true;

+ 102 - 38
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -130,18 +130,31 @@
                                 <span>状态</span>
                                 <span>操作</span>
                             </li>
-                            <li class="newslist" v-for="(d, i) in arr" :key="i">
-                                <span>{{d.leixing}}</span>
-                                <span>{{d.time}}</span>
-                                <span class="newscentent">
-                                    <span>{{d.neirong.qyname}}</span>
-                                    <span>{{d.neirong.saas}}</span>
-                                    <span>{{d.neirong.phone}}</span>
+                            <li v-if="isnews" class="newslist" v-for="(d, i) in arr" :key="i">
+                                <span>加入申请</span>
+                                <span>{{d.createTime}}</span>
+                                <span class="newscentent" style="position:relative;top:9px">
+                                    <span>{{d.companyName}}</span>
+                                    <span>{{d.admin}}</span>
+                                    <span>{{d.adminMobile}}</span>
                                 </span>
-                                <span>{{d.zhuangtai}}</span>
-                                <span><button v-if="d.caozuo" @click="Rejoin(i)" class="news-btn">重新加入</button></span>
+                                <span v-if='d.status == 0'>未通过</span>
+                                <span v-else-if='d.status == 1'>已批准</span>
+                                <span v-else-if='d.status == 2'>待批准</span>
+                                <span><button v-if="d.status == 0" @click="Rejoin(i)" class="news-btn">重新加入</button></span>
+                            </li>
+                            <li v-if="!isnews">
+                                <img style="width:100%" src="/static/img/nodata.png" alt="">
                             </li>
                         </ul>
+                        <div v-if="isnews" class="my-pagination">
+                            <el-pagination
+                                background
+                                @current-change="handleCurrentChange"
+                                layout="prev, pager, next"
+                                :total= list>
+                            </el-pagination>
+                        </div>
                     </div>
                 </div>
             </div>
@@ -163,27 +176,27 @@ import { setTimeout } from 'timers';
                 isname:true,//姓名验证
                 reg: new RegExp(/[\@\#\$\%\&\*!\¥]/),//非法字符
                 isheigh:false,//默认高度
+                isnews: false,
                 tab: [
                     {name: '企业信息'},
                     {name: '个人信息'},
                     {name: '安全设置'},
-                    // {name: '消息'},
+                    {name: '消息'},
                 ],
-                arr: [
-                    {leixing:'加入申请',time:'2018/12/01  12:45:21',neirong:{qyname:'X防守对方的发士大夫XX公司',saas:'管理员名称范德萨发达',phone:'1345678923'},zhuangtai:'待批准',caozuo:false},
-                    {leixing:'加入申请',time:'2018/12/01  12:45:21',neirong:{qyname:'XXX公司',saas:'管理员名称',phone:'1345678923'},zhuangtai:'未通过',caozuo:true},
-                ]
+                arr: [],
+                list:1
             }
         },
         mounted(){
-            let mob = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
-            this.mobile = mob;
+            let phone = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
+            this.mobile = phone;
             this.boxheight();
         },
         watch:{
             arr:function(){
                 this.$nextTick(function(){
                     this.boxheight();
+                    this.isnews = true;
                 })
             }
         },
@@ -193,26 +206,28 @@ import { setTimeout } from 'timers';
             },
             ishongdian(){
                 return this.$store.state.ishongdian;
-            }
+            },
         },
         methods: {
             // tab切换
             tabswitch(index){
                 if (index == 3) {
                     this.nowindex = 3;
-                    let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
+                    let mytoken = Session.get();
                     let id = mytoken.account.id;
-                    // tab切换到消息的时候执行
                     let param = {
                         type:'condition',
                         value:'creatorId='+id+''
                     }
+                    // tab切换到消息的时候执行
                     this.$ajax({
-                        url:'http://192.168.253.41:8560/api/commons/remind/apply/list',
+                        url: this.$url.api+'/api/commons/remind/apply/list',
                         method:'GET',
                         async:false,
                         params: {
-                            condition:JSON.stringify(param)
+                            condition:JSON.stringify(param),
+                            number:1,
+                            size:10
                         },
                         headers:{
                             'Access-Control-Allow-Origin':'*',
@@ -221,8 +236,11 @@ import { setTimeout } from 'timers';
                         }
                     })
                     .then(res=>{
-                        console.log(res)
-                        this.$store.state.ishongdian = false
+                        if (res.data.success) {
+                            this.arr = res.data.data.list;
+                            this.list = res.data.data.total;
+                            this.$store.state.ishongdian = false;
+                        }
                     })
                 } else {
                     this.nowindex = index;
@@ -230,9 +248,58 @@ import { setTimeout } from 'timers';
                 
             },
             setTurnHome(){
-                // debugger
                 this.$parent.turnHome = true
             },
+            //重新加入
+            Rejoin(i){
+                this.$ajax({
+                    url: this.$url.api+'/api/account/accountCenter/company/join',
+                    method:'POST',
+                    data:{
+                        username:this.arr[i].creatorName,
+                        accountId:this.mytoken.id,
+                        companyId:this.arr[i].companyId,
+                    },
+                    headers:{
+                        "Authorization":Session.getToken(),
+                    }
+                })
+                .then(res=>{
+                    if (res.data.success) {
+                        this.$message.success('提交成功,待管理员批准');
+                        this.tabswitch(3);//本页面刷新
+                    }
+                })
+            },
+            // 分页
+             handleCurrentChange(val) {
+                let mytoken = Session.get();
+                let id = mytoken.account.id;
+                let param = {
+                    type:'condition',
+                    value:'creatorId='+id+''
+                }
+                this.$ajax({
+                    url: this.$url.api+'/api/commons/remind/apply/list',
+                    method:'GET',
+                    async:false,
+                    params: {
+                        condition:JSON.stringify(param),
+                        number:val,
+                        size:10
+                    },
+                    headers:{
+                        'Access-Control-Allow-Origin':'*',
+                        "Authorization":mytoken.token,
+                        'Content-Type':'application/json;charset=UTF-8'
+                    }
+                })
+                .then(res=>{
+                    if (res.data.success) {
+                        this.arr = res.data.data.list;
+                    }
+                })
+            },
             //退出
             loginout(){
                 const frame = window.frames[window.frames.length - 1]
@@ -278,7 +345,6 @@ import { setTimeout } from 'timers';
                 if (this.isname) {
                     let name = this.$refs.realname.value.replace(/\s+/g, "");
                     let id = this.mytoken.id;
-                    let token = JSON.parse(localStorage.getItem('app-state-session')).token;
                     this.$ajax({
                         url: this.$url.api+"/api/account/account/update",
                         method :'post',
@@ -287,12 +353,12 @@ import { setTimeout } from 'timers';
                             realname:name
                         },
                         headers: {
-                            "Authorization":token
+                            "Authorization":Session.getToken()
                         }
                     })
                     .then(res=>{
                         if (res.data.success) {
-                            let session = JSON.parse(window.localStorage.getItem('app-state-session'));
+                            let session = Session.get();
                             session.account.realname = name;
                             Session.set(session);
                             this.$router.go(0);
@@ -303,20 +369,10 @@ import { setTimeout } from 'timers';
                     })
                 }
             },
-            //重新加入
-            Rejoin(i){
-                //成功后提示
-                this.$message({
-                    message: '提交成功,待管理员批准',
-                    type: 'success'
-                });
-                this.arr[i].zhuangtai = '待批准';
-                this.arr[i].caozuo = false;
-            },
             //没有内容也要有一定的高度
             boxheight(){
                 let H = this.$refs.qiyebox.offsetHeight;
-                if (H < 500) {
+                if (H <= 500) {
                     this.isheigh = true
                 } else {
                     this.isheigh = false
@@ -385,6 +441,9 @@ import { setTimeout } from 'timers';
     width: 130%;
     margin-left: -15%;
 }
+.gs-news > img {
+    width: 100%
+}
 .gs-news > ul {
     padding: 0;
     font-family: PingFangSC-Regular;
@@ -457,4 +516,9 @@ import { setTimeout } from 'timers';
     top: -5px;
     left: -25px;
 }
+.my-pagination {
+    margin: 0;
+    text-align: center !important;
+    margin-top: 50px;
+}
 </style>

+ 12 - 10
frontend/saas-portal-web/static/css/gongsi.css

@@ -379,16 +379,9 @@
     color: #243A52;
     text-align: right;
     font-weight: 600;
-    margin-right: 40px;
-    width: 100px;
     display: inline-block;
-}
-.qy-biaoqian {
-    padding: 6px 20px;
-    color: #FFFFFF;
-    background: #1E88F5;
-    border-radius: 2px;
-    margin-right: 8px;
+    width: 15%;
+    margin-right: 6%;
 }
 .jr-conent {
     padding: 60px 30px 30px 30px;
@@ -422,12 +415,21 @@
     margin-bottom: 0 !important;
 } 
 .lookup > ul > li span{
-    width: 16%;
     display: inline-block;
     overflow: hidden;
     text-overflow:ellipsis;
     white-space: nowrap;
 } 
+.lookup > ul > li span:nth-child(1) {
+    width: 47%
+}
+.lookup > ul > li span:nth-child(2) {
+    width: 30%;
+    padding: 0px 20px;
+} 
+.lookup > ul > li span:nth-child(3) {
+    width: 20%;
+} 
 .saasguanli {
     width: 18% !important;
 }

BIN
frontend/saas-portal-web/static/img/nodata.png


+ 8 - 3
frontend/saas-web/app/view/core/chart/EChartsBase.js

@@ -174,11 +174,11 @@ Ext.define('saas.view.core.EChartsBase', {
 
         me.removeEmptyChart();
 
-        if(dataCount > 0) {
+        if(me.isEmpty(store)) {
+            me.appendEmptyChart();
+        }else {
             option = me.createOption(store);
             me.echarts.setOption(option);
-        }else {
-            me.appendEmptyChart();
         }
     },
 
@@ -204,6 +204,11 @@ Ext.define('saas.view.core.EChartsBase', {
         }
     },
 
+    isEmpty: function(store) {
+        var dataCount = store.getCount();
+        return dataCount <= 0;
+    },
+
     createOption: function(store) {
         return null;
     }

+ 11 - 0
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -18,6 +18,7 @@ Ext.define('saas.view.home.charts.MonthSale', {
                 bind: {
                     store: '{month_sale}',
                 },
+                isEmpty: me.isEmpty,
                 createOption: me.createOption
             }]
         });
@@ -25,6 +26,16 @@ Ext.define('saas.view.home.charts.MonthSale', {
         me.callParent(arguments);
     },
 
+    isEmpty: function(store) {
+        var index = store.findBy(function(s) {
+            return s.get('y') > 0;
+        });
+        
+        var flag = index == -1;
+
+        return flag;
+    },
+
     createOption: function(store) {
         var fields = [],
         data = [];

+ 6 - 0
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -334,6 +334,12 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 name : "pu_date", 
                 fieldLabel : "单据日期", 
                 defaultValue: new Date()
+            }, {
+                xtype : "textfield", 
+                name : "pu_currency",
+                fieldLabel : "币别", 
+                readOnly:true,
+                defaultValue:'RMB'
             }, {
                 xtype : "textfield", 
                 name : "pu_total", 

+ 6 - 0
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -322,6 +322,12 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 name : "sa_date", 
                 fieldLabel : "单据日期", 
                 defaultValue: new Date()
+            }, {
+                xtype : "textfield", 
+                name : "sa_currency",
+                fieldLabel : "币别", 
+                readOnly:true,
+                defaultValue:'RMB'
             }, {
                 xtype : "textfield", 
                 name : "sa_total", 

+ 98 - 53
frontend/saas-web/app/view/sys/account/DataList.js

@@ -1,6 +1,3 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
 Ext.define('saas.view.sys.account.DataList', {
     extend: 'Ext.grid.Panel',
     xtype: 'sys-account-datalist',
@@ -13,35 +10,53 @@ Ext.define('saas.view.sys.account.DataList', {
     _openUrl:'/api/account/account/enable',
     _closeUrl:'/api/account/account/disable',              
 
+    plugins: [{
+        ptype: 'menuclipboard'
+    }],
+
     tbar: [{
         width: 150,
         name: 'username',
         xtype: 'textfield',
-        emptyText : '账户名称'
+        emptyText : '账户名称',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 140,
         name: 'mobile',
         xtype: 'textfield',
         emptyText : '手机号码',
         // regex:/^1(3|4|5|7|8|9)\d{9}$/,
-        // regexText:'请输入正确的手机号码'
+        // regexText:'请输入正确的手机号码',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         xtype:'button',
         text:'查询',
         listeners: {
             click:function(b){
-                var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                var grid = b.up('grid');
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -144,6 +159,9 @@ Ext.define('saas.view.sys.account.DataList', {
                 });
             }
         }]
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     dbSearchFields: [],
@@ -279,6 +297,7 @@ Ext.define('saas.view.sys.account.DataList', {
                 width:50,
                 dataIndex:'actioncolumn',
                 text:'操作',
+                align: 'center',
                 items: [{
                     tooltip: '编辑',
                     iconCls: 'x-fa fa-pencil fa-fw',
@@ -319,10 +338,13 @@ Ext.define('saas.view.sys.account.DataList', {
     /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -337,10 +359,9 @@ Ext.define('saas.view.sys.account.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -354,38 +375,58 @@ Ext.define('saas.view.sys.account.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
+
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
             type = 'enum';
-        }else {
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
+            type = 'enum';
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -395,32 +436,36 @@ Ext.define('saas.view.sys.account.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        //debugger
     }
-
 })
 
 

+ 3 - 0
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -103,6 +103,9 @@ Ext.define('saas.view.sys.finish.DataList', {
         text : "结果", 
         dataIndex : "ml_result", 
         width : 250.0, 
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     condition:'',

+ 91 - 51
frontend/saas-web/app/view/sys/invitation/DataList.js

@@ -1,6 +1,3 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
 Ext.define('saas.view.sys.invitation.DataList', {
     extend: 'Ext.grid.Panel',
     xtype: 'sys-invitation-datalist',
@@ -14,13 +11,27 @@ Ext.define('saas.view.sys.invitation.DataList', {
     plugins: [{
         ptype: 'cellediting',
         clicksToEdit: 1
+    }, {
+        ptype: 'menuclipboard'
     }],
 
     tbar: [{
         width: 110,
-        name: 'username',
+        name: 're_applyname',
         xtype: 'textfield',
-        emptyText : '姓名'
+        emptyText : '姓名',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 140,
         name: 're_status',
@@ -45,6 +56,18 @@ Ext.define('saas.view.sys.invitation.DataList', {
             }else {
                 return 're_status=\'' + value + '\'';
             }
+        },
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
         }
     },{
         xtype:'button',
@@ -52,17 +75,7 @@ Ext.define('saas.view.sys.invitation.DataList', {
         listeners: {
             click:function(b){
                 var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -277,10 +290,13 @@ Ext.define('saas.view.sys.invitation.DataList', {
     /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -295,10 +311,9 @@ Ext.define('saas.view.sys.invitation.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -312,38 +327,58 @@ Ext.define('saas.view.sys.invitation.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
+
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
             type = 'enum';
-        }else {
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
+            type = 'enum';
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -353,30 +388,35 @@ Ext.define('saas.view.sys.invitation.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        this.store.load()
     }
 
 })

+ 97 - 48
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -13,16 +13,44 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     dataUrl:'/api/commons/number/list',                 
     deleteUrl:'/api/commons/number/delete/',
 
+    plugins: [{
+        ptype: 'menuclipboard'
+    }],
+
     tbar: [{
         width: 110,
         name: 'mn_name',
         xtype: 'textfield',
-        emptyText : '单据名称'
+        emptyText : '单据名称',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 110,
         name: 'mn_leadcode',
         xtype: 'textfield',
-        emptyText : '单据前缀'
+        emptyText : '单据前缀',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         cls:'x-formpanel-btn-blue',
         xtype:'button',
@@ -30,17 +58,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
         listeners: {
             click:function(b){
                 var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -101,6 +119,9 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
         text : '流水长度', 
         dataIndex : 'mn_number', 
         width : 110.0 
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     dbSearchFields: [],
@@ -241,6 +262,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                 width:50,
                 dataIndex:'actioncolumn',
                 text:'操作',
+                align: 'center',
                 items: [{
                     tooltip: '编辑',
                     iconCls: 'x-fa fa-pencil fa-fw',
@@ -281,10 +303,13 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -299,10 +324,9 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -316,38 +340,58 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
+
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            type = 'enum';
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
             type = 'enum';
-        }else {
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -357,30 +401,35 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        //debugger
     }
 
 })

+ 110 - 50
frontend/saas-web/app/view/sys/messagelog/DataList.js

@@ -7,21 +7,61 @@ Ext.define('saas.view.sys.messagelog.DataList', {
     layout:'fit',
     dataUrl:'/api/commons/messagelog/list',
 
+    plugins: [{
+        ptype: 'menuclipboard'
+    }],
+
     tbar: [{
         width: 110,
         name: 'ml_name',
         xtype: 'textfield',
-        emptyText : '单据类型'
+        emptyText : '单据类型',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 150,
         name: 'ml_code',
         xtype: 'textfield',
-        emptyText : '单据编号'
+        emptyText : '单据编号',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 110,
         name: 'ml_man',
         xtype: 'textfield',
-        emptyText : '操作人员'
+        emptyText : '操作人员',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         cls:'x-formpanel-btn-blue',
         xtype:'button',
@@ -29,17 +69,7 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         listeners: {
             click:function(b){
                 var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -81,6 +111,9 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         text : "操作人员", 
         dataIndex : "ml_man", 
         width : 110, 
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     condition:'',
@@ -146,13 +179,16 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         me.callParent(arguments);
     },
 
-     /**
+    /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -167,10 +203,9 @@ Ext.define('saas.view.sys.messagelog.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -184,38 +219,58 @@ Ext.define('saas.view.sys.messagelog.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
+
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
             type = 'enum';
-        }else {
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
+            type = 'enum';
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -225,30 +280,35 @@ Ext.define('saas.view.sys.messagelog.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
+            var from = value.from,
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        //debugger
     }
 
 });

+ 2 - 2
frontend/saas-web/ext/packages/ux/src/plugin/MenuClipboard.js

@@ -80,10 +80,10 @@ Ext.define('Ext.ux.plugin.MenuClipboard', {
     createMenu : function() {
 		var me = this;
 		return Ext.create('Ext.menu.Menu', {
-			bodyCls:'copyMenu',
+			cls: 'x-copy-menu',
 			items: [{
 				copyType : 'cell',
-				iconCls : 'x-button-icon-copy',
+				iconCls : 'x-fa fa-copy',
 				text : '复制单元格',
 				handler: function(item) {
 					if(me.execable) {