Procházet zdrojové kódy

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

guq před 7 roky
rodič
revize
cdf0981986
41 změnil soubory, kde provedl 303 přidání a 188 odebrání
  1. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  2. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  3. 0 4
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  4. 0 4
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  5. 3 2
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  6. 4 9
      base-servers/socket/socket-api/src/main/java/com/usoftchina/saas/socket/api/SocketMessageApi.java
  7. 60 0
      base-servers/socket/socket-api/src/main/java/com/usoftchina/saas/socket/dto/ClientMessage.java
  8. 4 0
      base-servers/socket/socket-server/pom.xml
  9. 14 8
      base-servers/socket/socket-server/src/main/java/com/usoftchina/saas/socket/controller/MessageController.java
  10. 1 0
      framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java
  11. 8 5
      frontend/saas-portal-web/src/components/conenter/home.vue
  12. 0 25
      frontend/saas-portal-web/src/pages/remove-token/remove-token.html
  13. 0 0
      frontend/saas-portal-web/src/pages/remove-token/remove-token.js
  14. 0 15
      frontend/saas-portal-web/src/pages/remove-token/remove-token.vue
  15. 1 0
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  16. 5 2
      frontend/saas-web/app/view/core/dbfind/types/AccountDbfindTrigger.js
  17. 3 0
      frontend/saas-web/app/view/core/dbfind/types/BankInfoDbfindTrigger.js
  18. 3 0
      frontend/saas-web/app/view/core/dbfind/types/BomDbfindTrigger.js
  19. 3 0
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  20. 3 0
      frontend/saas-web/app/view/core/dbfind/types/EmployeeDbfindTrigger.js
  21. 3 0
      frontend/saas-web/app/view/core/dbfind/types/OriOrderMutiDbfindTrigger.js
  22. 3 0
      frontend/saas-web/app/view/core/dbfind/types/ProductAddMultiDbfindTrigger.js
  23. 3 0
      frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js
  24. 3 0
      frontend/saas-web/app/view/core/dbfind/types/ProductMultiDbfindTrigger.js
  25. 3 0
      frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js
  26. 3 0
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  27. 10 1
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  28. 1 0
      frontend/saas-web/app/view/document/address/DataList.js
  29. 38 0
      frontend/saas-web/app/view/document/address/DatalistController.js
  30. 11 9
      frontend/saas-web/app/view/document/customer/FormPanel.js
  31. 1 1
      frontend/saas-web/app/view/document/kind/ChildForm.js
  32. 5 5
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  33. 1 1
      frontend/saas-web/app/view/main/Main.js
  34. 2 0
      frontend/saas-web/app/view/main/Main.scss
  35. 42 19
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  36. 0 22
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  37. 14 14
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  38. 14 14
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  39. 14 14
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  40. 14 14
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  41. 2 0
      frontend/saas-web/app/view/stock/report/DataListController.js

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -220,6 +220,8 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
         updatePay.setId(pay.getMain().getId());
         updatePay.setPb_pdamount(amountTotal);
         updatePay.setPb_pbdamount(amountTotal2);
