|
@@ -31,14 +31,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage'], functi
|
|
|
{field: 'con_position', title: __('Con_position'),searchable: false},
|
|
|
{field: 'unit_type', title: __('Unit_type'),searchable: false},
|
|
|
{field: 'number', title: __('Number'),searchable: false},
|
|
|
+ {field: 'price', title: '单价',searchable: false},
|
|
|
+ {field: 'total', title: '总价',searchable: false},
|
|
|
{field: 'depart_id', title: '操作人部门',searchList: $.getJSON('auth/group/departList'),formatter:function (value, row) {
|
|
|
return row.usr_depart;
|
|
|
}},
|
|
|
{field: 'usr_nickname', title: '操作人'},
|
|
|
- {field: 'total', title: '总价'},
|
|
|
{field: 'pro_date', title: __('Pro_date'), operate:'RANGE', addclass:'datetimerange',searchable: false},
|
|
|
{field: 'ex_date', title: __('Ex_date'),searchable: false, operate:'RANGE', addclass:'datetimerange'},
|
|
|
- {field: 'operate', title: __('Operate'),searchable: false,
|
|
|
+ {field: 'operate', title: __('Operate'),searchable: false,visible: status!='contract' ? true : false,
|
|
|
table: table,
|
|
|
events: Controller.api.events.operate,
|
|
|
formatter: Controller.api.formatter.operate
|
|
@@ -66,6 +67,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage'], functi
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
edit: function () {
|
|
|
+ $.ajax({
|
|
|
+ url: 'intention/unitTypeList',
|
|
|
+ type: 'post',
|
|
|
+ dataType: 'json',
|
|
|
+ success: function success(res) {
|
|
|
+ var data = res.rows;
|
|
|
+ $('#c-unit_type').selectPage({
|
|
|
+ data : data,
|
|
|
+ });
|
|
|
+ console.log(data);
|
|
|
+ }
|
|
|
+ });
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
api: {
|
|
@@ -83,6 +96,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage'], functi
|
|
|
case 0: //保护中
|
|
|
buttons.push({name: 'giveup', text: '放弃', classname: 'btn btn-xs btn-danger btn-giveup'});
|
|
|
buttons.push({name: 'sign', text: '签单', classname: 'btn btn-xs btn-success btn-sign'});
|
|
|
+ buttons.push({name: 'follow', text:'跟进', classname: 'btn btn-xs btn-info btn-follow'});
|
|
|
+ buttons.push({name: 'edit', text:'修改', classname: 'btn btn-xs btn-warning btn-editone'});
|
|
|
break;
|
|
|
case 1:
|
|
|
buttons.push({name: 'again', text: '再次保护', classname: 'btn btn-xs btn-success btn-again'});
|
|
@@ -91,7 +106,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage'], functi
|
|
|
buttons.push({name: 'again', text:'再次保护', classname: 'btn btn-xs btn-success btn-again'});
|
|
|
break;
|
|
|
}
|
|
|
- buttons.push({name: 'follow', text:'跟进', classname: 'btn btn-xs btn-info btn-follow'});
|
|
|
|
|
|
return Table.api.buttonlink(this, buttons, value, row, index, 'operate');
|
|
|
},
|
|
@@ -176,13 +190,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage'], functi
|
|
|
content:res.data,
|
|
|
yes: function(index){
|
|
|
addFollow(row.id,row.unit_name);
|
|
|
+
|
|
|
layer.close(index); //如果设定了yes回调,需进行手工关闭
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 修改
|
|
|
+ 'click .btn-editone': function clickBtnEditone(e, value, row, index) {
|
|
|
+ e.stopPropagation();
|
|
|
+ e.preventDefault();
|
|
|
+ var options = $(this).closest('table').bootstrapTable('getOptions');
|
|
|
+ var open = Fast.api.open(options.extend.edit_url + (options.extend.edit_url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk], __('Edit'), {
|
|
|
+ title: '修改',
|
|
|
+ maxmin: false
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -210,5 +235,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage'], functi
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
return Controller;
|
|
|
});
|