Browse Source

Merge remote-tracking branch 'origin/dev' into dev

zhouy 7 years ago
parent
commit
89764ffc25
77 changed files with 1164 additions and 742 deletions
  1. 0 1
      .gitignore
  2. 2 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  3. 9 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java
  4. 3 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/PaydetailView.java
  5. 5 8
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/RecdetailView.java
  6. 1 1
      applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml
  7. 1 1
      applications/money/money-server/src/main/resources/mapper/CustomerCheckViewMapper.xml
  8. 2 1
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  9. 2 2
      applications/money/money-server/src/main/resources/mapper/PaydetailViewMapper.xml
  10. 2 2
      applications/money/money-server/src/main/resources/mapper/RecdetailViewMapper.xml
  11. 1 1
      applications/money/money-server/src/main/resources/mapper/VendorAcountViewMapper.xml
  12. 14 0
      applications/purchase/purchase-api/pom.xml
  13. 14 0
      applications/purchase/purchase-api/src/main/java/com/usoftchina/saas/purchase/api/PurchaseService.java
  14. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  15. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseDetail.java
  16. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java
  17. 0 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  18. 7 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  19. 1 1
      applications/purchase/purchase-server/src/main/resources/application.yml
  20. 2 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/PurchaseDetailDTO.java
  21. 4 0
      applications/sale/sale-server/pom.xml
  22. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java
  23. 44 28
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  24. 9 3
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  25. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  26. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/Make.java
  27. 3 121
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java
  28. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java
  29. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/StockTaking.java
  30. 28 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/StocktakingController.java
  31. 1 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  32. 7 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/StockTakingMapper.java
  33. 5 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/StocktakingService.java
  34. 156 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/StocktakingServiceImpl.java
  35. 18 1
      applications/storage/storage-server/src/main/resources/mapper/StockTakingMapper.xml
  36. 1 1
      base-servers/account/account-server/src/main/resources/application.yml
  37. 1 1
      base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml
  38. 4 0
      frontend/saas-portal-web/Dockerfile
  39. 20 0
      frontend/saas-portal-web/runtime/nginx/default.conf
  40. 1 1
      frontend/saas-web/app/model/sale/ProdIODetail.js
  41. 2 1
      frontend/saas-web/app/util/FormUtil.js
  42. 5 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  43. 92 91
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  44. 3 0
      frontend/saas-web/app/view/core/dbfind/types/BankInfoDbfindTrigger.js
  45. 1 1
      frontend/saas-web/app/view/core/dbfind/types/BomDbfindTrigger.js
  46. 5 3
      frontend/saas-web/app/view/core/dbfind/types/OriOrderMutiDbfindTrigger.js
  47. 2 2
      frontend/saas-web/app/view/core/form/FormPanel.js
  48. 2 0
      frontend/saas-web/app/view/core/form/field/ConDateField.js
  49. 26 0
      frontend/saas-web/app/view/core/form/field/ConDateField.scss
  50. 3 1
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  51. 1 22
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  52. 41 0
      frontend/saas-web/app/view/document/product/FormController.js
  53. 5 5
      frontend/saas-web/app/view/home/InfoCard.js
  54. 1 1
      frontend/saas-web/app/view/home/charts/PurchaseTrend.js
  55. 1 1
      frontend/saas-web/app/view/home/charts/StockAmount.js
  56. 1 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  57. 0 1
      frontend/saas-web/app/view/money/report/AccountBalance.js
  58. 1 1
      frontend/saas-web/app/view/money/report/CustomerCheck.js
  59. 1 1
      frontend/saas-web/app/view/money/report/PayDetail.js
  60. 9 2
      frontend/saas-web/app/view/money/report/RecDetail.js
  61. 1 1
      frontend/saas-web/app/view/money/report/VendorCheck.js
  62. 53 24
      frontend/saas-web/app/view/money/verification/FormPanel.js
  63. 174 0
      frontend/saas-web/app/view/money/verification/FormPanelController.js
  64. 88 34
      frontend/saas-web/app/view/money/verification/QueryPanel.js
  65. 1 1
      frontend/saas-web/app/view/sale/report/Sale.js
  66. 107 31
      frontend/saas-web/app/view/stock/inventory/EditDataList.js
  67. 5 0
      frontend/saas-web/app/view/stock/inventory/EditDataListModel.js
  68. 1 1
      frontend/saas-web/app/view/stock/make/FormPanel.js
  69. 7 7
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  70. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  71. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  72. 5 5
      frontend/saas-web/app/view/sys/config/FormPanel.js
  73. 125 301
      frontend/saas-web/app/view/sys/power/GroupGrid.js
  74. 4 7
      frontend/saas-web/app/view/sys/power/OtherField.js
  75. 1 1
      frontend/saas-web/index.html
  76. 5 0
      frontend/saas-web/resources/json/navigation.json
  77. 0 0
      frontend/saas-web/resources/othcss/imagehover.css

+ 0 - 1
.gitignore

@@ -29,7 +29,6 @@ applications/**/build/
 base-servers/**/build/
 framework/**/build/
 frontend/saas-web/build/
-frontend/saas-portal-web/build/
 nbbuild/
 dist/
 node_modules/

+ 2 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -70,6 +70,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     SALEOUT_POST_ERROR(72005,""),
     SALEOUT_UNAUDIT_ERROR(72006,"销售订单已转出货单,无法反审核"),
     SALE_ORDER_HASAUDIT(72003, "存在已审核单据,单据编号:%s"),
+    SALE_EXISTS_PURCHASE(72004, "存在已转的采购单据,单据编号:%s"),
 
     //资金
     PAYBALANCE_OUTNOWBALANCE(74001,"本次核销金额不能大于未核销金额"),
@@ -80,6 +81,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BEFORE_UNAUDIT(74006, "单据:<u>%s</u>未审核,无法反审核"),
     BANK_AMOUNT_NOTENOUGH(74004, "资金账号不足"),
     SUBLEDGER_NOT_EXIS(74005,"来源单据不存在"),
+    CHECK_SETACOUNT_EXIS(74006, "不能删除单据日期小于等于结账期间<u>%s</u>的单据"),
 
 
 

+ 9 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java