+        updatePay.setPb_auditdate(new Date());
+        updatePay.setPb_auditman(BaseContextHolder.getUserName());
         paybalanceMapper.updateByPrimaryKeySelective(updatePay);
         //updateByPrimaryKeySelective
         /**

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -264,6 +264,8 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
         updateRay.setId(rec.getMain().getId());
         updateRay.setRb_rdamount(amountTotal);
         updateRay.setRb_rbdamount(amountTotal2);
+        updateRay.setRb_auditdate(new Date());
+        updateRay.setRb_auditman(BaseContextHolder.getUserName());
         recbalanceMapper.updateByPrimaryKeySelective(updateRay);
         /**
          * 更新客户资料

+ 0 - 4
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -385,12 +385,8 @@
       <if test="pb_text5 != null">
         pb_text5 = #{pb_text5,jdbcType=VARCHAR},
       </if>
-      <if test="pb_auditman !=null">
         pb_auditman = #{pb_auditman,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_auditdate !=null">
         pb_auditdate = #{pb_auditdate,jdbcType=TIMESTAMP}
-      </if>
     </set>
     where pb_id = #{id,jdbcType=INTEGER}
   </update>

+ 0 - 4
applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml

@@ -537,12 +537,8 @@
       <if test="rb_text5 != null">
         rb_text5 = #{rb_text5,jdbcType=VARCHAR},
       </if>
-      <if test="rb_auditman !=null">
         rb_auditman = #{rb_auditman,jdbcType=VARCHAR},
-      </if>
-    <if test="rb_auditdate !=null">
       rb_auditdate = #{rb_auditdate,jdbcType=TIMESTAMP}
-    </if>
     </set>
     where rb_id = #{id,jdbcType=INTEGER}
   </update>

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

@@ -25,6 +25,7 @@ import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.server.web.ServletUtils;
 import com.usoftchina.saas.socket.api.SocketMessageApi;
+import com.usoftchina.saas.socket.dto.ClientMessage;
 import com.usoftchina.saas.utils.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -261,8 +262,8 @@ public class AuthController {
                 JwtInfo jwtInfo = new JwtInfo(appId, companyId, accountDTO.getId(), accountDTO.getUsername(), accountDTO.getRealname());
                 JwtToken jwtToken = JwtHelper.generateToken(jwtInfo, privateKeyPath, expire);
                 TokenDTO tokenDTO = BeanMapper.map(jwtToken, TokenDTO.class);
-                socketMessageApi.sendToClient(clientId, "/sso/callback",
-                        JsonUtils.toJsonString(new AuthDTO(tokenDTO, accountDTO)));
+                socketMessageApi.sendToClient(new ClientMessage(clientId, "/sso/callback",
+                        JsonUtils.toJsonString(new AuthDTO(tokenDTO, accountDTO))));
             }
             ServletUtils.writeJsonPMessage(response, callback, true);
         }

+ 4 - 9
base-servers/socket/socket-api/src/main/java/com/usoftchina/saas/socket/api/SocketMessageApi.java

@@ -1,9 +1,10 @@
 package com.usoftchina.saas.socket.api;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.socket.dto.ClientMessage;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RequestBody;
 
 /**
  * @author yingp
@@ -14,24 +15,18 @@ public interface SocketMessageApi {
     /**
      * 发送信息给指定用户
      *
-     * @param clientId
-     * @param dest
      * @param message
      * @return
      */
     @PostMapping("/message/clients")
-    Result sendToClient(@RequestParam("clientId") String clientId,
-                        @RequestParam(value = "dest", required = false) String dest,
-                        @RequestParam("message") String message);
+    Result sendToClient(@RequestBody ClientMessage message);
 
     /**
      * 广播信息
      *
-     * @param dest
      * @param message
      * @return
      */
     @PostMapping("/message/clients/all")
-    Result sendToAllClients(@RequestParam(value = "dest", required = false) String dest,
-                            @RequestParam("message") String message);
+    Result sendToAllClients(@RequestBody ClientMessage message);
 }

+ 60 - 0
base-servers/socket/socket-api/src/main/java/com/usoftchina/saas/socket/dto/ClientMessage.java

