فهرست منبع

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

zhuth 7 سال پیش
والد
کامیت
caf46d56ee
22فایلهای تغییر یافته به همراه143 افزوده شده و 48 حذف شده
  1. 2 4
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/config/WebConfig.java
  2. 3 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/config/WebConfig.java
  3. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  4. 5 5
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  5. 2 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/config/WebConfig.java
  6. 3 5
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebConfig.java
  7. 19 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  8. 3 4
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java
  9. 11 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java
  10. 2 3
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/config/WebConfig.java
  11. 1 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  12. 10 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  13. 4 0
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  14. 35 1
      applications/storage/storage-server/src/main/resources/mapper/MakematerialMapper.xml
  15. 2 2
      frontend/saas-web/app/model/sale/Saledetail.js
  16. 1 1
      frontend/saas-web/app/util/FormUtil.js
  17. 16 6
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  18. 1 1
      frontend/saas-web/app/view/document/product/FormController.js
  19. 1 1
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  20. 1 0
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  21. 2 2
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  22. 12 1
      frontend/saas-web/app/view/sys/config/FormPanel.js

+ 2 - 4
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,5 +48,4 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }

+ 3 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,6 +48,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }
 
+

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

@@ -30,6 +30,7 @@ import com.usoftchina.saas.page.PageRequest;
 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 org.springframework.util.StringUtils;
 
 import java.util.ArrayList;
