Browse Source

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

zhuth 7 years ago
parent
commit
30076a20f0
60 changed files with 1200 additions and 508 deletions
  1. 27 27
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/RecdetailView.java
  2. 1 1
      applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml
  3. 4 4
      applications/money/money-server/src/main/resources/mapper/RecdetailViewMapper.xml
  4. 66 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/PurchaseDTO.java
  5. 62 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/PurchaseDetailDTO.java
  6. 156 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/PurchaseListDTO.java
  7. 7 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java
  8. 8 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java
  9. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/report/SaleProfitView.java
  10. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/SaleService.java
  11. 58 3
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  12. 242 0
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  13. 1 0
      applications/sale/sale-server/src/main/resources/mapper/SaleProfitViewMapper.xml
  14. 2 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  15. 102 60
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  16. 56 2
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  17. 2 2
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml
  18. 33 44
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  19. 1 1
      frontend/saas-web/app/view/core/dbfind/types/BankInfoDbfindTrigger.js
  20. 1 1
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  21. 1 1
      frontend/saas-web/app/view/core/dbfind/types/EmployeeDbfindTrigger.js
  22. 1 1
      frontend/saas-web/app/view/core/dbfind/types/ProductMultiDbfindTrigger.js
  23. 1 1
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  24. 1 1
      frontend/saas-web/app/view/core/form/RemoteCombo.js
  25. 0 77
      frontend/saas-web/app/view/document/employee/BasePanel.js
  26. 0 10
      frontend/saas-web/app/view/document/employee/BasePanelController.js
  27. 0 4
      frontend/saas-web/app/view/document/employee/BasePanelModel.js
  28. 0 60
      frontend/saas-web/app/view/document/employee/FormController.js
  29. 0 8
      frontend/saas-web/app/view/document/employee/FormModel.js
  30. 0 74
      frontend/saas-web/app/view/document/employee/FormPanel.js
  31. 52 1
      frontend/saas-web/app/view/document/kind/ChildForm.js
  32. 60 0
      frontend/saas-web/app/view/document/kind/Kind.js
  33. 16 17
      frontend/saas-web/app/view/document/kind/KindController.js
  34. 30 0
      frontend/saas-web/app/view/document/kind/KindModel.js
  35. 27 0
      frontend/saas-web/app/view/document/other/Employee.js
  36. 4 4
      frontend/saas-web/app/view/home/InfoCard.js
  37. 8 4
      frontend/saas-web/app/view/main/Main.js
  38. 41 15
      frontend/saas-web/app/view/main/Main.scss
  39. 1 1
      frontend/saas-web/app/view/main/MainController.js
  40. 1 1
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  41. 1 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  42. 1 1
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  43. 1 1
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  44. 1 1
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  45. 3 3
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  46. 5 5
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  47. 2 2
      frontend/saas-web/app/view/money/report/AccountBalance.js
  48. 2 2
      frontend/saas-web/app/view/money/report/RecDetail.js
  49. 6 6
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  50. 5 5
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  51. 4 0
      frontend/saas-web/app/view/sale/report/SaleProfit.js
  52. 11 2
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  53. 26 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  54. 2 2
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  55. 1 1
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  56. 2 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  57. 1 1
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  58. 2 2
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  59. 45 40
      frontend/saas-web/app/view/sys/feedback/FormPanel.js
  60. 2 3
      frontend/saas-web/resources/json/navigation.json

+ 27 - 27
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/RecdetailView.java

