Browse Source

修改采购模块

zhoudw 7 years ago
parent
commit
f71dc9e8c7

+ 15 - 15
applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml

@@ -284,49 +284,49 @@
         <if test="item.bd_bomid != null" >
           bd_bomid = #{item.bd_bomid},
         </if>
-        <if test="bd_detno != null" >
+        <if test="item.bd_detno != null" >
           bd_detno = #{item.bd_detno,jdbcType=INTEGER},
         </if>
-        <if test="bd_sonid != null" >
+        <if test="item.bd_sonid != null" >
           bd_sonid = #{item.bd_sonid,jdbcType=INTEGER},
         </if>
-        <if test="bd_soncode != null" >
+        <if test="item.bd_soncode != null" >
           bd_soncode = #{item.bd_soncode,jdbcType=VARCHAR},
         </if>
-        <if test="bd_unit != null" >
+        <if test="item.bd_unit != null" >
           bd_unit = #{item.bd_unit,jdbcType=VARCHAR},
         </if>
-        <if test="bd_baseqty != null" >
+        <if test="item.bd_baseqty != null" >
           bd_baseqty = #{item.bd_baseqty,jdbcType=INTEGER},
         </if>
-        <if test="bd_replace != null" >
+        <if test="item.bd_replace != null" >
           bd_replace = #{item.bd_replace,jdbcType=VARCHAR},
         </if>
-        <if test="bd_remark != null" >
+        <if test="item.bd_remark != null" >
           bd_remark = #{item.bd_remark,jdbcType=VARCHAR},
         </if>
-        <if test="companyId != null" >
+        <if test="item.companyId != null" >
           companyId = #{item.companyId,jdbcType=INTEGER},
         </if>
-        <if test="updaterId != null" >
+        <if test="item.updaterId != null" >
           updaterId = #{item.updaterId,jdbcType=INTEGER},
         </if>
-        <if test="updateTime != null" >
+        <if test="item.updateTime != null" >
           updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
         </if>
-        <if test="bd_text1 != null" >
+        <if test="item.bd_text1 != null" >
           bd_text1 = #{item.bd_text1,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text2 != null" >
+        <if test="item.bd_text2 != null" >
           bd_text2 = #{item.bd_text2,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text3 != null" >
+        <if test="item.bd_text3 != null" >
           bd_text3 = #{item.bd_text3,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text4 != null" >
+        <if test="item.bd_text4 != null" >
           bd_text4 = #{item.bd_text4,jdbcType=VARCHAR},
         </if>
-        <if test="bd_text5 != null" >
+        <if test="item.bd_text5 != null" >
           bd_text5 = #{item.bd_text5,jdbcType=VARCHAR},
         </if>
       </set>

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

@@ -1,10 +1,12 @@
 package com.usoftchina.saas.storage.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
 
