瀏覽代碼

admin 2月15号

guojing 5 年之前
父節點
當前提交
79bdb5f975

+ 1 - 1
admin-ui/app/whepi/mock/menu5.json

@@ -4,7 +4,7 @@
   "data": [
     {
       "id": "ENT10001",
-      "text": "团购系统",
+      "text": "资源需求管理",
       "href": "/app/whepi/tugou/tugou.js",
       "iconCls": "icon-blank fa fa-align-justify",
       "state": "close",

+ 60 - 44
admin-ui/app/whepi/tugou/dialogTugou.js

@@ -5,6 +5,7 @@ define(function (require) {
 
     var isLoading = false;
 
+
     function queryGrid1(data) {
       console.log(data);
     }
@@ -72,7 +73,7 @@ define(function (require) {
                 xtype: 'yvselect',
                 name: 'uptownIds',
                 multiple: true,
-                label: '小区',
+                label: '发布小区',
                 data: queryGrid2(),
                 width: 900,
                 height: 35,
@@ -82,62 +83,76 @@ define(function (require) {
                   queryGrid1(data);
                 },
               }],
-            [
-              {
-                name: 'tgTitle',
-                label: '组团标题',
-                required: true,
-                maxlength: 20,
-                readonly: context.isEdit ? true : false,
-                width: 450,
-                height: 35, validType: 'isBlank'
+            [{
+              xtype: 'yvselect',
+              name: 'uptownIds',
+              label: '需求类型',
+              data: [{id: '1', text: '食蔬采购'}, {id: '2', text: '药品采购'}, {id: '3', text: '医疗服务'}, {
+                id: '4',
+                text: '生活用品'
+              }, {id: '5', text: '其他服务'}],
+              width: 450,
+              height: 35,
+              onChange: function (data) {
+
               },
-              {
-                name: 'tgSupplier', label: '组织者', maxlength: 20,
-                width: 450, height: 35,
-                required: true, value: '指挥部',
+            },{
+              name: 'tgPrice',
+              label: '单价',
+              readonly: context.isEdit ? true : false,
+              maxlength: 4, validType: 'integer',
+              width: 450, height: 35,
+            }
+              /*{
+                name: 'tgTitle',
+                label: '发布标题',
                 readonly: true,
-              }],
+                value: value,
+                width: 450,
+                height: 35, validType: 'isBlank',
+                onRender: function () {
+                  $combRow = $(this);
+                }
+              }*/
+            ],
             [{
-              name: 'tgGoods', label: '团购套餐',
+              name: 'tgGoods', label: '套餐描述',
               required: true, width: 900, height: 35,
               maxlength: 50,
               readonly: context.isEdit ? true : false,
               height: '100px', multiline: true,
             }],
-            [{
+        /*    [{
               name: 'tgPrice',
               label: '单价',
               readonly: context.isEdit ? true : false,
               maxlength: 4, validType: 'integer',
               required: true, width: 450, height: 35,
-            },
-              {
-                name: 'tgMinNum',
-                label: '最小起订量',
-                readonly: context.isEdit ? true : false,
-                maxlength: 4, validType: 'integer',
-                required: true, width: 450, height: 35,
-              }],
+            }],*/
             [{
+              name: 'tgMinNum',
+              label: '最低配送',
+              readonly: context.isEdit ? true : false,
+              maxlength: 4, validType: 'integer',
+              required: true, width: 450, height: 35,
+            }, {
               name: 'tgMaxNum',
               readonly: context.isEdit ? true : false,
-              label: '最大上限', required: true, validType: 'integer',
+              label: '配送上限', required: true, validType: 'integer',
               maxlength: 4, width: 450, height: 35,
-            },
-              {
-                name: 'tgEndTime',
-                label: '团购截止时间',
-                readonly: context.isEdit ? true : false,
-                xtype: 'datetimebox',
-                required: true, width: 450, height: 35,
-              }],
+            }],
             [{
+              name: 'tgEndTime',
+              label: '需求截止时间',
+              readonly: context.isEdit ? true : false,
+              xtype: 'datetimebox',
+              required: true, width: 450, height: 35,
+            }, {
               name: 'tgDeliverTime',
               multiline: true,
               readonly: context.isEdit ? true : false,
               xtype: 'datetimebox',
-              label: '预计送货时间',
+              label: '预计货时间',
               required: true, width: 450, height: 35,
             },
               {
@@ -146,14 +161,14 @@ define(function (require) {
                 readonly: context.isEdit ? true : false,
                 required: true, maxlength: 11,
               }],
-            [{
-              name: 'remark',
-              label: '备注',
-              multiline: true,
-              width: 900,
-              height: '100px',
-              maxlength: 100,
-            }]
+            /* [{
+               name: 'remark',
+               label: '备注',
+               multiline: true,
+               width: 900,
+               height: '100px',
+               maxlength: 100,
+             }]*/
           ],
         }
       },
@@ -201,6 +216,7 @@ define(function (require) {
           }
         }
       ]
-    };
+    }
+      ;
   };
 });

+ 128 - 0
admin-ui/app/whepi/tugou/import.js

@@ -0,0 +1,128 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $grid1, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+
+
+    function queryGrid() {
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api('/sys/importExcel/getAllPeopleInfo'),
+        queryParams: queryForm
+      }, true);
+    }
+
+    var queryToolbar = {
+      xtype: 'toolbar',
+      title: '需求统计',
+      items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            $dlg.window('close');
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: '小区',
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}, width: 350
+        },
+      ]]
+    };
+
+    // 列表2增删改查按钮
+    var gridToolbar2 = {
+      xtype: 'toolbar',
+      title: '需求列表',
+      items: [
+        {
+          text: '导出excel', iconCls: 'fa fa-external-link-square', onClick: function () {
+            $.yvan.download({
+              method: 'get',
+              url: api('/sys/importExcel/errorPeopleInfo'),
+              fileName: '人员基本信息错误数据-' + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+            });
+          }
+        },
+      ]
+    };
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogimport',
+      title: '',
+      width: '100%',
+      height: '100%',
+      onOpen: function () {
+        $dlg = $(this);
+        queryGrid();
+      },
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+          },
+          autoSizeColumns: true,
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          idField: 'peopleId',
+          columns: [[
+            {field: 'peopleId', hidden: true},
+            {field: 'excelNum', title: '序号', align: "right", maxWidth: 100, },
+            {field: 'peopleCode', title: '小区名称', minWidth: 100, maxWidth: 200},
+            {field: 'name', title: '楼栋', minWidth: 100, maxWidth: 200},
+            {field: 'nativePlace', title: '单元', minWidth: 100, maxWidth: 200},
+            {field: 'birthday', title: '门牌号', minWidth: 100, maxWidth: 200},
+            {field: 'joIdAffiliated', title: '数量', minWidth: 100, maxWidth: 200},
+            {field: 'joIdCode', title: '联系方式', minWidth: 100, maxWidth: 200},
+            {field: 'phone', title: '需求备注', minWidth: 100, maxWidth: 200},
+
+          ]],
+        }
+      }
+    };
+  };
+});