@@ -15,13 +15,13 @@ public class RecdetailView {
 
     private String PU_BUYERNAME;
 
-    private Date pb_date;
+    private Date rb_date;
 
     private Double cu_beginaramount;
 
-    private Double pb_pdamount;
+    private Double rb_rdamount;
 
-    private Double pb_pbdamount;
+    private Double rb_rbdamount;
 
     private Double mustpay;
 
@@ -88,14 +88,6 @@ public class RecdetailView {
         this.PU_BUYERNAME = PU_BUYERNAME == null ? null : PU_BUYERNAME.trim();
     }
 
-    public Date getPb_date() {
-        return pb_date;
-    }
-
-    public void setPb_date(Date pb_date) {
-        this.pb_date = pb_date;
-    }
-
     public Double getCu_beginaramount() {
         return cu_beginaramount;
     }
@@ -104,22 +96,6 @@ public class RecdetailView {
         this.cu_beginaramount = cu_beginaramount;
     }
 
-    public Double getPb_pdamount() {
-        return pb_pdamount;
-    }
-
-    public void setPb_pdamount(Double pb_pdamount) {
-        this.pb_pdamount = pb_pdamount;
-    }
-
-    public Double getPb_pbdamount() {
-        return pb_pbdamount;
-    }
-
-    public void setPb_pbdamount(Double pb_pbdamount) {
-        this.pb_pbdamount = pb_pbdamount;
-    }
-
     public Double getMustpay() {
         return mustpay;
     }
@@ -151,4 +127,28 @@ public class RecdetailView {
     public void setPi_remark(String pi_remark) {
         this.pi_remark = pi_remark == null ? null : pi_remark.trim();
     }
+
+    public Date getRb_date() {
+        return rb_date;
+    }
+
+    public void setRb_date(Date rb_date) {
+        this.rb_date = rb_date;
+    }
+
+    public Double getRb_rdamount() {
+        return rb_rdamount;
+    }
+
+    public void setRb_rdamount(Double rb_rdamount) {
+        this.rb_rdamount = rb_rdamount;
+    }
+
+    public Double getRb_rbdamount() {
+        return rb_rbdamount;
+    }
+
+    public void setRb_rbdamount(Double rb_rbdamount) {
+        this.rb_rbdamount = rb_rbdamount;
+    }
 }

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml

@@ -27,7 +27,7 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by date, bankid desc
+    order by bankname, date, bankid desc
   </select>
 
 </mapper>

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

@@ -8,10 +8,10 @@
     <result column="pi_class" property="pi_class" jdbcType="VARCHAR" />
     <result column="PU_BUYERCODE" property="PU_BUYERCODE" jdbcType="VARCHAR" />
     <result column="PU_BUYERNAME" property="PU_BUYERNAME" jdbcType="VARCHAR" />
-    <result column="pb_date" property="pb_date" jdbcType="TIMESTAMP" />
+    <result column="rb_date" property="rb_date" jdbcType="TIMESTAMP" />
     <result column="cu_beginaramount" property="cu_beginaramount" jdbcType="DOUBLE" />
-    <result column="pb_pdamount" property="pb_pdamount" jdbcType="DOUBLE" />
-    <result column="pb_pbdamount" property="pb_pbdamount" jdbcType="DOUBLE" />
+    <result column="rb_rdamount" property="rb_rdamount" jdbcType="DOUBLE" />
+    <result column="rb_rbdamount" property="rb_rbdamount" jdbcType="DOUBLE" />
     <result column="mustpay" property="mustpay" jdbcType="DOUBLE" />
     <result column="mustdate" property="mustdate" jdbcType="DOUBLE" />
     <result column="pi_total" property="pi_total" jdbcType="DOUBLE" />
@@ -29,6 +29,6 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by pb_date desc
+    order by rb_date desc
   </select>
 </mapper>

+ 66 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/PurchaseDTO.java

@@ -0,0 +1,66 @@
+package com.usoftchina.saas.sale.dto;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class PurchaseDTO extends CommonBaseEntity implements Serializable {
+
+    private String pu_code;
+
+    private Date pu_date;
+
+    private Integer pu_vendid;
+
+    private String pu_vendcode;
+
+    private String pu_vendname;
+
+    private Integer pu_buyerid;
+
+    private String pu_buyercode;
+
+    private String pu_buyername;
+
+    private Date pu_delivery;
+
+    private Double pu_taxtotal;
+
+    private Double pu_total;
+
+    private String pu_remark;
+
+    private String pu_totalupper;
+
+    private String pu_printstatus;
+
+    private String pu_printstatuscode;
+
+    private String pu_acceptstatuscode;
+
+    private String pu_acceptstatus;
+
+    private String pu_statuscode;
+
+    private String pu_status;
+
+    private String pu_text1;
+
+    private String pu_text2;
+
+    private String pu_text3;
+
+    private String pu_text4;
+
+    private String pu_text5;
+
+    private String pu_shipaddresscode;
+
+    private String pu_auditman;
+
+    private Date pu_auditdate;
+
+}

+ 62 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/PurchaseDetailDTO.java

@@ -0,0 +1,62 @@
+package com.usoftchina.saas.sale.dto;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.dto.ProductDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class PurchaseDetailDTO extends CommonBaseEntity implements Serializable {
+
+    private  Long pd_puid;
+
+    private String pd_code;
+
+    private Integer pd_detno;
+
+    private Long pd_prodid;
+
+    private String pd_prodcode;
+
+    private String pd_unit;
+
+    private Double pd_qty;
+
+    private Double pd_price;
+
+    private Double pd_taxprice;
+
+    private Double pd_total;
+
+    private Double pd_taxrate;
+
+    private Double pd_taxtotal;
+
+    private Double pd_acceptqty;
+
+    private Date pd_delivery;
+
+    private String pd_salecode;
+
+    private Integer pd_saledetno;
+
+    private Integer pd_sdid;
+
+    private String pd_text1;
+
+    private String pd_text2;
+
+    private String pd_text3;
+
+    private String pd_text4;
+
+    private String pd_text5;
+
+    private Double pd_yqty;
+
+    private  String pd_remark;
+
+    private ProductDTO productDTO;
+}

+ 156 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/PurchaseListDTO.java

@@ -0,0 +1,156 @@
+package com.usoftchina.saas.sale.dto;
+
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2018-10-10 16:42
+ **/
+@Data
+public class PurchaseListDTO extends CommonBaseEntity implements Serializable {
+
+    //主表信息
+    private  Integer pu_id;
+
+    private String pu_code;
+
+    private Date pu_date;
+
+    private Integer pu_vendid;
+
+    private String pu_vendcode;
+
+    private String pu_vendname;
+
+    private Integer pu_buyerid;
+
+    private String pu_buyercode;
+
+    private String pu_buyername;
+
+    private Date pu_delivery;
+
+    private Double pu_taxtotal;
+
+    private Double pu_total;
+
+    private String pu_remark;
+
+    private String pu_totalupper;
+
+    private String pu_printstatus;
+
+    private String pu_printstatuscode;
+
+    private String pu_acceptstatuscode;
+
+    private String pu_acceptstatus;
+
+    private String pu_statuscode;
+
+    private String pu_status;
+
+    private String pu_text1;
+
+    private String pu_text2;
+
+    private String pu_text3;
+
+    private String pu_text4;
+
+    private String pu_text5;
+
+    private String pu_shipaddresscode;
+
+    private Date pu_auditdate;
+
+    private String pu_auditman;
+
+    //从表字段
+    private Long pd_id;
+
+    private  Long pd_puid;
+
+    private String pd_code;
+
+    private Integer pd_detno;
+
+    private Integer pd_prodid;
+
+    private String pd_prodcode;
+
+    private String pd_unit;
+
+    private Double pd_qty;
+
+    private Double pd_price;
+
+    private Double pd_taxprice;
+
+    private Double pd_total;
+
+    private Double pd_taxrate;
+
+    private Double pd_taxtotal;
+
+    private Double pd_acceptqty;
+
+    private Date pd_delivery;
+
+    private String pd_salecode;
+
+    private Integer pd_saledetno;
+
+    private Integer pd_sdid;
+
+    private String pd_text1;
+
+    private String pd_text2;
+
+    private String pd_text3;
+
+    private String pd_text4;
+
+    private String pd_text5;
+
+    private Double pd_yqty;
+
+    private String pd_remark;
+
+    private String pd_ordercode;
+
+    //private ProductDTO productDTO;
+    private Long pr_id;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
+    private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
+    private String pr_brand;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
+    private String pr_status;
+    private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
+}

+ 7 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java

@@ -186,7 +186,13 @@ public class SaleController {
        return Result.success();
     }
 
-    @GetMapping("/test")
+    @PostMapping("/saleTurnPurchase/{id}")
+    public Result saleTurnPurchase(@PathVariable("id") Long id){
+        DocBaseDTO baseDTO = saleService.saleTurnPurchase(id);
+        return Result.success(baseDTO);
+    }
+
+  @GetMapping("/test")
     public String test() {
         return "配置构建success-1";
     }

+ 8 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java

@@ -2,6 +2,8 @@ package com.usoftchina.saas.sale.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.sale.dto.PurchaseDTO;
+import com.usoftchina.saas.sale.dto.PurchaseDetailDTO;
 import com.usoftchina.saas.sale.po.Sale;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
@@ -42,4 +44,10 @@ public interface SaleMapper extends CommonBaseMapper<Sale> {
     Integer checkSendStatus(Long id);
 
     void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
+
+    void turnPurchase(PurchaseDTO purchase);
+
+    void turnPurchaseDetail(List<PurchaseDetailDTO> list);
+
+    Integer selectPurchaseId(@Param("code") String code,@Param("companyid") Long companyid);
 }

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

@@ -56,4 +56,6 @@ public class SaleProfitView {
     private String pd_remark;
 
     private Double pd_profitpresent;
+
+    private Double pw_costprice;
 }

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/SaleService.java

@@ -44,4 +44,6 @@ public interface SaleService {
     void batchClose(BatchDealBaseDTO baseDTOs);
 
     void batchOpen(BatchDealBaseDTO baseDTOs);
+
+    DocBaseDTO saleTurnPurchase(Long id);
 }

+ 58 - 3
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.sale.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.CommonService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
@@ -14,12 +15,11 @@ import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
-import com.usoftchina.saas.sale.dto.SaleDTO;
-import com.usoftchina.saas.sale.dto.SaleDetailDTO;
-import com.usoftchina.saas.sale.dto.SaleFormDTO;
+import com.usoftchina.saas.sale.dto.*;
 import com.usoftchina.saas.sale.mapper.*;
 import com.usoftchina.saas.sale.po.Sale;
 import com.usoftchina.saas.sale.po.SaleDetail;
@@ -524,6 +524,61 @@ public class SaleServiceImpl implements SaleService{
 
     }
 
+    @Override
+    public DocBaseDTO saleTurnPurchase(Long id) {
+        Sale sale = saleMapper.selectByPrimaryKey(id);
+        List<SaleList> dateilList = saleListMapper.selectSaleListByCondition("sa_id="+id,BaseContextHolder.getCompanyId());
+
+        PurchaseDTO purchase = new PurchaseDTO();
+        List<PurchaseDetailDTO> listPurchaseDetail = new ArrayList<PurchaseDetailDTO>();
+
+        //销售主表转采购主表
+        Result<String> result = maxnumberService.getMaxnumber(BillCodeSeq.PURCHASE.getCaller(),false);
+        purchase.setPu_code(result.getData());
+        purchase.setPu_status(Status.UNAUDITED.getDisplay());
+        purchase.setPu_statuscode(Status.UNAUDITED.toString());
+        purchase.setCompanyId(BaseContextHolder.getCompanyId());
+        purchase.setCreatorId(BaseContextHolder.getUserId());
+        purchase.setCreateTime(new Date());
+        purchase.setCreatorName(BaseContextHolder.getUserName());
+        saleMapper.turnPurchase(purchase);
+
+        Long purchaseId = purchase.getId();
+        for (SaleList detail : dateilList){
+            PurchaseDetailDTO purchaseDetailDTO = new PurchaseDetailDTO();
+            Double taxPrice = detail.getPr_purcprice()==null?new Double(0):Double.valueOf(detail.getPr_purcprice());
+            Double taxrate = detail.getSd_taxrate()==null?new Double(0):detail.getSd_taxrate();
+            Double qty = detail.getSd_qty()==null?new Double(0):detail.getSd_qty();
+            purchaseDetailDTO.setPd_prodid(Long.valueOf(String.valueOf(detail.getSd_prodid())));
+            purchaseDetailDTO.setPd_prodcode(detail.getSd_prodcode());
+            purchaseDetailDTO.setPd_detno(detail.getSd_detno());
+            purchaseDetailDTO.setPd_qty(detail.getSd_qty());
+            purchaseDetailDTO.setPd_price(taxPrice/(1+taxrate));
+            purchaseDetailDTO.setPd_salecode(sale.getSa_code());
+            purchaseDetailDTO.setPd_saledetno(detail.getSd_detno());
+            purchaseDetailDTO.setPd_taxrate(taxrate);
+            purchaseDetailDTO.setPd_taxprice(taxPrice);
+            purchaseDetailDTO.setPd_taxtotal(taxPrice*qty);
+            purchaseDetailDTO.setCompanyId(BaseContextHolder.getCompanyId());
+            purchaseDetailDTO.setCreatorId(BaseContextHolder.getUserId());
+            purchaseDetailDTO.setCreateTime(new Date());
+            purchaseDetailDTO.setCreatorName(BaseContextHolder.getUserName());
+            purchaseDetailDTO.setPd_puid(purchaseId);
+            purchaseDetailDTO.setPd_code(result.getData());
+            listPurchaseDetail.add(purchaseDetailDTO);
+        }
+
+        saleMapper.turnPurchaseDetail(listPurchaseDetail);
+
+
+
+        DocBaseDTO baseDTO = new DocBaseDTO();
+        baseDTO.setCode(result.getData());
+        baseDTO.setId(Long.valueOf(String.valueOf(purchaseId)));
+        baseDTO.setName(BillCodeSeq.PURCHASE.getName());
+        return baseDTO;
+    }
+
     //更新最新销售总额
     private void updateTotal(Long id) {
         if (null == id) {

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

@@ -421,4 +421,246 @@
   <update id="updateCreator">
     update sale set creatorId = #{userId} , creatorName=#{userName} where sa_id=#{id}
   </update>
+  
+  
+  
+  <!-- 销售订单转采购单-->
+  <insert id="turnPurchase" parameterType="com.usoftchina.saas.sale.dto.PurchaseDTO" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into purchase
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="pu_code != null" >
+        pu_code,
+      </if>
+      <if test="pu_date != null" >
+        pu_date,
+      </if>
+      <if test="pu_vendid != null" >
+        pu_vendid,
+      </if>
+      <if test="pu_vendcode != null" >
+        PU_VENDCODE,
+      </if>
+      <if test="pu_vendname != null" >
+        PU_VENDNAME,
+      </if>
+      <if test="pu_buyerid != null" >
+        PU_BUYERID,
+      </if>
+      <if test="pu_buyercode != null" >
+        PU_BUYERCODE,
+      </if>
+      <if test="pu_buyername != null" >
+        PU_BUYERNAME,
+      </if>
+      <if test="pu_delivery != null" >
+        PU_DELIVERY,
+      </if>
+      <if test="pu_taxtotal != null" >
+        PU_TAXTOTAL,
+      </if>
+      <if test="pu_total != null" >
+        PU_TOTAL,
+      </if>
+      <if test="pu_remark != null" >
+        PU_REMARK,
+      </if>
+      <if test="pu_totalupper != null" >
+        PU_TOTALUPPER,
+      </if>
+      <if test="pu_printstatus != null" >
+        PU_PRINTSTATUS,
+      </if>
+      <if test="pu_printstatuscode != null" >
+        PU_PRINTSTATUSCODE,
+      </if>
+      <if test="pu_acceptstatuscode != null" >
+        PU_ACCEPTSTATUSCODE,
+      </if>
+      <if test="pu_acceptstatus != null" >
+        PU_ACCEPTSTATUS,
+      </if>
+      <if test="pu_statuscode != null" >
+        PU_STATUSCODE,
+      </if>
+      <if test="pu_status != null" >
+        PU_STATUS,
+      </if>
+      <if test="companyId != null" >
+        companyid,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updaterName != null" >
+        updaterName,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+      <if test="creatorId != null" >
+        creatorId,
+      </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
+      <if test="pu_text1 != null" >
+        pu_text1,
+      </if>
+      <if test="pu_text2 != null" >
+        pu_text2,
+      </if>
+      <if test="pu_text3 != null" >
+        pu_text3,
+      </if>
+      <if test="pu_text4 != null" >
+        pu_text4,
+      </if>
+      <if test="pu_text5 != null" >
+        pu_text5,
+      </if>
+      <if test="pu_shipaddresscode != null" >
+        PU_SHIPADDRESSCODE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="pu_code != null" >
+        #{pu_code,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_date != null" >
+        #{pu_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pu_vendid != null" >
+        #{pu_vendid,jdbcType=INTEGER},
+      </if>
+      <if test="pu_vendcode != null" >
+        #{pu_vendcode,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_vendname != null" >
+        #{pu_vendname,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_buyerid != null" >
+        #{pu_buyerid,jdbcType=INTEGER},
+      </if>
+      <if test="pu_buyercode != null" >
+        #{pu_buyercode,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_buyername != null" >
+        #{pu_buyername,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_delivery != null" >
+        #{pu_delivery,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pu_taxtotal != null" >
+        #{pu_taxtotal,jdbcType=DOUBLE},
+      </if>
+      <if test="pu_total != null" >
+        #{pu_total,jdbcType=DOUBLE},
+      </if>
+      <if test="pu_remark != null" >
+        #{pu_remark,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_totalupper != null" >
+        #{pu_totalupper,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_printstatus != null" >
+        #{pu_printstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_printstatuscode != null" >
+        #{pu_printstatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_acceptstatuscode != null" >
+        #{pu_acceptstatuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_acceptstatus != null" >
+        #{pu_acceptstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_statuscode != null" >
+        #{pu_statuscode,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_status != null" >
+        #{pu_status,jdbcType=VARCHAR},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterName != null" >
+        #{updaterName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creatorId != null" >
+        #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pu_text1 != null" >
+        #{pu_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_text2 != null" >
+        #{pu_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_text3 != null" >
+        #{pu_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_text4 != null" >
+        #{pu_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_text5 != null" >
+        #{pu_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pu_shipaddresscode != null" >
+        #{pu_shipaddresscode,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+
+  <insert id="turnPurchaseDetail" parameterType="java.util.List" >
+    insert into purchasedetail ( PD_PUID, PD_CODE,
+    PD_DETNO, PD_PRODID, PD_PRODCODE,
+    PD_UNIT, PD_QTY, PD_PRICE,PD_TAXPRICE,
+    PD_TOTAL,PD_TAXRATE, PD_TAXTOTAL, PD_ACCEPTQTY,
+    PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
+    PD_SDID, companyId, updaterId,
+    updateTime, pd_text1, pd_text2,
+    pd_text3, pd_text4, pd_text5,
+    pd_yqty,pd_remark)
+    values
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      (
+      #{item.pd_puid,jdbcType=INTEGER}, #{item.pd_code,jdbcType=VARCHAR},
+      #{item.pd_detno,jdbcType=INTEGER}, #{item.pd_prodid,jdbcType=INTEGER}, #{item.pd_prodcode,jdbcType=VARCHAR},
+      #{item.pd_unit,jdbcType=VARCHAR}, #{item.pd_qty,jdbcType=DOUBLE}, #{item.pd_price,jdbcType=DOUBLE},#{item.pd_taxprice,jdbcType=DOUBLE},
+      #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE}, #{item.pd_taxtotal,jdbcType=DOUBLE}, #{item.pd_acceptqty,jdbcType=DOUBLE},
+      #{item.pd_delivery,jdbcType=DOUBLE}, #{item.pd_salecode,jdbcType=VARCHAR}, #{item.pd_saledetno,jdbcType=INTEGER},
+      #{item.pd_sdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.pd_text1,jdbcType=VARCHAR}, #{item.pd_text2,jdbcType=VARCHAR},
+      #{item.pd_text3,jdbcType=VARCHAR}, #{item.pd_text4,jdbcType=VARCHAR}, #{item.pd_text5,jdbcType=VARCHAR},
+      #{item.pd_yqty,jdbcType=DOUBLE}, #{item.pd_remark,jdbcType=VARCHAR}
+      )
+    </foreach>
+  </insert>
+  <select id="selectPurchaseId" resultType="int">
+    select pu_id from purchase where
+    <if test="code !=null">
+      pu_code=#{code}
+    </if> and
+    <if test="companyid !=null">
+      companyid=#{companyid}
+    </if>
+
+  </select>
 </mapper>

+ 1 - 0
applications/sale/sale-server/src/main/resources/mapper/SaleProfitViewMapper.xml

@@ -25,6 +25,7 @@
     <result column="pd_profitpresent" property="pd_profitpresent" jdbcType="DOUBLE" />
     <result column="companyid" property="companyid" jdbcType="INTEGER" />
       <result column="pd_remark" property="pd_remark" jdbcType="VARCHAR" />
+    <result column="pw_costprice" property="pw_costprice" jdbcType="DOUBLE" />
   </resultMap>
   <select id="selectByCondition" resultMap="BaseResultMap">
     select  *  from Sale_Profit_View

+ 2 - 1
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.storage.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.storage.po.Make;
+import com.usoftchina.saas.storage.po.ProdInOut;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -27,7 +28,7 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
 
     Double getOnHand(@Param("prodid") Long prodid, @Param("whid") Integer whid, @Param("companyId") Long companyId);
 
-    String selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
+    ProdInOut selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
 
     void updateCreator(@Param("userId") Long userId,@Param("userName") String userName,@Param("id") Long ma_id);
 }

+ 102 - 60
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.storage.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.CommonService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
@@ -295,8 +296,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
         String ma_statuscode = make.getMa_statuscode();
         if(StringUtils.isEmpty(ma_statuscode)||(!StringUtils.isEmpty(ma_statuscode)&&!ma_statuscode.equals(Status.UNAUDITED.name()))){
             throw  new BizException(BizExceptionCode.BIZ_AUDITED);
-        };
-
+        }
         //2.校验库存是否足够
         validStorage(makeListDTO);
         //3.生成  完工入库单和领料单 并 过账
@@ -347,12 +347,14 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * 2.过账
      * @param makeListDTO
      */
+
     @Transactional(rollbackFor = Exception.class)
     public void generateProdIO(MakeListDTO makeListDTO) {
         Make make = makeListDTO.getMain();
         Long ma_id = make.getId();
         List<MakeMaterial> items = makeListDTO.getItems();
-
+        Result res = null;
+        Object result =  null;
         if ("组装".equals(make.getMa_type())){
             /** 1.生产领料单 **/
             //a.主表
@@ -361,7 +363,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             String code = maxnumberService.getMaxnumber("MakeOut", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -399,7 +400,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
                 prodIODetailList.add(prodIODetail);
             }
             prodIODetailMapper.batchInsert(prodIODetailList);
-
             //c.领料单过账
             Map<String, Object> map = new HashMap<String, Object>();
             map.put("inoutNo", code);
@@ -407,14 +407,14 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76201, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                throw new BizException(76201, result.toString());
             }
-
             //重新获取更新后的工单
             make = getMapper().selectByPrimaryKey(ma_id);
-
             /** 2.完工入库单 **/
             //a.主表
             prodInOut = new ProdInOut();
@@ -422,7 +422,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             code = maxnumberService.getMaxnumber("MakeIn", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -455,15 +454,17 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             prodIODetail.setCompanyId(BaseContextHolder.getCompanyId());    //公司ID
             prodIODetail.setPd_status(0);      //单据状态
             prodIODetailMapper.insertSelective(prodIODetail);
-
             map.put("inoutNo", code);
             map.put("class", "完工入库单");
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76201, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                unPostMakeIn(make);
+                throw new BizException(76201, result.toString());
             }
         }else if ("拆件".equals(make.getMa_type())){
             /** 1.拆件领料单 **/
@@ -473,8 +474,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             String code = maxnumberService.getMaxnumber("MakeOut", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-            //prodInOut.setPi_total(make.getMa_price());
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -514,9 +513,11 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76201, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                throw new BizException(76201, result.toString());
             }
 
             //重新获取更新后的工单
@@ -533,7 +534,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             code = maxnumberService.getMaxnumber("MakeIn", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -578,9 +578,12 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76202, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                unPostMakeIn(make);
+                throw new BizException(76202,result.toString());
             }
         }
     }