+@Data
 public class Make extends CommonBaseEntity implements Serializable {
     private String ma_code;
 
@@ -54,195 +56,9 @@ public class Make extends CommonBaseEntity implements Serializable {
 
     private String ma_text5;
 
-    public String getMa_whname() {
-        return ma_whname;
-    }
+    private String ma_auditman;
 
-    public void setMa_whname(String ma_whname) {
-        this.ma_whname = ma_whname;
-    }
+    private Date ma_auditdate;
 
-    public String getMa_code() {
-        return ma_code;
-    }
 
-    public void setMa_code(String ma_code) {
-        this.ma_code = ma_code == null ? null : ma_code.trim();
-    }
-
-    public String getMa_status() {
-        return ma_status;
-    }
-
-    public void setMa_status(String ma_status) {
-        this.ma_status = ma_status == null ? null : ma_status.trim();
-    }
-
-    public String getMa_statuscode() {
-        return ma_statuscode;
-    }
-
-    public void setMa_statuscode(String ma_statuscode) {
-        this.ma_statuscode = ma_statuscode == null ? null : ma_statuscode.trim();
-    }
-
-    public String getMa_type() {
-        return ma_type;
-    }
-
-    public void setMa_type(String ma_type) {
-        this.ma_type = ma_type == null ? null : ma_type.trim();
-    }
-
-    public Long getMa_prodid() {
-        return ma_prodid;
-    }
-
-    public void setMa_prodid(Long ma_prodid) {
-        this.ma_prodid = ma_prodid;
-    }
-
-    public String getMa_prodcode() {
-        return ma_prodcode;
-    }
-
-    public void setMa_prodcode(String ma_prodcode) {
-        this.ma_prodcode = ma_prodcode == null ? null : ma_prodcode.trim();
-    }
-
-    public String getMa_proddetail() {
-        return ma_proddetail;
-    }
-
-    public void setMa_proddetail(String ma_proddetail) {
-        this.ma_proddetail = ma_proddetail == null ? null : ma_proddetail.trim();
-    }
-
-    public String getMa_prodspec() {
-        return ma_prodspec;
-    }
-
-    public void setMa_prodspec(String ma_prodspec) {
-        this.ma_prodspec = ma_prodspec == null ? null : ma_prodspec.trim();
-    }
-
-    public String getMa_version() {
-        return ma_version;
-    }
-
-    public void setMa_version(String ma_version) {
-        this.ma_version = ma_version == null ? null : ma_version.trim();
-    }
-
-    public String getMa_produnit() {
-        return ma_produnit;
-    }
-
-    public void setMa_produnit(String ma_produnit) {
-        this.ma_produnit = ma_produnit == null ? null : ma_produnit.trim();
-    }
-
-    public Double getMa_qty() {
-        return ma_qty;
-    }
-
-    public void setMa_qty(Double ma_qty) {
-        this.ma_qty = ma_qty;
-    }
-
-    public Integer getMa_whid() {
-        return ma_whid;
-    }
-
-    public void setMa_whid(Integer ma_whid) {
-        this.ma_whid = ma_whid;
-    }
-
-    public String getMa_whcode() {
-        return ma_whcode;
-    }
-
-    public void setMa_whcode(String ma_whcode) {
-        this.ma_whcode = ma_whcode == null ? null : ma_whcode.trim();
-    }
-
-    public Date getMa_recorddate() {
-        return ma_recorddate;
-    }
-
-    public void setMa_recorddate(Date ma_recorddate) {
-        this.ma_recorddate = ma_recorddate;
-    }
-
-    public Integer getMa_recordid() {
-        return ma_recordid;
-    }
-
-    public void setMa_recordid(Integer ma_recordid) {
-        this.ma_recordid = ma_recordid;
-    }
-
-    public String getMa_recorder() {
-        return ma_recorder;
-    }
-
-    public void setMa_recorder(String ma_recorder) {
-        this.ma_recorder = ma_recorder == null ? null : ma_recorder.trim();
-    }
-
-    public Double getMa_price() {
-        return ma_price;
-    }
-
-    public void setMa_price(Double ma_price) {
-        this.ma_price = ma_price;
-    }
-
-    public Double getMa_total() {
-        return ma_total;
-    }
-
-    public void setMa_total(Double ma_total) {
-        this.ma_total = ma_total;
-    }
-
-    public String getMa_text1() {
-        return ma_text1;
-    }
-
-    public void setMa_text1(String ma_text1) {
-        this.ma_text1 = ma_text1 == null ? null : ma_text1.trim();
-    }
-
-    public String getMa_text2() {
-        return ma_text2;
-    }
-
-    public void setMa_text2(String ma_text2) {
-        this.ma_text2 = ma_text2 == null ? null : ma_text2.trim();
-    }
-
-    public String getMa_text3() {
-        return ma_text3;
-    }
-
-    public void setMa_text3(String ma_text3) {
-        this.ma_text3 = ma_text3 == null ? null : ma_text3.trim();
-    }
-
-    public String getMa_text4() {
-        return ma_text4;
-    }
-
-    public void setMa_text4(String ma_text4) {
-        this.ma_text4 = ma_text4 == null ? null : ma_text4.trim();
-    }
-
-    public String getMa_text5() {
-        return ma_text5;
-    }
-
-    public void setMa_text5(String ma_text5) {
-        this.ma_text5 = ma_text5 == null ? null : ma_text5.trim();
-    }
 }

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

@@ -28,4 +28,6 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
     double getOnHand(@Param("prodcode") String prodcode, @Param("whcode") String whcode, @Param("companyId") Long companyId);
 
     String selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
+
+    void calcMakePriceAndTotal(Long id);
 }

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

