(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["CancelRequest~f71cff67"],{"4b27":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"cancel"},[a("h2",[e._v(e._s(e.$lang.cancel_request))]),a("el-divider"),a("el-form",{ref:"elForm",attrs:{model:e.formData,rules:e.rules,"label-width":"150px"}},[a("el-row",{attrs:{gutter:15}},[a("el-form-item",{attrs:{"label-width":"0",prop:"tabs"}},[a("el-radio-group",{model:{value:e.formData.tabs,callback:function(t){e.$set(e.formData,"tabs",t)},expression:"formData.tabs"}},e._l(e.tabsOptions,(function(t,n){return a("el-radio-button",{key:n,attrs:{label:t.value,disabled:t.disabled}},[e._v(e._s(t.label))])})),1)],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"id",label:"ID"}}),a("el-table-column",{attrs:{prop:"relid",label:e.$lang.hostid}}),a("el-table-column",{attrs:{prop:"type",label:e.$lang.type},scopedSlots:e._u([{key:"default",fn:function(t){return["Immediate"===t.row.type?a("span",[e._v(e._s(e.$lang.immediately_cancel))]):e._e(),"Endofbilling"===t.row.type?a("span",[e._v(e._s(e.$lang.wait_bill_end))]):e._e()]}}])}),a("el-table-column",{attrs:{prop:"reason",label:e.$lang.cancel_reason}}),a("el-table-column",{attrs:{prop:"username",label:e.$lang.user_name}}),a("el-table-column",{attrs:{prop:"hostid",label:e.$lang.hostid}}),a("el-table-column",{attrs:{prop:"uid",label:e.$lang.user_id}}),a("el-table-column",{attrs:{prop:"domainstatus",label:e.$lang.host_state}}),a("el-table-column",{attrs:{prop:"nextduedate",label:e.$lang.due_time}}),a("el-table-column",{attrs:{prop:"productname",label:e.$lang.product_name}}),a("el-table-column",{attrs:{prop:"groupname",label:e.$lang.group_name}}),a("el-table-column",{attrs:{prop:"type_desc",label:e.$lang.display_type_description}}),a("el-table-column",{attrs:{prop:"product_desc",label:e.$lang.display_product_description}}),a("el-table-column",{attrs:{label:e.$lang.operate},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"small",type:"danger",icon:"el-icon-delete"},on:{click:function(a){return e.deleteRequest(t.row)}}},[e._v(e._s(e.$lang.delete))])]}}])})],1)],1)},r=[],l=(a("96cf"),a("1da1")),s=a("c2b8"),c={metaInfo:{title:window.zjmf_cw_lang.cancel_request},data:function(){return{tableData:[],formData:{tabs:0},rules:{tabs:[]},tabsOptions:[{label:this.$lang.cancel_request_pending,value:0},{label:this.$lang.audited_cancellation_request,value:1}]}},methods:{getData:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["e"])();case 2:a=t.sent,n=a.data,e.tableData=n.data;case 5:case"end":return t.stop()}}),t)})))()},getCancelData:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["d"])();case 2:if(a=t.sent,n=a.data,200===n.status){t.next=7;break}return e.$message.error(n.msg),t.abrupt("return");case 7:e.tableData=n.data;case 8:case"end":return t.stop()}}),t)})))()},deleteRequest:function(e){var t=this;return Object(l["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.$confirm(t.$lang.delete_continue,t.$lang.hint,{confirmButtonText:t.$lang.confirm,cancelButtonText:t.$lang.cancel,type:"warning"}).then((function(){Object(s["b"])(e.id).then((function(e){200!==e.data.status?t.$message.error(e.msg):(t.$message.success(e.msg),t.getData())}))})).catch((function(){}));case 1:case"end":return a.stop()}}),a)})))()}},computed:{tabsVal:function(){return this.formData.tabs}},watch:{tabsVal:function(e,t){0===e?this.getData():1===e&&this.getCancelData()}},created:function(){this.getData(),this.cancelReason()}},u=c,o=a("2877"),i=Object(o["a"])(u,n,r,!1,null,null,null);t["default"]=i.exports},c2b8:function(e,t,a){"use strict";a.d(t,"e",(function(){return r})),a.d(t,"d",(function(){return l})),a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return c})),a.d(t,"c",(function(){return u}));var n=a("a27e");function r(){return Object(n["a"])({url:"cancel_request/list"})}function l(){return Object(n["a"])({url:"cancel_request/cancellist"})}function s(e){return Object(n["a"])({url:"cancel_request/list",method:"delete",params:{id:e}})}function c(){return Object(n["a"])({url:"request_cancel_reason"})}function u(e){return Object(n["a"])({url:"request_cancel_reason_post",method:"post",data:e})}}}]);