zhoudw 7 жил өмнө
parent
commit
0ee2f9e6c8
32 өөрчлөгдсөн 1704 нэмэгдсэн , 60 устгасан
  1. 4 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java
  2. 1 1
      applications/commons/commons-server/src/main/resources/application.yml
  3. 58 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Fundinouttype.java
  4. 48 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productunit.java
  5. 118 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java
  6. 35 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java
  7. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductunitController.java
  8. 1 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java
  9. 19 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java
  10. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductunitMapper.java
  11. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorcontactMapper.java
  12. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java
  13. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductunitService.java
  14. 42 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java
  15. 38 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java
  16. 139 0
      applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml
  17. 125 0
      applications/document/document-server/src/main/resources/mapper/ProductunitMapper.xml
  18. 206 0
      applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml
  19. 6 0
      applications/storage/storage-server/src/main/docker/Dockerfile
  20. 1 1
      applications/storage/storage-server/src/main/resources/config/application-docker.yml
  21. 34 34
      framework/server-starter/src/main/java/com/usoftchina/saas/server/ServerAutoConfiguration.java
  22. 8 1
      frontend/saas-web/app/util/BaseUtil.js
  23. 4 4
      frontend/saas-web/app/util/FormUtil.js
  24. 5 9
      frontend/saas-web/app/view/core/form/FormPanel.js
  25. 2 2
      frontend/saas-web/app/view/core/form/FormPanelController.js
  26. 3 3
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  27. 218 0
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  28. 158 0
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  29. 8 0
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelModel.js
  30. 212 0
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  31. 115 0
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js
  32. 5 0
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelModel.js

+ 4 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java