@@ -98,6 +99,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Override
+    @Transactional
     public DocBaseDTO saveFormData(CustomerFormDTO data) {
         if (null == data || null == data.getMain()){
             throw new BizException(500, "数据为空,请填写后再保存");
@@ -223,6 +225,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         singleDelete(id);
     }
 
+    @Transactional
     private void singleDelete(Long id) {
         if (null!=id) {
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
@@ -249,6 +252,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Override
+    @Transactional
     public void deletecontact(Long id) {
         customercontactMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
@@ -257,6 +261,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Override
+    @Transactional
     public void deleteaddress(Long id) {
         customeraddressMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
@@ -264,6 +269,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         messageLogService.deleteDetail(docBaseDTO);
     }
 
+    @Transactional
     private DocBaseDTO singleClose(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
@@ -298,6 +304,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         }
     }
 
+    @Transactional
     private DocBaseDTO singleOpen(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {

+ 5 - 5
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -49,10 +49,10 @@
         <!--productonhand-->
         <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
         <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
-        <result column=" pr_brand" property="pr_brand" jdbcType="VARCHAR" />
-        <result column=" pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
-        <result column=" pr_zxbzs" property="pr_zxbzs" jdbcType="VARCHAR" />
-        <result column=" pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
+        <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+        <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
+        <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="VARCHAR" />
+        <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
         <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
         <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
     </resultMap>
@@ -475,7 +475,7 @@
         <result column="wh_name" property="rc_whName" jdbcType="VARCHAR" />
         <result column="pw_onhand" property="rc_number" jdbcType="DOUBLE" />
         <result column="pw_avprice" property="rc_price" jdbcType="DOUBLE" />
-        <result column="pw_amount" property="rc_amount" jdbcType="DOOUBLE" />
+        <result column="pw_amount" property="rc_amount" jdbcType="DOUBLE" />
     </resultMap>
     <select id="selectReserveCost" resultMap="ProdReserveCostResultMap">
         select * from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whcode=wh_code

+ 2 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,6 +48,5 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }
 

+ 3 - 5
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -50,5 +49,4 @@ public class WebConfig extends WebMvcConfigurationSupport{
         configurer.favorPathExtension(false);
     }
 
-}
-
+}

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

@@ -13,6 +13,7 @@ import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.api.ProductApi;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.page.PageRequest;
@@ -47,8 +48,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     private PurchasedetailMapper purchasedetailMapper;
     @Autowired
     private PurchaseListMapper purchaseListMapper;
-   /* @Autowired
-    private ProductApi productApi;*/
+    @Autowired
+    private ProductApi productApi;
     @Autowired
     private MaxnumberService maxnumberService;
     @Autowired
@@ -179,6 +180,12 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         baseDTO = getBaseDTOById(pu_id);
 
+        //取供应商汇率
+        getVendorTaxrate(pu_id);
+        //取价
+        getPrice(pu_id);
+
+
         //计算金额,未税单价,未税金额等
         calcPurchase(pu_id);
         //日志
@@ -186,6 +193,15 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         return baseDTO;
     }
 
+    private void getVendorTaxrate(Long pu_id) {
+        purchasedetailMapper.getVendorTaxrate(pu_id);
+    }
+
+    private void getPrice(Long pu_id) {
+        purchasedetailMapper.getPrice(pu_id);
+    }
+
+
     @Override
     @Transactional
     public void delete(Long id) {
@@ -474,7 +490,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //更新存在字段
         purchaseMapper.updateByPrimaryKeySelective(purchase);
         //更新最新采购单价
-        //productApi.updateLatestPurchasePrice(id);
+        productApi.updateLatestPurchasePrice(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
         messageLogService.audit(docBaseDTO);

+ 3 - 4
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -20,8 +20,9 @@ import java.util.List;
  * @create: 2018-10-30 11:20
  **/
 
+
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +41,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,6 +49,5 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }
 

+ 11 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.storage.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.entities.Product;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -35,6 +36,16 @@ public class MakeMaterial extends CommonBaseEntity implements Serializable {
 
     private String mm_remark;
 
+    private Product product;
+
+    public Product getProduct() {
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
     public Long getMm_maid() {
         return mm_maid;
     }

+ 2 - 3
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }

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

@@ -25,4 +25,5 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
 
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
+    double getOnHand(@Param("prodcode") String prodcode, @Param("whcode") String whcode, @Param("companyId") Long companyId);
 }

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

@@ -140,12 +140,21 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
         List<MakeMaterial> makeMaterialList = makeListDTO.getItems();
         if ("组装".equals(make.getMa_type())){
             //判断明细的库存是否足够
+            int i = 0;
             for(MakeMaterial makeMaterial : makeMaterialList){
+                i++;
                 double qty = makeMaterial.getMm_qty() * makeMaterial.getMm_oneuseqty();
+                double onHand = getMapper().getOnHand(makeMaterial.getMm_prodcode(),makeMaterial.getMm_whcode(), BaseContextHolder.getCompanyId());
+                if(onHand < qty){
+                    throw new BizException(79402, "行" + i + "库存不足");
+                }
             }
         }else if ("拆件".equals(make.getMa_type())){
             double qty = make.getMa_qty();
-
+            double onHand = getMapper().getOnHand(make.getMa_prodcode(),make.getMa_whcode(),BaseContextHolder.getCompanyId());
+            if(onHand < qty){
+                throw new BizException(79402, make.getMa_prodcode() + ":库存不足");
+            }
         }
     }
 

+ 4 - 0
applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml

@@ -367,4 +367,8 @@
   <select id="validateCodeWhenUpdate" resultType="int" >
     select count(*) from MAKE where MA_CODE = #{code} and MA_ID != #{id} and companyId =#{companyId}
   </select>
+
+    <select id="getOnHand" resultType="double">
+        SELECT PW_ONHAND FROM PRODUCTWH WHERE PW_PRODCODE=#{prodcode} AND PW_WHCODE=#{whcode} and COMPANYID=#{companyId}
+    </select>
 </mapper>

+ 35 - 1
applications/storage/storage-server/src/main/resources/mapper/MakematerialMapper.xml

@@ -18,6 +18,40 @@
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <association property="product" jdbcType="com.usoftchina.saas.document.entities.Product">
+        <id column="pr_id" property="id" jdbcType="INTEGER" />
+        <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />
+        <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
+        <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
+        <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
+        <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
+        <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
+        <result column="pr_whid" property="pr_whid" jdbcType="INTEGER" />
+        <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
+        <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
+        <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER" />
+        <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
+        <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+        <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE" />
+        <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE" />
+        <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE" />
+        <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER" />
+        <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR" />
+        <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
+        <result column="pr_docdate" property="pr_docdate" jdbcType="TIMESTAMP" />
+        <result column="pr_recordmanid" property="pr_recordmanid" jdbcType="INTEGER" />
+        <result column="pr_recordman" property="pr_recordman" jdbcType="VARCHAR" />
+        <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
+        <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
+        <result column="companyId" property="companyId" jdbcType="INTEGER" />
+        <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+        <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+        <result column="pr_text1" property="pr_text1" jdbcType="VARCHAR" />
+        <result column="pr_text2" property="pr_text2" jdbcType="VARCHAR" />
+        <result column="pr_text3" property="pr_text3" jdbcType="VARCHAR" />
+        <result column="pr_text4" property="pr_text4" jdbcType="VARCHAR" />
+        <result column="pr_text5" property="pr_text5" jdbcType="VARCHAR" />
+    </association>
   </resultMap>
   <sql id="Base_Column_List" >
     mm_id, mm_maid, mm_detno, mm_prodid, mm_prodcode, mm_whid, mm_whcode, mm_price, mm_oneuseqty, 
@@ -215,7 +249,7 @@
     where mm_id = #{id}
   </update>
   <select id="selectByFK" resultMap="BaseResultMap">
-    SELECT * FROM MAKEMATERIAL WHERE MM_MAID=#{id} AND COMPANYID={companyId}
+    SELECT * FROM MAKEMATERIAL LEFT JOIN PRODUCT ON PR_ID=MA_PRODID AND MAKEMATERIAL.COMPANYID=PRODUCT.COMPANYID WHERE MM_MAID=#{id} AND MAKEMATERIAL.COMPANYID={companyId}
   </select>
   <delete id="deleteByFK">
     DELETE FROM MAKEMATERIAL WHERE MM_MAID=#{id} AND COMPANYID={companyId}

+ 2 - 2
frontend/saas-web/app/model/sale/Saledetail.js

@@ -5,8 +5,8 @@ Ext.define('saas.model.sale.Saledetail', {
         { name: 'sd_detno', type: 'int' },
         { name: 'id', type: 'int' },
         { name: 'sd_prodcode', type: 'string' },
-        { name: 'sd_qty', type: 'int' },
-        { name: 'sd_yqty', type: 'int' },
+        { name: 'sd_qty', type: 'float' },
+        { name: 'sd_yqty', type: 'float' },
         { name: 'sd_price', type: 'float' },
         { name: 'sd_taxrate', type: 'float' },
         { name: 'sd_total', type: 'float' },

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

@@ -221,7 +221,7 @@ Ext.define('saas.util.FormUtil', {
                             var detnoColumn = grid.detnoColumn;
                             var datas = [];
                             
-                            Ext.Array.each(new Array(3), function() {
+                            Ext.Array.each(new Array(10), function() {
                                 detno += 1;
                                 var data = {};
                                 data[detnoColumn] = detno;

+ 16 - 6
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -42,7 +42,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                             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="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';
+                                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;
@@ -68,11 +68,21 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                 }
                 //加载数据
                 var data,dbCondition=[];
-                if(me.dbtplcondition){
-                    dbCondition = [{
-                        type: 'condition',
-                        value:me.dbtplcondition,
-                    }];
+                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 ";
+                        }
+                    }
+                    dbtplcondition = "(" + dbtplcondition.substring(0,dbtplcondition.length-4) + ")";
+                    if(dbtplcondition.length>0){
+                        dbCondition = [{
+                            type: 'condition',
+                            value:dbtplcondition
+                        }];
+                    }
                 }
                 //添加默认条件
                 if(me.defaultCondition) {

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

@@ -86,7 +86,7 @@ Ext.define('saas.view.document.product.FormController', {
                         defaultCondition:"wh_statuscode='OPEN'",
                         //联想设置
                         dbtpls:[{
-                            field:'wh_code',width:100
+                            field:'wh_code',width:180
                         },{
                             field:'wh_description',width:100
                         }],

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

@@ -15,7 +15,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         defaultCondition:"ve_statuscode='OPEN'",
                         //赋值 
                         dbfinds:[{
-                            from:'id',to:'pu_vendid'
+                            from:'id',to:'pu_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pu_vendcode'
                         },{

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

@@ -133,6 +133,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "已转数", 
                 dataIndex : "sd_yqty", 
                 width : 120.0, 
+                hidden : true,
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 2

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

@@ -90,11 +90,11 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
             text: '客户编号',
             dataIndex: 'sa_custcode',
-            width: 120
+            width: 150
         }, {
             text: '客户名称',
             dataIndex: 'sa_custname',
-            width: 120
+            width: 180
         }, {
             text: '审核状态',
             dataIndex: 'sa_status',

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

@@ -110,5 +110,16 @@ Ext.define('saas.view.sys.config.FormPanel', {
         allowBlank : true, 
         editable:false,
         columnWidth : 0.25
-    }]
+    }],
+
+    initComponent: function () {
+        var me = this,
+        viewModel = me.getViewModel();
+
+        viewModel.set('createTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
+        viewModel.set('updateTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
+        viewModel.setFormulas(o);
+        viewModel.set(statusCodeField, auditTexts.unAuditCode);
+        me.callParent(arguments);
+    }
 });