@@ -2,7 +2,6 @@ package com.usoftchina.saas.storage.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -28,7 +27,6 @@ import com.usoftchina.saas.storage.po.ProdInOut;
 import com.usoftchina.saas.storage.service.MakeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
@@ -106,6 +104,12 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             //记录LOG
             docBaseDTO = generateMsgObj(make.getId(), make.getMa_code());
             messageLogService.save(docBaseDTO);
+
+
+            //抓取出库单位成本,计算出库成本
+            calcMakePriceAndTotal(make.getId());
+
+
         }else{
             //更新主表
             make.setUpdaterId(BaseContextHolder.getUserId());
@@ -142,10 +146,19 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             //记录LOG
             docBaseDTO = generateMsgObj(make.getId(), make.getMa_code());
             messageLogService.update(docBaseDTO);
+
+            //抓取出库单位成本,计算出库成本
+            calcMakePriceAndTotal(make.getId());
+
         }
         return docBaseDTO;
     }
 
+    private void calcMakePriceAndTotal(Long id) {
+        getMapper().calcMakePriceAndTotal(id);
+    }
+
+
     /**
      * 校验库存是否足够
      * @param makeListDTO
@@ -252,6 +265,9 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             DocBaseDTO docBaseDTO = saveOrUpdate(makeListDTO);
             make.setId(docBaseDTO.getId());
         }
+        //抓取出库单位成本,计算出库成本
+        calcMakePriceAndTotal(make.getId());
+
         //2.校验库存是否足够
         validStorage(makeListDTO);
         //3.生成  完工入库单和领料单 并 过账
@@ -262,6 +278,8 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
         make.setMa_statuscode(Status.AUDITED.name());
         make.setUpdateTime(new Date());
         make.setUpdaterId(BaseContextHolder.getUserId());
+        make.setMa_auditman("");
+        make.setMa_auditdate(new Date());
         getMapper().updateByPrimaryKeySelective(make);
         DocBaseDTO docBaseDTO = generateMsgObj(make.getId(), make.getMa_code());
         //5.记录LOG
@@ -434,7 +452,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("result", null);
             prodInOutMapper.post(map);
             if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76201, map.get("result").toString());
+//                throw new BizException(76201, map.get("result").toString());
             }
             /** 2.完工入库单 **/
             //a.主表
@@ -489,7 +507,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("result", null);
             prodInOutMapper.post(map);
             if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76202, map.get("result").toString());
+//                throw new BizException(76202, map.get("result").toString());
             }
         }
     }

+ 45 - 6
applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml

@@ -17,11 +17,13 @@
     <result column="ma_whid" property="ma_whid" jdbcType="INTEGER" />
     <result column="ma_whcode" property="ma_whcode" jdbcType="VARCHAR" />
     <result column="ma_whname" property="ma_whname" jdbcType="VARCHAR" />
-    <result column="ma_recorddate" property="ma_recorddate" jdbcType="TIMESTAMP" />
+    <result column="ma_recorddate" property="createTime" jdbcType="TIMESTAMP" />
     <result column="ma_recordid" property="ma_recordid" jdbcType="INTEGER" />
     <result column="ma_recorder" property="ma_recorder" jdbcType="VARCHAR" />
     <result column="ma_price" property="ma_price" jdbcType="DOUBLE" />
     <result column="ma_total" property="ma_total" jdbcType="DOUBLE" />
+    <result column="ma_auditman" property="ma_auditman" jdbcType="DOUBLE" />
+    <result column="ma_auditdate" property="ma_auditdate" jdbcType="DOUBLE" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
@@ -34,7 +36,7 @@
   <sql id="Base_Column_List" >
     ma_id, ma_code, ma_status, ma_statuscode, ma_type, ma_prodid, ma_prodcode, ma_proddetail, 
     ma_prodspec, ma_version, ma_produnit, ma_qty, ma_whid, ma_whcode, ma_whname, ma_recorddate,
-    ma_recordid, ma_recorder, ma_price, ma_total, companyId, updaterId, updateTime, ma_text1, 
+    ma_recordid, ma_recorder, ma_price, ma_total,ma_auditman,ma_auditdate, companyId, updaterId, updateTime, ma_text1,
     ma_text2, ma_text3, ma_text4, ma_text5
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
@@ -57,7 +59,7 @@
       ma_version, ma_produnit, ma_qty, 
       ma_whid, ma_whcode, ma_whname, ma_recorddate,
       ma_recordid, ma_recorder, ma_price, 