@@ -62,7 +62,10 @@ public class ListReqDTO implements Serializable {
                     //字符串默认是模糊查询
                     if ("string".equals(type)) {
                         con = " " + field + " like '%" + value + "%' and";
-                    } else {
+                    } else if ("condition".equals(type)) {
+                        //type为condition为前端拼的条件
+                        con = " " + value + " and";
+                    }  else {
                         con = " " + field + " " + operation + " '" + value + "' and";
                     }
 

+ 1 - 1
applications/commons/commons-server/src/main/resources/application.yml

@@ -47,7 +47,7 @@ eureka:
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8500/eureka/
 server:
-  port: 8900
+  port: 8920
   tomcat:
     uri-encoding: UTF-8
 info:

+ 58 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Fundinouttype.java

@@ -0,0 +1,58 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Fundinouttype extends CommonBaseEntity implements Serializable {
+    private String ft_name;
+
+    private String ft_kind;
+
+    private Integer ft_recordid;
+
+    private String ft_recorder;
+
+    private Date ft_date;
+
+    public String getFt_name() {
+        return ft_name;
+    }
+
+    public void setFt_name(String ft_name) {
+        this.ft_name = ft_name == null ? null : ft_name.trim();
+    }
+
+    public String getFt_kind() {
+        return ft_kind;
+    }
+
+    public void setFt_kind(String ft_kind) {
+        this.ft_kind = ft_kind == null ? null : ft_kind.trim();
+    }
+
+    public Integer getFt_recordid() {
+        return ft_recordid;
+    }
+
+    public void setFt_recordid(Integer ft_recordid) {
+        this.ft_recordid = ft_recordid;
+    }
+
+    public String getFt_recorder() {
+        return ft_recorder;
+    }
+
+    public void setFt_recorder(String ft_recorder) {
+        this.ft_recorder = ft_recorder == null ? null : ft_recorder.trim();
+    }
+
+    public Date getFt_date() {
+        return ft_date;
+    }
+
+    public void setFt_date(Date ft_date) {
+        this.ft_date = ft_date;
+    }
+}

+ 48 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productunit.java

@@ -0,0 +1,48 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Productunit extends CommonBaseEntity implements Serializable {
+    private String pu_name;
+
+    private Integer pu_recordid;
+
+    private String pu_recorder;
+
+    private Date pu_date;
+
+    public String getPu_name() {
+        return pu_name;
+    }
+
+    public void setPu_name(String pu_name) {
+        this.pu_name = pu_name == null ? null : pu_name.trim();
+    }
+
+    public Integer getPu_recordid() {
+        return pu_recordid;
+    }
+
+    public void setPu_recordid(Integer pu_recordid) {
+        this.pu_recordid = pu_recordid;
+    }
+
+    public String getPu_recorder() {
+        return pu_recorder;
+    }
+
+    public void setPu_recorder(String pu_recorder) {
+        this.pu_recorder = pu_recorder == null ? null : pu_recorder.trim();
+    }
+
+    public Date getPu_date() {
+        return pu_date;
+    }
+
+    public void setPu_date(Date pu_date) {
+        this.pu_date = pu_date;
+    }
+}

+ 118 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java

@@ -0,0 +1,118 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Vendorcontact extends CommonBaseEntity implements Serializable {
+    private Integer vc_veid;
+
+    private Integer vc_detno;
+
+    private String vc_name;
+
+    private Integer vc_tel;
+
+    private String vc_qq;
+
+    private String vc_email;
+
+    private String ve_text1;
+
+    private String ve_text2;
+
+    private String ve_text3;
+
+    private String ve_text4;
+
+    private String ve_text5;
+
+    public Integer getVc_veid() {
+        return vc_veid;
+    }
+
+    public void setVc_veid(Integer vc_veid) {
+        this.vc_veid = vc_veid;
+    }
+
+    public Integer getVc_detno() {
+        return vc_detno;
+    }
+
+    public void setVc_detno(Integer vc_detno) {
+        this.vc_detno = vc_detno;
+    }
+
+    public String getVc_name() {
+        return vc_name;
+    }
+
+    public void setVc_name(String vc_name) {
+        this.vc_name = vc_name == null ? null : vc_name.trim();
+    }
+
+    public Integer getVc_tel() {
+        return vc_tel;
+    }
+
+    public void setVc_tel(Integer vc_tel) {
+        this.vc_tel = vc_tel;
+    }
+
+    public String getVc_qq() {
+        return vc_qq;
+    }
+
+    public void setVc_qq(String vc_qq) {
+        this.vc_qq = vc_qq == null ? null : vc_qq.trim();
+    }
+
+    public String getVc_email() {
+        return vc_email;
+    }
+
+    public void setVc_email(String vc_email) {
+        this.vc_email = vc_email == null ? null : vc_email.trim();
+    }
+
+    public String getVe_text1() {
+        return ve_text1;
+    }
+
+    public void setVe_text1(String ve_text1) {
+        this.ve_text1 = ve_text1 == null ? null : ve_text1.trim();
+    }
+
+    public String getVe_text2() {
+        return ve_text2;
+    }
+
+    public void setVe_text2(String ve_text2) {
+        this.ve_text2 = ve_text2 == null ? null : ve_text2.trim();
+    }
+
+    public String getVe_text3() {
+        return ve_text3;
+    }
+
+    public void setVe_text3(String ve_text3) {
+        this.ve_text3 = ve_text3 == null ? null : ve_text3.trim();
+    }
+
+    public String getVe_text4() {
+        return ve_text4;
+    }
+
+    public void setVe_text4(String ve_text4) {
+        this.ve_text4 = ve_text4 == null ? null : ve_text4.trim();
+    }
+
+    public String getVe_text5() {
+        return ve_text5;
+    }
+
+    public void setVe_text5(String ve_text5) {
+        this.ve_text5 = ve_text5 == null ? null : ve_text5.trim();
+    }
+}

+ 35 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java

@@ -0,0 +1,35 @@
+package com.usoftchina.saas.document.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+import com.usoftchina.saas.document.service.FundinouttypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/fundinoutType")
+public class FundinouttypeController {
+
+    @Autowired
+    private FundinouttypeService fundinouttypeService;
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Fundinouttype fundinouttype){
+        fundinouttypeService.save(fundinouttype);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        fundinouttypeService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Fundinouttype> fundinouttypeList = fundinouttypeService.findAll();
+        return Result.success(fundinouttypeList);
+    }
+}

+ 37 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductunitController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.controller;
+
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Productunit;
+import com.usoftchina.saas.document.service.ProductunitService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/productUnit")
+public class ProductunitController {
+
+    @Autowired
+    private ProductunitService productunitService;
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Productunit productunit){
+        productunitService.save(productunit);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        productunitService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Productunit> productunitList = productunitService.findAll();
+        return Result.success(productunitList);
+    }
+
+}

+ 1 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorController.java

@@ -9,10 +9,7 @@ import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.service.VendorService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 

