complainDeal.zml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. ${sweet_alert_reuse_method()}
  2. <script>
  3. function showLargeImg(thisImg)
  4. {
  5. var dialog = new parent.Z.Dialog();
  6. dialog.shadow = true;
  7. dialog.title = "图片";
  8. dialog.fixed = true;
  9. dialog.url = "showLargeImg.htm?imgpath="+thisImg.src;
  10. dialog.width = parent.Z.D.clientWidth()-200;
  11. dialog.height = parent.Z.D.clientHeight()-200;
  12. dialog.execute();
  13. dialog.$background.remove();
  14. }
  15. function doRemoveImg()
  16. {
  17. Z("#divImg").remove();
  18. Z("#finishImgPath").remove();
  19. }
  20. (function(){
  21. var imgReader = function( item ){
  22. var blob = item.getAsFile(),
  23. reader = new FileReader();
  24. // 读取文件后将其显示在网页中
  25. reader.onload = function(e){
  26. var img = new Image();
  27. var result = e.target.result;
  28. Z("#imgData").text(result);
  29. img.src = result;
  30. img.id = "divImg";
  31. Z("#imgSrc").append(img);
  32. };
  33. // 读取文件
  34. reader.readAsDataURL(blob);
  35. };
  36. window.addEventListener( 'paste', function(e){
  37. // 添加到事件对象中的访问系统剪贴板的接口
  38. var clipboardData = e.clipboardData,
  39. i = 0,
  40. items, item, types;
  41. if(clipboardData){
  42. items = clipboardData.items;
  43. if( !items ){
  44. return;
  45. }
  46. item = items[0];
  47. // 保存在剪贴板中的数据类型
  48. types = clipboardData.types || [];
  49. for( ; i < types.length; i++ ){
  50. if( types[i] === 'Files' ){
  51. item = items[i];
  52. break;
  53. }
  54. }
  55. // 判断是否为图片数据
  56. if( item && item.kind === 'file' && item.type.match(/^image\//i) ){
  57. imgReader( item );
  58. }
  59. }
  60. });
  61. })();
  62. function doDealComplainOrder(){
  63. var imgData = Z("#imgData").text();//投诉截图
  64. if (Z.Validates.isEmpty(Z("#imgSrc").html()))
  65. {
  66. swal({title : "请将跟进截图粘贴至空白处",type : "warning",timer: 1500,width:300,showConfirmButton:false});
  67. return;
  68. }
  69. var ajax = new Z.Ajax();
  70. ajax.setClassName("ComplainDealPresenter");
  71. ajax.setMethodName("doDealComplainOrder");
  72. ajax.addParam("complainId",Z("#complainId").val());
  73. ajax.addParam("imgData",imgData);
  74. ajax.setFailureAlert();
  75. ajax.setSuccess(function(){
  76. swal({title:"处理成功",type:"success",timer: 1200,width:300,showConfirmButton:false}).then(function(){
  77. parent.location.reload();parent.Z.Dialog.close();
  78. });
  79. });
  80. ajax.setLoading("complainDeal", '<i class="z-font z-save"></i>正在处理',{disabled:true});
  81. ajax.execute();
  82. }
  83. </script>
  84. ${zhiqim_manager_content()}
  85. <input type="hidden" id="complainId" name="complainId" value="${order.getComplainId()}">
  86. <form name="theForm">
  87. <table class="z-table z-bordered z-pd6 z-bg-white z-text-left">
  88. <tr class="z-h40">
  89. <td align="center" width="150">客户旺旺:</td>
  90. <td width="140">${order.getBuyerNick()}</td>
  91. <td align="center" width="130">产品名称:</td>
  92. <td colspan="2">${order.getOrderText()}</td>
  93. </tr>
  94. <tr class="z-h40">
  95. <td align="center" width="150">店铺名称:</td>
  96. <td width="140">${order.getShopNick()}</td>
  97. <td align="center" width="130">设&nbsp;计&nbsp;师:</td>
  98. <td width="210">${order.getDesigner()}</td>
  99. <td align="left" colspan="1">录单时间:${Sqls.toDateTimeString(order.getCreateTime())}</td>
  100. </tr>
  101. <tr class="z-h40">
  102. <td align="center" width="150">责任部门:</td>
  103. <td width="190">${order.getUndertakeDept()}</td>
  104. <td align="center" width="130">投诉类型:</td>
  105. <td width="210">${order.getComplainType()}</td>
  106. <td align="left" width="300">店铺扣罚:${order.getShopPunishScore()} 分</td>
  107. </tr>
  108. <tr class="z-h40">
  109. <td align="center" width="150">处理方案:</td>
  110. <td width="190">${order.getDisposeProject()}</td>
  111. <td align="center" width="150">责任人:</td>
  112. <td width="210">${order.getUndertakePerson()}</td>
  113. <td width="300">
  114. <button type="button" class="z-button zi-bg-white zi-mg-l1" onclick="Z(this).find('zcover>i.z-checkbox').click()">
  115. <input type="checkbox" id="isSatrapAssist" name="isSatrapAssist" class="z-checkbox" data-class="${zmr_color_class}" <#if order.isSatrapAssist()>checked</#if> data-role="z-checkbox" onclick="Z.E.stop(); this.value=this.checked" disabled>
  116. 主管协助</button>
  117. </td>
  118. </tr>
  119. <tr class="z-h50">
  120. <td align="center" width="150">备注:</td>
  121. <td colspan="4">${order.getComplainSpecificText()}
  122. </td>
  123. </tr>
  124. <tr>
  125. <td align="center" width="200">受理截图</td>
  126. <td colspan="5" >
  127. <div style="display: flex;max-height: 100px;">
  128. <img src="${order.getDisposeImgPath()}" onclick="showLargeImg(this)" id="disposeImgPath">
  129. </div>
  130. </td>
  131. </tr>
  132. <tr class="z-h100">
  133. <td align="center" width="200">跟进截图:</td>
  134. <td colspan="5" style="position: relative;">
  135. <#if order.getComplainStatus() != 20><button type="button" class="z-button z-mg-l10 z-w60 z-cyan z-relative-right" onclick="doRemoveImg();" style="top:2px;left: 90%;position: absolute;">移除</button></#if>
  136. <div style="display:none" id="imgData"></div>
  137. <div id="imgSrc"></div>
  138. <div><img src="${order.getFinishImgPath()}" onclick="showLargeImg(this)" id="finishImgPath"></div>
  139. </td>
  140. </tr>
  141. <tr class="z-h100">
  142. <td align="center" width="200" style="border-top:none;"></td>
  143. <td style="border-top:none;" colspan="5"></td>
  144. </tr>
  145. </table>
  146. </form>
  147. ${zhiqim_manager_content_end()}
  148. <#-- 操作 -->
  149. <div class="z-fixed z-w100p z-h100 z-text-center" style="bottom:0;left:0">
  150. <div>
  151. <table class="z-table z-bordered z-pd6 z-text-left z-bg-white z-h40">
  152. <tr class="z-h40">
  153. <td align="center" colspan="3">订单受理人:<input type="text" value="${order.getComplainAddName()}" id="complainAddName" style="border:none;"></td>
  154. <td align="center" colspan="3">受理时间:<input type="text" value="${Sqls.toDateTimeString(order.getComplainAddTime())}" id="complainAddTime" style="border:none;"></td>
  155. </tr>
  156. </table>
  157. </div>
  158. <div class="z-w100p z-bg-gray z-pd-t10 z-h60">
  159. <#if order.getComplainStatus() != 20><button type="button" id="complainDeal" class="z-button ${zmr_color_class} z-large z-w150" onclick="doDealComplainOrder();">提交投诉单</button>&nbsp;&nbsp;</#if>
  160. <button type="button" class="z-button z-large z-mg-l10 z-w100" onclick="parent.Z.Dialog.close();">关闭</button>
  161. </div>
  162. </div>