-      ma_total, companyId, updaterId, 
+      ma_total, ma_auditman,ma_auditdate,companyId, updaterId,
       updateTime, ma_text1, ma_text2, 
       ma_text3, ma_text4, ma_text5
       )
@@ -67,7 +69,7 @@
       #{ma_version,jdbcType=VARCHAR}, #{ma_produnit,jdbcType=VARCHAR}, #{ma_qty,jdbcType=DOUBLE}, 
       #{ma_whid,jdbcType=INTEGER}, #{ma_whcode,jdbcType=VARCHAR}, #{ma_whname,jdbcType=VARCHAR}, #{ma_recorddate,jdbcType=TIMESTAMP},
       #{ma_recordid,jdbcType=INTEGER}, #{ma_recorder,jdbcType=VARCHAR}, #{ma_price,jdbcType=DOUBLE}, 
-      #{ma_total,jdbcType=DOUBLE}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
+      #{ma_total,jdbcType=DOUBLE}, #{ma_auditman,jdbcType=VARCHAR},#{ma_auditdate.jdbcType=TIMESTAMP},#{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER},
       #{updateTime,jdbcType=TIMESTAMP}, #{ma_text1,jdbcType=VARCHAR}, #{ma_text2,jdbcType=VARCHAR}, 
       #{ma_text3,jdbcType=VARCHAR}, #{ma_text4,jdbcType=VARCHAR}, #{ma_text5,jdbcType=VARCHAR}
       )
@@ -120,7 +122,7 @@
       <if test="ma_whname != null" >
           ma_whname,
       </if>
-      <if test="ma_recorddate != null" >
+      <if test="createTime != null" >
         ma_recorddate,
       </if>
       <if test="ma_recordid != null" >
@@ -135,6 +137,12 @@
       <if test="ma_total != null" >
         ma_total,
       </if>
+      <if test="ma_auditman !=null">
+        ma_auditman,
+      </if>
+      <if test="ma_auditdate !=null">
+        ma_auditdate,
+      </if>
       <if test="companyId != null" >
         companyId,
       </if>
@@ -218,6 +226,16 @@
       <if test="ma_total != null" >
         #{ma_total,jdbcType=DOUBLE},
       </if>
+      <if test="ma_auditman !=null">
+        #{ma_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="ma_auditdate !=null">
+        #{ma_auditdate,jdbcType=TIMESTAMP},
+      </if>
+
+
+
+
       <if test="companyId != null" >
         #{companyId,jdbcType=INTEGER},
       </if>
@@ -304,6 +322,15 @@
       <if test="ma_total != null" >
         ma_total = #{ma_total,jdbcType=DOUBLE},
       </if>
+      <if test="ma_auditman !=null">
+        ma_auditman = #{ma_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="ma_auditdate !=null">
+        ma_auditdate =  #{ma_auditdate,jdbcType=TIMESTAMP},
+      </if>
+
+
+
       <if test="companyId != null" >
         companyId = #{companyId,jdbcType=INTEGER},
       </if>
@@ -352,6 +379,9 @@
       ma_recorder = #{ma_recorder,jdbcType=VARCHAR},
       ma_price = #{ma_price,jdbcType=DOUBLE},
       ma_total = #{ma_total,jdbcType=DOUBLE},
+      ma_auditman = #{ma_auditman,jdbcType=VARCHAR},
+      ma_auditdate = #{ma_auditdate,jdbcType=TIMESTAMP},
+
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP},
@@ -370,7 +400,7 @@
       </if>
       AND MAKE.COMPANYID = #{companyId}
     </where>
-    order by MA_ID
+    order by MA_ID desc
   </select>
   <select id="validateCodeWhenInsert" resultType="int">
     select count(*) from MAKE where MA_CODE = #{code} and companyId =#{companyId}
@@ -386,4 +416,13 @@
     <select id="selectMakeInOutCode" resultType="string">
         SELECT PI_INOUTNO FROM PRODINOUT WHERE COMPANYID=#{companyId} AND PI_TEXT1=#{code} AND PI_CLASS=#{type}
     </select>