@@ -688,54 +691,93 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * 2.反过账
      * @param make
      */
-    @Transactional(rollbackFor = Exception.class)
     public void selectProdIO(Make make) {
+        unPostMakeIn(make);
+        unPostPicking(make);
+    }
+
+    /**
+     * 删除,反审核完工入库单
+     * @param make
+     */
+    @Transactional
+    public void unPostMakeIn(Make make){
         String code = make.getMa_code();
         String type = make.getMa_type();
-        String outCode="";
         Long companyId = BaseContextHolder.getCompanyId();
-        String inCode = getMapper().selectMakeInOutCode(code, companyId, "完工入库单");
-        if ("拆件".equals(type)){
-            outCode = getMapper().selectMakeInOutCode(code, companyId, "拆件领料单");
-        }else if ("组装".equals(type)){
-            outCode = getMapper().selectMakeInOutCode(code, companyId, "生产领料单");
-        }
-        Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo", inCode);
-        map.put("class", "完工入库单");
-        map.put("commitid", BaseContextHolder.getUserId());
-        map.put("companyId", companyId);
-        map.put("result", null);
-        //完工入库单反过账
-        prodInOutMapper.unPost(map);
-        if(!StringUtils.isEmpty(map.get("result"))){
-            throw new BizException(76203, map.get("result").toString());
+        String inCode="";
+        ProdInOut prodInOut = null;
+        prodInOut = getMapper().selectMakeInOutCode(code, companyId, "完工入库单");
+        if (!StringUtils.isEmpty(prodInOut)){
+            String status = prodInOut.getPi_statuscode();
+            inCode = prodInOut.getPi_inoutno();
+            if ("AUDITED".equals(status)){
+                Map<String, Object> map = new HashMap<String, Object>();
+                map.put("inoutNo", inCode);
+                map.put("class", "完工入库单");
+                map.put("commitid", BaseContextHolder.getUserId());
+                map.put("companyId", companyId);
+                map.put("result", null);
+                //完工入库单反过账
+                Result res = warehouseApi.unPost(map);
+                Object result =  res.getData();
+                if (!StringUtils.isEmpty(result)){
+                    throw new BizException(76201, result.toString());
+                }
+            }
+            prodIODetailMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
+            prodInOutMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
         }
-        prodIODetailMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
-        prodInOutMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
-
+    }
 
+    /**
+     * 删除,反审核领料单
+     * @param make
+     */
+    @Transactional
+    public void unPostPicking(Make make){
+        String code = make.getMa_code();
+        String type = make.getMa_type();
+        Long companyId = BaseContextHolder.getCompanyId();
+        String outCode="";
+        ProdInOut prodInOut = null;
         if ("拆件".equals(type)){
-            map.put("class", "拆件领料单");
+            prodInOut = getMapper().selectMakeInOutCode(code, companyId, "拆件领料单");
         }else if ("组装".equals(type)){
-            map.put("class", "生产领料单");
-        }
-        map.put("inoutNo", outCode);
-        map.put("result", null);
-        //生产领料单/拆件领料反过账
-        prodInOutMapper.unPost(map);
-        if(!StringUtils.isEmpty(map.get("result"))){
-            throw new BizException(76204, map.get("result").toString());
+            prodInOut = getMapper().selectMakeInOutCode(code, companyId, "生产领料单");
         }
-        if ("拆件".equals(type)){
-            prodIODetailMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
-            prodInOutMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
-        }else if ("组装".equals(type)){
-            prodIODetailMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
-            prodInOutMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
+        if (!StringUtils.isEmpty(prodInOut)){
+            String status = prodInOut.getPi_statuscode();
+            outCode = prodInOut.getPi_inoutno();
+            if ("AUDITED".equals(status)) {
+                Map<String, Object> map = new HashMap<String, Object>();
+                map.put("inoutNo", outCode);
+                if ("拆件".equals(type)){
+                    map.put("class", "拆件领料单");
+                }else if ("组装".equals(type)){
+                    map.put("class", "生产领料单");
+                }
+                map.put("commitid", BaseContextHolder.getUserId());
+                map.put("companyId", companyId);
+                map.put("result", null);
+                //生产领料单/拆件领料反过账
+                Result res = warehouseApi.unPost(map);
+                Object result =  res.getData();
+                if (!StringUtils.isEmpty(result)){
+                    throw new BizException(76201, result.toString());
+                }
+            }
+            if ("拆件".equals(type)){
+                prodIODetailMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
+                prodInOutMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
+            }else if ("组装".equals(type)){
+                prodIODetailMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
+                prodInOutMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
+            }
         }
     }
 
+
     /**
      * 构造日记记录对象
      * @param id

+ 56 - 2
applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml

@@ -37,6 +37,60 @@
     <result column="ma_text4" property="ma_text4" jdbcType="VARCHAR" />
     <result column="ma_text5" property="ma_text5" jdbcType="VARCHAR" />
   </resultMap>
+
+
+
+
+
+
+
+  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
+    <id column="pi_id" jdbcType="INTEGER" property="id" />
+    <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
+    <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
+    <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
+    <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
+    <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
+    <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
+    <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
+    <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
+    <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
+    <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
+    <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
+    <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
+    <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
+    <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
+    <result column="pi_recordmanid" jdbcType="INTEGER" property="pi_recordmanid" />
+    <result column="pi_recordman" jdbcType="VARCHAR" property="pi_recordman" />
+    <result column="pi_recorddate" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
+    <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
+    <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
+    <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
+    <result column="companyid" property="companyId" jdbcType="BIGINT" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
+    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
+    <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
+    <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
+    <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
+    <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
+    <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
+    <result column="pi_ioid" jdbcType="INTEGER" property="pi_ioid" />
+  </resultMap>
+
+
+
+
+
+
+
   <sql id="Base_Column_List" >
     ma_id, ma_code, ma_status, ma_statuscode, ma_type, ma_prodid, ma_prodcode, ma_proddetail, 
     ma_prodspec, ma_version, ma_produnit, ma_qty, ma_whid, ma_whcode, ma_whname, ma_recorddate,
@@ -439,8 +493,8 @@
         SELECT IFNULL(PW_ONHAND,0) FROM PRODUCTWH WHERE PW_PRODID=#{prodid} AND PW_WHID=#{whid} and COMPANYID=#{companyId}
     </select>
 
-    <select id="selectMakeInOutCode" resultType="string">
-        SELECT PI_INOUTNO FROM PRODINOUT WHERE COMPANYID=#{companyId} AND PI_MACODE=#{code} AND PI_CLASS=#{type}
+    <select id="selectMakeInOutCode" resultMap="ResultMapWithBLOBs">
+        SELECT * FROM PRODINOUT WHERE COMPANYID=#{companyId} AND PI_MACODE=#{code} AND PI_CLASS=#{type}
     </select>
 
   <update id="updateCreator">

+ 2 - 2
base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml

@@ -20,8 +20,8 @@
         SELECT a.id id,a.username,a.realname,a.email,a.mobile,GROUP_CONCAT(c.name) roleNames,GROUP_CONCAT(c.id) roleIds
         FROM ac_account a
         left join ac_account_company d on a.id = d.account_id
-        left join ac_account_role b on a.id=b.account_id
-        left join ac_role c  on b.role_id = c.id
+        left join ac_account_role b on a.id=b.account_id and d.company_id = b.company_id
+        left join ac_role c  on b.role_id = c.id and b.company_id = c.company_id
         <where>
             <if test="condition!=null">
                 ${condition}

+ 33 - 44
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -308,49 +308,38 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
         return val;
     },
 
-    autoSetValue: function(data, dbfinds) {
-		var trigger = this;
-		var triggerV = null;
-		if (!trigger.ownerCt || trigger.column) { //如果是grid的dbfind
-			var grid = trigger.owner;
-			var record = grid.lastSelectedRecord || trigger.record || grid.getSelectionModel().selected.items[0] || grid.selModel.lastSelected; //detailgrid里面selected
-			Ext.Array.each(Ext.Object.getKeys(data),
-					function(k) {
-				Ext.Array.each(dbfinds,
-						function(ds) {
-					if (ds.trigger == trigger.name || Ext.isEmpty(ds.trigger)) {
-						if (Ext.Array.contains(ds.dbGridField.split(';'), k)) { //k == ds.dbGridField//支持多dbgrid的字段对应grid同一字段
-							if (ds.field == trigger.name) {
-								triggerV = data[k]; //trigger所在位置赋值
-							}
-							record.set(ds.field, data[k]);
-						}
-					}
-				});
-			});
-		} else {
-			var ff;
-			Ext.Array.each(Ext.Object.getKeys(data),
-					function(k) {
-				Ext.Array.each(dbfinds,
-						function(ds) {
-					if (k == ds.dbGridField) {
-							if (trigger.name == ds.field||trigger.name.substring(0,trigger.name.indexOf('-new'))==ds.field) {
-								triggerV = data[k];
-							} else {
-								ff = Ext.getCmp(ds.field);
-								if (ff && ff.setValue) ff.setValue(data[k]);
-							}
-					}
-				});
-			});
-		}
-		trigger.setValue(triggerV);
-		data.data = data;
-		trigger.lastTriggerValue='';
-		trigger.fireEvent('aftertrigger', trigger, data);
-		trigger.lastTriggerId = null;
-		trigger.lastQueryValue='';
+    autoSetValue: function(combo, record) {
+        var me = combo;
+        var dbfinds = me.dbfinds;
+        if(dbfinds&&dbfinds.length>0){
+            if(me.belong=='grid'){
+                for (let index = 0; index < dbfinds.length; index++) {
+                    var item = dbfinds[index];
+                    var rec = me.column.ownerCt.ownerCt.selModel.getLastSelected();
+                    var nowRec = me.column.ownerCt.ownerCt.store.getData().getByKey(rec.id);
+                    nowRec.set(item.to,record.get(item.from));
+                    if(me.name==item.to){
+                        me.column.getEditor().setValue(record.get(item.from));
+                    }
+                }
+            }else if(me.belong=='form'){
+                for (let index = 0; index < dbfinds.length; index++) {
+                    var item = dbfinds[index];
+                    var field = me.ownerCt.down('[name='+item.to+']');
+                    if(field){
+                        var val = record.get(item.from);
+                        if(field.xtype=='dbfindtrigger'){
+                            field.setRawValue(val);
+                            field.setValue(val);
+                            field.value = val;
+                            field.lastTriggerValue=val;
+                        }else{
+                            field.setValue(val);
+                        }    
+                    }
+                }
+            }
+            me.aftertrigger(me,record);
+        }
     }
-
 });

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

@@ -26,7 +26,7 @@ Ext.define('saas.view.core.dbfind.types.BankInfoDbfindTrigger', {
         text: "账户ID",
         flex: 0,
         dataIndex: "id",
-        width: 0,
+        hidden:true,
         xtype: ""
     }, {
         text: "资金账户",

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

@@ -31,7 +31,7 @@ Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
         conditionCode: 'id',
         text: "客户ID",
         dataIndex: "id",
-        width: 0,
+        hidden:true,
         xtype: "",
     }, {
         conditionCode: 'cu_code',

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

@@ -31,7 +31,7 @@ Ext.define('saas.view.core.dbfind.types.EmployeeDbfindTrigger', {
         text: "人员ID",
         hidden: true,
         dataIndex: "id",
-        width: 0,
+        hidden:true,
         xtype: "numbercolumn"
     },{
         text: "人员编号",

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

@@ -78,7 +78,7 @@ Ext.define('saas.view.core.dbfind.types.ProductMultiDbfindTrigger', {
         dataIndex: "pr_purcprice",
         align: 'end',
         xtype: 'numbercolumn',
-        width: 0,
+        hidden:true,
     }, {
         text: "仓库id",
         dataIndex: "pr_whid",

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

@@ -31,7 +31,7 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
         text: "仓库ID",
         flex: 0,
         dataIndex: "id",
-        width: 0,
+        hidden:true,
         xtype: "",
     }, {
         text: "仓库编号",

+ 1 - 1
frontend/saas-web/app/view/core/form/RemoteCombo.js

@@ -37,7 +37,7 @@ Ext.define('saas.view.core.form.RemoteCombo', {
             picker;
         var count = this.store.getCount();
         var pickerCfg = Ext.apply({
-                height: count>5?150:30*count,
+                height: count>5?248-(me.hiddenBtn?50:0):(33*count+me.hiddenBtn?0:50),
                 hiddenBtn:me.hiddenBtn,
                 xtype: 'boundlistadd',
                 id: me.id + '-picker',

+ 0 - 77
frontend/saas-web/app/view/document/employee/BasePanel.js

@@ -1,77 +0,0 @@
-Ext.define('saas.view.document.employee.BasePanel', {
-    extend: 'saas.view.core.base.BasePanel',
-    xtype: 'document-employee-basepanel',
-
-    controller: 'document-employee-basepanel',
-    viewModel: 'document-employee-basepanel',
-
-    searchField:[{ 
-        xtype : "textfield", 
-        name : "em_code", 
-        emptyText : "账号", 
-        width:120
-    },{
-        xtype : "textfield", 
-        name : "em_name", 
-        emptyText : "姓名", 
-        width:120
-    },{
-        xtype : "textfield", 
-        name : "em_class", 
-        emptyText : "类型",    
-        width:100
-    },{
-        xtype : "textfield", 
-        name : "name", 
-        emptyText : "角色",    
-        width:100
-    }],
-
-    //字段属性
-    _formXtype:'document-employee-formpanel',
-    _title:'人员资料',
-    _deleteUrl:'/api/document/employee/delete/',
-
-    gridConfig: {
-        idField: 'id',
-        codeField: 'pr_code',
-        statusCodeField:'pr_statuscode',
-        dataUrl: '/api/document/employee/list',
-        columns : [{
-            text : "id", 
-            width : 0, 
-            dataIndex : "id", 
-            xtype : "numbercolumn", 
-        },{
-            text : "账号", 
-            width : 200.0, 
-            dataIndex : "em_code", 
-        }, 
-        {
-            text : "姓名", 
-            dataIndex : "em_name", 
-            width : 180.0, 
-        },
-        {
-            text : "密码", 
-            dataIndex : "em_password", 
-            width : 180.0, 
-        }, 
-        {
-            text : "类型", 
-            dataIndex : "em_class", 
-            width : 120.0, 
-            hidden : true,
-        }, 
-        {
-            text : "电话", 
-            dataIndex : "em_mobile", 
-            width : 120.0,
-        }]
-    },
-
-    refresh:function(){
-        this.items.items[0].store.load()
-    }
-
-});

+ 0 - 10
frontend/saas-web/app/view/document/employee/BasePanelController.js

@@ -1,10 +0,0 @@
-Ext.define('saas.view.document.employee.BasePanelController', {
-    extend: 'saas.view.core.base.BasePanelController',
-    alias: 'controller.document-employee-basepanel',
-
-    init: function (form) {
-        var me = this;
-        this.control({
-        });
-    }
-});

+ 0 - 4
frontend/saas-web/app/view/document/employee/BasePanelModel.js

@@ -1,4 +0,0 @@
-Ext.define('saas.view.document.employee.BasePanelModel', {
-    extend: 'saas.view.core.base.BasePanelModel',
-    alias: 'viewmodel.document-employee-basepanel'
-});

+ 0 - 60
frontend/saas-web/app/view/document/employee/FormController.js

@@ -1,60 +0,0 @@
-Ext.define('saas.view.document.employee.FormController', {
-    extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.document-employee-formpanel',
-
-    auditBtnClick: function() {
-        var me = this,
-        form = me.getView(),
-        statusCodeField = form._statusCodeField,
-        viewModel = me.getViewModel(),
-        status = viewModel.data[statusCodeField];
-        status == 'OPEN' ? me.unAudit() : me.audit();
-    },
-
-    audit: function(){
-        var me = this,
-        form = this.getView(),
-        viewModel = me.getViewModel();
-        
-        saas.util.BaseUtil.request({
-            url: form._openUrl+'/'+viewModel.data.id,
-            params: '',
-            method: 'POST',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                form.initId = localJson.data.id;
-                saas.util.FormUtil.loadData(form);
-                viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('启用成功');
-            }
-        })
-        .catch(function(res) {
-            console.error(res);
-            saas.util.BaseUtil.showToast('启用失败: ' + res.message);
-        });
-    },
-    unAudit: function() {
-        var me = this,
-        form = this.getView(),
-        viewModel = me.getViewModel();
-        
-        saas.util.BaseUtil.request({
-            url: form._closeUrl+'/'+viewModel.data.id,
-            params: '',
-            method: 'POST',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                form.initId = localJson.data.id;
-                saas.util.FormUtil.loadData(form);
-                viewModel.set('base.editable', false);
-                saas.util.BaseUtil.showToast('禁用成功');
-            }
-        })
-        .catch(function(res) {
-            console.error(res);
-            saas.util.BaseUtil.showToast('禁用失败: ' + res.message);
-        });
-    }
-});

+ 0 - 8
frontend/saas-web/app/view/document/employee/FormModel.js

@@ -1,8 +0,0 @@
-Ext.define('saas.view.document.employee.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.document-employee-formpanel',
-
-    data: {
-        showAuditBtn:false
-    }
-});

+ 0 - 74
frontend/saas-web/app/view/document/employee/FormPanel.js

@@ -1,74 +0,0 @@
-Ext.define('saas.view.document.employee.FormPanel', {
-    extend: 'saas.view.core.form.FormPanel',
-    xtype: 'document-employee-formpanel',
-    controller: 'document-employee-formpanel',
-    viewModel: 'document-employee-formpanel',
-    caller:'Employee',
-    //字段属性
-    _title:'物料资料',
-    _idField: 'id',
-    _codeField: 'em_code',
-    _readUrl:'/api/document/employee/read/',
-    _saveUrl:'/api/document/employee/save',
-    _deleteUrl:'/api/document/employee/delete/',
-    _deleteMsg:'删除的人员资料将不能恢复,请确认是否删除?',
-    initId:0,
-    codeInHeader: false,
-    defaultItems: [{
-        xtype: 'hidden',
-        name: 'id',
-        fieldLabel: 'id',
-        allowBlank: true,
-        columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 'em_code',
-        fieldLabel: '账号',
-        allowBlank: false,
-        columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 'em_name',
-        fieldLabel: '姓名',
-        allowBlank: false,
-        columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 'em_password',
-        fieldLabel: '密码',
-        allowBlank: false,
-        columnWidth: 0.25
-    },{
-        xtype: 'combobox',
-        name: 'em_class',
-        columnWidth: 0.25,
-        fieldLabel: '类型',
-        queryMode: 'local',
-        displayField: 'name',
-        valueField: 'value',
-        allowBlank:false,
-        editable:false,
-        store: Ext.create('Ext.data.ArrayStore', {
-            fields: ['name', 'value'],
-            data: [
-                ["正式", "正式"],
-                ["离职", "离职"],
-            ]
-        })
-    },{
-        xtype: 'textfield',
-        name: 'em_mobile',
-        fieldLabel: '电话',
-        allowBlank: false,
-        columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 'em_email',
-        fieldLabel: '邮箱',
-        // allowBlank: false,
-        columnWidth: 0.25
-    }],
-    auditTexts: {
-
-    }
-});

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

@@ -274,7 +274,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name: 'wh_type',
                 allowBlank:false,
                 displayField : "display", 
-                editable:true,
+                editable:false,
                 hideTrigger : false, 
                 maxLength : 100.0, 
                 minValue : null, 
@@ -302,6 +302,57 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 value:'OPEN'
             }]
         },
+        employee:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                fieldLabel: '人员编号',
+                name: 'em_code',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '人员名称',
+                name: 'em_name',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '联系电话',
+                name: 'em_mobile',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '邮箱',
+                name: 'em_email', 
+                allowBlank:false,  
+                maxLength: 20
+            },{
+                value:'正式',
+                xtype:'combo',
+                fieldLabel: '人员状态',
+                name: 'em_class',
+                allowBlank:false,
+                displayField : "display", 
+                editable:false,
+                hideTrigger : false, 
+                maxLength : 100.0, 
+                minValue : null, 
+                positiveNum : false, 
+                queryMode : "local", 
+                valueField : "value", 
+                store:{
+                    fields: ['display', 'value'],
+                    data : [
+                        {"display":"正式", "value":'正式'},
+                        {"display":"离职", "value":'离职'}
+                    ]
+                }
+            },]
+        },
         maxnumbers:{
             items:[{
                 xtype:'hidden',

+ 60 - 0
frontend/saas-web/app/view/document/kind/Kind.js

@@ -258,6 +258,66 @@ Ext.define('saas.view.document.kind.Kind', {
             }],
             reqUrl:'/api/account/account/bind/roles',
         },
+        employee:{
+            columns: [{
+                text: '人员编号',
+                dataIndex: 'em_code',
+                width: 200
+            },{
+                text: '人员名称',
+                dataIndex: 'em_name',
+                width: 200
+            },{
+                text: '联系电话',
+                dataIndex: 'em_mobile',
+                width: 200
+            },{  
+                text: '邮箱',
+                dataIndex: 'em_email',
+                width: 200
+            },{
+                text: '人员状态',
+                dataIndex: 'em_class',
+                width:90,
+                xtype: 'actioncolumn',
+                align : 'center',
+                items: [{
+                    iconCls:'',
+                    getClass: function(v, meta, rec) {
+                        if(rec.get('em_class')=='正式'){
+                            return 'x-grid-checkcolumn-checked-btn';
+                        }else{
+                            return 'x-grid-checkcolumn-btn';
+                        }
+                    },
+                    handler: function(view, rowIndex, colIndex) {
+                        var rec = view.getStore().getAt(rowIndex);
+                        var type=rec.get('em_class')=='正式'?true:false;
+                        //  禁用/启用
+                        var form = this.ownerCt.ownerCt.ownerCt;
+                        var grid = this.ownerCt.ownerCt;
+                        saas.util.BaseUtil.request({
+                            url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
+                            params: '',
+                            method: 'POST',
+                        })
+                        .then(function(localJson) {
+                            if(localJson.success){
+                                saas.util.BaseUtil.showToast('操作成功');
+                                grid.store.load();
+                            }
+                        })
+                        .catch(function(res) {
+                            console.error(res);
+                            saas.util.BaseUtil.showToast('操作失败: ' + res.message);
+                        });
+                    }
+                }]
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/employee/save',
+            delUrl: '/api/document/employee/delete'
+        },
         warehouse:{
             columns: [{
                 text: '编号',

+ 16 - 17
frontend/saas-web/app/view/document/kind/KindController.js

@@ -32,10 +32,10 @@ Ext.define('saas.view.document.kind.KindController', {
         if(store) store.reload();
         vm.set('title', button.typeText);
     },
-    onAdd:function(){
-        var me=this,
-            dataKind=me.getViewModel().getData()['dataKind'].value;
-        me.createDialog(dataKind);
+    onAdd:function(b){
+        var dk = b.ownerCt.ownerCt;
+        var dataKind=dk.getViewModel().getData()['dataKind'].value;
+        this.createDialog(dataKind,null,dk);
     },
     onRefresh:function(){
         var me = this;
@@ -64,20 +64,19 @@ Ext.define('saas.view.document.kind.KindController', {
         return columns;
     },
     onEdit:function(grid,row,col){
-        var me=this,
-            dataKind=me.getViewModel().getData()['dataKind'].value;
-            rec = grid.getStore().getAt(row);
-        this.createDialog(dataKind,rec);
+        var dk = grid.ownerCt.ownerCt;
+        var dataKind=dk.getViewModel().getData()['dataKind'].value,
+        rec = grid.getStore().getAt(row);
+        this.createDialog(dataKind,rec,dk);
     },
     onDelete:function(grid,row,col){
-        var me=this,
-            view=me.getView(),
-            dataKind=me.getViewModel().getData()['dataKind'].value;
+        var dk = grid.ownerCt.ownerCt;
+        var dataKind=dk.getViewModel().getData()['dataKind'].value,
         rec = grid.getStore().getAt(row);
-        var keyV=rec.get(view.etc[dataKind].keyField);
+        var keyV=rec.get(dk.etc[dataKind].keyField);
         //删除接口
         saas.util.BaseUtil.request({
-            url: view.etc[dataKind].delUrl+'/'+keyV,
+            url: dk.etc[dataKind].delUrl+'/'+keyV,
             method: 'POST'
         })
         .then(function(localJson) {
@@ -91,8 +90,8 @@ Ext.define('saas.view.document.kind.KindController', {
             saas.util.BaseUtil.showToast('删除失败: ' + res.message);
         });
     },
-    createDialog: function(dataKind,record) {
-        var view = this.getView();var me=this;
+    createDialog: function(dataKind,record,dk) {
+        var view = dk;
         this.isEdit = !!record;
         this.dialog = view.add({
             autoScroll:true,
@@ -101,8 +100,8 @@ Ext.define('saas.view.document.kind.KindController', {
                 title: record ? '修改{title}' : '新增{title}'
             },
             dataKind:dataKind,
-            belong:this.getView().etc[dataKind],
-            _parent:this.getView(),
+            belong:view.etc[dataKind],
+            _parent:view,
             record:record,
             session: true
         });

+ 30 - 0
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -263,6 +263,36 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             }
         },
+        employee:{
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'em_code',  type: 'string'},
+                {name: 'em_mobile',  type: 'string'},
+                {name: 'em_email',  type: 'string'},
+                {name: 'em_clasee',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/employee/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list'
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        },
         productunit: {    
             fields:[
                 {name: 'id', type: 'int'},

+ 27 - 0
frontend/saas-web/app/view/document/other/Employee.js

@@ -0,0 +1,27 @@
+Ext.define('saas.view.document.other.Employee', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-employee',
+    autoScroll: true,
+    layout:'fit',
+    _openUrl:'/api/document/employee/open',
+    _closeUrl:'/api/document/employee/close',
+    defaultType:'employee',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'人员资料'});
+        }
+    }
+})

+ 4 - 4
frontend/saas-web/app/view/home/InfoCard.js

@@ -42,25 +42,25 @@ Ext.define('saas.view.home.InfoCard', {
                     title: '七天内待出货销售',
                     color: 'yellow',
                     viewType: 'sale-sale-querypanel',
-                    condition: 'sale.companyid=' + companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail where sd_said=sa_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now()) <7)'
+                    condition: 'sale.companyid=' + companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail detail where sd_id=saledetail.sd_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now())<= 7)'
                 },
                 unstorage: {
                     title: '七天内待入库采购',
                     color: 'purple',
                     viewType: 'purchase-purchase-querypanel',
-                    condition: 'purchase.companyId=' + companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail where pd_puid=pu_id and IFNULL(pd_acceptqty,0) < ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <7)'
+                    condition: 'purchase.companyId=' + companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pd_acceptqty,0) < ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <= 7)'
                 },
                 unpay: {
                     title: '七天内待付款',
                     color: 'red',
                     viewType: 'purchase-purchasein-querypanel',
-                    condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now()) < 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
+                    condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now()) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unreceive: {
                     title: '七天内待收款',
                     color: 'pink',
                     viewType: 'sale-saleout-querypanel',
-                    condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now()) < 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=1 and ifnull(sl_namount,0)<>0)'
+                    condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now()) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unauditcheck: {
                     title: '未审核验收',

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

@@ -66,12 +66,14 @@ Ext.define('saas.view.main.Main', {
                 },
                 {
                     iconCls:'x-fa fa-question',
+                    cls:'sa-nav-button',
                     ui: 'header',
                     arrowVisible: false,
                     tooltip: '帮助',
                     width:50, 
+                    height:45,
                     menu: {
-                        cls:'x-main-menu',
+                        cls:'x-main-menu sa-nav-menu',
                         items: [{
                             text: '新手导航',
                             iconCls:'x-fa fa-comment-o sa-navicon',
@@ -94,6 +96,7 @@ Ext.define('saas.view.main.Main', {
                             text: '客服热线',
                             iconCls:'x-fa fa-comment-o sa-navicon',
                             menu:{
+                                cls:'sa-nav-menu',
                                 items:[{
                                     text:'<span onclick="javascript:window.open(\'http://www.usoftchina.com\');" style="text-decoration:underline;color:blue;">优软科技官网</span>'
                                 },{	
@@ -120,14 +123,15 @@ Ext.define('saas.view.main.Main', {
                 {
                     ui: 'header',
                     arrowVisible: false,
-                    id:"userImage",    
+                    id:"userImage", 
+                    cls:' sa-nav-button',   
                     width: 50,
                     height:50,    
                     bind: {
                         html:'<img class="x-img x-box-item x-toolbar-item x-img-header" style="height:35px;width:35px;margin-top: 6px;margin-left: 14px;" src="{avatarUrl}" alt="">'
                     }, 
                     menu: {
-                        cls:'x-main-menu2',
+                        cls:'x-main-menu2 sa-nav-menu', 
                         items: [ {  
                             text: '账户中心',
                             iconCls:'x-fa fa-user-o sa-navicon',
@@ -140,7 +144,7 @@ Ext.define('saas.view.main.Main', {
                             handler:'feedbackMsg'
                         }, {
                             text: '退出',
-                            iconCls:'x-fa fa-power-off',
+                            iconCls:'x-fa fa-power-off sa-navicon',
                             handler: 'onLogout'
                         }]
                     }

+ 41 - 15
frontend/saas-web/app/view/main/Main.scss

@@ -221,32 +221,35 @@ body > .x-mask {
     filter: grayscale(100%);
     filter: gray;
 }
- .x-main-menu{
+ .sa-nav-menu{
     background: #f8fbff;
     border: 1px solid #34baf6;
     margin-top: 10px;
  }
- .x-main-menu .x-menu-item-text-default {
+ .sa-nav-button{
+    box-shadow: none !important;
+ }
+ .sa-nav-menu.x-menu-item-text-default,
+ .sa-nav-menu  .sa-navicon {
     //font-family: PingFangSC-Regular;
     //font-size: 14px;
     color: #34BAF6;
     letter-spacing: 0;
     text-align: center;
  }
- .x-menu.x-main-menu .x-menu-bodyWrap{
+ .x-menu.sa-nav-menu .x-menu-bodyWrap{
     margin-left: -0.5px;
  }
-.x-main-menu .x-fa.sa-navicon{
+/* .x-main-menu .x-fa.sa-navicon{
     color: #34BAF6;
-} 
-.x-main-menu .x-menu-item-text-default.x-menu-item.x-menu-item-default-focus,
-.x-main-menu .x-menu-item-text-default.x-menu-item.x-menu-item-active{
+}  */
+.sa-nav-menu .x-menu-item.x-menu-item-default-focus  .x-menu-item-text-default ,
+.sa-nav-menu .x-menu-item.x-menu-item-active  .x-menu-item-text-default,
+.sa-nav-menu .x-menu-item.x-menu-item-default-focus  .sa-navicon ,
+.sa-nav-menu .x-menu-item.x-menu-item-active  .sa-navicon{
     color: white;
 }
-.x-main-menu .x-fa.sa-navicon.x-menu-item-default-focus,
-.x-main-menu .x-fa.sa-navicon.x-menu-item-active{
-    color: #34BAF6;
-} 
+
 .x-main-menu::before{
     content: ' ';
     display: block;
@@ -268,16 +271,14 @@ body > .x-mask {
     margin-left: 16px;
 }
 .x-main-menu2::before{
-    content: ' ';
+    /* content: ' ';
     display: block;
     border-style: solid;
     box-shadow: 0px 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(15, 136, 232, 0.6);
     box-shadow: aliceblue;
     border-width: 17px;
     border-color: #cccccc;
-    /* border-color: #cccccc #6e838e #9c9d9e #bdc3c5; */
     position: fixed;
-    /* left: 100%; */
     top: 26px;
     -moz-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
     -webkit-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
@@ -286,5 +287,30 @@ body > .x-mask {
     -khtml-clip-path: polygon(100% 0px, 0 50%, 100% 100%);
     clip-path: polygon(0 100%, 50% 0, 100% 100%);
     margin-top: 25px;
-    margin-left: 47px;
+    margin-left: 47px; */
+
+    content: ' ';
+    display: block;
+    border-style: solid;
+    background-color: #f8fbff;
+    transform: rotate(45deg);
+    border-color: #34baf6;
+    position: fixed;
+    width: 15px;
+    height: 15px;
+    clip-path: polygon(0% 0, 100% 0%, 0 100%);
+    -moz-clip-path: polygon(0% 0, 100% 0%, 0 100%);
+    -webkit-clip-path: polygon(0% 0, 100% 0%, 0 100%);
+    -o-clip-path: polygon(0% 0, 100% 0%, 0 100%);
+    -ms-clip-path: polygon(0% 0, 100% 0%, 0 100%);
+    -khtml-clip-path: polygon(0% 0, 100% 0%, 0 100%);
+    border-width: 1px 0px 0px 1px !important;
+    margin-top: -7.5px;
+    margin-left: 55px;
+}
+
+.x-boundlist-item {
+    text-overflow: ellipsis;
+    overflow: hidden;
+    white-space: nowrap;
 }

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

@@ -121,7 +121,7 @@ Ext.define('saas.view.main.MainController', {
                 modal: true,
                 id:"feedbackWin",
                 height: '50%',
-                width: '50%',
+                width: '70%',
                 title: '意见反馈',
                 scrollable: true,
                 constrain: true,

+ 1 - 1
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -44,7 +44,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn",
-                width:0
+                hidden:true
             }, {
                 text : "期间", 
                 dataIndex : "ftd_ym", 

+ 1 - 1
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -88,7 +88,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0
+            hidden:true
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',

+ 1 - 1
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -70,7 +70,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn",
-                width:0
+                hidden:true
             }, {
                 text : "期间",
                 dataIndex : "ord_ym",

+ 1 - 1
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -89,7 +89,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

+ 1 - 1
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -70,7 +70,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn",
-                width:0
+                hidden:true
             }, {
                 text : "期间", 
                 dataIndex : "osd_ym", 

+ 3 - 3
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -89,7 +89,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
@@ -143,7 +143,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
             text: '金额',
             xtype: 'numbercolumn',
             dataIndex: 'os_amount',
-            width: 0,
+            hidden:true,
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -153,7 +153,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         }, {
             text: '备注',
             dataIndex: 'os_remark',
-            width: 0
+            hidden:true
         }],
         relativeColumn: []
     }

+ 5 - 5
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -142,26 +142,26 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         },{
             text: '源单编号',
             dataIndex: 'rbd_slcode',
-            width: 0
+            hidden:true
         },{
             text: '业务类别',
             dataIndex: 'rbd_slkind',
-            width: 0
+            hidden:true
         },{
             text: '单据日期',
             dataIndex: 'rbd_sldate',
             xtype: 'datecolumn',
-            width: 0
+            hidden:true
         },{
             text: '单据金额',
             dataIndex: 'rbd_amount',
             xtype: 'numbercolumn',
-            width: 0
+            hidden:true
         },{
             text: '本次核销金额',
             dataIndex: 'rbd_nowbalance',
             xtype: 'numbercolumn',
-            width: 0
+            hidden:true
         },
         ]
     },

