| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549 |
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>编辑工单</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link href="../css/mui.min.css" rel="stylesheet" />
- <!--<link rel="stylesheet" href="css/app.css" />-->
- <link href="../css/mui.picker.css" rel="stylesheet" />
- <link href="../css/mui.poppicker.css" rel="stylesheet" />
- <link rel="stylesheet" href="css/iconfont.css" />
- <link rel="stylesheet" href="css/inits.css" />
- <style>
- body {
- font-size: 14px;
- }
- .mui-bar-popover {
- width: 30%;
- }
- .mui-popover.mui-bar-popover .mui-table-view {
- width: 100%;
- }
-
- .mui-table-view .mui-table-view-cell>a:not(.mui-btn) {
- text-align: center;
- }
- .mui-table-view-cell {
- padding: 1px 15px!important;
- }
- .san {
- font-size: 14px;
- margin-right: 5px
- }
- .nav_a {
- border-right: 1px solid #ccc;
- }
- .radio_box {
- display: inline-block;
- }
- .mui-radio input[type=radio]:before {
- font-size: 20px;
- vertical-align: middle;
- }
- .mui-radio.mui-left input[type=radio] {
- line-height: 24px!important;
- }
- .mui-radio.mui-left label {
- padding-right: 1px!important;
- padding-left: 51px!important;
- }
- .ztext {
- width: 100%;
- margin: 0;
- border: 0;
- }
-
- .action {
- padding: 5px 15px;
- }
-
- .type_down {
- float: right!important;
- display: inline-block!important;
- vertical-align: middle!important;
- line-height: 42px;
- }
-
- .type_con {
- width: 55%!important;
- float: left!important;
- vertical-align: middle!important;
- display: inline-block!important;
- padding: 10px 0!important;
- }
-
- .label {
- width: 30%!important;
- padding: 11px 0px!important;
- }
-
- .get_yzm {
- padding: 5px!important;
- width: auto!important;
- }
-
- .yzm_con {
- float: left!important;
- width: 40%!important;
- }
-
- .mui-bar-nav {
- background-color: #00a1cb;
- }
-
- .mui-input-row label {
- text-align: -webkit-right;
- }
-
- .mui-input-row {
- font-size: 14px;
- }
-
- .mui-btn-block {
- padding: 10px;
- width: 100%;
- }
-
- .mui-input-row select {
- font-size: 14px;
- }
-
- .size-14 {
- font-size: 14px;
- }
-
- input {
- font-size: 14px;
- }
-
- p img {
- max-width: 100%;
- height: auto;
- }
-
- .img-box {
- float: left;
- width: 20%;
- height: 60px;
- margin: 2%;
- text-align: center;
- position: relative;
- }
-
- .img-box img {
- width: 100%;
- height: 100%;
- }
-
- .image-list {
- display: none;
- overflow: hidden;
- }
-
- .mui-preview-image.mui-fullscreen {
- position: fixed;
- z-index: 20;
- background-color: #000;
- }
-
- .mui-preview-header,
- .mui-preview-footer {
- position: absolute;
- width: 100%;
- left: 0;
- z-index: 10;
- }
-
- .mui-preview-header {
- height: 44px;
- top: 0;
- }
-
- .mui-preview-footer {
- height: 50px;
- bottom: 0px;
- }
-
- .mui-preview-header .mui-preview-indicator {
- display: block;
- line-height: 25px;
- color: #fff;
- text-align: center;
- margin: 15px auto 4;
- width: 70px;
- background-color: rgba(0, 0, 0, 0.4);
- border-radius: 12px;
- font-size: 16px;
- }
-
- .mui-preview-image {
- display: none;
- -webkit-animation-duration: 0.5s;
- animation-duration: 0.5s;
- -webkit-animation-fill-mode: both;
- animation-fill-mode: both;
- }
-
- .mui-preview-image.mui-preview-in {
- -webkit-animation-name: fadeIn;
- animation-name: fadeIn;
- }
-
- .mui-preview-image.mui-preview-out {
- background: none;
- -webkit-animation-name: fadeOut;
- animation-name: fadeOut;
- }
-
- .mui-preview-image.mui-preview-out .mui-preview-header,
- .mui-preview-image.mui-preview-out .mui-preview-footer {
- display: none;
- }
-
- .mui-zoom-scroller {
- position: absolute;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- left: 0;
- right: 0;
- bottom: 0;
- top: 0;
- width: 100%;
- height: 100%;
- margin: 0;
- -webkit-backface-visibility: hidden;
- }
-
- .mui-zoom {
- -webkit-transform-style: preserve-3d;
- transform-style: preserve-3d;
- }
-
- .mui-slider .mui-slider-group .mui-slider-item img {
- width: auto;
- height: auto;
- max-width: 100%;
- max-height: 100%;
- }
-
- .mui-android-4-1 .mui-slider .mui-slider-group .mui-slider-item img {
- width: 100%;
- }
-
- .mui-android-4-1 .mui-slider.mui-preview-image .mui-slider-group .mui-slider-item {
- display: inline-table;
- }
-
- .mui-android-4-1 .mui-slider.mui-preview-image .mui-zoom-scroller img {
- display: table-cell;
- vertical-align: middle;
- }
-
- .mui-preview-loading {
- position: absolute;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- display: none;
- }
-
- .mui-preview-loading.mui-active {
- display: block;
- }
-
- .mui-preview-loading .mui-spinner-white {
- position: absolute;
- top: 50%;
- left: 50%;
- margin-left: -25px;
- margin-top: -25px;
- height: 50px;
- width: 50px;
- }
-
- .mui-preview-image img.mui-transitioning {
- -webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease;
- transition: transform 0.5s ease, opacity 0.5s ease;
- }
-
- @-webkit-keyframes fadeIn {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
-
- @keyframes fadeIn {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
-
- @-webkit-keyframes fadeOut {
- 0% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
- }
-
- @keyframes fadeOut {
- 0% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
- }
-
- p img {
- max-width: 100%;
- height: auto;
- }
- .delcoin{
- position: absolute;
- right: -5px;
- top: -5px;
- color: #FF0000;
- font-size: 26px;
- }
- </style>
- </head>
- <body>
- <header class="mui-bar mui-bar-nav " style="padding-right: 15px;height: 50px;color: #fff;">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
- <h1 class="mui-center mui-title" style="color:#fff;">编辑工单</h1>
- </header>
- <div class="mui-content">
- <ul class="mui-table-view">
- <li class="mui-table-view-cell">
- <div class="mui-input-row">
- <label class="label">保密要求:</label>
- <div class="mui-input-row mui-radio mui-left radio_box">
- <label>保密</label>
- <input type="radio" type="radio" name="secret" value="1" />
- </div>
- <div class="mui-input-row mui-radio mui-left radio_box">
- <label>公开</label>
- <input type="radio" type="radio" name="secret" value="0" />
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell">
- <div class="mui-input-row">
- <label class="label">紧急程度:</label>
- <div class="mui-input-row mui-radio mui-left radio_box">
- <label>普通</label>
- <input type="radio" type="radio" name="jinji" value="1" />
- </div>
- <div class="mui-input-row mui-radio mui-left radio_box">
- <label>紧急</label>
- <input type="radio" type="radio" name="jinji" value="2" />
- </div>
- </div>
- </li>
- <li class="mui-table-view-cell" id="showUserPicker">
- <div class=" mui-input-row mui-select">
- <label class="label">诉求类型:</label>
- <!--<input type="text" id='userResult' class="ui-alert type_con" data-index="" readonly="readonly" />-->
- <select name="" id="userResult">
- </select>
- </div>
- </li>
- <li class="mui-table-view-cell">
- <div class="mui-input-row">
- <label class="label">诉求主题:</label>
- <input type="text" id="title" placeholder="请填写您的诉求主题">
- </div>
- </li>
- <li class="mui-table-view-cell">
- <div class="mui-input-row">
- <label class="label">内容:</label>
- <textarea class="ztext content size-14" name="" id="textarea" rows="3" cols="" placeholder="请详细描述您的问题和建议..."></textarea>
- </div>
- </li>
- <li class="mui-table-view-cell">
- <div class="mui-input-row">
- <label class="label">投诉地址:</label>
- <input type="text" id="AreaName" placeholder="请填写您的称呼">
- </div>
- </li>
- <li class="mui-table-view-cell">
- <div class="mui-input-row">
- <label class="label">投诉人:</label>
- <input type="text" id="name" placeholder="请填写您的称呼">
- </div>
- </li>
- <li class="mui-table-view-cell">
- <div class="mui-input-row">
- <label class="label">联系电话:</label>
- <input type="text" id="phone" placeholder="请填写联系电话">
- </div>
- </li>
- <!--<li class="mui-table-view-cell" style="padding-bottom: 20px;">
- <div id='image-list' class="row image-list"></div>
- </li>-->
- </ul>
- <p class="action">
- <i class="iconfont icon-gantanhao" style="margin-right: 5px;font-size: 20px;vertical-align: middle;"></i>
- <span style="color: #f81737;">以上内容都为必填内容,请如实填写</span>
- </p>
- <!--<button type="button" class="mui-btn mui-btn-primary mui-btn-block block_button">提交</button>-->
- <div style="padding: 10px;">
- <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block block_button submit">提交</button>
- </div>
- </div>
- <script src="../js/mui.min.js?"></script>
- <script src="../js/mui.picker.js"></script>
- <script src="../js/mui.poppicker.js"></script>
- <script src="../js/zepto.js"></script>
- <script src="../js/huayi.config.js"></script>
- <script src="../js/mui.zoom.js"></script>
- <script src="../js/mui.previewimage.js"></script>
- <script type="text/javascript">
- mui.init({
- swipeBack: false,
- })
- mui.previewImage();
- mui.plusReady(function() {
- var wv = plus.webview.currentWebview();
- var vText = wv.token;
- var name = wv.name;
- if(name) {
- Select();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder',
- async: false,
- data: {
- workorderid: name,
- "token": vText
- },
- dataType: 'json',
- success: function(result) {
- if(result.state.toLowerCase() == "success") {
- var Data = result.data.data;
- $("#name").val(Data[0].F_CusName);
- $("#AreaName").val(Data[0].AreaName + Data[0].F_SourceAddress);
- $("#phone").val(Data[0].F_CusPhone);
- $("#title").val(Data[0].F_ComTitle);
- $('.content').val(Data[0].F_ComContent);
- $("#userResult").val(Data[0].F_InfoType + '');
- $(' input[name="secret"][value="' + Data[0].F_IsProtect + '"]').prop("checked", "checked");
- $(' input[name="jinji"][value="' + Data[0].F_Level + '"]').prop("checked", "checked");
- //图片展示
- // if(Data[0].File) {
- // $(Data[0].File).each(function(i, n) {
- //// n.F_FileType == '.jpg' &&
- // if(n.F_FileType == '.png') {
- // alert(JSON.stringify(Data[0].File))
- // $('<div class="img-box">'+
- // '<span class="delcoin">x</span>'+
- // '<img src="' + n.F_FileUrl +
- // '" alt="" class="image-item" data-preview-src="" data-preview-group="1" /><div>').appendTo("#image-list");
- // $(".image-list").show();
- // } else if(n.F_FileType == '.docx') {
- // mui.toast('猜猜我是谁')
- // }
- // })
- // }
- }
- }
- });
- }
- $(".delcoin").on("tap",function(){
- $(this).parent(".img-box").hide();
- });
- //提交按钮
- $('.submit').on('tap', function() {
- if($('#name').val() == '') {
- mui.alert('请输入姓名!')
- } else if($('#phone').val() == '') {
- mui.alert('请输入联系电话!')
- } else if($('#title').val() == '') {
- mui.alert('请输入诉求主题!')
- } else if($('.content').val() == '') {
- mui.alert('请输入诉求内容!')
- } else {
- Submit()
- }
- })
- function Submit() {
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + 'WorkOrder/EditWorkOrder',
- async: true,
- data: {
- workorderid: name,
- isprotect: $('input[name="secret"]:checked').val(), //(0普通1保密)
- level: $('input[name="jinji"]:checked').val(), //=(1普通2紧急)
- content: $('.content').val(), //投诉内容
- cusname: $('#name').val(), //投诉人姓名
- cusphone: $('#phone').val(), //投诉人电话
- sourceaddress: $('#AreaName').val(), //详细地址
- type: $("#userResult").val(), //类型
- title: $("#title").val(),
- issubmit: 1, //=(0保存1保存并提交)
- token: vText
- },
- success: function(data) {
- var str = JSON.parse(data);
- if(str.state.toLowerCase() == "success") {
- mui.toast('修改成功!');
- var wobj = plus.webview.getWebviewById("WorkDetails");
- wobj.reload(true);
- }
- }
- });
- }
- function Select() {
- //工单类型
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListById?',
- async: false,
- data: {
- token: vText,
- id: 2
- },
- dataType: 'json',
- success: function(data) {
- var type_data = data.data;
- $(type_data).each(function(i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo("#userResult");
- })
- }
- });
- }
- });
- </script>
- </body>
- </html>
|