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
| @{
| 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))';
| var Dispatch = [{ code: "1", label: "是" }, { code: "0", label: "否" }];
| 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: 100 },
| { label: '收货地址', name: 'ShrAddress', labtype: 'txt', hidden: false, width: 200 },
| { label: '联系人', name: 'Shr', labtype: 'txt', hidden: false, width: 100 },
| { label: '联系电话', name: 'ShrTel', labtype: 'txt', hidden: false, width: 100 },
| //{ label: '业务经理', name: 'Youhui', labtype: 'txt', hidden: false, width: 100 },
| {
| label: '派工专家', ExpertId: 'id', labtype: 'txt', hidden: false, width: 100,
| formatter: function (cellvalue, options, rowObject) {
| if ($.trim(rowObject.ExpertId) !== '') {
| return rowObject.ExpertName;
| } else {
| return '<a href="javascript:void(0)" onclick="ExpertDispatch(\'' + rowObject.OrderId + '\',\'' + rowObject.OrderNo+'\');"> <span style="background: #ECF3FF;"> 派工 </span> </a > ';
| }
| }
| },
|
| { label: '劳务费(元)', name: 'Money', labtype: 'txt', hidden: false, width: 100 },
|
| ];
| dataUrl = "/Expert/GetOrderList";
| searchCol = [
| { label: '下单时间', name: 'XdTime', labtype: 'datearea', hidden: false, cwidth: '5%', cccwidth: '15%'},
| { label: '订单编号', name: 'OrderNo', labtype: 'txt', hidden: false, cwidth: '5%', cccwidth: '8%' },
| { 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, cwidth: '5%', cccwidth: '15%'},
| { label: '客户类型', name: 'Khlx', labtype: 'combox', hidden: false, data: JSON.parse(Khlx), cwidth: '5%', cccwidth: '8%' },
| {
| label: '是否派工', name: 'isDispatch', labtype: 'combox', hidden: false, data: Dispatch /*JSON.parse(HuifangStatus)*/, cwidth: '5%', cccwidth: '8%'
| },
|
| ];
|
| function ExpertDispatch(orderid, orderNo) {
| OpenWindow("专家派工", "400px", "230px", "/Expert/Dispatch/?orderid=" + orderid);
| }
|
|
|
|
| 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>
| }
|
|