+ 19 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+
+public interface FundinouttypeMapper extends CommonBaseMapper<Fundinouttype> {
+    int deleteByPrimaryKey(Long ft_id);
+
+    int insert(Fundinouttype record);
+
+    int insertSelective(Fundinouttype record);
+
+    Fundinouttype selectByPrimaryKey(Long ft_id);
+
+    int updateByPrimaryKeySelective(Fundinouttype record);
+
+    int updateByPrimaryKey(Fundinouttype record);
+}

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductunitMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Productunit;
+
+public interface ProductunitMapper extends CommonBaseMapper<Productunit> {
+    int deleteByPrimaryKey(Long pu_id);
+
+    int insert(Productunit record);
+
+    int insertSelective(Productunit record);
+
+    Productunit selectByPrimaryKey(Long pu_id);
+
+    int updateByPrimaryKeySelective(Productunit record);
+
+    int updateByPrimaryKey(Productunit record);
+}

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorcontactMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Vendorcontact;
+
+public interface VendorcontactMapper extends CommonBaseMapper<Vendorcontact> {
+    int deleteByPrimaryKey(Long vc_id);
+
+    int insert(Vendorcontact record);
+
+    int insertSelective(Vendorcontact record);
+
+    Vendorcontact selectByPrimaryKey(Long vc_id);
+
+    int updateByPrimaryKeySelective(Vendorcontact record);
+
+    int updateByPrimaryKey(Vendorcontact record);
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
+
+public interface FundinouttypeService extends CommonBaseService<FundinouttypeMapper, Fundinouttype> {
+
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductunitService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Productunit;
+import com.usoftchina.saas.document.mapper.ProductunitMapper;
+
+public interface ProductunitService extends CommonBaseService<ProductunitMapper, Productunit> {
+
+}

+ 42 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java

@@ -0,0 +1,42 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Fundinouttype;
+import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
+import com.usoftchina.saas.document.service.FundinouttypeService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<FundinouttypeMapper, Fundinouttype> implements FundinouttypeService {
+
+    /**
+     * 保存/更新
+     * @param fundinouttype
+     * @return
+     */
+    @Override
+    public boolean save(Fundinouttype fundinouttype){
+        fundinouttype.setCompanyId(BaseContextHolder.getCompanyId());
+        if(fundinouttype.getId() == 0){
+            getMapper().insertSelective(fundinouttype);
+        }else{
+            getMapper().updateByPrimaryKeySelective(fundinouttype);
+        }
+        return true;
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        getMapper().deleteByPrimaryKey(id);
+        return true;
+    }
+
+}

+ 38 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java

@@ -0,0 +1,38 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Productunit;
+import com.usoftchina.saas.document.mapper.ProductunitMapper;
+import com.usoftchina.saas.document.service.ProductunitService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMapper, Productunit> implements ProductunitService {
+
+    @Override
+    public boolean save(Productunit productunit){
+        productunit.setCompanyId(BaseContextHolder.getCompanyId());
+        if(productunit.getId() == 0){
+            getMapper().insertSelective(productunit);
+        }else{
+            getMapper().updateByPrimaryKeySelective(productunit);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        getMapper().deleteByPrimaryKey(id);
+        return true;
+    }
+
+    @Override
+    public List<Productunit> findAll(){
+        List<Productunit> productunitList = getMapper().selectAll();
+        return productunitList;
+    }
+
+}

+ 139 - 0
applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml

@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.document.mapper.FundinouttypeMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Fundinouttype" >
+    <id column="ft_id" property="id" jdbcType="INTEGER" />
+    <result column="ft_name" property="ft_name" jdbcType="VARCHAR" />
+    <result column="ft_kind" property="ft_kind" jdbcType="VARCHAR" />
+    <result column="ft_recordid" property="ft_recordid" jdbcType="INTEGER" />
+    <result column="ft_recorder" property="ft_recorder" jdbcType="VARCHAR" />
+    <result column="ft_date" property="ft_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    ft_id, ft_name, ft_kind, ft_recordid, ft_recorder, ft_date, companyId, updaterId, 
+    updateTime
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from fundinouttype
+    where ft_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from fundinouttype
+    where ft_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    insert into fundinouttype (ft_name, ft_kind,
+      ft_recordid, ft_recorder, ft_date, 
+      companyId, updaterId, updateTime
+      )
+    values (#{ft_name,jdbcType=VARCHAR}, #{ft_kind,jdbcType=VARCHAR},
+      #{ft_recordid,jdbcType=INTEGER}, #{ft_recorder,jdbcType=VARCHAR}, #{ft_date,jdbcType=TIMESTAMP}, 
+      #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    insert into fundinouttype
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ft_name != null" >
+        ft_name,
+      </if>
+      <if test="ft_kind != null" >
+        ft_kind,
+      </if>
+      <if test="ft_recordid != null" >
+        ft_recordid,
+      </if>
+      <if test="ft_recorder != null" >
+        ft_recorder,
+      </if>
+      <if test="ft_date != null" >
+        ft_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ft_name != null" >
+        #{ft_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_kind != null" >
+        #{ft_kind,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_recordid != null" >
+        #{ft_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ft_recorder != null" >
+        #{ft_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_date != null" >
+        #{ft_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    update fundinouttype
+    <set >
+      <if test="ft_name != null" >
+        ft_name = #{ft_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_kind != null" >
+        ft_kind = #{ft_kind,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_recordid != null" >
+        ft_recordid = #{ft_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ft_recorder != null" >
+        ft_recorder = #{ft_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ft_date != null" >
+        ft_date = #{ft_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ft_id = #{id}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    update fundinouttype
+    set ft_name = #{ft_name,jdbcType=VARCHAR},
+      ft_kind = #{ft_kind,jdbcType=VARCHAR},
+      ft_recordid = #{ft_recordid,jdbcType=INTEGER},
+      ft_recorder = #{ft_recorder,jdbcType=VARCHAR},
+      ft_date = #{ft_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where ft_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM FUNDINOUTTYPE
+  </select>
+</mapper>

+ 125 - 0
applications/document/document-server/src/main/resources/mapper/ProductunitMapper.xml

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.document.mapper.ProductunitMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Productunit" >
+    <id column="pu_id" property="id" jdbcType="INTEGER" />
+    <result column="pu_name" property="pu_name" jdbcType="VARCHAR" />
+    <result column="pu_recordid" property="pu_recordid" jdbcType="INTEGER" />
+    <result column="pu_recorder" property="pu_recorder" jdbcType="VARCHAR" />
+    <result column="pu_date" property="pu_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    pu_id, pu_name, pu_recordid, pu_recorder, pu_date, companyId, updaterId, updateTime
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from productunit
+    where pu_id = #{id}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from productunit
+    where pu_id = #{id}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    insert into productunit (pu_name, pu_recordid,
+      pu_recorder, pu_date, companyId, 
+      updaterId, updateTime)
+    values (#{pu_name,jdbcType=VARCHAR}, #{pu_recordid,jdbcType=INTEGER},
+      #{pu_recorder,jdbcType=VARCHAR}, #{pu_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    insert into productunit
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="pu_name != null" >
+        pu_name,
+      </if>
+      <if test="pu_recordid != null" >
+        pu_recordid,
+      </if>
+      <if test="pu_recorder != null" >
+        pu_recorder,
+      </if>
+      <if test="pu_date != null" >
+        pu_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="pu_name != null" >
+        #{pu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_recordid != null" >
+        #{pu_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pu_recorder != null" >
+        #{pu_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_date != null" >
+        #{pu_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    update productunit
+    <set >
+      <if test="pu_name != null" >
+        pu_name = #{pu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_recordid != null" >
+        pu_recordid = #{pu_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pu_recorder != null" >
+        pu_recorder = #{pu_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_date != null" >
+        pu_date = #{pu_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where pu_id = #{id}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Productunit" >
+    update productunit
+    set pu_name = #{pu_name,jdbcType=VARCHAR},
+      pu_recordid = #{pu_recordid,jdbcType=INTEGER},
+      pu_recorder = #{pu_recorder,jdbcType=VARCHAR},
+      pu_date = #{pu_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where pu_id = #{id}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM PRODUCTUNIT
+  </select>
+</mapper>

+ 206 - 0
applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml

@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.document.mapper.VendorcontactMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Vendorcontact" >
+    <id column="vc_id" property="id" jdbcType="INTEGER" />
+    <result column="vc_veid" property="vc_veid" jdbcType="INTEGER" />
+    <result column="vc_detno" property="vc_detno" jdbcType="INTEGER" />
+    <result column="vc_name" property="vc_name" jdbcType="VARCHAR" />
+    <result column="vc_tel" property="vc_tel" jdbcType="INTEGER" />
+    <result column="vc_qq" property="vc_qq" jdbcType="VARCHAR" />
+    <result column="vc_email" property="vc_email" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
+    <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
+    <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
+    <result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
+    <result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    vc_id, vc_veid, vc_detno, vc_name, vc_tel, vc_qq, vc_email, companyId, updaterId, 
+    updateTime, ve_text1, ve_text2, ve_text3, ve_text4, ve_text5
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from vendorcontact
+    where vc_id = #{id}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from vendorcontact
+    where vc_id = #{id}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    insert into vendorcontact (vc_veid, vc_detno,
+      vc_name, vc_tel, vc_qq, 
+      vc_email, companyId, updaterId, 
+      updateTime, ve_text1, ve_text2, 
+      ve_text3, ve_text4, ve_text5
+      )
+    values (#{vc_veid,jdbcType=INTEGER}, #{vc_detno,jdbcType=INTEGER},
+      #{vc_name,jdbcType=VARCHAR}, #{vc_tel,jdbcType=INTEGER}, #{vc_qq,jdbcType=VARCHAR}, 
+      #{vc_email,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{ve_text1,jdbcType=VARCHAR}, #{ve_text2,jdbcType=VARCHAR}, 
+      #{ve_text3,jdbcType=VARCHAR}, #{ve_text4,jdbcType=VARCHAR}, #{ve_text5,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    insert into vendorcontact
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="vc_veid != null" >
+        vc_veid,
+      </if>
+      <if test="vc_detno != null" >
+        vc_detno,
+      </if>
+      <if test="vc_name != null" >
+        vc_name,
+      </if>
+      <if test="vc_tel != null" >
+        vc_tel,
+      </if>
+      <if test="vc_qq != null" >
+        vc_qq,
+      </if>
+      <if test="vc_email != null" >
+        vc_email,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+      <if test="ve_text1 != null" >
+        ve_text1,
+      </if>
+      <if test="ve_text2 != null" >
+        ve_text2,
+      </if>
+      <if test="ve_text3 != null" >
+        ve_text3,
+      </if>
+      <if test="ve_text4 != null" >
+        ve_text4,
+      </if>
+      <if test="ve_text5 != null" >
+        ve_text5,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="vc_veid != null" >
+        #{vc_veid,jdbcType=INTEGER},
+      </if>
+      <if test="vc_detno != null" >
+        #{vc_detno,jdbcType=INTEGER},
+      </if>
+      <if test="vc_name != null" >
+        #{vc_name,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_tel != null" >
+        #{vc_tel,jdbcType=INTEGER},
+      </if>
+      <if test="vc_qq != null" >
+        #{vc_qq,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_email != null" >
+        #{vc_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ve_text1 != null" >
+        #{ve_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text2 != null" >
+        #{ve_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text3 != null" >
+        #{ve_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text4 != null" >
+        #{ve_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text5 != null" >
+        #{ve_text5,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    update vendorcontact
+    <set >
+      <if test="vc_veid != null" >
+        vc_veid = #{vc_veid,jdbcType=INTEGER},
+      </if>
+      <if test="vc_detno != null" >
+        vc_detno = #{vc_detno,jdbcType=INTEGER},
+      </if>
+      <if test="vc_name != null" >
+        vc_name = #{vc_name,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_tel != null" >
+        vc_tel = #{vc_tel,jdbcType=INTEGER},
+      </if>
+      <if test="vc_qq != null" >
+        vc_qq = #{vc_qq,jdbcType=VARCHAR},
+      </if>
+      <if test="vc_email != null" >
+        vc_email = #{vc_email,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ve_text1 != null" >
+        ve_text1 = #{ve_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text2 != null" >
+        ve_text2 = #{ve_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text3 != null" >
+        ve_text3 = #{ve_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text4 != null" >
+        ve_text4 = #{ve_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ve_text5 != null" >
+        ve_text5 = #{ve_text5,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where vc_id = #{id}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Vendorcontact" >
+    update vendorcontact
+    set vc_veid = #{vc_veid,jdbcType=INTEGER},
+      vc_detno = #{vc_detno,jdbcType=INTEGER},
+      vc_name = #{vc_name,jdbcType=VARCHAR},
+      vc_tel = #{vc_tel,jdbcType=INTEGER},
+      vc_qq = #{vc_qq,jdbcType=VARCHAR},
+      vc_email = #{vc_email,jdbcType=VARCHAR},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      ve_text1 = #{ve_text1,jdbcType=VARCHAR},
+      ve_text2 = #{ve_text2,jdbcType=VARCHAR},
+      ve_text3 = #{ve_text3,jdbcType=VARCHAR},
+      ve_text4 = #{ve_text4,jdbcType=VARCHAR},
+      ve_text5 = #{ve_text5,jdbcType=VARCHAR}
+    where vc_id = #{id}
+  </update>
+</mapper>

+ 6 - 0
applications/storage/storage-server/src/main/docker/Dockerfile

@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD storage-server-1.0.0-SNAPSHOT.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

+ 1 - 1
applications/storage/storage-server/src/main/resources/config/application-docker.yml

@@ -1,6 +1,6 @@
 eureka:
   instance:
-    hostname: saas-document-server
+    hostname: saas-storage-server
     prefer-ip-address: false
   client:
     serviceUrl:

+ 34 - 34
framework/server-starter/src/main/java/com/usoftchina/saas/server/ServerAutoConfiguration.java

@@ -1,20 +1,20 @@
 package com.usoftchina.saas.server;
 
-import com.usoftchina.saas.server.error.ServletErrorUtils;
-import com.usoftchina.saas.server.error.UnCaughtErrorFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.Bean;
+//import com.usoftchina.saas.server.error.ServletErrorUtils;
+//import com.usoftchina.saas.server.error.UnCaughtErrorFilter;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.lang.Nullable;
-import org.springframework.web.servlet.HandlerExceptionResolver;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.util.NestedServletException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
+//import org.springframework.lang.Nullable;
+//import org.springframework.web.servlet.HandlerExceptionResolver;
+//import org.springframework.web.servlet.ModelAndView;
+//import org.springframework.web.util.NestedServletException;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.IOException;
 
 /**
  * @author yingp
@@ -24,25 +24,25 @@ import java.io.IOException;
 @ComponentScan(basePackages = {"com.usoftchina.saas.server"})
 public class ServerAutoConfiguration {
 
-    private Logger logger = LoggerFactory.getLogger(UnCaughtErrorFilter.class);
-
-    @Bean
-    public HandlerExceptionResolver handlerExceptionResolver() {
-        return new HandlerExceptionResolver(){
-            @Nullable
-            @Override
-            public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, @Nullable Object o, Exception e) {
-                Throwable cause = e;
-                if (e instanceof NestedServletException) {
-                    cause = ((NestedServletException) e).getRootCause();
-                }
-                logger.error(ServletErrorUtils.buildMessage(request, cause), cause);
-                try {
-                    ServletErrorUtils.writerErrorResult(response, cause);
-                } catch (IOException ex) {
-                }
-                return null;
-            }
-        };
-    }
+//    private Logger logger = LoggerFactory.getLogger(UnCaughtErrorFilter.class);
+//
+//    @Bean
+//    public HandlerExceptionResolver handlerExceptionResolver() {
+//        return new HandlerExceptionResolver(){
+//            @Nullable
+//            @Override
+//            public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, @Nullable Object o, Exception e) {
+//                Throwable cause = e;
+//                if (e instanceof NestedServletException) {
+//                    cause = ((NestedServletException) e).getRootCause();
+//                }
+//                logger.error(ServletErrorUtils.buildMessage(request, cause), cause);
+//                try {
+//                    ServletErrorUtils.writerErrorResult(response, cause);
+//                } catch (IOException ex) {
+//                }
+//                return null;
+//            }
+//        };
+//    }
 }

+ 8 - 1
frontend/saas-web/app/util/BaseUtil.js

@@ -24,7 +24,14 @@ Ext.define('saas.util.BaseUtil', {
                     "Content-Type": 'application/json;charset=UTF-8' 
                 },
                 success: function (response, opts) {
-                    resolve(response);
+                    var res = Ext.decode(response.responseText);
+                    if(res.success) {
+                        return resolve(response);
+                    }else {
+                        console.error('server request failure with code ' + res.code + '.');
+                        console.error('failure message: ' + res.message);
+                        return reject(response);
+                    }
                 },
                 failure: function (response, opts) {
                     console.error('server-side failure with status code ' + response.status);

+ 4 - 4
frontend/saas-web/app/util/FormUtil.js

@@ -96,12 +96,12 @@ Ext.define('saas.util.FormUtil', {
                     var o = {
                         main: d.main
                     };
-                    if(d.items) {
+                    if(d.hasOwnProperty('items')) {
                         o.detail0 = d.items;
                     }else {
                         var idx = 1;
-                        while(d['item' + idx]) {
-                            o['detail' + (idx - 1)] = d['item' + idx];
+                        while(d.hasOwnProperty('items' + idx)) {
+                            o['detail' + (idx - 1)] = d['items' + idx];
                             idx++;
                         }
                     }
@@ -115,7 +115,7 @@ Ext.define('saas.util.FormUtil', {
         }else{
             //取后台编号
             me.BaseUtil.request({
-                url: 'http://192.168.253.228:8900/number/getMaxnumber',
+                url: basePath + 'commons/number/getMaxnumber',
                 params: {
                     caller:form.caller
                 },

+ 5 - 9
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -35,7 +35,6 @@ Ext.define('saas.view.core.form.FormPanel', {
     toolBtns: [], // 自定义按钮
 
     initComponent: function() {
-
         var me = this;
         me.initViewModel();
         me.FormUtil.setItems(me);
@@ -148,7 +147,7 @@ Ext.define('saas.view.core.form.FormPanel', {
         viewModel.set('form', main);
 
         for(var i = 0; i < detailCount; i++) {
-            var detailData = formData['detail' + i],
+            var detailData = formData['detail' + i] || [],
             detail = viewData['detail' + i],
             store = detail.detailStore;
 
@@ -178,21 +177,18 @@ Ext.define('saas.view.core.form.FormPanel', {
             if(!ignore) {
                 if(bind) {
                     if(!Ext.isString(bind)) {
-                        bind = name;
                         Ext.apply(bind, {
-                            value: '{form.' + bind + '}'
+                            value: '{form.' + name + '}'
                         });
                     }else {
-                        bind = bind.replace(/[{|}]/g, '');
-                        item.bind = '{form.' + bind + '}';
+                        item.bind = '{form.' + name + '}';
                     }
                 }else {
-                    bind = name;
-                    item.bind = '{form.' + bind + '}';
+                    item.bind = '{form.' + name + '}';
                 }
                 // 设置默认值
                 if(defaultValue) {
-                    viewModel.set('form.' + bind, defaultValue);
+                    viewModel.set('form.' + name, defaultValue);
                 }
             }
 

+ 2 - 2
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -97,7 +97,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
                     dirtyGridData.push(d);
                 }
             });
-            params['item' + ( i + 1)] = dirtyGridData;
+            params['items' + ( i + 1)] = dirtyGridData;
         }
 
         // 只有一个从表时从表字段改为items
@@ -167,7 +167,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
                     dirtyGridData.push(d);
                 }
             });
-            params['item' + ( i + 1)] = dirtyGridData;
+            params['items' + ( i + 1)] = dirtyGridData;
         }
 
         // 只有一个从表时从表字段改为items

+ 3 - 3
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -176,9 +176,9 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 displayInfo: true,
                 emptyMsg: "暂无数据",
                 store: me.store,
-                displayMsg: '当前显示第{0}到{1}条数据,一共有{2}条',
-                beforePageText: "当前第",
-                afterPageText: "页,共{0}页"
+                displayMsg: '显示{0}-{1}条,共{2}条',
+                beforePageText: "第",
+                afterPageText: "页共{0}页"
             }]
         });
         me.callParent(arguments);

+ 218 - 0
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -0,0 +1,218 @@
+Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'stock-appropriationinout-formpanel',
+
+    controller: 'stock-appropriationinout-formpanel',
+    viewModel: 'stock-appropriationinout-formpanel',
+    
+     //字段属性
+     _title:'其它入库单',
+     _idField: 'id',
+     _codeField: 'pi_inoutno',
+     _statusField: 'pi_status',
+     _statusCodeField: 'pi_statuscode',
+     
+     _relationColumn: 'pd_piid',
+     _readUrl:'http://localhost:8800/purchase/read/',
+     _saveUrl:'http://localhost:8800/purchase/save',
+     _auditUrl:'http://localhost:8800/purchase/audit',
+     _deleteUrl:'http://localhost:8800/purchase/delete/',
+     _deleteDetailUrl:'http://localhost:8800/purchase/deleteItem/',
+     _turnInUrl:'http://localhost:8800/purchase/turnProdin/',
+     initId:0,
+ 
+     toolBtns: [{
+         xtype: 'button',
+         text: '转其他出库',
+         handler: 'turnIn'
+     }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    },{
+        xtype : "textfield", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "调拨单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        _detnoColumn:  'pd_pdno',
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "pd_pdno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
+            }, {
+                text : "id", 
+                dataIndex : "id", 
+                xtype : "numbercolumn",
+                hidden:true
+            },{
+                text : "pd_piid", 
+                dataIndex : "pd_piid", 
+                xtype : "numbercolumn",
+                hidden:true
+            },
+            {
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                xtype : "", 
+                items : null,
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },
+            {
+                text : "名称", 
+                dataIndex : "pr_detail",
+                ignore:true
+            },
+            {
+                text : "规格", 
+                dataIndex : "pr_spec",
+                ignore:true
+            },
+            {
+                text : "单位", 
+                dataIndex : "pr_unit",
+                ignore:true
+            },
+            {
+                text : "数量", 
+                dataIndex : "pd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            }, {
+                text : "拨出仓库id", 
+                dataIndex : "pd_whid", 
+                xtype : "numbercolumn",
+                hidden:true
+            },
+            {
+                text : "拨出仓库编号", 
+                dataIndex : "pd_whcode", 
+                width : 120.0, 
+                items : null,
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },{
+                text : "拨出仓库名称", 
+                dataIndex : "pd_whname", 
+                width : 120.0
+            },{
+                text : "拨入仓库id", 
+                dataIndex : "pd_inwhid", 
+                xtype : "numbercolumn",
+                hidden:true
+            },{
+                text : "拨入仓库编号", 
+                dataIndex : "pd_inwhcode", 
+                width : 120.0, 
+                items : null,
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },{
+                text : "拨入仓库名称", 
+                dataIndex : "pd_inwhname", 
+                width : 120.0
+            }
+            
+            
+           
+        ]
+    }, {
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "createTime", 
+        bind : "{createTime}", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "updateTime", 
+        bind : "{updateTime}", 
+        fieldLabel : "更新时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        readOnly : true, 
+        editable : false, 
+        name : "pu_status", 
+        bind : "{pi_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

+ 158 - 0
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -0,0 +1,158 @@
+Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.stock-appropriationinout-formpanel',
+    
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    addCombo:function(){
+        var combo=this.ownerCmp;
+        Ext.create('Ext.window.Window',{
+            layout:'vbox',
+            bodyPadding: 15,
+            width:500,
+            items:[{
+                fieldLabel:'实际值',
+                xtype:'textfield'
+            },{
+                fieldLabel:'显示值',
+                xtype:'textfield'
+            }],
+            buttons:[{
+                text:'确认',
+                handler:function(b){
+                    combo.setValue('ok');
+                    b.up('window').close();
+                }
+            }],
+            renderTo:this.ownerCmp.ownerCt.getEl()
+        }).show();
+
+    },
+
+    turnIn: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnInUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+              
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
+});

+ 8 - 0
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelModel.js

@@ -0,0 +1,8 @@
+Ext.define('saas.view.stock.appropriationInOut.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.stock-appropriationinout-formpanel',
+    data: {
+        pi_class: '调拨单'
+     }
+
+});

+ 212 - 0
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -0,0 +1,212 @@
+Ext.define('saas.view.stock.appropriationinout.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'stock-appropriationinout-querypanel',
+
+    controller: 'stock-appropriationinout-querypanel',
+    viewModel: 'stock-appropriationinout-querypanel',
+
+    viewName: 'stock-appropriationinout-querypanel',
+
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pu_id',
+        bind: '{pu_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'pu_code',
+        bind: '{pu_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        bind: '{pu_date}',
+        fieldLabel: '采购日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        bind: '{pu_vendcode}',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        //#pr_detail
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType: 'VAG',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'pu_statuscode',
+       // bind: '{pu_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pu_status',
+        valueField: 'pu_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['pu_statuscode', 'pu_status'],
+        data: [
+            ["$ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ]
+        })
+    }, {
+        xtype: 'multicombo',
+        name: 'pu_acceptstatuscode',
+        bind: '{pu_acceptstatuscode}',
+        fieldLabel: '入库状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["TURNIN", "已入库"],
+            ["UNTURNIN", "未入库"],
+            ["PARTIN", "部分入库"]
+        ]
+    }],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员',
+        allowBlank: true
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额',
+        allowBlank: true
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
+        allowBlank: true,
+        columnWidth: 1
+    }],
+    queryGridConfig: {
+        idField: 'pu_id',
+        codeField: 'pu_code',
+        addTitle: '采购单',
+        addXtype: 'purchase-purchase-formpanel',
+        defaultCondition:' pi_class = \'调拨单\'',
+        baseVastUrl: 'http://localhost:8800/purchase/',
+        baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '含税金额',
+            dataIndex: 'pu_taxtotal',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'pu_total',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '采购序号',
+            dataIndex: 'pd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'pd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'pd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'pd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }]
+    }
+});

+ 115 - 0
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js

@@ -0,0 +1,115 @@
+Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.stock-appropriationinout-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_detail',to:'pr_detail'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

+ 5 - 0
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.stock.appropriationInOut.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.stock-appropriationinout-querypanel'
+
+});