info.js
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
'use strict';
var $ = require('jquery'),
common=require('../common/common');
if(+$("#status").val()===200){
$(".btn-return").add(".btn-submit").show();
}else{
$(".btn-return").add(".btn-submit").remove();
}
var Bll={
toast:function(content,fn){
common.dialog.confirm("温馨提示",content,function(){
common.util.__ajax({
url:'/supplier/index/status',
data:fn()
},function(){
history.go(-1);
});
});
},
model:function(datas){
var _deform={
id:$("#id").val(),
status:$("#status").val(),
operations:$("#operations").val()
}
for(var key in datas){
_deform[key]=datas[key];
}
return _deform
}
}
//提交操作
$(document).on('click', '.btn-submit', function() {
Bll.toast("确定要审核通过吗?",function(){
return Bll.model({status:300});
});
});
//提交驳回
$(document).on('click', '.btn-return', function() {
Bll.toast("确定要驳回审核吗?",function(){
return Bll.model({status:900});
});
});
//冻结操作
$(document).on('click', '.btn-freeze', function() {
Bll.toast("确定要冻结审核吗?",function(){
return Bll.model({isFreeze:"Y",operations:3});
});
});
//解冻操作
$(document).on('click', '.btn-recovery', function() {
var that = this;
Bll.toast("确定要解冻审核吗?",function(){
return Bll.model({isFreeze:"N",operations:4});
});
});