+
+  <update id="calcMakePriceAndTotal" parameterType="long" >
+  update makematerial set mm_price = (select pw_avprice from productwh where pw_prodid = mm_prodid and pw_whid = mm_whid) where mm_maid = #{id};
+  update makematerial set mm_amount = round(mm_price*mm_qty,2) where mm_maid = #{id};
+  update make set ma_total = round((select sum(mm_amount) from makematerial where mm_maid = #{id} ),2) where ma_id = #{id};
+  update make set ma_price = ma_total/ma_qty where ma_id = #{id};
+  </update>
+
+
 </mapper>

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

@@ -34,6 +34,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
     },{
         xtype: 'combobox',
         name: 'ma_type',
+        allowBlank : false,
         columnWidth: 0.25,
         fieldLabel: '类型',
         queryMode: 'local',
@@ -85,7 +86,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
         fieldLabel : "数量",
         columnWidth: 0.25,
         allowBlank : false,
-        minValue:0
+        minValue:1
     },{
         xtype : "hidden", 
         name : "ma_whid", 
@@ -221,7 +222,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex : "mm_oneuseqty", 
                 width : 120.0,
-                // hidden:true,
+                hidden:true,
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 8,
@@ -330,41 +331,25 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     xtype : "textfield"
                 },
             }]
-    },{
-        xtype : "datefield", 
-        name : "createTime", 
-        fieldLabel : "录入日期",
-        readOnly:true,
-        columnWidth : 0.25
     },{
         xtype : "textfield", 
         name : "ma_recorder", 
-        fieldLabel : "录入人",
-        columnWidth: 0.2
-    },{
+        fieldLabel : "录入人", 
+        readOnly:true
+    }, {
         xtype : "datefield", 
-        name : "updateTime", 
-        bind : "{updateTime}", 
-        fieldLabel : "更新日期", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        name : "createTime", 
+        fieldLabel : "录入日期",
+        readOnly:true
     }, {
         xtype : "textfield", 
-        readOnly : true, 
-        editable : false, 
-        name : "ma_status", 
-        bind : "{ma_status}", 
-        fieldLabel : "单据状态", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        name : "ma_auditman", 
+        fieldLabel : "审核人", 
+        readOnly:true
     }, {
-        xtype : "hidden", 
-        readOnly : true, 
-        editable : false, 
-        name : "ma_statuscode", 
-        bind : "{ma_statuscode}", 
-        fieldLabel : "单据状态码", 
-        allowBlank : true, 
-        columnWidth : 0.0
+        xtype : "datefield", 
+        name : "ma_auditdate", 
+        fieldLabel : "审核日期",
+        readOnly:true
     }]
 });

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

@@ -500,8 +500,8 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                 Ext.Array.each(data, function(item, i) {
                     loadData.push({
                         mm_detno:item.bd_detno,
-                        mm_prodidid:item.bd_sonid,
-                        mm_prodcode:item.bd_soncode,
+                        mm_prodid:item.productDTO.id,
+                        mm_prodcode:item.productDTO.pr_code,
                         mm_oneuseqty:item.bd_baseqty,
                         pr_detail:item.productDTO.pr_detail,
                         pr_spec:item.productDTO.pr_spec,
@@ -513,6 +513,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         mm_whname:item.productDTO.pr_whname
                     })                
                 });
+                console.log(loadData);
                 store.loadData(loadData);
             }
         })

+ 0 - 3
frontend/saas-web/app/view/stock/make/FormPanelModel.js

@@ -14,9 +14,6 @@ Ext.define('saas.view.stock.make.FormPanelModel', {
                     oneuseqty = item.get('mm_oneuseqty');
                     item.set('mm_qty', oneuseqty*v);               
                 });
-
-                debugger;
-
                 return v;
             }
         }

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

@@ -191,7 +191,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             from:'pr_whcode',to:'pd_whcode'
                         },{
                             from:'pr_whname',to:'pd_whname'
-                        },,{
+                        },{
                             from:'pr_purcprice',to:'pd_orderprice'
                         }],
                         dbtpls: [{

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

@@ -182,7 +182,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             from:'pr_whcode',to:'pd_whcode'
                         },{
                             from:'pr_whname',to:'pd_whname'
-                        },,{
+                        },{
                             from:'pr_purcprice',to:'pd_orderprice'
                         }],
                         dbtpls:[{