+ 2 - 2
frontend/saas-web/app/view/money/report/AccountBalance.js

@@ -60,7 +60,7 @@ Ext.define('saas.view.money.report.AccountBalance', {
             }
         },{
             text:'支出',
-            dataIndex:'thisamount',
+            dataIndex:'outamount',
             xtype: 'numbercolumn',
             renderer : function(v) {
                 var arr = (v + '.').split('.');
@@ -77,7 +77,7 @@ Ext.define('saas.view.money.report.AccountBalance', {
             }
         },{
             text: '账户余额',
-            dataIndex: 'pr_code',
+            dataIndex: 'thisamount',
             xtype: 'numbercolumn',
             renderer : function(v) {
                 var arr = (v + '.').split('.');

+ 2 - 2
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -20,7 +20,7 @@ Ext.define('saas.view.money.report.RecDetail', {
         columnWidth: 0.25
     }, {
         xtype: 'condatefield',
-        name: 'pb_date',
+        name: 'rb_date',
         fieldLabel: '单据日期',
         columnWidth: 0.5
     }],
@@ -52,7 +52,7 @@ Ext.define('saas.view.money.report.RecDetail', {
             width: 200
         }, {
             text: '单据日期',
-            dataIndex: 'pb_date',
+            dataIndex: 'rb_date',
             width: 200,
         }, {
             text: '序号',

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

@@ -141,29 +141,29 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
             text: '录入人ID',
             dataIndex: 'creatorId',
-            width: 0
+            hidden:true
         }, {
             text: '录入人',
             dataIndex: 'creatorName',
-            width: 0
+            hidden:true
         }, {
             text: '录入日期',
             dataIndex: 'createTime',
             xtype: 'datecolumn',
-            width: 0
+            hidden:true
         }, {
             text: '更新人ID',
             dataIndex: 'updaterId',
-            width: 0
+            hidden:true
         }, {
             text: '更新人',
             dataIndex: 'updater',
-            width: 0
+            hidden:true
         }, {
             text: '更新日期',
             dataIndex: 'updateTime',
             xtype: 'datecolumn',
-            width: 0
+            hidden:true
         }],
         relativeColumn: [
         {

+ 5 - 5
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -130,25 +130,25 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         },{
             text: '录入人ID',
             dataIndex: 'creatorId',
-            width: 0
+            hidden:true
         }, {
             text: '录入日期',
             dataIndex: 'createTime',
             xtype: 'datecolumn',
-            width: 0
+            hidden:true
         }, {
             text: '更新人ID',
             dataIndex: 'updaterId',
-            width: 0
+            hidden:true
         }, {
             text: '更新人',
             dataIndex: 'updaterName',
-            width: 0
+            hidden:true
         }, {
             text: '更新日期',
             dataIndex: 'updateTime',
             xtype: 'datecolumn',
-            width: 0
+            hidden:true
         }],
         relativeColumn: [{
             text: 'id',

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleProfit.js

@@ -115,6 +115,10 @@ Ext.define('saas.view.sale.report.SaleProfit', {
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
         }
+    }, {
+        text: '成本单价',
+        dataIndex: 'pw_costprice',
+        xtype: 'numbercolumn'
     }, {
         text: '成本金额',
         dataIndex: 'pd_total',

+ 11 - 2
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -21,7 +21,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
      _auditUrl:'/api/sale/sale/audit/',
      _unAuditUrl: '/api/sale/sale/unAudit/',
      _deleteUrl:'/api/sale/sale/delete/',
-     _turnOutUrl:'/api/sale/sale/turnProdOut/', 
+     _turnOutUrl:'/api/sale/sale/turnProdOut/',
+     _turnPurchase:'/api/sale/sale/saleTurnPurchase/',
      initId:0,
  
      toolBtns: [{
@@ -32,6 +33,14 @@ Ext.define('saas.view.sale.sale.FormPanel', {
          bind: {
              hidden: '{sa_statuscode!="AUDITED"}'
          }
+     },{
+         xtype: 'button',
+         text: '转采购单',
+         hidden: true,
+         handler: 'turnPurchase',
+         bind: {
+             hidden: '{sa_statuscode!="AUDITED"}'
+         }
      }],
 
     defaultItems: [{
@@ -89,7 +98,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn",
-                width:0
+                hidden:true
             }, {
                 text : "物料id", 
                 dataIndex : "sd_prodid", 

+ 26 - 1
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -82,5 +82,30 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
             console.error(res);
             saas.util.BaseUtil.showToast('转单失败: ' + res.message);
         });
-     }
+     },
+    turnPurchase : function(){
+        var me = this,
+            form = me.getView(),
+            id = form.getForm().findField(form._idField);
+        saas.util.BaseUtil.request({
+            url: form._turnPurchase+id.value,
+            method: 'POST',
+        })
+            .then(function(localJson) {
+                if(localJson.success){
+                    var intValue = localJson.data.id,
+                        codeValue= localJson.data.code,
+                        name = localJson.data.name;
+                    saas.util.BaseUtil.openTab('purchase-purchase-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                        initId: intValue
+                    });
+                    saas.util.BaseUtil.showToast('转单成功');
+                    saas.util.FormUtil.loadData(form);
+                }
+            })
+            .catch(function(res) {
+                console.error(res);
+                saas.util.BaseUtil.showToast('转单失败: ' + res.message);
+            });
+    }
 });

+ 2 - 2
frontend/saas-web/app/view/sale/sale/QueryPanel.js

@@ -87,7 +87,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'sa_id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '销售单号',
@@ -145,7 +145,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         relativeColumn: [ {
             text: 'id',
             dataIndex: 'sa_id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

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

@@ -72,7 +72,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn",
-                width:0
+                hidden:true
             }, {
                 text : "物料id", 
                 dataIndex : "pd_prodid", 

+ 2 - 2
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -74,7 +74,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
@@ -125,7 +125,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

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

@@ -81,7 +81,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn",
-                width:0
+                hidden:true
             }, {
                 text : "物料id", 
                 dataIndex : "pd_prodid", 

+ 2 - 2
frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

@@ -76,7 +76,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
@@ -122,7 +122,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',

+ 45 - 40
frontend/saas-web/app/view/sys/feedback/FormPanel.js

@@ -14,47 +14,52 @@ Ext.define('saas.view.sys.feedback.FormPanel', {
     fieldDefaults: {
         margin: '0 0 10 0',
         labelAlign: 'right',
-        labelWidth: 90,
-        columnWidth: 0.25,
+        labelWidth: 70,
+        columnWidth: 0.5,
     },
     bodyPadding: 10,
     border: false,
-
-    items: [{
-        xtype: 'hidden',
-        name: 'id',
-        fieldLabel: 'id',
-        readOnly:true,
-        defaultVale:saas.util.BaseUtil.getCurrentUser() ? saas.util.BaseUtil.getCurrentUser().id:null
-    }, {
-        xtype : "textfield", 
-        name : "fb_name", 
-        fieldLabel : "姓名",
-        readOnly:true,
-       defaultVale:saas.util.BaseUtil.getCurrentUser() ? saas.util.BaseUtil.getCurrentUser().realname:null
-    }, {
-        xtype : "textfield", 
-        name : "fb_mobile", 
-        fieldLabel : "手机号",
-       defaultVale:saas.util.BaseUtil.getCurrentUser() ? saas.util.BaseUtil.getCurrentUser().mobile:null
-    }, {
-        xtype : "textfield", 
-        name : "fb_QQ", 
-        fieldLabel : "QQ"
-    }, {
-        xtype : "textfield", 
-        name : "fb_wechat", 
-        fieldLabel : "微信"
-    }, {
-        xtype : "htmleditor", 
-        name : "fb_msg", 
-        fieldLabel : "反馈内容",
-        flex: 1
-    }],buttons: [{
-        text: '提交',
-        handler:'onSubmit'
-    },{
-        text: '关闭',
-        handler:'onClose'
-    }]
+    initComponent: function () {
+        var me = this;
+        me.items = [{
+            xtype: 'hidden',
+            name: 'id',
+            fieldLabel: 'id',
+            readOnly:true,
+            value:saas.util.BaseUtil.getCurrentUser() ? saas.util.BaseUtil.getCurrentUser().id:null
+        }, {
+            xtype : "textfield", 
+            name : "fb_name", 
+            fieldLabel : "姓名",
+            readOnly:true,
+            value:saas.util.BaseUtil.getCurrentUser() ? saas.util.BaseUtil.getCurrentUser().realname:null
+        }, {
+            xtype : "textfield", 
+            name : "fb_mobile", 
+            fieldLabel : "手机号",
+            value:saas.util.BaseUtil.getCurrentUser() ? saas.util.BaseUtil.getCurrentUser().mobile:null
+        }, {
+            xtype : "textfield", 
+            name : "fb_QQ", 
+            fieldLabel : "QQ"
+        }, {
+            xtype : "textfield", 
+            name : "fb_wechat", 
+            fieldLabel : "微信"
+        }, {
+            xtype : "htmleditor", 
+            name : "fb_msg", 
+            fieldLabel : "反馈内容",
+            columnWidth: 1
+        }];
+        me.buttons = [{
+            text: '提交',
+            handler:'onSubmit'
+        },{
+            text: '关闭',
+            handler:'onClose'
+        }];
+        me.callParent(arguments);
+    }
+    
 });

+ 2 - 3
frontend/saas-web/resources/json/navigation.json

@@ -220,10 +220,9 @@
             "viewType": "other-bankinformation",
             "leaf": true
         },{
-            "id":"employee-list-formpanel",
+            "id":"other-employee",
             "text": "人员资料",
-            "viewType": "document-employee-basepanel",
-            "addType":"document-employee-formpanel",
+            "viewType": "other-employee",
             "leaf": true
         }]
     }, {