username@email.com
2023-02-28 67a0042c5f29e4bb0e0b82f6190f2bc51480b45c
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
@{
    ViewBag.Title = "CooperOrder";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var OrderType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.OrderType))';
 
        var users = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.users))';
        var Khlx = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Khlx))';
        var HuifangStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.HuifangStatus))';
        var PingjiaStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.PingjiaStatus))';
        loseherght = 60;
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            { label: '下单时间', name: 'XdTimeName', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '订单号', name: 'OrderNo', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
                }
            },
 
            { label: '订单类别', name: 'OrderTypeName', labtype: 'txt', hidden: false, width: 100  },
            { label: '客户名称', name: 'KhdwName', labtype: 'txt', hidden: false, width: 200 },
 
            { label: '数量', name: 'OrderNum', labtype: 'txt', hidden: false, width: 60 },
            { label: '单价', name: 'Price', labtype: 'txt', hidden: false, width: 60 },
 
            { label: '金额', name: 'Money', labtype: 'txt', hidden: false, width: 60 },
            {
                label: '受理', name: 'ShouliStatusName', labtype: 'txt', hidden: false, width: 60,
                formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.ShouliStatus == 'D') {
                        return "未受理";
                    } else {
                        return cellvalue;
                    }
 
                }
            },
            {
                label: '撤单', name: 'ChedanStatusName', labtype: 'txt', hidden: false, width: 60,
                formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.ChedanStatus == 'D') {
                        return "<a onclick=\"chedan('" + rowObject.Id + "')\"  >否</a>";
                    } else {
                        return cellvalue;
                    }
                }
            },
            {
                label: '撤单退还金额', name: 'Chedan', labtype: 'txt', hidden: false, width: 60
            },
            {
                label: '完工', name: 'WangongStatusName', labtype: 'txt', hidden: false, width: 60,
                formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.WangongStatus == 'D') {
                        return "否";
                    } else {
                        return cellvalue;
                    }
                }
            },
            {
                label: '送货', name: 'SonghuoStatusName', labtype: 'txt', hidden: false, width: 60,
                formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.SonghuoStatus == 'D') {
                        return "否";
                    } else {
                        return cellvalue;
                    }
                }
            },
            {
                label: '回访', name: 'HuifangStatusName', labtype: 'txt', hidden: false, width: 60,
                formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.HuifangStatus == 'D') {
                        return "未回访";
                    } else {
                        return cellvalue;
                    }
                }
            },
            {
                label: '评价', name: 'PingjiaStatusName', labtype: 'txt', hidden: false, width: 60,
                formatter: function (cellvalue, options, rowObject) {
                    if (rowObject.PingjiaStatus == 'D') {
                        return "未评价";
                    } else {
                        return cellvalue;
                    }
                }
            },
            { label: '优惠/元', name: 'Youhui', labtype: 'txt', hidden: false, width: 60 },
            {
                label: '打印', name: 'OrderType', labtype: 'txt', hidden: false, width: 60,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('" + rowObject.OrderNo.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Print?id=" + rowObject.Id + "')\"  >打印</a>";
 
 
                }
            },
        ];
        dataUrl = "/CooperOrder/GetListchedan";
        searchCol = [
            { label: '下单时间', name: 'XdTime', labtype: 'datearea', hidden: false },
            { label: '订单编号', name: 'OrderNo', labtype: 'txt', hidden: false },
            { label: '订单类型', name: 'OrderType', labtype: 'combox', hidden: false, data: JSON.parse(OrderType), cwidth: '5%', cccwidth: '8%' },
            { label: '业务经理', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(users), cwidth: '5%', cccwidth: '8%' },
            { label: '客户名称', name: 'KhdwName', labtype: 'txt', hidden: false },
            { label: '客户类型', name: 'Khlx', labtype: 'combox', hidden: false, data: JSON.parse(Khlx), cwidth: '5%', cccwidth: '8%' },
            { label: '回访', name: 'HuifangStatus', labtype: 'combox', hidden: false, data: JSON.parse(HuifangStatus), cwidth: '5%', cccwidth: '8%' },
            { label: '评价', name: 'PingjiaStatus', labtype: 'combox', hidden: false, data: JSON.parse(PingjiaStatus), cwidth: '5%', cccwidth: '8%' },
 
 
 
 
 
 
 
        ];
        var _pageAdd = function () {
            OpenWindow("新增订单", "98%", "90%", "/CooperOrder/Edit/");
        }
 
         function shouli (id) {
 
            // 1、打开弹出层
            var index = layer.open({
                type: 1,  //基本层类型
                icon: 0, //图标
                content: '确认受理?',   //内容
                shade: 0.3,  //遮罩,如果想定义别的颜色,可以shade:[0.5,'#fff']
                shadeClose: 1,   //是否点击遮罩关闭
                skin: 'demoClass',    //样式类名
                moveType: 1, //拖拽风格,默认为0(会有个过度的透明框)
                btn: ['确定', '取消'],    //按钮
                btn1: function () { //按钮一的回调
 
                    layer.close(index);
 
                    $.ajax({
                        type: "GET",
                        url: "/CooperOrder/Shouli?id=" + id,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
                           
                            if (data.Result) {
                                toastr.success("受理成功");
                                window._reloadPageData();
                            } else {
                                toastr.error("受理失败" + data.Message);
                            }
                        },
                        error: function () {
 
 
                            toastr.error("受理失败");
                        }
                    });
                },
                //                btn2:function(){    //按钮二的回调
                //
                //                }
            });
        }
 
        function chedan(id) {
            OpenWindow("撤单", "20%", "30%", "/CooperOrder/Chedan?id=" + id);
        }
 
        function huifang(id) {
            OpenWindow("回访", "20%", "30%", "/CooperOrder/Huifang?id=" + id);
        }
 
        function pingjia(id) {
            OpenWindow("评价", "20%", "30%", "/CooperOrder/Pingjia?id=" + id);
        }
 
 
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
 
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
        /**/
    }
}
    </script>
}
 
@section footerScripts{
    <script type="text/javascript">
 
 
 
 
 
    </script>
}