@@ -44,12 +44,21 @@ public class Fundtransfer extends CommonBaseEntity implements Serializable {
     private String ftd_paymethod;
 
     private String ftd_paycode;
+    private String ftd_remark;
 
     private String ft_auditman;
 
     private Date ft_auditdate;
 
 
+    public String getFtd_remark() {
+        return ftd_remark;
+    }
+
+    public void setFtd_remark(String ftd_remark) {
+        this.ftd_remark = ftd_remark;
+    }
+
     public String getFt_auditman() {
         return ft_auditman;
     }

+ 3 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/PaydetailView.java

@@ -25,7 +25,7 @@ public class PaydetailView {
 
     private Double mustpay;
 
-    private Long mustdate;
+    private Date mustdate;
 
     private Double pi_total;
 
@@ -129,11 +129,11 @@ public class PaydetailView {
         this.mustpay = mustpay;
     }
 
-    public Long getMustdate() {
+    public Date getMustdate() {
         return mustdate;
     }
 
-    public void setMustdate(Long mustdate) {
+    public void setMustdate(Date mustdate) {
         this.mustdate = mustdate;
     }
 

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

@@ -25,13 +25,17 @@ public class RecdetailView {
 
     private Double mustpay;
 
-    private Double mustdate;
+    private Date mustdate;
 
     private Double pi_total;
 
     private String pi_remark;
     private Integer companyId;
 
+    public void setMustdate(Date mustdate) {
+        this.mustdate = mustdate;
+    }
+
     public Integer getCompanyId() {
         return companyId;
     }
@@ -104,13 +108,6 @@ public class RecdetailView {
         this.mustpay = mustpay;
     }
 
-    public Double getMustdate() {
-        return mustdate;
-    }
-
-    public void setMustdate(Double mustdate) {
-        this.mustdate = mustdate;
-    }
 
     public Double getPi_total() {
         return pi_total;

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

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

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

@@ -30,7 +30,7 @@
                 and  companyId = #{companyId}
             </if>
         </where>
-        order by pi_date desc
+        order by pi_custname asc, pi_date desc, pi_custcode desc
     </select>
 
 </mapper>

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

@@ -24,6 +24,7 @@
     <result column="ftd_nowbalance" property="ftd_nowbalance" jdbcType="DOUBLE" />
     <result column="ftd_paymethod" property="ftd_paymethod" jdbcType="VARCHAR" />
     <result column="ftd_paycode" property="ftd_paycode" jdbcType="VARCHAR" />
+    <result column="ftd_remark" property="ftd_remark" jdbcType="VARCHAR" />
     <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
     <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
     <result column="ft_auditman" property="ft_auditman" jdbcType="VARCHAR" />
@@ -37,7 +38,7 @@
     ft_auditman, ft_auditdate
   </sql>
   <sql id="Detail_Column_List" >
-    ftd_bankname,ftd_inbankname,ftd_nowbalance,ftd_paymethod,ftd_paycode
+    ftd_bankname,ftd_inbankname,ftd_nowbalance,ftd_paymethod,ftd_paycode,ftd_remark
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/PaydetailViewMapper.xml

@@ -13,7 +13,7 @@
     <result column="pb_pdamount" property="pb_pdamount" jdbcType="DOUBLE" />
     <result column="pb_pbdamount" property="pb_pbdamount" jdbcType="DOUBLE" />
     <result column="mustpay" property="mustpay" jdbcType="DOUBLE" />
-    <result column="mustdate" property="mustdate" jdbcType="DECIMAL" />
+    <result column="mustdate" property="mustdate" jdbcType="TIMESTAMP" />
     <result column="pi_total" property="pi_total" jdbcType="DOUBLE" />
     <result column="pi_remark" property="pi_remark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
@@ -29,7 +29,7 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by pb_date desc
+    order by pi_vendname asc, pb_date desc,pi_vendcode desc
   </select>
 
 </mapper>

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

@@ -13,7 +13,7 @@
     <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="mustdate" property="mustdate" jdbcType="TIMESTAMP" />
     <result column="pi_total" property="pi_total" jdbcType="DOUBLE" />
     <result column="pi_remark" property="pi_remark" jdbcType="VARCHAR" />
   <result column="companyId" property="companyId" jdbcType="INTEGER" />
@@ -29,6 +29,6 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by rb_date desc
+    order by pi_custname asc, rb_date desc, pi_custcode desc
   </select>
 </mapper>

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

@@ -32,6 +32,6 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by pi_date desc
+    order by pi_vendname asc, pi_date desc, pi_vendcode desc
   </select>
 </mapper>

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

@@ -13,4 +13,18 @@
     <description>purchase server api</description>
 
 
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>purchase-dto</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
+    </dependencies>
 </project>

+ 14 - 0
applications/purchase/purchase-api/src/main/java/com/usoftchina/saas/purchase/api/PurchaseService.java

@@ -0,0 +1,14 @@
+package com.usoftchina.saas.purchase.api;
+
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient("purchase-server")
+public interface PurchaseService {
+
+    @PostMapping("/purchase/getPurchaseCode")
+    public String getPurchaseCode(@RequestBody DocBaseDTO baseDTO);
+
+}

+ 4 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -174,4 +174,8 @@ public class PurchaseController {
         return purchaseService.turnProdin(id);
     }
 
+    @PostMapping("/getPurchaseCode")
+    public String getPurchaseCode(@RequestBody DocBaseDTO baseDTO) {
+        return purchaseService.getPurchaseCode(baseDTO);
+    }
 }

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseDetail.java

@@ -42,6 +42,8 @@ public class PurchaseDetail extends CommonBaseEntity implements Serializable {
 
     private Integer pd_saledetno;
 
+    private Long pd_saleid;
+
     private Integer pd_sdid;
 
     private String pd_text1;

+ 1 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java

@@ -136,5 +136,5 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      */
     Result turnProdin(Long id);
 
-
+    String getPurchaseCode(DocBaseDTO baseDTO);
 }

+ 0 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -438,7 +438,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_date(new Date());
         targetPi.setPi_status("未审核");
         targetPi.setPi_statuscode("UNAUDITED");
-        targetPi.setPi_recorddate(new Date());
         targetPi.setPi_vendid(sourcePi.getPi_vendid());
         targetPi.setPi_vendcode(sourcePi.getPi_vendcode());
         targetPi.setPi_vendname(sourcePi.getPi_vendname());

+ 7 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -594,7 +594,13 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         return billCode;
     }
-    
+
+    @Override
+    public String getPurchaseCode(DocBaseDTO baseDTO) {
+       String caller = baseDTO.getName();
+       String code = maxnumberService.getMaxnumber(caller, false).getData();
+       return pushMaxnubmer(code, baseDTO.getId());
+    }
     /** 
     * @Description
     * @Param: [id]

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

@@ -47,7 +47,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@localhost:8500/eureka/
 management:
   endpoints:
     web:

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

@@ -42,6 +42,8 @@ public class PurchaseDetailDTO extends CommonBaseEntity implements Serializable
 
     private Integer pd_saledetno;
 
+    private Long pd_saleid;
+
     private Integer pd_sdid;
 
     private String pd_text1;

+ 4 - 0
applications/sale/sale-server/pom.xml

@@ -88,6 +88,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>commons-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>purchase-api</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

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

@@ -50,4 +50,6 @@ public interface SaleMapper extends CommonBaseMapper<Sale> {
     void turnPurchaseDetail(List<PurchaseDetailDTO> list);
 
     Integer selectPurchaseId(@Param("code") String code,@Param("companyid") Long companyid);
+
+    String checkIsTurnPurchase(@Param("id") Long id,@Param("companyid") Long companyid);
 }

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

@@ -19,6 +19,7 @@ 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.purchase.api.PurchaseService;
 import com.usoftchina.saas.sale.dto.*;
 import com.usoftchina.saas.sale.mapper.*;
 import com.usoftchina.saas.sale.po.Sale;
@@ -29,6 +30,7 @@ import com.usoftchina.saas.sale.service.SaleService;
 import com.usoftchina.saas.storage.po.ProdIODetail;
 import com.usoftchina.saas.storage.po.ProdInOut;
 import com.usoftchina.saas.utils.BeanMapper;
+import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -61,6 +63,8 @@ public class SaleServiceImpl implements SaleService{
     private ProdInOutService prodInOutService;
     @Autowired
     private CommonService commonService;
+    @Autowired
+    private PurchaseService purchaseService;
 
     @Override
     public PageInfo<SaleList> getListData(@PageDefault(size = 10) PageRequest page, ListReqDTO req) {
@@ -285,6 +289,12 @@ public class SaleServiceImpl implements SaleService{
         if (num > 0) {
             throw new BizException(BizExceptionCode.SALEOUT_UNAUDIT_ERROR);
         }
+        //检查是否转采购订单
+        String purchaseCode = saleMapper.checkIsTurnPurchase(id,BaseContextHolder.getCompanyId());
+        if (purchaseCode != null && purchaseCode.length()>0){
+            throw new BizException(BizExceptionCode.SALE_EXISTS_PURCHASE.getCode(),
+                    String.format(BizExceptionCode.SALE_EXISTS_PURCHASE.getMessage(),purchaseCode));
+        }
         singleUnAudit(id);
     }
 
@@ -479,7 +489,7 @@ public class SaleServiceImpl implements SaleService{
             //获取物料默认仓库
             Map<String, Object> warehouse = getWareHouseByCode(saleDetail.getSd_prodcode());
             if (null != warehouse) {
-                prodIODetail.setPd_whid(warehouse.get("pr_whid") == null ? 0 : Integer.valueOf(warehouse.get("pr_whid").toString()));
+                prodIODetail.setPd_whid(warehouse.get("pr_whid") == null ? 0 : Long.valueOf(warehouse.get("pr_whid").toString()));
                 prodIODetail.setPd_whcode(warehouse.get("pr_whcode") == null ? null : warehouse.get("pr_whcode").toString());
                 prodIODetail.setPd_whname(warehouse.get("pr_whname") == null ? null : warehouse.get("pr_whname").toString());
             }
@@ -534,12 +544,22 @@ public class SaleServiceImpl implements SaleService{
         Sale sale = saleMapper.selectByPrimaryKey(id);
         List<SaleList> dateilList = saleListMapper.selectSaleListByCondition("sa_id="+id,BaseContextHolder.getCompanyId());
 
+        //判断是否已转采购单
+        String purchaseCode = saleMapper.checkIsTurnPurchase(id,BaseContextHolder.getCompanyId());
+        if (purchaseCode != null && purchaseCode.length()>0){
+            throw new BizException(BizExceptionCode.SALE_EXISTS_PURCHASE.getCode(),
+                    String.format(BizExceptionCode.SALE_EXISTS_PURCHASE.getMessage(),purchaseCode));
+        }
+
         PurchaseDTO purchase = new PurchaseDTO();
         List<PurchaseDetailDTO> listPurchaseDetail = new ArrayList<PurchaseDetailDTO>();
-
+        DocBaseDTO baseDTO = new DocBaseDTO();
         //销售主表转采购主表
-        Result<String> result = maxnumberService.getMaxnumber(BillCodeSeq.PURCHASE.getCaller(),false);
-        purchase.setPu_code(result.getData());
+       // Result<String> result = maxnumberService.getMaxnumber(BillCodeSeq.PURCHASE.getCaller(),false);
+        baseDTO.setId(0l);
+        baseDTO.setName(BillCodeSeq.PURCHASE.getCaller());
+        String result = purchaseService.getPurchaseCode(baseDTO);
+        purchase.setPu_code(result);
         purchase.setPu_status(Status.UNAUDITED.getDisplay());
         purchase.setPu_statuscode(Status.UNAUDITED.toString());
         purchase.setCompanyId(BaseContextHolder.getCompanyId());
@@ -550,35 +570,31 @@ public class SaleServiceImpl implements SaleService{
 
         Long purchaseId = purchase.getId();
         for (SaleList detail : dateilList){
-            PurchaseDetailDTO purchaseDetailDTO = new PurchaseDetailDTO();
+            PurchaseDetailDTO purchaseDetail = 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);
+            purchaseDetail.setPd_prodid(Long.valueOf(String.valueOf(detail.getSd_prodid())));
+            purchaseDetail.setPd_prodcode(detail.getSd_prodcode());
+            purchaseDetail.setPd_detno(detail.getSd_detno());
+            purchaseDetail.setPd_qty(detail.getSd_qty());
+            purchaseDetail.setPd_price(taxPrice/(1+taxrate));
+            purchaseDetail.setPd_salecode(sale.getSa_code());
+            purchaseDetail.setPd_saledetno(detail.getSd_detno());
+            purchaseDetail.setPd_saleid(sale.getId());
+            purchaseDetail.setPd_taxrate(taxrate);
+            purchaseDetail.setPd_taxprice(taxPrice);
+            purchaseDetail.setPd_taxtotal(taxPrice*qty);
+            purchaseDetail.setCompanyId(BaseContextHolder.getCompanyId());
+            purchaseDetail.setCreatorId(BaseContextHolder.getUserId());
+            purchaseDetail.setCreateTime(new Date());
+            purchaseDetail.setCreatorName(BaseContextHolder.getUserName());
+            purchaseDetail.setPd_puid(purchaseId);
+            purchaseDetail.setPd_code(result);
+            listPurchaseDetail.add(purchaseDetail);
         }
-
         saleMapper.turnPurchaseDetail(listPurchaseDetail);
-
-
-
-        DocBaseDTO baseDTO = new DocBaseDTO();
-        baseDTO.setCode(result.getData());
+        baseDTO.setCode(result);
         baseDTO.setId(Long.valueOf(String.valueOf(purchaseId)));
         baseDTO.setName(BillCodeSeq.PURCHASE.getName());
         return baseDTO;

+ 9 - 3
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -421,7 +421,13 @@
   <update id="updateCreator">
     update sale set creatorId = #{userId} , creatorName=#{userName} where sa_id=#{id}
   </update>
-  
+
+  <select id="checkIsTurnPurchase"  resultType="java.lang.String">
+    select distinct pu_code from purchasedetail left join purchase on pd_puid=pu_id and
+    purchasedetail.companyid = purchase.companyid
+    where pd_saleid = #{id}
+    and purchasedetail.companyid= #{companyid}
+  </select>
   
   
   <!-- 销售订单转采购单-->
@@ -633,7 +639,7 @@
     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_DELIVERY, PD_SALECODE, PD_SALEDETNO,PD_SALEID,
     PD_SDID, companyId, updaterId,
     updateTime, pd_text1, pd_text2,
     pd_text3, pd_text4, pd_text5,
@@ -645,7 +651,7 @@
       #{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_delivery,jdbcType=DOUBLE}, #{item.pd_salecode,jdbcType=VARCHAR}, #{item.pd_saledetno,jdbcType=INTEGER},#{item.pd_saleid,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},

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java

@@ -49,7 +49,7 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_nettotal;
 
-    private Integer pd_whid;
+    private Long pd_whid;
 
     private String pd_whcode;
 

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/Make.java

@@ -30,7 +30,7 @@ public class Make extends CommonBaseEntity implements Serializable {
 
     private Double ma_qty;
 
-    private Integer ma_whid;
+    private Long ma_whid;
 
     private String ma_whcode;
 

+ 3 - 121
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java

@@ -2,16 +2,16 @@ package com.usoftchina.saas.storage.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
 import com.usoftchina.saas.document.dto.ProductDTO;
-import com.usoftchina.saas.document.entities.Product;
+import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
 
 /**
  * 制造单明细
  * @author chenwei
  * @date 2018/10/29
  */
+@Data
 public class MakeMaterial extends CommonBaseEntity implements Serializable {
     private Long mm_maid;
 
@@ -21,7 +21,7 @@ public class MakeMaterial extends CommonBaseEntity implements Serializable {
 
     private String mm_prodcode;
 
-    private Integer mm_whid;
+    private Long mm_whid;
 
     private String mm_whcode;
 
@@ -41,123 +41,5 @@ public class MakeMaterial extends CommonBaseEntity implements Serializable {
 
     private ProductDTO productDTO;
 
-    public String getMm_whname() {
-        return mm_whname;
-    }
 
-    public void setMm_whname(String mm_whname) {
-        this.mm_whname = mm_whname;
-    }
-
-    public ProductDTO getProductDTO() {
-        return productDTO;
-    }
-
-    public void setProductDTO(ProductDTO productDTO) {
-        this.productDTO = productDTO;
-    }
-
-    public Long getMm_maid() {
-        return mm_maid;
-    }
-
-    public void setMm_maid(Long mm_maid) {
-        this.mm_maid = mm_maid;
-    }
-
-    public Integer getMm_detno() {
-        return mm_detno;
-    }
-
-    public void setMm_detno(Integer mm_detno) {
-        this.mm_detno = mm_detno;
-    }
-
-    public Long getMm_prodid() {
-        return mm_prodid;
-    }
-
-    public void setMm_prodid(Long mm_prodid) {
-        this.mm_prodid = mm_prodid;
-    }
-
-    public String getMm_prodcode() {
-        return mm_prodcode;
-    }
-
-    public void setMm_prodcode(String mm_prodcode) {
-        this.mm_prodcode = mm_prodcode == null ? null : mm_prodcode.trim();
-    }
-
-    public Integer getMm_whid() {
-        return mm_whid;
-    }
-
-    public void setMm_whid(Integer mm_whid) {
-        this.mm_whid = mm_whid;
-    }
-
-    public String getMm_whcode() {
-        return mm_whcode;
-    }
-
-    public void setMm_whcode(String mm_whcode) {
-        this.mm_whcode = mm_whcode == null ? null : mm_whcode.trim();
-    }
-
-    public Double getMm_price() {
-        return mm_price;
-    }
-
-    public void setMm_price(Double mm_price) {
-        this.mm_price = mm_price;
-    }
-
-    public Double getMm_oneuseqty() {
-        return mm_oneuseqty;
-    }
-
-    public void setMm_oneuseqty(Double mm_oneuseqty) {
-        this.mm_oneuseqty = mm_oneuseqty;
-    }
-
-    public Double getMm_qty() {
-        return mm_qty;
-    }
-
-    public void setMm_qty(Double mm_qty) {
-        this.mm_qty = mm_qty;
-    }
-
-    public Double getMm_amount() {
-        return mm_amount;
-    }
-
-    public void setMm_amount(Double mm_amount) {
-        this.mm_amount = mm_amount;
-    }
-
-    public String getMm_repprodcode() {
-        return mm_repprodcode;
-    }
-
-    public void setMm_repprodcode(String mm_repprodcode) {
-        this.mm_repprodcode = mm_repprodcode == null ? null : mm_repprodcode.trim();
-    }
-
-    public String getMm_remark() {
-        return mm_remark;
-    }
-
-    public void setMm_remark(String mm_remark) {
-        this.mm_remark = mm_remark == null ? null : mm_remark.trim();
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
 }

+ 2 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java

@@ -45,13 +45,13 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_nettotal;
 
-    private Integer pd_whid;
+    private Long pd_whid;
 
     private String pd_whcode;
 
     private String pd_whname;
 
-    private Integer pd_inwhid;
+    private Long pd_inwhid;
 
     private String pd_inwhcode;
 

+ 2 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/StockTaking.java

@@ -7,7 +7,7 @@ import java.io.Serializable;
 @Data
 public class StockTaking extends CommonBaseEntity implements Serializable {
 
-    private Integer st_prodid;
+    private Long st_prodid;
 
     private String st_prodcode;
 
@@ -19,7 +19,7 @@ public class StockTaking extends CommonBaseEntity implements Serializable {
 
     private String st_produnit;
 
-    private Integer st_whid;
+    private Long st_whid;
 
     private String st_whcode;
 

+ 28 - 2
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/StocktakingController.java

@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 @RestController
 @RequestMapping("/stocktaking")
@@ -22,6 +23,17 @@ public class StocktakingController {
     @Autowired
     private StocktakingService stocktakingService;
 
+    /**
+     * 生成临时表数据
+     * @param page
+     * @param listReqDTO
+     * @return
+     */
+    @PostMapping("/build")
+    public Result buildListDataByCondition(@RequestBody ListReqDTO listReqDTO){
+        stocktakingService.buildListDataByCondition(listReqDTO);
+        return Result.success();
+    }
 
 
     /**
@@ -35,8 +47,11 @@ public class StocktakingController {
         return Result.success(stocktakingService.getList(page, listReqDTO));
     }
 
-
-
+    /**
+     * 保存
+     * @param list
+     * @return
+     */
     @PostMapping("/save")
     public Result save(@RequestBody List<StockTakingDTO> list){
         DocBaseDTO docBaseDTO = stocktakingService.saveOrUpdate(list);
@@ -44,6 +59,17 @@ public class StocktakingController {
     }
 
 
+    /**
+     * 生成盘点单据
+     * @param list
+     * @return
+     */
+    @GetMapping("/stock")
+    public Result stock(){
+        Map<String,Object> map = stocktakingService.stock();
+        return Result.success(map);
+    }
+
 
 
 }

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

@@ -26,7 +26,7 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
 
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
-    Double getOnHand(@Param("prodid") Long prodid, @Param("whid") Integer whid, @Param("companyId") Long companyId);
+    Double getOnHand(@Param("prodid") Long prodid, @Param("whid") Long whid, @Param("companyId") Long companyId);
 
     ProdInOut selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
 

+ 7 - 1
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/StockTakingMapper.java

@@ -15,5 +15,11 @@ public interface StockTakingMapper extends CommonBaseMapper<StockTaking> {
 
     int updateByPrimaryKeySelective(StockTaking record);
 
-    List<StockTaking> selectStockTakingBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<StockTaking> selectStockTakingBycondition(@Param("con") String con,@Param("companyId") Long companyId);
+
+    void deleteByCompany(@Param("companyId") Long companyId);
+
+    void insertFormProductWh(@Param("con") String con,@Param("companyId") Long companyId);
+
+    Double getPurcpriceByProduct(Long id);
 }

+ 5 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/StocktakingService.java

@@ -11,10 +11,15 @@ import com.usoftchina.saas.storage.mapper.StockTakingMapper;
 import com.usoftchina.saas.storage.po.StockTaking;
 
 import java.util.List;
+import java.util.Map;
 
 public interface StocktakingService extends CommonBaseService<StockTakingMapper, StockTaking> {
 
     PageInfo<StockTaking>  getList(PageRequest page, ListReqDTO listReqDTO);
 
     DocBaseDTO saveOrUpdate(List<StockTakingDTO> list);
+
+    void buildListDataByCondition(ListReqDTO listReqDTO);
+
+    Map<String,Object> stock();
 }

+ 156 - 2
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/StocktakingServiceImpl.java

@@ -3,19 +3,31 @@ package com.usoftchina.saas.storage.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.storage.dto.StockTakingDTO;
+import com.usoftchina.saas.storage.mapper.ProdIODetailMapper;
+import com.usoftchina.saas.storage.mapper.ProdInOutMapper;
 import com.usoftchina.saas.storage.mapper.StockTakingMapper;
+import com.usoftchina.saas.storage.po.ProdIODetail;
+import com.usoftchina.saas.storage.po.ProdInOut;
 import com.usoftchina.saas.storage.po.StockTaking;
 import com.usoftchina.saas.storage.service.StocktakingService;
 import com.usoftchina.saas.utils.BeanMapper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Created by zdw
@@ -24,6 +36,15 @@ import java.util.List;
 @Service
 public class StocktakingServiceImpl extends CommonBaseServiceImpl<StockTakingMapper, StockTaking> implements StocktakingService {
 
+    @Autowired
+    private MaxnumberService maxnumberService;
+    @Autowired
+    private ProdInOutMapper prodInOutMapper;
+    @Autowired
+    private ProdIODetailMapper prodIODetailMapper;
+
+
+
     @Override
     public PageInfo<StockTaking> getList(PageRequest page, ListReqDTO listReqDTO) {
         PageHelper.startPage(page.getNumber(), page.getSize());
@@ -44,14 +65,147 @@ public class StocktakingServiceImpl extends CommonBaseServiceImpl<StockTakingMap
         return baseDTO;
     }
 
-    private List<StockTaking> getList(ListReqDTO listReqDTO) {
+    @Override
+    @Transactional
+    public void buildListDataByCondition(ListReqDTO listReqDTO) {
         List<StockTaking> list = null;
         Long companyId = BaseContextHolder.getCompanyId();
         String con = listReqDTO.getFinalCondition();
+        //删除该companyid的数据
+        getMapper().deleteByCompany(companyId);
         if (null == con) {
             con = "1=1";
         }
-        list = getMapper().selectStockTakingBycondition(con,companyId);
+        //查询存入临时表
+        getMapper().insertFormProductWh(con,companyId);
+    }
+
+    @Override
+    @Transactional
+    public Map<String,Object> stock() {
+        Map<String,Object> resultMap = new HashMap();
+
+        Long companyId = BaseContextHolder.getCompanyId();
+        Long userId = BaseContextHolder.getUserId();
+        //生成入库单
+        ProdInOut prodIn = new ProdInOut();
+        String piInno = getMaxnumber(BillCodeSeq.OTHERIN);
+        prodIn.setPi_inoutno(piInno);
+        prodIn.setPi_class(BillCodeSeq.OTHERIN.getName());
+        prodIn.setPi_date(new Date());
+        prodIn.setPi_status("未审核");
+        prodIn.setPi_statuscode("UNAUDITED");
+        prodIn.setCompanyId(companyId);
+        prodIn.setCreateTime(new Date());
+        prodIn.setCreatorId(userId);
+        prodIn.setPi_remark("盘盈单");
+        prodInOutMapper.insertSelective(prodIn);
+        long inid = prodIn.getId();
+
+        Double purcprice = null;
+
+        List<StockTaking> inlist  = getMapper().selectStockTakingBycondition("st_num>0",companyId);
+        for (int i=0;i<inlist.size();i++) {
+            StockTaking st = inlist.get(i);
+            ProdIODetail prodInDetail = new ProdIODetail();
+            prodInDetail.setPd_piid(inid);
+            prodInDetail.setPd_inoutno(piInno);
+            prodInDetail.setPd_piclass(BillCodeSeq.OTHERIN.getName());
+            prodInDetail.setPd_pdno(i+1);
+
+            purcprice = getMapper().getPurcpriceByProduct(st.getSt_prodid());
+            prodInDetail.setPd_orderprice(purcprice==null?0:purcprice);
+            prodInDetail.setPd_prodid(st.getSt_prodid());
+            prodInDetail.setPd_prodcode(st.getSt_prodcode());
+            prodInDetail.setPd_inqty(st.getSt_num());
+            //仓库
+            prodInDetail.setPd_whid(st.getSt_whid());
+            prodInDetail.setPd_whcode(st.getSt_whcode());
+            prodInDetail.setPd_whname(st.getSt_whname());
+            prodInDetail.setCompanyId(companyId);
+            prodInDetail.setCreateTime(new Date());
+            prodInDetail.setCreatorId(userId);
+            prodIODetailMapper.insertSelective(prodInDetail);
+        }
+
+        //生成出库单
+        ProdInOut prodOut = new ProdInOut();
+        String piOutno = getMaxnumber(BillCodeSeq.OTHEROUT);
+        prodOut.setPi_inoutno(piOutno);
+        prodOut.setPi_class(BillCodeSeq.OTHEROUT.getName());
+        prodOut.setPi_date(new Date());
+        prodOut.setPi_status("未审核");
+        prodOut.setPi_statuscode("UNAUDITED");
+        prodOut.setCompanyId(companyId);
+        prodOut.setCreateTime(new Date());
+        prodOut.setCreatorId(userId);
+        prodOut.setPi_remark("盘亏单");
+        prodInOutMapper.insertSelective(prodOut);
+        long outid = prodOut.getId();
+
+        List<StockTaking> outlist  = getMapper().selectStockTakingBycondition("st_num<0",companyId);
+        for (int i=0;i<outlist.size();i++) {
+            StockTaking st = outlist.get(i);
+            ProdIODetail prodOutDetail = new ProdIODetail();
+            prodOutDetail.setPd_piid(outid);
+            prodOutDetail.setPd_inoutno(piOutno);
+            prodOutDetail.setPd_piclass(BillCodeSeq.OTHERIN.getName());
+            prodOutDetail.setPd_pdno(i+1);
+            prodOutDetail.setPd_prodid(st.getSt_prodid());
+            prodOutDetail.setPd_prodcode(st.getSt_prodcode());
+            prodOutDetail.setPd_outqty(-st.getSt_num());
+            //仓库
+            prodOutDetail.setPd_whid(st.getSt_whid());
+            prodOutDetail.setPd_whcode(st.getSt_whcode());
+            prodOutDetail.setPd_whname(st.getSt_whname());
+            prodOutDetail.setCompanyId(companyId);
+            prodOutDetail.setCreateTime(new Date());
+            prodOutDetail.setCreatorId(userId);
+            prodIODetailMapper.insertSelective(prodOutDetail);
+        }
+        DocBaseDTO baseDTOIN = new DocBaseDTO(inid,piInno,"其它入库单");
+        DocBaseDTO baseDTOOUT = new DocBaseDTO(outid,piOutno,"其它出库单");
+        resultMap.put("inData",baseDTOIN);
+        resultMap.put("outData",baseDTOOUT);
+        return resultMap;
+    }
+
+    private List<StockTaking> getList(ListReqDTO listReqDTO) {
+        List<StockTaking> list = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        list = getMapper().selectStockTakingBycondition(null,companyId);
         return list;
     }
+
+
+    public String getMaxnumber(BillCodeSeq bill) {
+        String code = maxnumberService.getMaxnumber(bill.getCaller(), false).getData();
+        DocBaseDTO base = new DocBaseDTO(0l, code, bill.getName());
+        return pushMaxnubmer(base);
+    }
+
+    public String pushMaxnubmer(DocBaseDTO baseDTO) {
+        String pi_inoutno = baseDTO.getCode();
+        String pi_class = baseDTO.getName();
+        Long id = baseDTO.getId();
+        if (null == pi_inoutno) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        String billCode = null;
+        synchronized (ProdInOutServiceImpl.class) {
+            Integer count = "0".equals(String.valueOf(id)) ? prodInOutMapper.validateCodeWhenInsert(pi_inoutno, companyId) :
+                    prodInOutMapper.validateCodeWhenUpdate(pi_inoutno, id, companyId);
+            String caller ="";
+            if("其它入库单".equals(pi_class)){
+                caller = BillCodeSeq.OTHERIN.getCaller();
+            }else if("其它出库单".equals(pi_class)) {
+                caller = BillCodeSeq.OTHEROUT.getCaller();
+            }
+            billCode = maxnumberService.pushMaxnubmer(count, pi_inoutno, caller).getData();
+        }
+        return billCode;
+    }
+
+
 }

+ 18 - 1
applications/storage/storage-server/src/main/resources/mapper/StockTakingMapper.xml

@@ -238,11 +238,28 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyId = #{companyId}
+      and companyId = #{companyId}
       </if>
+
     </where>
     order by st_id desc
   </select>
 
+  <delete id="deleteByCompany" parameterType="long">
+    delete from stocktaking
+    where companyId = #{companyId,jdbcType=INTEGER}
+  </delete>
+
+  <insert id="insertFormProductWh">
+    insert into stocktaking (st_prodid,st_prodcode,st_proddetail,st_prodorispeccode,st_prodkind,st_produnit,st_whid,st_whcode,st_whname,st_batchqty,companyId)
+    select pr_id,pr_code,pr_detail,pr_orispeccode,pr_kind,pr_unit,wh_id,wh_code,wh_description,pw_onhand,#{companyId} from productwh left join product on pw_prodid = pr_id  left join warehouse on pw_whid = wh_id
+    where productwh.companyid=#{companyId,jdbcType=INTEGER} and product.companyid =#{companyId,jdbcType=INTEGER} and warehouse.companyId=#{companyId,jdbcType=INTEGER}
+    and ${con}
+  </insert>
+
+  <select id="getPurcpriceByProduct"  resultType="double">
+    select pr_purcprice from product where pr_id = #{id}
+  </select>
+
 
 </mapper>

+ 1 - 1
base-servers/account/account-server/src/main/resources/application.yml

@@ -53,7 +53,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
 server:
   port: 8580
   tomcat:

+ 1 - 1
base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml

@@ -172,7 +172,7 @@
                 updater_id=#{updaterId,jdbcType=BIGINT},
             </if>
             <if test="updateTime != null">
-                update_time=#{updateTime,jdbcType=TIMESTAMP})
+                update_time=#{updateTime,jdbcType=TIMESTAMP}
             </if>
         </set>
         where id=#{id,jdbcType=BIGINT}

+ 4 - 0
frontend/saas-portal-web/Dockerfile

@@ -0,0 +1,4 @@
+FROM hub.c.163.com/library/nginx
+MAINTAINER USOFTCHINA <yingp@usoftchina.com>
+RUN rm /etc/nginx/conf.d/default.conf
+ADD runtime/nginx/default.conf /etc/nginx/conf.d/

+ 20 - 0
frontend/saas-portal-web/runtime/nginx/default.conf

@@ -0,0 +1,20 @@
+server {
+    listen       80;
+    server_name  localhost;
+
+    charset utf-8;
+
+    location / {
+        root   /usr/share/nginx/html;
+        index  index.html index.htm;
+    }
+
+    #error_page  404              /404.html;
+
+    # redirect server error pages to the static page /50x.html
+    #
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   html;
+    }
+}

+ 1 - 1
frontend/saas-web/app/model/sale/ProdIODetail.js

@@ -13,7 +13,7 @@ Ext.define('saas.model.sale.ProdIODetail', {
         { name: 'pd_prodid', type: 'int' },
         { name: 'pd_prodcode', type: 'string' },
         { name: 'pd_unit', type: 'string' },
-        { name: 'pd_inqty', type: 'int' },
+        { name: 'pd_inqty', type: 'float' },
         { name: 'pd_outqty', type: 'float' },
         { name: 'pd_orderprice', type: 'float' },
         { name: 'pd_sendprice', type: 'float' },

+ 2 - 1
frontend/saas-web/app/util/FormUtil.js

@@ -254,8 +254,9 @@ Ext.define('saas.util.FormUtil', {
                                 var detno = 0;
                                 var detnoColumn = grid.detnoColumn;
                                 var datas = [];
+                                var emptyRows = grid.emptyRows;
                                 
-                                Ext.Array.each(new Array(5), function() {
+                                Ext.Array.each(new Array(emptyRows), function() {
                                     detno += 1;
                                     var data = {};
                                     data[detnoColumn] = detno;

+ 5 - 1
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -256,7 +256,11 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                                     field.setValue(null);
                                     field.lastTriggerValue=null;
                                 }else{
-                                    field.setValue(null);
+                                    if(field.xtype.indexOf('hidden')>-1){
+                                        field.setValue(0);
+                                    }else{
+                                        field.setValue(null);
+                                    }
                                 }    
                             }
                         }

+ 92 - 91
frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js

@@ -26,110 +26,111 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
     },
     //输入值之后进行模糊查询
     doQuery: function(queryString, forceAll, rawQuery) {
+        if(!this.fireEvent('beforequery', this)) {
+            return;
+        };
     	queryString = queryString || '';
     	var me = this;
-    	if(me.lastQueryValue!=queryString){
-    		me.judge(me);
-    		var field=[];
-    		var sfield='';
-            var dbfinds=me.dbfinds;
-            var dbtpls=me.dbtpls;
-    		me.lastQueryValue=queryString;
-            if(queryString.trim()==''){
+        me.judge(me);
+        var field=[];
+        var sfield='';
+        var dbfinds=me.dbfinds;
+        var dbtpls=me.dbtpls;
+        me.lastQueryValue=queryString;
+        if(queryString.trim()==''){
+            me.collapse( );
+        }else{
+            if(!dbfinds||!dbtpls){
                 me.collapse( );
-            }else{
-                if(!dbfinds||!dbtpls){
-                    me.collapse( );
-                }else{                   
-                    //加载tpl模板
-                    if(dbtpls.length>0){
-                        var span="";
-                        var width=0;
-                        for(var i=0;i<dbtpls.length;i++){
-                            if(i==0){
-                                span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';//display:block;
-                            }else{
-                                span=span+'<span style="padding:0 0 0 20px;width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';
-                            }
-                            if(dbtpls[i].dbField=="true"){
-                                me.searchFieldArray=dbtpls[i].field;
-                            }
-                            width=width+dbtpls[i].width+20;
-                            field.push(dbtpls[i].field);
-                            sfield=sfield+dbtpls[i].field+',';
+            }else{                   
+                //加载tpl模板
+                if(dbtpls.length>0){
+                    var span="";
+                    var width=0;
+                    for(var i=0;i<dbtpls.length;i++){
+                        if(i==0){
+                            span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';//display:block;
+                        }else{
+                            span=span+'<span style="padding:0 0 0 20px;width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';
                         }
-                        me.defaultListConfig.minWidth=width+10;
-                        me.defaultListConfig.maxHeight=210;
-                        me.defaultListConfig.autoScroll=true;
-                        me.searchField=sfield.substring(0,sfield.length-1);
-                        me.tpl=Ext.create('Ext.XTemplate',
-                                '<ul style="padding-left: 0px;"><tpl for=".">',
-                                '<li role="option" class="x-boundlist-item" style="list-style:none;">' ,
-                                '<div style="height:30px;">',
-                                ''+span+'',
-                                '</li>',
-                            '</tpl></ul>'
-                        );
-                        me.store.setFields(field);
-                    }
-                }
-                //加载数据
-                var data,dbCondition=[];
-                if(me.dbfinds){
-                    var dbtplcondition = "";
-                    for (let index = 0; index < dbfinds.length; index++) {
-                        var item = dbfinds[index].from;
-                        if(!dbfinds[index].ignore){
-                            dbtplcondition+= "upper("+item+") like '%"+queryString.toUpperCase()+"%' or ";
+                        if(dbtpls[i].dbField=="true"){
+                            me.searchFieldArray=dbtpls[i].field;
                         }
+                        width=width+dbtpls[i].width+20;
+                        field.push(dbtpls[i].field);
+                        sfield=sfield+dbtpls[i].field+',';
                     }
-                    dbtplcondition = "(" + dbtplcondition.substring(0,dbtplcondition.length-4) + ")";
-                    if(dbtplcondition.length>0){
-                        dbCondition = [{
-                            type: 'condition',
-                            value:dbtplcondition
-                        }];
+                    me.defaultListConfig.minWidth=width+10;
+                    me.defaultListConfig.maxHeight=210;
+                    me.defaultListConfig.autoScroll=true;
+                    me.searchField=sfield.substring(0,sfield.length-1);
+                    me.tpl=Ext.create('Ext.XTemplate',
+                            '<ul style="padding-left: 0px;"><tpl for=".">',
+                            '<li role="option" class="x-boundlist-item" style="list-style:none;">' ,
+                            '<div style="height:30px;">',
+                            ''+span+'',
+                            '</li>',
+                        '</tpl></ul>'
+                    );
+                    me.store.setFields(field);
+                }
+            }
+            //加载数据
+            var data,dbCondition=[];
+            if(me.dbfinds){
+                var dbtplcondition = "";
+                for (let index = 0; index < dbfinds.length; index++) {
+                    var item = dbfinds[index].from;
+                    if(!dbfinds[index].ignore){
+                        dbtplcondition+= "upper("+item+") like '%"+queryString.toUpperCase()+"%' or ";
                     }
                 }
-                //添加默认条件
-                if(me.defaultCondition) {
-                    dbCondition.push({
+                dbtplcondition = "(" + dbtplcondition.substring(0,dbtplcondition.length-4) + ")";
+                if(dbtplcondition.length>0){
+                    dbCondition = [{
                         type: 'condition',
-                        value: me.defaultCondition
-                    });
+                        value:dbtplcondition
+                    }];
                 }
-                Ext.Ajax.request({
-                    url: me.dataUrl,
-                    params: {
-                        number: 1,
-                        size: 10,
-                        condition:JSON.stringify(dbCondition),
-                        page: 1,
-                        start: 0,
-                        limit: 10
-                    },
-                    method: 'GET',
-                    success: function(response, opts) {
-                        data = Ext.decode(response.responseText);
-                        data = data.data?data.data.list:[];
-                        if(data!=null && data.length>0 && me.store && field.length>0){
-                            me.store.loadData(data,false);
-                            me.expand();
-                        }else{
-                            me.store.removeAll();
-                            me.collapse();
-                        }
-                    },
-                    failure: function(response, opts) {}
-                });                
             }
-            return true;
-    	}else{
-    		return false;
-    	}
+            //添加默认条件
+            if(me.defaultCondition) {
+                dbCondition.push({
+                    type: 'condition',
+                    value: me.defaultCondition
+                });
+            }
+            Ext.Ajax.request({
+                url: me.dataUrl,
+                params: {
+                    number: 1,
+                    size: 10,
+                    condition:JSON.stringify(dbCondition),
+                    page: 1,
+                    start: 0,
+                    limit: 10
+                },
+                method: 'GET',
+                success: function(response, opts) {
+                    data = Ext.decode(response.responseText);
+                    data = data.data?data.data.list:[];
+                    if(data!=null && data.length>0 && me.store && field.length>0){
+                        me.store.loadData(data,false);
+                        me.expand();
+                    }else{
+                        me.store.removeAll();
+                        me.collapse();
+                    }
+                },
+                failure: function(response, opts) {}
+            });                
+        }
+        return true;
     },
     onTriggerClick:function(f){
-        this.fireEvent('beforetriggerclick', this);
+        if(!this.fireEvent('beforetriggerclick', this)) {
+            return;
+        };
         f.blur(f);
         //判断dbfindtrigger归属
         f.judge(f);

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

@@ -1,3 +1,6 @@
+/**
+ * 资金账户放大镜
+ */
 Ext.define('saas.view.core.dbfind.types.BankInfoDbfindTrigger', {
     extend: 'saas.view.core.dbfind.DbfindTrigger',
     xtype: 'bandinfoDbfindTrigger',

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

@@ -1,5 +1,5 @@
 /**
- * 客户资料放大镜
+ * BOM资料放大镜
  */
 Ext.define('saas.view.core.dbfind.types.BomDbfindTrigger', {
     extend: 'saas.view.core.dbfind.DbfindTrigger',

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

@@ -1,10 +1,12 @@
+/**
+ * 资金来源单据放大镜(多选)
+ */
 Ext.define('saas.view.core.dbfind.types.OriOrderMutiDbfindTrigger', {
     extend: 'saas.view.core.dbfind.MultiDbfindTrigger',
     xtype: 'oriOrderMutiDbfindTrigger',
-/**
- * 用于资金首付款单明细
- */
+   
     dataUrl: '/api/money/subledger/list',
+    // dataUrl: 'http://192.168.253.35:8880/subledger/list',
     addTitle: '源单资料',
     dbtpls: [{
         field: 'sl_code',

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

@@ -421,8 +421,8 @@ Ext.define('saas.view.core.form.FormPanel', {
         var me = this;
         var viewModel = me.getViewModel();
         var formItems = me.formItems;
-        var valid = !!Ext.Array.findBy(formItems, function(f) {
-            return f.isValid();
+        var valid = !Ext.Array.findBy(formItems, function(f) {
+            return !f.isValid();
         });
         var detailGrids = me.query('detailGridField');
 

+ 2 - 0
frontend/saas-web/app/view/core/form/field/ConDateField.js

@@ -61,6 +61,7 @@ Ext.define('saas.view.core.form.field.ConDateField', {
             allowBlank: allowBlank,
             flex: 1,
             fieldStyle: me.fieldStyle,
+            emptyText: '起始时间',
             //matchFieldWidth:true,
             listeners: {
                 change: function(f){
@@ -95,6 +96,7 @@ Ext.define('saas.view.core.form.field.ConDateField', {
             formatText: '',
             flex: 1,
             fieldStyle: me.fieldStyle,
+            emptyText: '结束时间',
             listeners: {
                 change: function(){
                     var from = me.from.value, to =me.to.value;

+ 26 - 0
frontend/saas-web/app/view/core/form/field/ConDateField.scss

@@ -0,0 +1,26 @@
+.x-condatefield {
+    .x-field {
+        background: #fff;
+    }
+
+    .x-field:first-child {
+        .x-form-trigger-wrap-default {
+            border-top-right-radius: 0;
+            border-bottom-right-radius: 0;
+        }
+    }
+    .x-field:nth-child(2) {
+        .x-form-trigger-wrap-default {
+            border-radius: 0;
+            border-left: 0;
+            border-right: 0;
+        }
+    }
+    .x-field:last-child {
+        .x-form-trigger-wrap-default {
+            border-top-left-radius: 0;
+            border-bottom-left-radius: 0;
+        }
+    }
+
+}

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

@@ -27,6 +27,8 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
     allowEmpty: false, // 表格为空时校验合法
     showCount: true, // 显示合计栏
 
+    emptyRows: 5,
+
     // Clearing selection disables the Actions.
     allowDeselect: true,
     defaultActionType: 'button',
@@ -201,7 +203,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         selectedRecord = me.selModel.lastSelected,
         datas = [];
 
-        num = num || 3;
+        num = num || me.emptyRows;
 
         //当前行后序号全部加1
         var detno = selectedRecord ? selectedRecord.data[detnoColumn] : 0;

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

@@ -188,28 +188,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     bind: {
                         hidden: '{!auditEnable}'
                     }
-                }, {
-                    text: '打印',
-                    handler: me.onPrint,
-                    menu: {
-                        cls:'x-query-menu',
-                        width: 80,
-                        items: [{
-                            text:'设置',
-                            handler:function(){
-                                me.onPrintSet(this)
-                            }
-                        }],
-                        listeners: {
-                            'mouseleave':function(enu){
-                                this.hide();
-                            } 
-                        }
-                    },
-                    bind: {
-                        hidden: '{!printEnable}'
-                    }
-                }, {
+                },  {
                     text: '导入',
                     handler: me.onImport,
                     menu: {

+ 41 - 0
frontend/saas-web/app/view/document/product/FormController.js

@@ -51,6 +51,47 @@ Ext.define('saas.view.document.product.FormController', {
         });
 
     },
+
+    initCopyData: function(formData) {
+        var me = this;
+        var form = this.getView();
+        var detailCount = form.detailCount;
+        var main = formData.main;
+        var auditTexts = form.auditTexts;
+
+        // 单号、id清空
+        main[form._idField] = 0;
+        main[form._codeField] = '';
+        // 单据状态为录入状态(未审核)
+        main[form._statusCodeField] = auditTexts.unAuditCode;
+        main[form._statusField] = auditTexts.unAuditText;
+
+        for(var k in main) {
+            // 主表日期改为当前日期
+            if(saas.util.BaseUtil.isDateString(main[k])) {
+                main[k] = Ext.Date.format(new Date, 'Y-m-d H:i:s');
+            }
+        }
+
+        for(var j = 0; j < detailCount; j++) {
+            var grid = form.query('detailGridField')[j],
+            emptyRows = grid.emptyRows,
+            detnoColumn = grid.detnoColumn,
+            detno = 0,
+            datas = [];
+
+            Ext.Array.each(new Array(emptyRows), function() {
+                detno += 1;
+                var data = {};
+                data[detnoColumn] = detno;
+                datas.push(data);
+            })
+            formData['detail' + j] = datas;
+        }
+
+        return me.myInitCopyData(formData);;
+    },
+
     auditBtnClick: function() {
         var me = this,
         form = me.getView(),

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

@@ -39,31 +39,31 @@ Ext.define('saas.view.home.InfoCard', {
         Ext.apply(me, {
             cards: {
                 unship: {
-                    title: '七天内待出货销售',
+                    title: '未出货销售订单',
                     color: 'yellow',
                     viewType: 'sale-sale-querypanel',
                     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: '七天内待入库采购',
+                    title: '未入库采购订单',
                     color: 'purple',
                     viewType: 'purchase-purchase-querypanel',
                     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: '七天内待付款',
+                    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)'
                 },
                 unreceive: {
-                    title: '七天内待收款',
+                    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=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unauditcheck: {
-                    title: '未审核验收',
+                    title: '未审核验收',
                     color: 'blue',
                     viewType: 'purchase-purchasein-querypanel',
                     condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'采购验收单\' and prodinout.companyId=' + companyId

+ 1 - 1
frontend/saas-web/app/view/home/charts/PurchaseTrend.js

@@ -81,7 +81,7 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                     style: {
                         lineWidth: 0,
                         strokeStyle: 'transparent',
-                        maxBarWidth: 50,
+                        maxBarWidth: 30,
                     },
                 }]
             }]

+ 1 - 1
frontend/saas-web/app/view/home/charts/StockAmount.js

@@ -75,7 +75,7 @@ Ext.define('saas.view.home.charts.StockAmount', {
                     style: {
                         lineWidth: 0,
                         strokeStyle: 'transparent',
-                        maxBarWidth: 50,
+                        maxBarWidth: 30,
                     },
                 }]
             }]

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

@@ -138,7 +138,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
             width: 110
         }, {
             text: '备注',
-            dataIndex: 'ft_remark',
+            dataIndex: 'ftd_remark',
             width: 250
         } ],
         relativeColumn: []

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

@@ -102,6 +102,5 @@ Ext.define('saas.view.money.report.AccountBalance', {
             text: '备注',
             dataIndex: 'remark',
             width: 250,
-            flex:1
         }]
 });

+ 1 - 1
frontend/saas-web/app/view/money/report/CustomerCheck.js

@@ -7,7 +7,7 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
 
     viewName: 'money-report-customercheck',
 
-    groupField: null,
+    groupField: 'pi_custname',
     listUrl: '/api/money/report/customercheck',
     defaultCondition: null,
     reportTitle: '客户对账单',

+ 1 - 1
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -6,7 +6,7 @@ Ext.define('saas.view.money.report.PayDetail', {
     viewModel: 'money-report-paydetail',
     viewName: 'money-report-paydetail',
 
-    groupField: null,
+    groupField:'pi_vendname',
     listUrl: '/api/money/report/payDetail',
     defaultCondition: null,
     reportTitle: '应付账款明细表',

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

@@ -7,7 +7,7 @@ Ext.define('saas.view.money.report.RecDetail', {
 
     viewName: 'money-report-recdetail',
 
-    groupField: null,
+    groupField: 'pi_custname',
     listUrl: '/api/money/report/recDetail',
     defaultCondition: null,
     reportTitle: '应收账款明细',
@@ -124,7 +124,14 @@ Ext.define('saas.view.money.report.RecDetail', {
             text: '单据总金额',
             dataIndex: 'pi_total',
             xtype: 'numbercolumn',
-            width: 110
+            width: 110,
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
         }, {
             text: '备注',
             dataIndex: 'pd_unit',

+ 1 - 1
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -7,7 +7,7 @@ Ext.define('saas.view.money.report.VendorCheck', {
 
     viewName: 'money-report-vendorcheck',
 
-    groupField: null,
+    groupField: 'pi_vendname',
     listUrl: '/api/money/report/vendorCheck',
     defaultCondition: null,
     reportTitle: '供应商对账单',

+ 53 - 24
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -78,7 +78,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
                     queryMode : "local",
                     store : null,
                     valueField : "value",
-                    xtype : "multidbfindtrigger"
+                    xtype : "oriOrderMutiDbfindTrigger"
                 }
             }, {
                 text: '业务类型',
@@ -173,7 +173,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
         detail2: {
             xtype: "detailGridField",
             storeModel: 'saas.model.money.Verification1',
-            detnoColumn: 'vd_detno',
+            detnoColumn: 'vcd_detno',
             deleteDetailUrl: '/api/money/verification/deleteDetail2/',
             columnWidth: 1,
             columns: [{
@@ -182,11 +182,11 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 hidden: true
             }, {
                 text: '来源ID',
-                dataIndex: 'vd_slid',
+                dataIndex: 'vcd_slid',
                 hidden: true
             }, {
                 text: '来源单号',
-                dataIndex: 'vd_slcode',
+                dataIndex: 'vcd_slcode',
                 width: 150,
                 editor:{
                     displayField : "display",
@@ -199,21 +199,21 @@ Ext.define('saas.view.money.verification.FormPanel', {
                     queryMode : "local",
                     store : null,
                     valueField : "value",
-                    xtype : "multidbfindtrigger"
+                    xtype : "oriOrderMutiDbfindTrigger"
                 }
             }, {
                 text: '业务类型',
-                dataIndex: "vd_slkind",
+                dataIndex: "vcd_slkind",
                 width: 110
             }, {
                 text: "单据日期",
-                dataIndex: "vd_sldate",
+                dataIndex: "vcd_sldate",
                 xtype: 'datecolumn',
                 width: 110
             }, {
                 text: "单据金额",
                 xtype: 'numbercolumn',
-                dataIndex: "vd_amount",
+                dataIndex: "vcd_amount",
                 width: 110,
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -269,7 +269,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
             }, {
                 text: "本次核销金额",
                 xtype: 'numbercolumn',
-                dataIndex: "vd_nowbalance",
+                dataIndex: "vcd_nowbalance",
                 width:150,
                 editor : {
                     xtype : "numberfield",
@@ -291,19 +291,22 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 }
             }]
         },
-        other: {
+        other: [{
             fieldLabel: '备注',
             xtype: 'textfield',
             columnWidth: 1,
             name: 'vc_remark'
-        },
+        }],
 
         // 预收冲应收
         receipts_offset_receivable : {
             main: [{
                 xtype: 'hidden',
-                fieldLabel: '客户id',
+                fieldLabel: '客户名称',
                 name: 'vc_custid',
+                listeners: {
+                    change: 'clearDetails'
+                }
             }, {
                 fieldLabel: '客户编号',
                 xtype: 'hidden',
@@ -325,7 +328,10 @@ Ext.define('saas.view.money.verification.FormPanel', {
             main: [{
                 xtype: 'hidden',
                 name: 'vc_vendid',
-                fieldLabel: '供应商ID'
+                fieldLabel: '供应商名称',
+                listeners: {
+                    change: 'clearDetails'
+                }
             }, {
                 xtype: "hidden",
                 name: "vc_vendcode",
@@ -346,10 +352,13 @@ Ext.define('saas.view.money.verification.FormPanel', {
         // 应收冲应付
         receivable_offset_payable: {
             main: [{
-                fieldLabel: '客户id',
+                fieldLabel: '客户名称',
                 xtype: 'textfield',
                 name: 'vc_custid',
-                hidden: true
+                hidden: true,
+                listeners: {
+                    change: 'clearDetail0'
+                }
             }, {
                 fieldLabel: '客户编号',
                 xtype: 'textfield',
@@ -358,11 +367,14 @@ Ext.define('saas.view.money.verification.FormPanel', {
             }, {
                 fieldLabel: '客户名称',
                 xtype: 'customerDbfindTrigger',
-                name: 'vc_custname',
+                name: 'vc_custname'
             }, {
                 xtype: 'hidden',
                 name: 'vc_vendid',
-                fieldLabel: '供应商ID'
+                fieldLabel: '供应商ID',
+                listeners: {
+                    change: 'clearDetail1'
+                }
             }, {
                 xtype: "hidden",
                 name: "vc_vendcode",
@@ -383,10 +395,13 @@ Ext.define('saas.view.money.verification.FormPanel', {
         // 应收转应收
         receivable_to_receivable: {
             main: [{
-                fieldLabel: '转出客户id',
+                fieldLabel: '转出客户',
                 xtype: 'textfield',
                 name: 'vc_outcustid',
-                hidden: true
+                hidden: true,
+                listeners: {
+                    change: 'clearDetail0'
+                }
             }, {
                 fieldLabel: '转出客户编号',
                 xtype: 'textfield',
@@ -395,7 +410,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
             }, {
                 fieldLabel: '转出客户',
                 xtype: 'customerDbfindTrigger',
-                name: 'vc_outcustname',
+                name: 'vc_outcustname'
             }, {
                 fieldLabel: '转入客户id',
                 xtype: 'textfield',
@@ -421,10 +436,13 @@ Ext.define('saas.view.money.verification.FormPanel', {
         // 应付转应付
         payable_to_payable: {
             main: [{
-                fieldLabel: '转出供应商id',
+                fieldLabel: '转出供应商',
                 xtype: 'textfield',
                 name: 'vc_outvendid',
-                hidden: true
+                hidden: true,
+                listeners: {
+                    change: 'clearDetail0'
+                }
             }, {
                 fieldLabel: '转出供应商编号',
                 xtype: 'textfield',
@@ -433,7 +451,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
             }, {
                 fieldLabel: '转出供应商',
                 xtype: 'vendorDbfindTrigger',
-                name: 'vc_outvendname',
+                name: 'vc_outvendname'
             }, {
                 fieldLabel: '转入供应商id',
                 xtype: 'textfield',
@@ -454,6 +472,17 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 name: 'vc_date'
             }],
             details: ['detail1']
+        },
+
+        defaultConditions: {
+            receipts_offset_receivable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)<>0 and ifnull(sl_namount,0)<>0',
+                'ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
+            prepaid_offset_payable: ['ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)<>0 and ifnull(sl_namount,0)<>0',
+                'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
+            receivable_offset_payable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0',
+                'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
+            receivable_to_receivable: ['ifnull(sl_custid,0)={vc_outcustid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
+            payable_to_payable: ['ifnull(sl_vendtid,0)={vc_outvendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0']
         }
     },
 
@@ -528,7 +557,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
 
         base[0].defaultValue = acitveType;
 
-        items = Ext.Array.merge(base, mainItems, (details[0] ? [detail1] : []), (details[1] ? [detail2] : []), [other] );
+        items = Ext.Array.merge(base, mainItems, (details[0] ? [detail1] : []), (details[1] ? [detail2] : []), other );
 
         return items;
     },

+ 174 - 0
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -110,6 +110,180 @@ Ext.define('saas.view.money.verification.FormPanelController', {
 
                 }
             },
+
+            // 来源单号1
+            'oriOrderMutiDbfindTrigger[name=vd_slcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'vd_slid',ignore:true
+                        }, {
+                            from: 'sl_code',
+                            to: 'vd_slcode'
+                        },{
+                            from: 'sl_orderamount',
+                            to: 'vd_amount'
+                        },{
+                            from: 'sl_yamount',
+                            to: 'sl_yamount'
+                        },{
+                            from:'sl_date',
+                            to:'vd_sldate'
+                        },{
+                            from:'sl_kind',
+                            to:'vd_slkind'
+                        },{
+                            from: 'sl_namount',
+                            to: 'vd_nowbalance'
+                        }],
+                    });
+                },
+                beforequery: function(f) {
+                    var defaultCondition = this.getDefaultCondition(0);
+                    if(!defaultCondition) {
+                        return false;
+                    }
+                    Ext.apply(f, {
+                        defaultCondition: defaultCondition
+                    });
+                },
+                beforetriggerclick: function(f) {
+                    var defaultCondition = this.getDefaultCondition(0);
+                    if(!defaultCondition) {
+                        return false;
+                    }
+                    Ext.apply(f, {
+                        defaultCondition: defaultCondition
+                    });
+                }
+            },
+
+            // 来源单号2
+            'oriOrderMutiDbfindTrigger[name=vcd_slcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'vcd_slid',ignore:true
+                        }, {
+                            from: 'sl_code',
+                            to: 'vcd_slcode'
+                        },{
+                            from: 'sl_orderamount',
+                            to: 'vcd_amount'
+                        },{
+                            from: 'sl_yamount',
+                            to: 'sl_yamount'
+                        },,{
+                            from: 'sl_namount',
+                            to: 'sl_namount'
+                        },{
+                            from:'sl_date',
+                            to:'vcd_sldate'
+                        },{
+                            from:'sl_kind',
+                            to:'vcd_slkind'
+                        },{
+                            from: 'sl_namount',
+                            to: 'vcd_nowbalance'
+                        }],
+                    });
+                },
+                beforequery: function(f) {
+                    var defaultCondition = this.getDefaultCondition(1);
+                    if(!defaultCondition) {
+                        return false;
+                    }
+                    Ext.apply(f, {
+                        defaultCondition: defaultCondition
+                    });
+                },
+                beforetriggerclick: function(f) {
+                    var defaultCondition = this.getDefaultCondition(1);
+                    if(!defaultCondition) {
+                        return false;
+                    }
+                    Ext.apply(f, {
+                        defaultCondition: defaultCondition
+                    });
+                }
+            },
         });
     },
+
+    getDefaultCondition: function(idx) {
+        var me = this,
+        form = me.getView(),
+        formItems = form.formItems,
+        viewModel = me.getViewModel(),
+        acitveType = form.acitveType,
+        etc = form.etc,
+        defaultConditions = etc.defaultConditions,
+        defaultConditionMode = defaultConditions[acitveType][idx];
+
+        var reg = /(.*){(.*)}(.*)/g;
+        var fieldName = defaultConditionMode.match(/(.*){(.*)}(.*)/)[2];
+        var fieldLabel = Ext.Array.findBy(formItems, function(f) {
+            return f.name == fieldName;
+        }).fieldLabel;
+        var fieldValue = viewModel.get(fieldName);
+        if(!fieldValue) {
+            saas.util.BaseUtil.showErrorToast('请先录入主表字段【' + '<span style="color: red;">' + fieldLabel + '</span>】');
+            return null;
+        }
+        var defaultCondition = defaultConditionMode.replace(reg, '$1' + fieldValue + '$3');
+
+        return defaultCondition;
+    },
+
+    /**
+     * 清空所有从表数据
+     */
+    clearDetails: function() {
+        var me = this;
+        
+        me.clearDetail0();
+        me.clearDetail1();
+    },
+
+    /**
+     * 清空第一个从表数据
+     */
+    clearDetail0: function(f, n, o) {
+        var me = this,
+        form = me.getView(),
+        grid = form.query('detailGridField')[0];
+        me.clearDetail(grid);
+    },
+
+    /**
+     * 清空第二个从表数据
+     */
+    clearDetail1: function() {
+        var me = this,
+        form = me.getView(),
+        grid = form.query('detailGridField')[1];
+        me.clearDetail(grid);
+    },
+
+    /**
+     * 清空一个从表数据
+     */
+    clearDetail: function(grid) {
+        var datas = [],
+        emptyRows = grid.emptyRows,
+        detnoColumn = grid.detnoColumn,
+        detno = 0,
+        store = grid.getStore();
+        
+        Ext.Array.each(new Array(emptyRows), function() {
+            detno += 1;
+            var data = {};
+            data[detnoColumn] = detno;
+            datas.push(data);
+        })
+        store.removeAll();
+        store.add(datas);
+    },
 });

+ 88 - 34
frontend/saas-web/app/view/money/verification/QueryPanel.js

@@ -8,64 +8,118 @@ Ext.define('saas.view.money.verification.QueryPanel', {
     viewName: 'money-verification-querypanel',
     
     queryFormItems: [{
-        xtype: 'hidden',
-        name: 'rb_id',
-        fieldLabel: 'ID',
-        allowBlank: true,
+        xtype: 'textfield',
+        name: 'vc_code',
+        fieldLabel: '单号/供应商名/客户名',
+        emptyText :'请输入单号或者供应商名或者客户名',
         getCondition: function(value) {
-            return 'rb_id=' + value;
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return  ' (vc_code like\'%' + value + '%\' '
+                    +' or vc_vendcode like \'%'+value+'%\' '
+                    +' or vc_custcode like \'%'+value+'%\') ';
+            }
         }
-    }, {
-        xtype: 'textfield',
-        name: 'rb_code',
-        emptyText:'请输入单据编号'
-    }, {
+    },{
         xtype: 'condatefield',
-        name: 'rb_date',
-        fieldLabel: '日期',
+        name: 'vc_date',
+        fieldLabel: '单据日期',
         columnWidth: 0.5,
         operation: 'between'
+    },{
+        xtype: 'combobox',
+        name: 'vc_statuscode',
+        fieldLabel: '审核状态',
+        queryMode: 'local',
+        displayField: 'name',
+        valueField: 'value',
+        emptyText :'全部',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['value', 'name'],
+            data: [
+                ["ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
+        }),
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'vc_statuscode=\'' + value + '\'';
+            }
+        }
+    },{
+        xtype: 'combobox',
+        name: 'vc_kind',
+        fieldLabel: '业务类型',
+        queryMode: 'local',
+        displayField: 'name',
+        valueField: 'value',
+        emptyText :'全部',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['value', 'name'],
+            data: [
+                ["ALL", "全部"],
+                ["预收冲应收", "预收冲应收"],
+                ["预付冲应付", "预付冲应付"],
+                ["应收冲应付", "应收冲应付"],
+                ["应收转应收", "应收转应收"],
+                ["应付转应付", "应付转应付"]
+            ]
+        }),
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'vc_kind=\'' + value + '\'';
+            }
+        }
     }],
     moreQueryFormItems: [],
     queryGridConfig: {
         idField: 'id',
-        codeField: 'rb_code',
-        addTitle: '收款单',
-        addXtype: 'money-recbalance-formpanel',
+        codeField: 'vc_code',
+        addTitle: '核销单',
+        addXtype: 'money-verification-formpanel',
         defaultCondition:'',
-        baseVastUrl: '/api/money/recbalance/',
+        baseVastUrl: '/api/money/verification/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
+            width: 100,
             xtype: 'numbercolumn',
             hidden: true
         }, {
             text: '单据编号',
-            dataIndex: 'rb_code',
-            width: 150
+            dataIndex: 'vc_code',
+            width: 200
+        }, {
+            text: '审核状态',
+            dataIndex: 'vc_status',
+            width: 120
         }, {
-            text: '单据状态',
-            dataIndex: 'rb_status',
-            width: 90
+            text: '业务类型',
+            dataIndex: 'vc_kind',
+            width: 200
         }, {
-            text: '日期',
-            dataIndex: 'rb_date',
-            xtype: 'datecolumn',
-            width: 110
+            text: '客户编号',
+            dataIndex: 'vc_custcode',
+            hidden: true
         }, {
             text: '客户名称',
-            dataIndex: 'rb_custname',
-            width: 150
+            dataIndex: 'vc_custname',
         }, {
-            text: '收款人',
-            dataIndex: 'rb_manname',
-            xtype: 'numbercolumn',
-            width: 110
+            text: '供应商名称',
+            dataIndex: 'vc_vendcode'
         }, {
-            text: '收款金额',
-            dataIndex: 'rb_rdamount',
+            text: '核销金额',
+            dataIndex: 'vc_amount1',
             xtype: 'numbercolumn',
-            width: 110,
+            width: 120,
             flex: 1,
             hidden: true
         }]

+ 1 - 1
frontend/saas-web/app/view/sale/report/Sale.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.sale.report.Sale', {
     viewName: 'sale-report-sale',
 
     groupField: null,
-    listUrl: '/api/sale/sale/list',
+    listUrl: '/api/sale/report/saleDetail',
     defaultCondition: null,
     reportTitle: '销售明细报表',
     QueryWidth:0.2,

+ 107 - 31
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -1,12 +1,16 @@
 Ext.define('saas.view.stock.inventory.EditDataList', {
     extend: 'Ext.grid.Panel',
     xtype: 'stock-inventory-editdatalist',
+    viewModel: 'stock-inventory-editdatalist',
+
 
     autoScroll: true,
     frame:true,
     layout:'fit',
     dataUrl:'/api/storage/stocktaking/list',
     saveUrl:'/api/storage/stocktaking/save',
+    buildUrl:'/api/storage/stocktaking/build',
+    stockUrl:'/api/storage/stocktaking/stock',
     requires: [
         'Ext.Action',
         'Ext.grid.plugin.CellEditing',
@@ -22,12 +26,21 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
             }
         }
     },
-    tbar: [{		
+    tbar: [{
+        xtype: 'hidden',
+        name: 'wh_id',
+        bind:'{wh_id}',
+        fieldLabel: 'wh_id'
+    },{
+        xtype: 'hidden',
+        name: 'wh_code',
+        fieldLabel: 'wh_code'
+    },{		
         xtype: 'warehouseDbfindTrigger',
         name: 'wh_description',
         emptyText: '仓库',
         dbfinds:[{
-            from:'id',to:'id',ignore:true 
+            from:'id',to:'wh_id',ignore:true 
         }, { 
             from:'wh_code',to:'wh_code'
         }, {
@@ -38,7 +51,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/producttype/getCombo',
-        name : "pr_kind", 
+        name : "pr_kind",
+        bind:'{pr_kind}', 
         emptyText : "类型", 
         allowBlank : false, 
         addHandler:function(b){
@@ -59,15 +73,24 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
             this.dialog.show();
         },
         width:150
-    }, {
+    },{
+        xtype: 'hidden',
+        name: 'pr_id',
+        bind:'{pr_id}',
+        fieldLabel: 'pr_id'
+    },{
+        xtype: 'hidden',
+        name: 'pr_code',
+        fieldLabel: 'pr_code'
+    },{
         xtype: 'productDbfindTrigger',
         name: 'pr_detail',
         emptyText:'输入物料编号或名称',
-        width:150,
+        width:200,
         dbfinds:[{
-            from:'pr_detail',to:'pr_detail',
+            from:'id',to:'pr_id',ignore:true
         },{
-            from:'pr_code',to:'pd_prodcode',
+            from:'pr_code',to:'pr_code',
         }, {
             from:'pr_detail',to:'pr_detail'
         }]
@@ -77,19 +100,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         text:'查询',
         listeners: {
             click:function(b){
-                var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
-                grid.store.loadPage(1);
+                var me =this.ownerCt.ownerCt;
+                me.onbuild();
             }
         }
     },'->',{
@@ -114,7 +126,9 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         text:'生成盘点单据',
         listeners: {
             click:function(b){
-             
+                var me = this.ownerCt.ownerCt;
+                me.onStocking();
+                
             }
         }
     }],
@@ -294,14 +308,12 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     getCondition: function(items) {
         var me = this,
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
             func = item.getCondition,
             value = item.value,
             condition;
-
             if(typeof func == 'function') {
                 condition = {
                     type: 'condition',
@@ -343,7 +355,6 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
 
         return type;
     },
-
     getDefaultFieldOperation: function(xtype) {
         var operation;
 
@@ -361,7 +372,6 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
 
         return operation;
     },
-
     /**
      * 处理部分字段值
      */
@@ -386,20 +396,87 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
 
         return conditionValue;
     },
-
     refresh:function(){
-        //debugger
-        var me = this,
+        var me = this;
+        // me.onbuild();
+        me.reload();
+    },
+    reload:function(){
+        var me = this;    
         store = me.getStore();
         store.load();
     },
+    onStocking:function(){
+        var me = this;
+        saas.util.BaseUtil.request({
+            url: me.stockUrl,
+            method: 'GET',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                // me.refresh();
+                var intValue = localJson.data.inData.id,
+                codeValue= localJson.data.inData.code,
+                name = localJson.data.inData.name;
+                saas.util.BaseUtil.openTab('stock-otherin-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                    initId: intValue
+                });
+        
+                intValue = localJson.data.outData.id;
+                codeValue= localJson.data.outData.code;
+                name = localJson.data.outData.name;
+                saas.util.BaseUtil.openTab('stock-otherout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                    initId: intValue
+                });
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            saas.util.BaseUtil.showToast('生成盘点单失败: ' + res.message);
+        });    
+    },
+    onbuild:function(){
+        var me =this;
+        var grid = me;
+        var tbar = me.dockedItems.items[2];
+        var data;
+        grid.condition = '';
+        var items = [];
+        var fields = tbar.items.items.map(f => f.name);
+        Ext.each(fields, function(f, index){
+            var field = tbar.down('[name='+f+']');
+            if(field){
+                items.push(field);
+            }
+        });
+        grid.condition = grid.getCondition(items);
+
+        var data = grid.condition;
+        param = {
+            mode:'MAIN',
+            condition: JSON.stringify(data)
+        }
+        saas.util.BaseUtil.request({
+            url: me.buildUrl,
+            params: JSON.stringify(param),
+            method: 'POST',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                me.reload();
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+        });        
+    },
     onSave:function(){
         var me = this,
         gridData = me.getDirtyData();
         if(gridData==null){
             saas.util.BaseUtil.showToast('未修改数据');
         }
-
         saas.util.BaseUtil.request({
             url: me.saveUrl,
             params: JSON.stringify(gridData),
@@ -407,7 +484,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                me.refresh();
+                me.reload();
             }
         })
         .catch(function(res) {
@@ -424,7 +501,6 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         Ext.Array.each(allData, function(item){
             var d = Object.assign({}, item.data),
             dirty = item.dirty;
-
             if(dirty){
                 if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
                     d.id = 0;

+ 5 - 0
frontend/saas-web/app/view/stock/inventory/EditDataListModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.stock.inventory.EditDataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.stock-inventory-editdatalist',
+    
+});

+ 1 - 1
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -293,7 +293,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     minValue:0
                 },
                 listeners:{
-                    edit:'price_change'
+                    // edit:'price_change'
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 7 - 7
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -81,13 +81,13 @@ Ext.define('saas.view.stock.make.FormPanelController', {
     },
 
 
-    price_change:function() {
-        var me = this,
-        viewModel = me.getViewModel(),
-        store = viewModel.get('detail0').detailStore;
-        var sum_qty = store.sum('mm_price');
-        viewModel.set('ma_price',sum_qty);
-    },
+    // price_change:function() {
+    //     var me = this,
+    //     viewModel = me.getViewModel(),
+    //     store = viewModel.get('detail0').detailStore;
+    //     var sum_qty = store.sum('mm_price');
+    //     viewModel.set('ma_price',sum_qty);
+    // },
 
 
      getBomData: function(v) {

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

@@ -72,7 +72,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
         xtype: 'vendorDbfindTrigger',
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
-        allowBlank : false,
+        allowBlank : true,
     },{
         xtype : "datefield", 
         name : "pi_date", 

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

@@ -56,7 +56,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         xtype: 'customerDbfindTrigger',
         name: 'pi_custname',
         bind: '{pi_custname}',
-        allowBlank : false,
+        allowBlank : true,
         fieldLabel: '客户名称'
     }, {
         xtype: "datefield",

+ 5 - 5
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -199,7 +199,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
                                 if(data.id){
                                     var serverOptions = Ext.manifest.server;
                                     var img = myForm.down('[name=SignetPhoto]');
-                                    img.el.dom.src = serverOptions.basePath + '/api/file/download?path='+data.fullPath;
+                                    img.el.dom.src = serverOptions.basePath.http + '/api/file/download?path='+data.fullPath;
                                     var showSignetPhoto = form.down('[name=showSignetPhoto]');
                                     showSignetPhoto.show();
                                 }
@@ -325,7 +325,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
                                 if(data.id){
                                     var serverOptions = Ext.manifest.server;
                                     var img = myForm.down('[name=LogoPhoto]');
-                                    img.el.dom.src = serverOptions.basePath + '/api/file/download?path='+data.fullPath;
+                                    img.el.dom.src = serverOptions.basePath.http + '/api/file/download?path='+data.fullPath;
                                     var showLogoPhoto = form.down('[name=showLogoPhoto]');
                                     showLogoPhoto.show();
                                 }
@@ -414,7 +414,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
         var signet = form.down('[name=signet]').value;
         if(signet&&signet!=''){
             var img = form.down('[name=SignetPhoto]');
-            img.el.dom.src = serverOptions.basePath + '/api/file/download?path='+signet;
+            img.el.dom.src = serverOptions.basePath.http + '/api/file/download?path='+signet;
             var showSignetPhoto = form.down('[name=showSignetPhoto]');
             showSignetPhoto.show();
         }
@@ -422,7 +422,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
         var logoUrl = form.down('[name=logoUrl]').value;
         if(logoUrl&&logoUrl!=''){
             var img = form.down('[name=LogoPhoto]');
-            img.el.dom.src = serverOptions.basePath + '/api/file/download?path='+logoUrl;
+            img.el.dom.src = serverOptions.basePath.http + '/api/file/download?path='+logoUrl;
             var showLogoPhoto = form.down('[name=showLogoPhoto]');
             showLogoPhoto.show();
         }
@@ -472,7 +472,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
 
     downLoad:function(path){
         var serverOptions = Ext.manifest.server;
-        window.location.href = serverOptions.basePath + '/api/file/download?path='+path;
+        window.location.href = serverOptions.basePath.http + '/api/file/download?path='+path;
         //ajax 响应下载必须要创建一个form实例
         // if (!Ext.fly('ext-attach-download')) {  
 		// 	var frm = document.createElement('form');  

+ 125 - 301
frontend/saas-web/app/view/sys/power/GroupGrid.js

@@ -20,7 +20,14 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         expandTip:null,
 		showSummaryRow: false,
         startCollapsed: false,
-        groupHeaderTpl: '{name}'+'模块'
+        groupHeaderTpl: Ext.create('Ext.XTemplate',
+            '<div>{rows:this.formatName}</div>',
+            {
+                formatName: function(name) {
+                    return name[0].data.moduleName+'模块';
+                }
+            }
+        )
 	})],
     initId:0,
     dataUrl:'/api/account/role/power/resource',
@@ -43,313 +50,127 @@ Ext.define('saas.view.sys.power.GroupGrid', {
      markDirty: false
     },
     trackMouseOver: false,
-    columns: [{
-        header: '单据名称',
-        dataIndex: 'groupName',
-        xtype: '',
-        flex: 2,
-        stopSelection: false,
-        menuDisabled:true,
-    },{
-        header: '查询',
-        dataIndex: 'query',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('query');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
-                        }
-                    }
-                    rec.set('query',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
-            }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    }, {
-        header: '保存',
-        dataIndex: 'add',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('add');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
-                        }
-                    }
-                    rec.set('add',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
-            }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    },{
-        header: '启用/关闭',
-        dataIndex: 'update',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1.5,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('update');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
+    columns: {
+        defaults:{
+            onTitleElClick:function(a,b,c,d){
+                var me = this;
+                var dataIndex = this.dataIndex;
+                var records = me.ownerCt.ownerCt.store.data.items;
+                var isAllCheck = true;
+                Ext.Array.each(records,function(rec){
+                    var data = rec.get(dataIndex);
+                    if(data!=null&&(typeof data)=='boolean'){
+                        if(!data){
                             isAllCheck = false
                         }
                     }
-                    rec.set('update',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
-            }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    }, {
-        header: '删除',
-        dataIndex: 'delete',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('delete');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
+                });
+                Ext.Array.each(records,function(rec){
+                    var data = rec.get(dataIndex);
+                    if(data!=null&&(typeof data)=='boolean'){
+                        if(data!=!isAllCheck){
+                            rec.set(dataIndex,!isAllCheck)
                         }
                     }
-                    rec.set('delete',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
-            }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    }, {
-        header: '审核',
-        dataIndex: 'audit',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('audit');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
-                        }
-                    }
-                    rec.set('audit',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
-            }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    }, {
-        header: '反审核',
-        dataIndex: 'unAudit',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('unAudit');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
-                        }
-                    }
-                    rec.set('unAudit',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
-            }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    }, {
-        header: '导入',
-        dataIndex: 'fileImport',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('fileImport');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
-                        }
-                    }
-                    rec.set('fileImport',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
-            }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    }, {
-        header: '导出',
-        dataIndex: 'fileExport',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('fileExport');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
-                        }
-                    }
-                    rec.set('fileExport',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
+                });
+                me.setHeaderStatus(!isAllCheck);
+            },
+            doUpdateHeaderState: function(e) {
+                return true;
             }
         },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    }, {
-        header: '打印',
-        dataIndex: 'print',
-        xtype: 'checkcolumn',
-        headerCheckbox: true,
-        menuDisabled:true,
-        flex: 1,
-        stopSelection: false,
-        onTitleElClick:function(a,b,c,d){
-            var me = this;
-            var records = me.ownerCt.ownerCt.store.data.items;
-            var first = 'null',isAllCheck = true;
-            Ext.Array.each(records,function(rec){
-                var data = rec.get('print');
-                if(data!=null&&(typeof data)=='boolean'){
-                    if(first=='null'){
-                        first = data;
-                    }else{
-                        if(first!=data){
-                            isAllCheck = false
-                        }
-                    }
-                    rec.set('print',!data)
-                }
-            });
-            if(isAllCheck){
-                me.setHeaderStatus(!first)
+        items:[{
+            header: '单据名称',
+            dataIndex: 'groupName',
+            xtype: '',
+            flex: 2,
+            stopSelection: false,
+            menuDisabled:true,
+        },{
+            header: '查询',
+            dataIndex: 'query',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        }, {
+            header: '保存',
+            dataIndex: 'add',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        },{
+            header: '启用/关闭',
+            dataIndex: 'update',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1.5,
+            stopSelection: false,
+        }, {
+            header: '删除',
+            dataIndex: 'delete',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        }, {
+            header: '审核',
+            dataIndex: 'audit',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        }, {
+            header: '反审核',
+            dataIndex: 'unAudit',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        }, {
+            header: '导入',
+            dataIndex: 'fileImport',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        }, {
+            header: '导出',
+            dataIndex: 'fileExport',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        }, {
+            header: '打印',
+            dataIndex: 'print',
+            xtype: 'checkcolumn',
+            headerCheckbox: true,
+            menuDisabled:true,
+            flex: 1,
+            stopSelection: false,
+        },{
+            text: '其它',
+            flex: 2.7,
+            dataIndex:'other',
+            xtype: 'widgetcolumn',
+            menuDisabled:true,
+            producesHTML: false,
+            widget: {
+                xtype: 'powerotherfield',
+                bind:'{record.other}'
             }
-        },
-        doUpdateHeaderState: function(e) {
-            return true;
-        }
-    },{
-        text: '其它',
-        flex: 2.7,
-        dataIndex:'other',
-        xtype: 'widgetcolumn',
-        menuDisabled:true,
-        producesHTML: false,
-        widget: {
-            xtype: 'powerotherfield',
-            bind:'{record.other}'
-        }
-    }],
+        }]
+    },
 
     initComponent: function () {
         var me = this;
@@ -357,6 +178,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         me.store = Ext.create('Ext.data.Store',{
             fields:[
                 {name: 'groupId',type:'int'},
+                {name: 'moduleId',type:'int'},
                 {name: 'groupName',type:'string'},
                 {name: 'moduleName',type:'string'},
                 {name: 'add'},
@@ -376,7 +198,9 @@ Ext.define('saas.view.sys.power.GroupGrid', {
                     return other;
                 }}
             ],
-            groupField:'moduleName',
+            groupDir:'ASC',
+            groupField:'moduleId',
+            clearRemovedOnLoad : true,
             proxy: {
                 timeout:8000,
                 type: 'ajax',

+ 4 - 7
frontend/saas-web/app/view/sys/power/OtherField.js

@@ -2,19 +2,16 @@
  * Created by zhouy on 2018/11/8.
  */
 Ext.define('saas.view.sys.power.OtherField', {
-    extend: 'Ext.form.FieldContainer',
+    extend: 'Ext.form.CheckboxGroup',
     //extend: 'Ext.form.field.Text',
     alias: 'widget.powerotherfield',
-    layout: 'column',
-    defaults:{
-       xtype:'checkbox',
-       columnWidth:1
-    },
+    columns: 1,
+    vertical: true,
     initComponent:function(){
         var me=this;
         me.callParent(arguments);
     },
-    setHtml:function(v){
+    setValue:function(v){
         this.setItems(v);
     },
     setItems:function(v){

+ 1 - 1
frontend/saas-web/index.html

@@ -8,7 +8,7 @@
     <title>云进销存 - 优企云服</title>
     <link rel="icon" href="/resources/images/favicon.png" type="image/x-icon">
     <!-- 图片动画效果样式导入 -->
-    <link type="text/css" rel="stylesheet" href="/ext/packages/css/imagehover.css" />
+    <link type="text/css" rel="stylesheet" href="/resources/othcss/imagehover.css" />
 
     <!-- The line below must be kept intact for Sencha Cmd to build your application -->
     <script id="microloader" data-app="a20e1670-7932-41f6-8e9c-55b77cba3f26" type="text/javascript" src="bootstrap.js"></script>

+ 5 - 0
frontend/saas-web/resources/json/navigation.json

@@ -159,6 +159,11 @@
             "text": "资金转存",
             "addType": "money-fundtransfer-formpanel",
             "viewType": "money-fundtransfer-querypanel"
+        }, {
+            "id": "verification",
+            "text": "核销单",
+            "addType": "money-verification-formpanel",
+            "viewType": "money-verification-querypanel"
         }]
     }, {
         "text": "报表",

+ 0 - 0
frontend/saas-web/ext/packages/css/imagehover.css → frontend/saas-web/resources/othcss/imagehover.css