+ 68 - 19
admin-ui/app/whepi/tugou/tugou.js

@@ -26,6 +26,7 @@ define(function (require) {
         return _datas;
       }
 
+
       // 输入搜索文本后点击回车按钮查询列表
       function enterQueryGrid1(e) {
         if (e.keyCode === 13) {
@@ -47,7 +48,7 @@ define(function (require) {
       }
 
       // 搜索按钮
-      var queryToolbarTitle = '团购信息管理';// 自行替换此参数
+      var queryToolbarTitle = '资源需求管理';// 自行替换此参数
       var queryToolbar = {
         xtype: 'toolbar', title: queryToolbarTitle, items: [
           {
@@ -112,7 +113,7 @@ define(function (require) {
         ]]
       };
 
-      var gridToolbarTitle = '团购信息列表';// 自行替换此参数
+      var gridToolbarTitle = '资源需求列表';// 自行替换此参数
       var gridToolbar = {
         xtype: 'toolbar',
         title: gridToolbarTitle,
@@ -130,27 +131,74 @@ define(function (require) {
             }
           },
           {
-            text: '取消', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            text: '取消', iconCls: 'fa fa-times-circle', onClick: function () {
+              debugger;
+              var row = $grid1.rowData();
+              if (!row) {
+                $.yvan.msg('请先选择一行数据');
+                return;
+              }
+              if (row.pubStatus != 1) {
+                $.yvan.msg('草稿状态才能发布');
+                return;
+              }
+              $.yvan.confirm('是否' + "<span style='color: green; font-weight:bold;'>发布</span>" + '[' + (row.joName) + ']任务?', {
+                yes: function (index) {
+                  $.yvan.ajax({
+                    method: 'post',
+                    url: api('/record/CustInfo/updatePub'),///wms/inv/updateFaBuPC
+                    data: {
+                      joId: row.joId,
+                    },
+                    success: function (data) {
+                      $.yvan.msg('发布成功');
+                      $grid1.reload();
+                    }
+                  });
+                }
+              });
+            }
+          },
+          {
+            text: '完成', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+              debugger;
               var row = $grid1.rowData();
               if (!row) {
                 $.yvan.msg('请先选择一行数据');
                 return;
               }
-              if (row.tgStatus != 1) {
-                $.yvan.msg('在团状态才能取消');
+              if (row.pubStatus != 1) {
+                $.yvan.msg('草稿状态才能发布');
                 return;
               }
+              $.yvan.confirm('是否' + "<span style='color: green; font-weight:bold;'>发布</span>" + '[' + (row.joName) + ']任务?', {
+                yes: function (index) {
+                  $.yvan.ajax({
+                    method: 'post',
+                    url: api('/record/CustInfo/updatePub'),///wms/inv/updateFaBuPC
+                    data: {
+                      joId: row.joId,
+                    },
+                    success: function (data) {
+                      $.yvan.msg('发布成功');
+                      $grid1.reload();
+                    }
+                  });
+                }
+              });
+            }
+          },
+          {
+            text: '查看需求详情', iconCls: 'fa fa-search', onClick: function () {
               $.yvan.showDialog(this,
-                require('/app/whepi/tugou/dialogTugou.js')({
-                  isEdit: true,
-                  jmId: row.jmId,
+                require('/app/whepi/tugou/import.js')({
                   confirm: function () {
                     $grid1.reload();
-                  }
+                  },
                 })
               );
             }
-          }
+          },
         ]
       };
 
@@ -183,12 +231,13 @@ define(function (require) {
                   [
                     {field: 'jmId', title: '信息id', hidden: true},
                     {field: 'uptown_id', title: '小区id', maxWidth: 200, align: 'left', hidden: true},
-                    {field: 'uptownName', title: '小区', maxWidth: 200, align: 'left',},
-                    {field: 'tgTitle', title: '组团标题', maxWidth: 200, align: 'left',},
+                    /*  {field: 'uptownName', title: '小区', maxWidth: 200, align: 'left',},*/
+                    {field: 'tgTitle', title: '标题', maxWidth: 200, align: 'left',},
+                    {field: 'tgTitle', title: '需求类型', maxWidth: 200, align: 'left',},
                     {field: 'tgSupplier', title: '组织者', maxWidth: 200,},
                     {
                       field: 'tgGoods',
-                      title: '团购套餐', maxWidth: 200,
+                      title: '套餐描述', maxWidth: 200,
                     },
                     {
                       field: 'tgPrice',
@@ -196,25 +245,25 @@ define(function (require) {
                     },
                     {
                       field: 'tgMinNum',
-                      title: '最小起订量',
+                      title: '最低配送(份)',
                       align: 'left',
                     },
                     {
                       field: 'tgMaxNum',
-                      title: '最大上限',
+                      title: '配送上限(份)',
                       align: 'left',
                     },
                     {
                       field: 'tgEndTime',
-                      title: '团购截止时间',
+                      title: '需求截止时间',
                       align: 'center',
                     },
                     {
-                      field: 'tgDeliverTime', title: '预计送时间', align: 'center',
+                      field: 'tgDeliverTime', title: '预计送时间', align: 'center',
                     },
 
-                    {field: 'tgPhoneNumber', title: '联系电话', align: 'center'},
-                    {field: 'remark', title: '备注', maxWidth: 200, align: 'left'},
+                    {field: 'tgPhoneNumber', title: '服务电话', align: 'center'},
+                    /*{field: 'remark', title: '备注', maxWidth: 200, align: 'left'},*/
                     {
                       field: 'tgStatus', title: '状态',
                       align: 'center', formatter: function (value) {

+ 2 - 2
whepi-ui/templates/home/buy.ftl

@@ -103,7 +103,7 @@
             $('#buyAll').append(' <a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form"\n' +
                     '                                             onclick=\'myBuyClick(' + JSON.stringify(v) + ')\'>\n' +
                     '                <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 4vh;">\n' +
-                    '                    <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' + v.tgTitle + '</div>\n' +
+                    '                    <div style="width: 30%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' +'【'+v.tgSupplier+'】'+ v.tgTitle + '</div>\n' +
                     '                    <div style="width: 20%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">\n' + v.count + '/' + v.tgMinNum + '</div>\n' +
                     '                    <div style="width: 35%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + sub(v.tgEndTime) + '</div>\n' +
                     '                    <div style="width: 15%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + getStatus(v.tgStatus) + '</div>\n' +
@@ -143,7 +143,7 @@
         function MybuyList(v) {
             $('#MyBuyAll').append('<a href="javascript:void(0);" style="color: grey;font-size: large" data-id="form" onclick=\'myBuyClick2(' + JSON.stringify(v) + ')\'>\n' +
                     '                        <div style="display: flex; flex-direction: row; text-align: center; font-size: x-small; line-height: 4vh;">\n' +
-                    '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' + v.tgTitle + '</div>\n' +
+                    '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px;text-align: left;">' +'【'+v.tgSupplier+'】'+ v.tgTitle + '</div>\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + timestampY(v.timeCreate) + '</div>\n' +
                     '                            <div style="width: 33%; overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size: 14px">' + getStatus(v.tgStatus) + '</div>\n' +
                     '                        </div>\n' + '                    </a>')

+ 2 - 0
whepi-web/src/main/java/com/bofeng/entity/Buy.java

@@ -54,5 +54,7 @@ public class Buy {
   private String tgPrice;
   @TableField(exist = false)
   private Integer tgMaxNum;
+  @TableField(exist = false)
+  private String tgSupplier;
 
 }

+ 4 - 4
whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java

@@ -65,10 +65,10 @@ public class UserOpenController {
                              @RequestParam(value = "userType", required = false, defaultValue = "0") Integer userType) throws JsonProcessingException {
         List<UserRole> list = new ArrayList<>();
         if (userId == 0) {
-            UserOpen userOpen = homeService.getUserOpen();
-            list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
-            /*list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
-            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);*/
+           /* UserOpen userOpen = homeService.getUserOpen();
+            list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());*/
+            list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
+            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);
             userId = userOpen.getUserId();
             model.put("user", userOpen);
             model.put("user_id", "\"" + userOpen.getUserId() + "\"");

+ 1 - 1
whepi-web/src/main/resources/application.yml

@@ -43,7 +43,7 @@ endpoints:
 #  whitelabel.enabled: false
 
 spring:
-  profiles.active: lll
+  profiles.active: guojing
 
   application:
     name: bofeng-web

+ 1 - 1
whepi-web/src/main/resources/mapper/BuyMapper.xml

@@ -19,7 +19,7 @@
     </select>
 
     <select id="MyGroup" resultType="com.bofeng.entity.Buy">
-        select DISTINCT a.tg_title,b.time_create,a.tg_status,a.jm_id,b.buy_status,b.buy_id
+        select DISTINCT a.tg_title,b.time_create,a.tg_status,a.jm_id,b.buy_status,b.buy_id,a.tg_supplier
         from  jm_tuangou a
         INNER JOIN jm_buy b on a.jm_id=b.jm_id
         where b.user_id=#{userId} and buy_status=1