Browse Source

admin 2月22号

guojing 5 năm trước cách đây
mục cha
commit
774965d642

+ 11 - 11
admin-ui/app/whepi/tugou/dialogTugou.js

@@ -78,7 +78,7 @@ define(function (require) {
                 width: 900,
                 height: 35,
                 validType: 'isBlank',
-                readonly: context.isEdit != 1 ? true : false,
+                disabled: context.isEdit != 1 ? true : false,
                 onChange: function (data) {
                   queryGrid1(data);
                 },
@@ -93,7 +93,7 @@ define(function (require) {
               }, {id: '5', text: '其他服务'}],
               width: 450,
               height: 35,
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               required: true,
               onChange: function (data) {
 
@@ -101,14 +101,14 @@ define(function (require) {
             }, {
               name: 'tgPrice',
               label: '单价',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               maxlength: 6, validType: 'number',
               width: 450, height: 35,
             }],
             [{
               name: 'tgItemNum',
               label: '个人限额',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               maxlength: 6, validType: 'integer',
               width: 450, height: 35,
             },],
@@ -116,31 +116,31 @@ define(function (require) {
               name: 'tgGoods', label: '套餐描述',
               required: true, width: 900, height: 35,
               maxlength: 500,
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               height: '100px', multiline: true,
             }],
             [{
               name: 'tgMinNum',
               label: '最低配送',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               maxlength: 4, validType: 'integer',
               width: 450, height: 35,
             }, {
               name: 'tgMaxNum',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               label: '配送上限', validType: 'integer',
               maxlength: 4, width: 450, height: 35,
             }],
             [{
               name: 'tgEndTime',
               label: '需求截止时间',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit == 3 ? true : false,
               xtype: 'datetimebox',
               required: true, width: 450, height: 35,
             }, {
               name: 'tgDeliverTime',
               multiline: true,
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit == 3 ? true : false,
               xtype: 'datetimebox',
               label: '预计配货时间',
               required: true, width: 450, height: 35,
@@ -148,13 +148,13 @@ define(function (require) {
               {
                 name: 'tgPhoneNumber', validType: 'telNum',
                 label: '联系电话', width: 450, height: 35,
-                readonly: context.isEdit != 1 ? true : false,
+                disabled: context.isEdit != 1 ? true : false,
                 required: true, maxlength: 11,
               },
               {
                 name: 'tgSupplier', width: 450, height: 35,
                 label: '供应商', maxlength: 20, required: true,
-                readonly: context.isEdit != 1 ? true : false,
+                disabled: context.isEdit != 1 ? true : false,
               }],
             [
               {

+ 4 - 0
whepi-web/src/main/java/com/bofeng/dao/JmTuangouDao.java

@@ -5,8 +5,10 @@ import com.bofeng.entity.JmTuangou;
 import com.yvan.PageDb;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
+import org.joda.time.DateTime;
 import org.springframework.stereotype.Repository;
 
+import java.util.Date;
 import java.util.List;
 
 @Mapper
@@ -43,4 +45,6 @@ public interface JmTuangouDao extends BaseMapper<JmTuangou> {
 
   JmTuangou getSelectOneRoleId(@Param("jmId") Long jmId);
 
+  int updateRemarkByJmIdzbxd(@Param("jmId") Long jmId, @Param("remark") String remark, @Param("tgEndTime")Date tgEndTime, @Param("tgDeliverTime")Date tgDeliverTime);
+
 }

+ 1 - 1
whepi-web/src/main/java/com/bofeng/service/JmTuangouService.java

@@ -226,6 +226,6 @@ public class JmTuangouService {
 
   @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
   public int updateRemarkByJmIdzbxd(JmTuangou jmTuangou) {
-    return jmTuangouDao.updateRemarkByJmId(jmTuangou.getJmId(), jmTuangou.getRemark());
+    return jmTuangouDao.updateRemarkByJmIdzbxd(jmTuangou.getJmId(), jmTuangou.getRemark(),jmTuangou.getTgEndTime(),jmTuangou.getTgDeliverTime());
   }
 }

+ 3 - 0
whepi-web/src/main/resources/mapper/JmTuangouMapper.xml

@@ -98,5 +98,8 @@
         select * from jm_tuangou where jm_id=#{jmId}
     </select>
 
+    <update id="updateRemarkByJmIdzbxd">
+        update jm_tuangou set remark=#{remark},tg_end_time=#{tgEndTime},tg_deliver_time=#{tgDeliverTime}, time_update=now() where jm_id=#{jmId}
+    </update>
 
 </mapper>