Procházet zdrojové kódy

工单撤回,审批,首页工单数量

miaofuhao %!s(int64=4) %!d(string=před) roky
rodič
revize
25e6fab425

+ 16 - 2
web/YTSoft.BaseCallCenter.MVCWeb/Content/js/CallRecord/callworkflow.js

@@ -44,12 +44,26 @@ layui.use(['form', 'upload', 'layer', 'jquery', 'laydate'], function () {
44 44
   //日期
45 45
   laydate.render({
46 46
     elem: '#date',
47
-    min: 0
47
+    min: 0,
48
+    type: 'datetime',
49
+    calendar: true,
50
+    ready: function (date) {
51
+      $(".layui-laydate-footer [lay-type='datetime'].laydate-btns-time").click();
52
+      $(".laydate-main-list-0 .layui-laydate-content li ol li:last-child").click();
53
+      $(".layui-laydate-footer [lay-type='date'].laydate-btns-time").click();
54
+    }
48 55
   });
49 56
   //日期
50 57
   laydate.render({
51 58
     elem: '#date1',
52
-    min: 0
59
+    min: 0,
60
+    type: 'datetime',
61
+    calendar: true,
62
+    ready: function (date) {
63
+      $(".layui-laydate-footer [lay-type='datetime'].laydate-btns-time").click();
64
+      $(".laydate-main-list-0 .layui-laydate-content li ol li:last-child").click();
65
+      $(".layui-laydate-footer [lay-type='date'].laydate-btns-time").click();
66
+    }
53 67
   });
54 68
 
55 69
   upload.render({

+ 57 - 23
web/YTSoft.BaseCallCenter.MVCWeb/Content/js/WorkOrder/WorkOrderMyListHF.js

@@ -246,17 +246,33 @@ layui.use(['table', 'jquery'], function () {
246 246
         }
247 247
       });
248 248
     } else if (obj.event === 'withdrawDeal') {
249
-      layer.confirm('确认要撤回该行数据么?', function (index) {
250
-        $.ajax({
251
-          url: "/Order/ResetDealedWorkOrder",
252
-          type: "get",
253
-          async: false,//同步请求
254
-          contentType: "application/json",
255
-          dataType: "text",
256
-          cache: false,
257
-          data: "workOrderId=" + data.F_WORKORDERID,
258
-          success: function (thisResult, result) {
259
-
249
+      // /Order/ResetDealedWorkOrder
250
+      layer.open({
251
+        type:1,
252
+        titel:'确认撤回么?',
253
+        closeBtn:0,
254
+        shadeClose:true,
255
+        shade:false,
256
+        area:['300px','200px'],
257
+        content:'<div id="mydiv" style="margin-left:10px;margin-top:10px;">' +
258
+        '<textarea placeholder="请输入撤回内容" id="txtReason" style="width:280px;height:70px;resize:none;border-radius:6px;border-color:#ccc;" >' +
259
+        '</textarea></div>',
260
+        btn:['确定','取消'],
261
+          yes: function (index, layero){
262
+          var textReason = top.$('#txtReason').val();
263
+          layer.close(index)
264
+          $.ajax({
265
+            url: "/Order/ResetDealedWorkOrder",
266
+            type: "get",
267
+            async: false,//同步请求
268
+            contentType: "application/json",
269
+            dataType: "text",
270
+            cache: false,
271
+            data: {
272
+              workOrderId: data.F_WORKORDERID,
273
+                reason: textReason
274
+            },
275
+            success: function (thisResult, result) {
260 276
             if (thisResult == "True") {
261 277
               layer.open({
262 278
                 content: '提交撤回成功'
@@ -264,23 +280,41 @@ layui.use(['table', 'jquery'], function () {
264 280
                 , btn: ['确定']
265 281
                 , yes: function (index, layero) {
266 282
                   //执行重载
267
-                  recordtableMethod()
283
+                  table.reload('recordtable', {
284
+                    page: {
285
+                      curr: 1 //重新从第 1 页开始
286
+                    }
287
+                    , where: {
288
+                      types: 0,
289
+                      dateParty: $("#test10").val()
290
+                      , NowDateTime: new Date()
291
+                      , workorderNum: $("#workorderNum").val()
292
+                      , cusName: $("#cusName").val()
293
+                      , phoneNumber: $("#phoneNumber").val()
294
+                      , userInfo: $("#userInfo").val()
295
+                      , bussType: $("#bussType").val()
296
+                      , detailType: $("#bussDetail").val()
297
+                      , Content: $("#Content").val()
298
+                    }
299
+                  });
268 300
                   layer.close(index);
269 301
                 }
270 302
               });
271 303
             } else {
272
-              layui.layer.alert("撤回失败!", {
273
-                icon: 2
274
-              });
275
-
304
+                layui.layer.alert("提交撤回失败!", {
305
+                  icon: 2
306
+                });
307
+  
308
+              }
309
+            },
310
+            error: function (error) {
311
+              return false;
276 312
             }
277
-          },
278
-          error: function (error) {
279
-            return false;
280
-          }
281
-        });
282
-        layer.close(index);
283
-      });
313
+          });
314
+        },
315
+
316
+      })
317
+
284 318
     } else if (obj.event === 'withdrawVisit') {
285 319
       layer.open({
286 320
         type:1,

+ 5 - 5
web/YTSoft.BaseCallCenter.MVCWeb/Views/CallRecord/CallWorkFolw.cshtml

@@ -489,12 +489,12 @@
489 489
 
490 490
                                 @if (Model.WorkOrderBaseModel.F_REQUESTSERVICETIME != null)
491 491
                                 {
492
-                                    <input name="F_REQUESTSERVICETIME" id="date" autocomplete="off" value="@string.Format("{0:yyyy-MM-dd}", Model.WorkOrderBaseModel.F_REQUESTSERVICETIME)" placeholder="yyyy-MM-dd" class="layui-input" type="text" />
492
+                                    <input name="F_REQUESTSERVICETIME" id="date" autocomplete="off" value="@string.Format("{0:yyyy-MM-dd HH:mm:ss}", Model.WorkOrderBaseModel.F_REQUESTSERVICETIME)" placeholder="yyyy-MM-dd HH:mm:ss" class="layui-input" type="text" />
493 493
 
494 494
                                 }
495 495
                                 else
496 496
                                 {
497
-                                    <input name="F_REQUESTSERVICETIME" id="date" autocomplete="off" placeholder="yyyy-MM-dd" class="layui-input" type="text" />
497
+                                    <input name="F_REQUESTSERVICETIME" id="date" autocomplete="off" placeholder="yyyy-MM-dd HH:mm:ss" class="layui-input" type="text" />
498 498
 
499 499
                                 }
500 500
 
@@ -544,12 +544,12 @@
544 544
 
545 545
                                 @if (Model.WorkOrderBaseModel.F_RETURNVISITTIME != null)
546 546
                                 {
547
-                                    <input name="F_RETURNVISITTIME" id="date1" autocomplete="off" placeholder="yyyy-MM-dd" value="@string.Format("{0:yyyy-MM-dd}", Model.WorkOrderBaseModel.F_RETURNVISITTIME) " class=" layui-input" type="text" />
547
+                                    <input name="F_RETURNVISITTIME" id="date1" autocomplete="off" placeholder="yyyy-MM-dd HH:mm:ss" value="@string.Format("{0:yyyy-MM-dd HH:mm:ss}", Model.WorkOrderBaseModel.F_RETURNVISITTIME) " class=" layui-input" type="text" />
548 548
 
549 549
                                 }
550 550
                                 else
551 551
                                 {
552
-                                    <input name="F_RETURNVISITTIME" id="date1" autocomplete="off" placeholder="yyyy-MM-dd" class="layui-input" type="text" />
552
+                                    <input name="F_RETURNVISITTIME" id="date1" autocomplete="off" placeholder="yyyy-MM-dd HH:mm:ss" class="layui-input" type="text" />
553 553
 
554 554
                                 }
555 555
 
@@ -593,7 +593,7 @@
593 593
     </div>
594 594
 </form>
595 595
 
596
-<script src="/Content/js/CallRecord/callworkflow.js?v=0.9" type="text/javascript" charset="utf-8"></script>
596
+<script src="/Content/js/CallRecord/callworkflow.js?v=0.4" type="text/javascript" charset="utf-8"></script>
597 597
 <script>
598 598
     if(helper.cookies.get('F_REPAIRMANID')=="4"){
599 599
         $(".F_CustomerEName").show()

+ 51 - 15
web/YTSoft.BaseCallCenter.MVCWeb/Views/Main/Index.cshtml

@@ -95,20 +95,18 @@
95 95
     function PhoneCallOut(type, tel) {
96 96
       var usercode = document.getElementById("txtLabourwork").value;
97 97
       var extnumber = document.getElementById("txtPhoneNum").value;
98
-      //console.log("9" + tel.toString())
99 98
       $.ajax({
100 99
         type: 'get',
101 100
         url: '/CallRecord/GetCallOutprefix/?phone=' + tel,
102 101
         dataType: 'html',
103 102
         success: function (res) {
104 103
           //"Type":"MakeCall","AgentID":"8002","AgentExten":"1001","DestinationNumber":"9018937726571"
105
-          //console.log(res)
106 104
           obj = {};
107 105
           obj.Type = "MakeCall";
108 106
           obj.AgentID = usercode;
109 107
           obj.AgentExten = extnumber;
110 108
           obj.AgentGroup = "12";
111
-          obj.Header = "9";
109
+          obj.Header = res.toString();
112 110
           obj.DestinationNumber = res.toString() + tel.toString();
113 111
           Send();
114 112
         }
@@ -254,7 +252,6 @@
254 252
     function button_ReleaseAnswer() {//挂机
255 253
       var usercode = document.getElementById("txtLabourwork").value;
256 254
       var extnumber = document.getElementById("txtPhoneNum").value;
257
-      //console.log("挂断")
258 255
       obj = {};
259 256
       obj.Type = "DropCall";
260 257
       obj.AgentID = usercode;
@@ -1170,6 +1167,16 @@
1170 1167
                             </a>
1171 1168
                           </dd>
1172 1169
                         }
1170
+                        else if (childNode.F_FunctionId == 105)
1171
+                        {
1172
+
1173
+                          <dd>
1174
+                            <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
1175
+                              @childNode.F_Name
1176
+                              <sup class="layui-badge WorkOrderShenPiCount" style="margin-left:50px;">0</sup>
1177
+                            </a>
1178
+                          </dd>
1179
+                        }
1173 1180
                         else if (childNode.F_FunctionId == 18)
1174 1181
                         {
1175 1182
 
@@ -2041,7 +2048,6 @@
2041 2048
 
2042 2049
       //监听导航点击
2043 2050
       element.on('nav(demo)', function (elem) {
2044
-        //console.log(elem)
2045 2051
         // layer.msg(elem.text());
2046 2052
         var urlSrc = $(this).find("a").attr("data-url");
2047 2053
         var aname = $(this).find("a").attr("aname");
@@ -2246,12 +2252,10 @@
2246 2252
           data: null,
2247 2253
           success: function (result, status) {
2248 2254
             if (status) {
2249
-
2250 2255
               $(".WorkOrderMyDealedDataCount").html(result);
2251 2256
             }
2252 2257
           }
2253 2258
         });
2254
-
2255 2259
       }
2256 2260
       //已回访撤回
2257 2261
       if ($(".WorkOrderMyVisitedDataCount") != undefined) {
@@ -2271,6 +2275,25 @@
2271 2275
         });
2272 2276
 
2273 2277
       }
2278
+
2279
+      //审核工单
2280
+      if ($(".WorkOrderShenPiCount") != undefined) {
2281
+        $.ajax({
2282
+          url: "/Order/WorkOrderShenPiCount/",
2283
+          type: "get",
2284
+          contentType: "application/json",
2285
+          dataType: "text",
2286
+          cache: true,
2287
+          data: null,
2288
+          success: function (result, status) {
2289
+            if (status) {
2290
+
2291
+              $(".WorkOrderShenPiCount").html(result);
2292
+            }
2293
+          }
2294
+        });
2295
+      }
2296
+      
2274 2297
       //待办工单
2275 2298
       if ($(".orderCount") != undefined) {
2276 2299
         $.ajax({
@@ -2334,8 +2357,14 @@
2334 2357
     }
2335 2358
 
2336 2359
   }
2337
-  function allOrderTotal(){
2338
-    if ($(".orderCount") != undefined || $(".orderNeedCount") != undefined||$(".orderlistHFCount")!=undefined||$(".OrderMyDataDZCount")!=undefined||$(".WorkOrderMyDealedDataCount")!=undefined||$(".WorkOrderMyVisitedDataCount")!=undefined) {
2360
+  function allOrderTotal(){ 
2361
+    if ($(".orderCount") != undefined 
2362
+    || $(".orderNeedCount") != undefined
2363
+    || $(".orderlistHFCount")!= undefined
2364
+    || $(".OrderMyDataDZCount")!=undefined
2365
+    || $(".WorkOrderMyDealedDataCount")!=undefined
2366
+    || $(".WorkOrderShenPiCount")!=undefined
2367
+    || $(".WorkOrderMyVisitedDataCount")!=undefined) {
2339 2368
         
2340 2369
         var totalOrderCount = 0;
2341 2370
         var myOrderCount = 0;
@@ -2352,6 +2381,9 @@
2352 2381
         if($(".WorkOrderMyDealedDataCount")!= undefined){
2353 2382
           WorkOrderMyDealedDataCount = $(".WorkOrderMyDealedDataCount").html();
2354 2383
         }
2384
+        if($(".WorkOrderShenPiCount")!= undefined){
2385
+          WorkOrderShenPiCount = $(".WorkOrderShenPiCount").html();
2386
+        }
2355 2387
         if($(".WorkOrderMyVisitedDataCount")!= undefined){
2356 2388
           WorkOrderMyVisitedDataCount = $(".WorkOrderMyVisitedDataCount").html();
2357 2389
         }
@@ -2376,10 +2408,19 @@
2376 2408
         if(WorkOrderMyDealedDataCount==undefined){
2377 2409
           WorkOrderMyDealedDataCount = 0
2378 2410
         }
2411
+        if(WorkOrderShenPiCount==undefined){
2412
+          WorkOrderShenPiCount = 0
2413
+        }
2379 2414
         if(WorkOrderMyVisitedDataCount==undefined){
2380 2415
           WorkOrderMyVisitedDataCount = 0
2381 2416
         }
2382
-        totalOrderCount = parseInt(myOrderCount) + parseInt(myNeedCount) + parseInt(orderlistHFCount) + parseInt(OrderMyDataDZCount)+ parseInt(WorkOrderMyDealedDataCount)+parseInt(WorkOrderMyVisitedDataCount);
2417
+        totalOrderCount = parseInt(myOrderCount)  
2418
+        + parseInt(myNeedCount) 
2419
+        + parseInt(orderlistHFCount) 
2420
+        + parseInt(OrderMyDataDZCount)
2421
+        + parseInt(WorkOrderMyDealedDataCount)
2422
+        + parseInt(WorkOrderShenPiCount)
2423
+        + parseInt(WorkOrderMyVisitedDataCount);
2383 2424
         if(totalOrderCount){
2384 2425
           $(".totalOrderCount").html(totalOrderCount);
2385 2426
         }else{
@@ -2520,7 +2561,6 @@
2520 2561
 
2521 2562
   $(".lineState").click(function (event) {
2522 2563
     var lineNum=$(this).attr("data-attr")
2523
-    //console.log(lineNum)
2524 2564
     $(".setLine ul").removeClass("selectLineColor")
2525 2565
     $(this).addClass("selectLineColor")
2526 2566
     $.ajax({
@@ -2645,7 +2685,6 @@
2645 2685
                       url: '/CallRecord/GetCallOutprefix/?phone=' + keyNun,
2646 2686
                       dataType: 'html',
2647 2687
                       success: function (res) {
2648
-                        //console.log(res)
2649 2688
                         $(".telLine,.maskTask").hide();
2650 2689
                         ZYhj(res.toString() + keyNun.toString());
2651 2690
                         
@@ -2953,7 +2992,6 @@
2953 2992
       success: function (data) {
2954 2993
         
2955 2994
         if (eval('(' + data + ')').msg == "成功") {
2956
-        //console.log(eval('(' + data + ')').msg)
2957 2995
         var screenData = eval('(' + data + ')').data
2958 2996
           $("#F_CustomerId").val(screenData.WorkOrderBaseModel.CustomerBaseModel.F_CustomerId) //客户id
2959 2997
           $("#workOrderNum").val(screenData.WorkOrderBaseModel.F_WORKORDERID) //工单ID 
@@ -3094,7 +3132,6 @@
3094 3132
             }
3095 3133
             
3096 3134
             $(n.WorkTypeModelList).each(function(l, m) {
3097
-              //console.log(m.F_ParentName)
3098 3135
               htmls +='<dd><a href="javascript:;" data-value="'
3099 3136
               +m.F_Name+'" data-type="'
3100 3137
               +m.F_ParentName+'" data-url="'
@@ -3152,7 +3189,6 @@
3152 3189
       
3153 3190
       table.on('tool(demo111)', function (obj) {
3154 3191
         var data = obj.data;
3155
-        //console.log(data)
3156 3192
         if (obj.event === 'viewData') {
3157 3193
           layer.open({
3158 3194
             type: 2,

+ 1 - 1
web/YTSoft.BaseCallCenter.MVCWeb/Views/Order/WorkOrderShenPiList.cshtml

@@ -30,7 +30,7 @@
30 30
   </blockquote>
31 31
   <div class="layui-fluid">
32 32
     <div class=" layui-col-space15">
33
-      <input type="hidden" value="14" id="bussType">
33
+      <input type="hidden" value="" id="bussType">
34 34
       @if (Model.SeatFlag)
35 35
       {
36 36
         <input type="hidden" value="1" id="SeatFlag" />

+ 30 - 7
web/YTSoft.BaseCallCenter.MVCWeb/Views/Report/ReportWorkOrderInfo.cshtml

@@ -176,7 +176,7 @@
176 176
             }); 
177 177
 
178 178
             //查询
179
-            $("#btnSearch").click(function () {
179
+            $("#dateParty").click(function () {
180 180
                 //var dataParty = getWeekStartDate() + ' - ' + getWeekEndDate();
181 181
                 //$(".dayParty").val(dataParty);
182 182
                 LoadOneWeek($(".dayParty").val());
@@ -184,7 +184,30 @@
184 184
                 document.getElementById("divReportProduct").style.display = "none";
185 185
                 document.getElementById("divReportContent").style.display = "";
186 186
             });
187
-
187
+            $("#btnSearch").click(function(){
188
+
189
+              var spanTypeText = document.getElementById("spanType").innerHTML
190
+              var type = document.getElementById("txtType").value.toString();
191
+              var txtSeartDate = document.getElementById("txtSeartDate").value
192
+              switch(type){
193
+                  case "0":
194
+                    LoadOneWeek(txtSeartDate);
195
+                    break
196
+                  case "1":
197
+                    LoadTwoWeek(txtSeartDate)
198
+                    break
199
+                  case "2":
200
+                    LoadTwoWeek(txtSeartDate);
201
+                    break
202
+                  case "3":
203
+                    LoadQuarter(txtSeartDate);
204
+                    break
205
+                  case "4":
206
+                    LoadProduct(txtSeartDate);
207
+                    break
208
+              }
209
+              
210
+            })
188 211
             //导出
189 212
             $("#ExToExcel").click(function () {
190 213
                 var dataParty = $(".dayParty").val();
@@ -196,7 +219,7 @@
196 219
             $("#oneOneWeek").click(function () {
197 220
                 var dataParty = getWeekStartDate() + ' - ' + formatDate(now);
198 221
                 $(".dayParty").val(dataParty);
199
-                //document.getElementById("spanType").innerHTML = "周查询";
222
+                document.getElementById("spanType").innerHTML = "周查询";
200 223
                 document.getElementById("txtType").value = "0";
201 224
                 LoadOneWeek(dataParty);
202 225
 
@@ -208,7 +231,7 @@
208 231
             $("#product").click(function () {
209 232
                 var dataParty = getWeekStartDate() + ' - ' + formatDate(now);
210 233
                 $(".dayParty").val(dataParty);
211
-                //document.getElementById("spanType").innerHTML = "周查询";
234
+                document.getElementById("spanType").innerHTML = "周查询";
212 235
                 document.getElementById("txtType").value = "4";
213 236
                 LoadProduct(dataParty);
214 237
 
@@ -220,7 +243,7 @@
220 243
             $("#oneTwoWeek").click(function () { 
221 244
                 var dataParty = getTwoWeekStartDate() + ' - ' + formatDate(now);
222 245
                 $(".dayParty").val(dataParty); 
223
-                //document.getElementById("spanType").innerHTML = "两周查询";
246
+                document.getElementById("spanType").innerHTML = "两周查询";
224 247
                 document.getElementById("txtType").value = "1";
225 248
                 LoadTwoWeek(dataParty);
226 249
 
@@ -232,7 +255,7 @@
232 255
             $("#oneQuarter").click(function () {
233 256
                 var dataParty = getQuarterStartDate() + ' - ' + formatDate(now);
234 257
                 $(".dayParty").val(dataParty);
235
-                //document.getElementById("spanType").innerHTML = "季度查询";
258
+                document.getElementById("spanType").innerHTML = "季度查询";
236 259
                 document.getElementById("txtType").value = "2";
237 260
                 LoadQuarter(dataParty); 
238 261
 
@@ -244,7 +267,7 @@
244 267
             $("#oneYear").click(function () {
245 268
                 var dataParty = getYearStartDate() + ' - ' + formatDate(now);
246 269
                 $(".dayParty").val(dataParty);
247
-                //document.getElementById("spanType").innerHTML = "年度查询";
270
+                document.getElementById("spanType").innerHTML = "年度查询";
248 271
                 document.getElementById("txtType").value = "3";
249 272
                 LoadOneYear(dataParty);
250 273