|
@@ -132,26 +132,26 @@ define(function (require) {
|
|
|
},
|
|
|
{
|
|
|
text: '取消', iconCls: 'fa fa-times-circle', onClick: function () {
|
|
|
- debugger;
|
|
|
var row = $grid1.rowData();
|
|
|
if (!row) {
|
|
|
$.yvan.msg('请先选择一行数据');
|
|
|
return;
|
|
|
}
|
|
|
- if (row.pubStatus != 1) {
|
|
|
- $.yvan.msg('草稿状态才能发布');
|
|
|
+ if (row.tgStatus != 1) {
|
|
|
+ $.yvan.msg('在团状态才能取消');
|
|
|
return;
|
|
|
}
|
|
|
- $.yvan.confirm('是否' + "<span style='color: green; font-weight:bold;'>发布</span>" + '[' + (row.joName) + ']任务?', {
|
|
|
+ $.yvan.confirm('是否' + "<span style='color: red; font-weight:bold;'>取消</span>" + '[' + (row.tgTitle) + ']吗?', {
|
|
|
yes: function (index) {
|
|
|
$.yvan.ajax({
|
|
|
method: 'post',
|
|
|
- url: api('/record/CustInfo/updatePub'),///wms/inv/updateFaBuPC
|
|
|
+ url: api('/yeweihui/updateStatus'),
|
|
|
data: {
|
|
|
- joId: row.joId,
|
|
|
+ jmId: row.jmId,
|
|
|
+ tgStatus: 4,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
- $.yvan.msg('发布成功');
|
|
|
+ $.yvan.msg('取消成功');
|
|
|
$grid1.reload();
|
|
|
}
|
|
|
});
|
|
@@ -161,26 +161,26 @@ define(function (require) {
|
|
|
},
|
|
|
{
|
|
|
text: '完成', iconCls: 'fa fa-circle-o-notch', onClick: function () {
|
|
|
- debugger;
|
|
|
var row = $grid1.rowData();
|
|
|
if (!row) {
|
|
|
$.yvan.msg('请先选择一行数据');
|
|
|
return;
|
|
|
}
|
|
|
- if (row.pubStatus != 1) {
|
|
|
- $.yvan.msg('草稿状态才能发布');
|
|
|
+ if (row.tgStatus != 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
|
|
|
+ url: api('/yeweihui/updateStatus'),
|
|
|
data: {
|
|
|
- joId: row.joId,
|
|
|
+ jmId: row.jmId,
|
|
|
+ tgStatus: 2,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
- $.yvan.msg('发布成功');
|
|
|
+ $.yvan.msg('完成');
|
|
|
$grid1.reload();
|
|
|
}
|
|
|
});
|
|
@@ -190,8 +190,14 @@ define(function (require) {
|
|
|
},
|
|
|
{
|
|
|
text: '查看需求详情', iconCls: 'fa fa-search', onClick: function () {
|
|
|
+ var row = $grid1.rowData();
|
|
|
+ if (!row) {
|
|
|
+ $.yvan.msg('请先选择一行数据');
|
|
|
+ return;
|
|
|
+ }
|
|
|
$.yvan.showDialog(this,
|
|
|
require('/app/whepi/tugou/import.js')({
|
|
|
+ jmId: row.jmId,
|
|
|
confirm: function () {
|
|
|
$grid1.reload();
|
|
|
},
|
|
@@ -230,10 +236,22 @@ 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: 'tgTitle', title: '需求类型', maxWidth: 200, align: 'left',},
|
|
|
+ {field: 'tgTitle', title: '标题', maxWidth: 200, align: 'left'},
|
|
|
+ {
|
|
|
+ field: 'tgType', title: '需求类型', maxWidth: 200, align: 'left', formatter: function (value) {
|
|
|
+ if (value == 1) {
|
|
|
+ return '食蔬采购';
|
|
|
+ } else if (value == 2) {
|
|
|
+ return '药品采购';
|
|
|
+ } else if (value == 3) {
|
|
|
+ return '医疗服务';
|
|
|
+ } else if (value == 4) {
|
|
|
+ return '生活用品';
|
|
|
+ } else if (value == 5) {
|
|
|
+ return '其他服务';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
{field: 'tgSupplier', title: '组织者', maxWidth: 200,},
|
|
|
{
|
|
|
field: 'tgGoods',
|
|
@@ -279,6 +297,8 @@ define(function (require) {
|
|
|
},
|
|
|
},
|
|
|
{field: 'tgStatus', title: '状态', hidden: true},
|
|
|
+ {field: 'timeCreate', title: '创建时间', align: 'center'},
|
|
|
+ {field: 'timeUpdate', title: '修改时间', align: 'center'},
|
|
|
]
|
|
|
]
|
|
|
}
|