@@ -0,0 +1,60 @@
+package com.usoftchina.saas.socket.dto;
+
+import java.io.Serializable;
+
+/**
+ * @author yingp
+ * @date 2018/12/12
+ */
+public class ClientMessage implements Serializable{
+    /**
+     * 客户端ID
+     */
+    private String clientId;
+    /**
+     * destination
+     */
+    private String dest;
+    /**
+     * 消息内容
+     */
+    private String message;
+
+    public ClientMessage() {
+    }
+
+    public ClientMessage(String dest, String message) {
+        this.dest = dest;
+        this.message = message;
+    }
+
+    public ClientMessage(String clientId, String dest, String message) {
+        this.clientId = clientId;
+        this.dest = dest;
+        this.message = message;
+    }
+
+    public String getClientId() {
+        return clientId;
+    }
+
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    public String getDest() {
+        return dest;
+    }
+
+    public void setDest(String dest) {
+        this.dest = dest;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+}

+ 4 - 0
base-servers/socket/socket-server/pom.xml

@@ -35,6 +35,10 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-websocket</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>socket-api</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

+ 14 - 8
base-servers/socket/socket-server/src/main/java/com/usoftchina/saas/socket/controller/MessageController.java

@@ -1,6 +1,10 @@
 package com.usoftchina.saas.socket.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.exception.ExceptionCode;
+import com.usoftchina.saas.socket.api.SocketMessageApi;
+import com.usoftchina.saas.socket.dto.ClientMessage;
+import com.usoftchina.saas.utils.BizAssert;
 import org.springframework.messaging.simp.SimpMessagingTemplate;
 import org.springframework.web.bind.annotation.*;
 
@@ -12,7 +16,7 @@ import javax.annotation.Resource;
  */
 @RestController
 @RequestMapping("/message")
-public class MessageController {
+public class MessageController implements SocketMessageApi{
 
     @Resource
     private SimpMessagingTemplate simpMessagingTemplate;
@@ -20,39 +24,41 @@ public class MessageController {
     /**
      * 发送信息给指定用户
      *
-     * @param clientId
-     * @param dest
      * @param message
      * @return
      */
+    @Override
     @PostMapping("/clients")
-    public Result sendToClient(@RequestParam String clientId, String dest, @RequestParam String message) {
+    public Result sendToClient(@RequestBody ClientMessage message) {
+        BizAssert.hasText(message.getClientId(), ExceptionCode.ILLEGAL_ARGUMENTS);
+        BizAssert.hasText(message.getDest(), ExceptionCode.ILLEGAL_ARGUMENTS);
         /**
          * 前端使用
          * <pre>
          *     stomp.subscribe('/clients/{clientId}/{dest}', function(message){});
          * </pre>
          */
-        simpMessagingTemplate.convertAndSendToUser(clientId, dest, message);
+        simpMessagingTemplate.convertAndSendToUser(message.getClientId(), message.getDest(), message.getMessage());
         return Result.success();
     }
 
     /**
      * 广播信息
      *
-     * @param dest
      * @param message
      * @return
      */
+    @Override
     @PostMapping("/clients/all")
-    public Result sendToAllClients(String dest, @RequestParam String message) {
+    public Result sendToAllClients(@RequestBody ClientMessage message) {
+        BizAssert.hasText(message.getDest(), ExceptionCode.ILLEGAL_ARGUMENTS);
         /**
          * 前端使用
          * <pre>
          *     stomp.subscribe('/clients/{dest}', function(message){});
          * </pre>
          */
-        simpMessagingTemplate.convertAndSend(dest, message);
+        simpMessagingTemplate.convertAndSend(message.getDest(), message.getMessage());
         return Result.success();
     }
 }

+ 1 - 0
framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java

@@ -10,6 +10,7 @@ public enum ExceptionCode implements BaseExceptionCode {
     SYSTEM_TIMEOUT(-2, "系统超时,请稍候再试"),
 
     INVALID_DEFAULT_PAGE(10001, "无效默认分页参数"),
+    ILLEGAL_ARGUMENTS(20001, "参数错误"),
     // jwt token 相关 start
     // 过期
     JWT_TOKEN_EXPIRED(40001, "token超时,请检查 token 的有效期"),

+ 8 - 5
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -269,11 +269,14 @@
         withCredentials:true
       })
       .then(res=>{
-        const data=res.data.data,session = data.token, account = data.account
-        account.companies = account.companies || []
-        session.account = account
-        Session.set(session);
-        this.account = Session.getAccount();
+        const data=res.data.data;
+        if(data&&data!=null){
+          const session = data.token, account = data.account
+          account.companies = account.companies || []
+          session.account = account
+          Session.set(session);
+          this.account = Session.getAccount();
+        }
       })
     },
     mounted() {

+ 0 - 25
frontend/saas-portal-web/src/pages/remove-token/remove-token.html

@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>Document</title>
-</head>
-<body>
-    <div id="app">hello</div>
-    <script>
-        // iframe接收消息
-        window.addEventListener('message', function(e) {
-            if (e.data == 'removeToken') {
-                if (e.source != window.parent) {
-                    return;
-                }
-                var storeKey = 'app-state-session';
-                localStorage.removeItem(storeKey);
-                window.parent.postMessage("success", "*");
-            }
-        });
-    </script>
-</body>
-</html>

+ 0 - 0
frontend/saas-portal-web/src/pages/remove-token/remove-token.js


+ 0 - 15
frontend/saas-portal-web/src/pages/remove-token/remove-token.vue

@@ -1,15 +0,0 @@
-<template>
-    <div>
-
-    </div>
-</template>
-
-<script>
-    export default {
-        
-    }
-</script>
-
-<style scoped>
-
-</style>

+ 1 - 0
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -83,6 +83,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                     },'->',{
                         xtype:'button',
                         text:'新增',
+                        cls:'x-formpanel-btn-blue',
                         handler: me.onAddClick.bind(me)
                     }])
                 },{

+ 5 - 2
frontend/saas-web/app/view/core/dbfind/types/AccountDbfindTrigger.js

@@ -15,7 +15,7 @@ Ext.define('saas.view.core.dbfind.types.AccountDbfindTrigger', {
     }],
     defaultCondition: "d.status=1",
     dbSearchFields:[{
-        emptyText:'输入账户名称或真实姓名',
+        emptyText:'输入账户名称或姓名',
         xtype : "textfield", 
         name : "search", 
         getCondition: function(v) {
@@ -34,7 +34,7 @@ Ext.define('saas.view.core.dbfind.types.AccountDbfindTrigger', {
     },{
         text: "账号名称",
         dataIndex: "username",
-        hidden:true
+        // hidden:true
     }, {
         text: "姓名",
         dataIndex: "realname",
@@ -51,6 +51,9 @@ Ext.define('saas.view.core.dbfind.types.AccountDbfindTrigger', {
         text: "岗位角色",
         dataIndex: "roleNames",
         width: 200
+    }, {
+        dataIndex: "",
+        flex: 1
     }]
 
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/BankInfoDbfindTrigger.js

@@ -56,5 +56,8 @@ Ext.define('saas.view.core.dbfind.types.BankInfoDbfindTrigger', {
         xtype: "datecolumn",
         dataIndex: "bk_date",
         width: 110
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/BomDbfindTrigger.js

@@ -52,6 +52,9 @@ Ext.define('saas.view.core.dbfind.types.BomDbfindTrigger', {
         text: "版本",
         width: 80,
         dataIndex: "bo_version"
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js

@@ -68,6 +68,9 @@ Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
         text: "备注",
         dataIndex: "cu_remark",
         width: 250
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/EmployeeDbfindTrigger.js

@@ -53,6 +53,9 @@ Ext.define('saas.view.core.dbfind.types.EmployeeDbfindTrigger', {
         text: "邮箱",
         dataIndex: "em_email",
         width: 180
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/OriOrderMutiDbfindTrigger.js

@@ -56,5 +56,8 @@ Ext.define('saas.view.core.dbfind.types.OriOrderMutiDbfindTrigger', {
         "dataIndex": "sl_date",
         "width": 110,
         xtype: 'datecolumn'
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/ProductAddMultiDbfindTrigger.js

@@ -100,6 +100,9 @@ Ext.define('saas.view.core.dbfind.types.ProductAddMultiDbfindTrigger', {
         dataIndex: "pr_saleprice",
         xtype: 'numbercolumn',
         hidden:true
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js

@@ -100,5 +100,8 @@ Ext.define('saas.view.core.dbfind.types.ProductDbfindTrigger', {
         dataIndex: "po_avprice",
         xtype: 'numbercolumn',
         hidden:true
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/ProductMultiDbfindTrigger.js

@@ -107,6 +107,9 @@ Ext.define('saas.view.core.dbfind.types.ProductMultiDbfindTrigger', {
         dataIndex: "po_avprice",
         xtype: 'numbercolumn',
         hidden:true
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js

@@ -68,6 +68,9 @@ Ext.define('saas.view.core.dbfind.types.VendorDbfindTrigger', {
         text: "备注",
         dataIndex: "ve_remark",
         width: 250
+    }, {
+        dataIndex: '',
+        flex: 1
     }]
 
 });

+ 3 - 0
frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js

@@ -44,6 +44,9 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
         text: "仓库类型",
         dataIndex: "wh_type",
         width: 110
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     onAddClick: function() {

+ 10 - 1
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     enableColumnHide: false,
     border: 1,
     margin: '0 0 10 0', // formpanel的fieldDefaults未生效
-    height: 245,
+    minHeight: 245,
     columnWidth : 1.0, 
 
     requires: [
@@ -67,6 +67,15 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
                 emptyText: '<div style="width: 100%; text-align: center; cursor: pointer; color: green;" class="fa fa-plus" title="新增行" onclick="addRows(\'' + me.id + '\')"></div>',
             },
             listeners: {
+                boxready: function(g) {
+                    var f = g.ownerCt,
+                    c = f.detailCount || 1,
+                    fb = f.getBox(),
+                    fh = fb.height,
+                    h = (fh * 0.5) / c;
+
+                    g.setHeight(h);
+                },
                 edit: function() {
                     this.fireEvent('validChange');
                 },

+ 1 - 0
frontend/saas-web/app/view/document/address/DataList.js

@@ -5,6 +5,7 @@ Ext.define('saas.view.document.address.DataList', {
     extend: 'saas.view.document.kind.Kind',
     xtype: 'document-address-datalist',
     viewModel: 'document-address-datalist',
+    controller:'document-address-datalist',
     defaultType:'address',
     windowType:'document-address-window',
     _openUrl:'/api/document/address/setDefault',

+ 38 - 0
frontend/saas-web/app/view/document/address/DatalistController.js

@@ -0,0 +1,38 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.address.DatalistController', {
+    extend: 'saas.view.document.kind.KindController',
+    alias: 'controller.document-address-datalist',
+    
+    onDelete:function(grid,row,col){
+        var dk = grid.ownerCt.ownerCt;
+        var dataKind=dk.getViewModel().getData()['dataKind'].value,
+        rec = grid.getStore().getAt(row);
+        var keyV=rec.get(dk.etc[dataKind].keyField);
+        if(rec.get('ad_default')==1){
+            saas.util.BaseUtil.showErrorToast('不能删除默认地址');
+            return;
+        }
+        var deleteMsg = '删除的'+dk.getViewModel().getData()['title']+'将不能恢复,请确认是否删除?';
+        saas.util.BaseUtil.deleteWarn(deleteMsg,function(btn){
+            if(btn == 'yes'){
+                //删除接口
+                saas.util.BaseUtil.request({
+                    url: dk.etc[dataKind].delUrl+'/'+keyV,
+                    method: 'POST'
+                })
+                .then(function(localJson) {
+                    if(localJson.success){
+                        saas.util.BaseUtil.showSuccessToast('删除成功');
+                        grid.store.load();
+                    }
+                })
+                .catch(function(res) {
+                    console.error(res);
+                    saas.util.BaseUtil.showErrorToast('删除失败: ' + res.message);
+                });
+            }
+        });
+    }
+});

+ 11 - 9
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -36,15 +36,14 @@ Ext.define('saas.view.document.customer.FormPanel', {
         columnWidth: 0.25
     },{
         xtype: 'textfield',
-        name: 'cu_shortname',
-        fieldLabel: '客户称',
+        name: 'cu_name',
+        fieldLabel: '客户称',
         allowBlank: false,
         columnWidth: 0.25
     },{
         xtype: 'textfield',
-        name: 'cu_name',
-        fieldLabel: '客户名称',
-        allowBlank: false,
+        name: 'cu_shortname',
+        fieldLabel: '客户简称',
         columnWidth: 0.25
     },{
         editable:false,
@@ -155,7 +154,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
     }, {
         xtype : "hidden", 
         name : "cu_sellerid", 
-        fieldLabel : "业务员id"
+        fieldLabel : "业务员id",
+        defaultValue:saas.util.BaseUtil.getCurrentUser().id
     }, {
         xtype : "hidden", 
         name : "cu_sellercode", 
@@ -163,9 +163,9 @@ Ext.define('saas.view.document.customer.FormPanel', {
     }, {
         xtype : "employeeDbfindTrigger", 
         name : "cu_sellername", 
-        fieldLabel : "业务员", 
-        allowBlank : false, 
-        columnWidth : 0.25
+        fieldLabel : "业务员",  
+        columnWidth : 0.25,
+        defaultValue:saas.util.BaseUtil.getCurrentUser().realname
     },{
         xtype : "hidden", 
         name : "cu_nsrzh", 
@@ -231,6 +231,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         detnoColumn: 'cc_detno',
         showCount: false,
         deleteDetailUrl:'/api/document/customer/deletecontact',
+        height:145,
         columns : [
             {
                 text : "ID", 
@@ -332,6 +333,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         detnoColumn: 'ca_detno',
         showCount: false,
         deleteDetailUrl:'/api/document/customer/deleteaddress',
+        height:145,
         columns : [
             {
                 text : "ID", 

+ 1 - 1
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -53,7 +53,7 @@ Ext.define('saas.view.document.kind.ChildForm', {
                     }
                 }).catch(function(res) {
                     saas.util.BaseUtil.showErrorToast(res.message);
-                    w.setLoading(true);
+                    w.setLoading(false);
                 })
               }
           }

+ 5 - 5
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -36,15 +36,14 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         columnWidth: 0.25
     },{
         xtype: 'textfield',
-        name: 've_shortname',
-        fieldLabel: '供应商称',
+        name: 've_name',
+        fieldLabel: '供应商称',
         allowBlank: false,
         columnWidth: 0.25
     },{
         xtype: 'textfield',
-        name: 've_name',
-        fieldLabel: '供应商名称',
-        allowBlank: false,
+        name: 've_shortname',
+        fieldLabel: '供应商简称',
         columnWidth: 0.25
     },{
         xtype: 'hidden',
@@ -227,6 +226,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         detnoColumn: 'vc_detno',
         showCount: false,
         deleteDetailUrl:'/api/document/vendor/deleteContact',
+        height:145,
         columns : [
             {
                 text : "ID", 

+ 1 - 1
frontend/saas-web/app/view/main/Main.js

@@ -124,7 +124,7 @@ Ext.define('saas.view.main.Main', {
                     }
                 },
                 {
-                    ui: 'header',
+                    // ui: 'header',
                     arrowVisible: false,
                     cls:' sa-nav-button',   
                     width: 50,

+ 2 - 0
frontend/saas-web/app/view/main/Main.scss

@@ -231,6 +231,8 @@ body > .x-mask {
     color: #34BAF6;
     padding: 0;
     box-shadow: none !important;
+    border: none;
+    background-color: transparent !important;
 
     .x-btn-icon-el {
         color: #34BAF6;

+ 42 - 19
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -172,6 +172,21 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                             var format = '0,000.' + xr.join('');
                             return Ext.util.Format.number(v, format);
                         },
+                    }, 
+                    {
+                        text : "税率", 
+                        xtype: 'numbercolumn',
+                        dataIndex : "pd_taxrate", 
+                        width : 80.0,
+                        editor : {
+                            xtype : "numberfield",
+                            decimalPrecision: 0,
+                            minValue: 0,
+                            maxValue: 100
+                        },
+                        renderer : function(v) {
+                            return Ext.util.Format.number(v, '0');
+                        }
                     },
                     {
                         text : "已转数", 
@@ -197,21 +212,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                             var format = '0.' + xr.join('');
                             return Ext.util.Format.number(v, format);
                         }
-                    }, 
-                    {
-                        text : "税率", 
-                        xtype: 'numbercolumn',
-                        dataIndex : "pd_taxrate", 
-                        width : 80.0,
-                        editor : {
-                            xtype : "numberfield",
-                            decimalPrecision: 0,
-                            minValue: 0,
-                            maxValue: 100
-                        },
-                        renderer : function(v) {
-                            return Ext.util.Format.number(v, '0');
-                        }
                     },{
                         text : "需求日期", 
                         dataIndex : "pd_delivery", 
@@ -287,7 +287,8 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     {
                         text : "关联销售单号", 
                         dataIndex : "pd_salecode", 
-                        width : 150.0
+                        width : 150.0,
+                        ignore:true,
                     },{
                         text : "备注", 
                         dataIndex : "pd_remark",
@@ -383,7 +384,29 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
             hidden: '{turnHidden}'
         },
          handler: 'turnIn'
-     }]
-
-
+     }],
+     initFormData: function(data) {
+        var me = this;
+        me.setFormData(data);
+        if(data.main.pu_statuscode!='AUDITED'&&!data.main.pu_shipaddresscode){
+            //读取默认地址
+            saas.util.BaseUtil.request({
+                url: '/api/document/address/getDefault',
+                method: 'GET',
+            })
+            .then(function (localJson) {
+                var data = localJson.data;
+                if(data&&data.ad_address){
+                    var f = me.down('[name=pu_shipaddresscode]');
+                    f.setValue(data.ad_address)
+                }else{
+                    saas.util.BaseUtil.showErrorToast('未设置默认采购交货地址,维护后新增会自动给采购交货地址赋默认值');
+                }
+            })
+            .catch(function (res) {
+                saas.util.BaseUtil.showErrorToast('获取默认采购交货地址失败' + res.message);
+            });
+        }
+        me.clearDirty();
+    }
 });

+ 0 - 22
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -61,28 +61,6 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                     });
 
                 }
-            },
-            'remotecombo[name=pu_shipaddresscode]':{
-                afterrender:function(f){
-                    if(f.ownerCt.initId==0){
-                        //读取默认地址
-                        saas.util.BaseUtil.request({
-                            url: '/api/document/address/getDefault',
-                            method: 'GET',
-                        })
-                        .then(function (localJson) {
-                            var data = localJson.data;
-                            if(data&&data.ad_address){
-                                f.setValue(data.ad_address)
-                            }else{
-                                saas.util.BaseUtil.showErrorToast('未设置默认采购交货地址,维护后新增会自动给采购交货地址赋默认值');
-                            }
-                        })
-                        .catch(function (res) {
-                            saas.util.BaseUtil.showErrorToast('获取默认采购交货地址失败' + res.message);
-                        });
-                    }
-                }
             }
         });
     },

+ 14 - 14
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -228,6 +228,20 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 },
+            }, {
+                text : "税率", 
+                xtype: 'numbercolumn',
+                dataIndex : "pd_taxrate", 
+                width : 80.0, 
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                },
+                renderer : function(v) {
+                    return Ext.util.Format.number(v, '0');
+                },
             }, 
            {
                 text : "含税金额", 
@@ -247,20 +261,6 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 }
-            }, {
-                text : "税率", 
-                xtype: 'numbercolumn',
-                dataIndex : "pd_taxrate", 
-                width : 80.0, 
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 0,
-                    minValue: 0,
-                    maxValue: 100
-                },
-                renderer : function(v) {
-                    return Ext.util.Format.number(v, '0');
-                },
             },
             {
                 text : "未税金额", 

+ 14 - 14
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -240,6 +240,20 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 },
+            }, {
+                text : "税率", 
+                xtype: 'numbercolumn',
+                dataIndex : "pd_taxrate", 
+                width : 80.0, 
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }, 
+                renderer : function(v) {
+                    return Ext.util.Format.number(v, '0');
+                }
             }, 
            {
                 text : "含税金额", 
@@ -259,20 +273,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 }
-            }, {
-                text : "税率", 
-                xtype: 'numbercolumn',
-                dataIndex : "pd_taxrate", 
-                width : 80.0, 
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 0,
-                    minValue: 0,
-                    maxValue: 100
-                }, 
-                renderer : function(v) {
-                    return Ext.util.Format.number(v, '0');
-                }
             },
             {
                 text : "未税金额", 

+ 14 - 14
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -220,6 +220,20 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 },
+            }, {
+                text : "税率", 
+                xtype: 'numbercolumn',
+                dataIndex : "pd_taxrate", 
+                width : 80.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                },
+                renderer : function(v) {
+                    return Ext.util.Format.number(v, '0');
+                }
             }, 
            {
                 text : "含税金额", 
@@ -244,20 +258,6 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 }
-            }, {
-                text : "税率", 
-                xtype: 'numbercolumn',
-                dataIndex : "pd_taxrate", 
-                width : 80.0,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 0,
-                    minValue: 0,
-                    maxValue: 100
-                },
-                renderer : function(v) {
-                    return Ext.util.Format.number(v, '0');
-                }
             },
             {
                 text : "未税金额", 

+ 14 - 14
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -198,6 +198,20 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 }
+            }, {
+                text: "税率",
+                xtype: 'numbercolumn',
+                dataIndex: "pd_taxrate", 
+                width : 80.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                },
+                renderer : function(v) {
+                    return Ext.util.Format.number(v, '0');
+                }
             },
             {
                 text: "含税金额",
@@ -217,20 +231,6 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                     var format = '0,000.' + xr.join('');
                     return Ext.util.Format.number(v, format);
                 }
-            }, {
-                text: "税率",
-                xtype: 'numbercolumn',
-                dataIndex: "pd_taxrate", 
-                width : 80.0,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 0,
-                    minValue: 0,
-                    maxValue: 100
-                },
-                renderer : function(v) {
-                    return Ext.util.Format.number(v, '0');
-                }
             },
             {
                 text: "未税金额",

+ 2 - 0
frontend/saas-web/app/view/stock/report/DataListController.js

@@ -8,6 +8,7 @@ Ext.define('saas.view.stock.report.DataListController', {
         form = reportPanel.down('form'),
         grid = reportPanel.down('grid'),
         columns = grid.columns,
+        mySummaryBar = grid.getDockedItems()[2],
         toggleColumns = [],
         store = grid.store;
 
@@ -31,6 +32,7 @@ Ext.define('saas.view.stock.report.DataListController', {
             con.columnWidth = 0.65;
             reportPanel.queryMode = 'MAIN';
         }
+        mySummaryBar.setHidden(newValue);
         
         form.updateLayout();
         toggleColumns.map(function(c) {