chunk-c2e9.0d8d468d.js
14.5 KB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c2e9","m1cH"],{"2BY2":function(e,r,a){},"9uUW":function(e,r,a){"use strict";var t=a("NKHs");a.n(t).a},AhPl:function(e,r,a){"use strict";var t=a("fALF");a.n(t).a},NKHs:function(e,r,a){},WEEz:function(e,r,a){"use strict";var t=a("Kw5r");t.default.directive("dialogDrag",{bind:function(e,r,a,t){var n,c,i=-1<e.className.indexOf("dialogDragNoHeader")?e.querySelector(".el-tabs__header"):e.querySelector(".el-dialog__header");if(n="el-tabs__header is-top"==i.className?(c=!0,document.querySelectorAll(".el-dialog")[r.value]):(c=!1,e.querySelector(".el-dialog")),i.style.cursor="move",n){var d=n&&n.currentStyle||window.getComputedStyle(n,null);i.onmousedown=function(e){var t=e.clientX-(c?0:i.offsetLeft),l=e.clientY-(c?0:i.offsetTop),o=void 0,s=void 0;s=d.left.includes("%")?(o=+document.body.clientWidth*(+d.left.replace(/\%/g,"")/100),+document.body.clientHeight*(+d.top.replace(/\%/g,"")/100)):(o=+d.left.replace(/\px/g,""),+d.top.replace(/\px/g,"")),document.onmousemove=function(e){var r=e.clientX-t,a=e.clientY-l;n.style.left=r+o+"px",n.style.top=a+s+"px"},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}}}),t.default.directive("dialogDragWidth",{bind:function(r,e,a,t){var l=e.value.$el.querySelector(".el-dialog");r.onmousedown=function(e){var a=e.clientX-r.offsetLeft;document.onmousemove=function(e){e.preventDefault();var r=e.clientX-a;l.style.width=r+"px"},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}})},Xdmn:function(e,r,a){"use strict";a.r(r);var t=a("P2sY"),o=a.n(t),l=a("4d7F"),s=a.n(l),n=a("m1cH"),c=a.n(n),i=a("7NVX"),d=a("hZMg"),u={name:"AfterEdit",components:{AddDialog:i.a},props:{params:{type:Object,default:function(){return{}}},fn:{type:Function}},data:function(){return new Date,new Date("2017-12-31"),{loading:!0,AFTERTYPE:this.$Constants.AFTERTYPE,pickerOption:{},ruleForm:{afterType:1,afterTypeName:1,storeName:"",contactName:"",contactPhone:"",contactProvince:void 0,contactAddress:"",serviceDate:"2019-02-01",serviceType:"",repairReason:"",carBrand:void 0,carSeries:void 0,carType:"",carColor:"",carVinNo:""},rules:{afterType:[{required:!0,message:"请选择售后类型",trigger:"change"}],storeName:[{required:!0,min:0,max:50,message:"请输入店面名称",trigger:"blur",placeholder:"请输入店面名称"}],contactName:[{required:!0,min:0,max:50,message:"请输入联系人",trigger:"blur",placeholder:"请输入联系人"}],contactPhone:[{required:!0,min:0,max:50,message:"请输入联系方式",trigger:"blur",placeholder:"请输入联系方式"}],contactProvince:[{required:!0,message:"请选择所在城区",trigger:"blur",placeholder:"请选择所在城区"}],contactAddress:[{required:!0,min:0,max:50,message:"请输入详细地址",trigger:"blur",placeholder:"请输入详细地址"}],serviceDate:[{required:!0,message:"请选择服务日期",trigger:"blur",placeholder:"请选择服务日期"}],serviceType:[{required:!0,message:"请选择服务类型",trigger:"change",placeholder:"请选择服务类型"}],repairReason:[{required:!0,min:1,max:50,message:"请输入检修原因",trigger:"blur",placeholder:"请输入检修原因"}],carBrand:[{required:!0,type:"number",message:"请选择品牌",trigger:"change",placeholder:"请选择品牌"}],carSeries:[{required:!0,type:"number",message:"请选择车系",trigger:"change",placeholder:"请选择车系"}],carType:[{required:!0,type:"string",message:"请选择车型",trigger:"change",placeholder:"请选择车型"}],carColor:[{required:!0,min:0,max:50,message:"请输入车身颜色",trigger:"blur",placeholder:"请输入车身颜色"}],carVinNo:[{min:0,max:50,message:"请输入车架号",trigger:"blur",placeholder:"请输入车架号"}]},serviceTypeOptions:[],reserveInstallReasonOptions:[],carBrandOptions:[],carTypeOptions:[],carSeriesOptions:[],selectedOptions:[],asycOptions:[],asycAddressModel:[],asycAddressProps:{label:"areaName",value:"id",children:"children",checkStrictly:!1},isDisabled:!0}},watch:{},mounted:function(){this.resetForm(),this.getDictDataListByKey(),this.getEditAfter(),this.getCarbrandList(),this.isDisabled=(this.params.type,!0)},methods:{resetForm:function(){this.$set(this,"ruleForm",{afterType:1,storeName:"",contactName:"",contactPhone:"",contactProvince:void 0,contactAddress:"",serviceDate:"2019-02-01",serviceType:"",repairReason:"",carBrand:void 0,carColor:"",carVinNo:"",carSeries:"",carType:""})},handleAsycChange:function(t){var l=this;return 3==t.length&&(this.ruleForm.contactProvince=String([].concat(c()(t))[2]),this.$refs.ruleForm.validateField("contactProvince")),new s.a(function(e){var a=t[t.length-1];l.getAddress(a).then(function(r){l.asycOptions.map(function(e){e.id==a?e.children=r:e.children&&0<e.children.length&&e.children.map(function(e){e.id==a&&(t.length<2||r.map(function(e){e.children=null}),e.children=r)})}),e()})})},getAddress:function(e){var r={id:e,type:"children"};return new s.a(function(a){Object(d.vb)(r).then(function(e){var r=[];e.data.map(function(e){e.children=[],r.push(e)}),a(r)})})},getDictDataListByKey:function(){var a=this;Object(d.Kb)({dictType:"sys_order_service_item"}).then(function(e){var r=[];a.serviceAsycType=[],e.data.items.map(function(e){r.push({value:e.dataKey,label:e.dataValue}),a.serviceAsycType[e.dataKey]=e.dataValue}),a.serviceTypeOptions=r}).catch(function(e){})},getEditAfter:function(){var l=this;Object(d.Rb)({id:this.params.id}).then(function(e){if(l.loading=!1,e&&200==e.code&&e.data){var r=e.data,a={afterType:r.afterSaleType,afterTypeName:l.$Constants.AFTERTYPE[r.afterSaleType].split(",")[0],storeName:r.merchantInfo?r.merchantInfo.name:"--",contactName:r.contact,contactPhone:r.phoneNumber,contactProvince:String(r.district),contactAddress:r.address,serviceDate:r.expectInstallTime,serviceType:r.installDeviceType,repairReason:r.repairReason,carBrand:Number(r.carBrand),carSeries:Number(r.carSeries),carType:String(r.carType),carColor:r.carColor,carVinNo:r.vinNo};r.carSeries&&l.getCarseriesList(r.carBrand),r.carType&&l.getCartypeList(r.carSeries);var t=o()({},l.ruleForm,a);l.$set(l,"ruleForm",{}),l.$nextTick(function(){l.$set(l,"ruleForm",t)}),r.area&&(l.asycAddressModel=l.$Common.fliterAddress(r.area)[2],l.getAddress(0).then(function(e){l.asycOptions=e,l.$nextTick(function(){l.handleAsycChange(l.$Common.fliterAddress(r.area)[2].splice(0,1)).then(function(e){l.handleAsycChange(l.$Common.fliterAddress(r.area)[2].splice(0,2)).then(function(e){})})})}))}})},comfirmAfter:function(){var r=this,e={that:r,tipText:"是否取消售后申请?",tipTitle:"提示",confirmButtonText:"继续",showCancelButton:!1,type:"error",callBack:function(){Object(d.f)({orderId:r.params.id}).then(function(e){e&&200==e.code&&(r.$message({type:"success",message:"取消成功!"}),r.fn(!0))})}};this.$Common.confirmDialog(e)},carBrandChange:function(){this.getCarseriesList(this.ruleForm.carBrand),this.ruleForm.carSeries="",this.ruleForm.carType=void 0},carSeriesChange:function(){this.getCartypeList(this.ruleForm.carSeries),this.ruleForm.carType=void 0},getCarbrandList:function(){var a=this;Object(d.Db)().then(function(e){if(e&&200==e.code){var r=[];a.serviceAsycType=[],e.data.item.map(function(e){r.push({value:Number(e.bid),label:e.brand}),a.serviceAsycType[e.dataKey]=e.dataValue}),a.carBrandOptions=r}})},getCarseriesList:function(e){var a=this;Object(d.Eb)({brandId:Number(e)}).then(function(e){if(e&&200==e.code){var r=[];a.serviceAsycType=[],e.data.item.map(function(e){r.push({value:Number(e.csid),label:e.carseries}),a.serviceAsycType[e.dataKey]=e.dataValue}),a.carSeriesOptions=r}})},getCartypeList:function(e){var a=this;Object(d.Fb)({seriesId:Number(e)}).then(function(e){if(e&&200==e.code){var r=[];a.serviceAsycType=[],e.data.item.map(function(e){r.push({value:String(e.id),label:e.name}),a.serviceAsycType[e.dataKey]=e.dataValue}),a.carTypeOptions=r}})}}},p=(a("lqJY"),a("9uUW"),a("KHd+")),m=Object(p.a)(u,function(){var r=this,e=r.$createElement,a=r._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:r.loading,expression:"loading"}],staticClass:"after-container-order",attrs:{"element-loading-text":"hard working..."}},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:r.ruleForm,rules:r.rules,"label-width":"120px"}},[a("h3",[r._v("订单信息")]),r._v(" "),a("div",{staticClass:"h3_part"},[a("el-form-item",{attrs:{label:"售后类型"}},[a("el-input",{attrs:{placeholder:r.rules.afterType[0].placeholder,disabled:""},model:{value:r.ruleForm.afterTypeName,callback:function(e){r.$set(r.ruleForm,"afterTypeName",e)},expression:"ruleForm.afterTypeName"}})],1),r._v(" "),a("el-form-item",{attrs:{label:"店面名称",prop:"storeName"}},[a("el-input",{attrs:{placeholder:r.rules.storeName[0].placeholder,disabled:""},model:{value:r.ruleForm.storeName,callback:function(e){r.$set(r.ruleForm,"storeName",e)},expression:"ruleForm.storeName"}})],1),r._v(" "),a("el-form-item",{staticClass:"width-50 pr-0",attrs:{label:"联系人",prop:"contactName"}},[a("el-input",{attrs:{placeholder:r.rules.contactName[0].placeholder,disabled:""},model:{value:r.ruleForm.contactName,callback:function(e){r.$set(r.ruleForm,"contactName",e)},expression:"ruleForm.contactName"}})],1),r._v(" "),a("el-form-item",{staticClass:"width-50 pl-0",attrs:{label:"联系方式",prop:"contactPhone"}},[a("el-input",{attrs:{placeholder:r.rules.contactPhone[0].placeholder,disabled:""},model:{value:r.ruleForm.contactPhone,callback:function(e){r.$set(r.ruleForm,"contactPhone",e)},expression:"ruleForm.contactPhone"}})],1),r._v(" "),a("el-form-item",{attrs:{label:"所在城区",prop:"contactProvince"}},[a("el-cascader",{attrs:{disabled:"",options:r.asycOptions,"change-on-select":!0,props:r.asycAddressProps,placeholder:r.rules.contactProvince[0].placeholder},on:{change:r.handleAsycChange,"expand-change":r.handleAsycChange},model:{value:r.asycAddressModel,callback:function(e){r.asycAddressModel=e},expression:"asycAddressModel"}})],1),r._v(" "),a("el-form-item",{attrs:{label:"详细地址",prop:"contactAddress"}},[a("el-input",{attrs:{placeholder:r.rules.contactAddress[0].placeholder,disabled:""},model:{value:r.ruleForm.contactAddress,callback:function(e){r.$set(r.ruleForm,"contactAddress",e)},expression:"ruleForm.contactAddress"}})],1),r._v(" "),a("el-form-item",{staticClass:"width-50 pr-0",attrs:{label:"服务日期",prop:"serviceDate"}},[a("el-date-picker",{attrs:{placeholder:r.rules.serviceDate[0].placeholder,"picker-options":r.pickerOption,type:"date",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",disabled:r.isDisabled},model:{value:r.ruleForm.serviceDate,callback:function(e){r.$set(r.ruleForm,"serviceDate",e)},expression:"ruleForm.serviceDate"}})],1),r._v(" "),a("el-form-item",{staticClass:"width-50 pl-0",attrs:{label:"服务类型",prop:"serviceType"}},[a("el-select",{attrs:{placeholder:r.rules.serviceType[0].placeholder,disabled:""},model:{value:r.ruleForm.serviceType,callback:function(e){r.$set(r.ruleForm,"serviceType",e)},expression:"ruleForm.serviceType"}},r._l(r.serviceTypeOptions,function(e,r){return a("el-option",{key:r,attrs:{label:e.label,value:e.value}})}))],1),r._v(" "),a("el-form-item",{staticClass:"textarea_form",attrs:{label:"检修原因",prop:"repairReason"}},[a("el-input",{attrs:{placeholder:r.rules.repairReason[0].placeholder,type:"textarea",disabled:r.isDisabled},model:{value:r.ruleForm.repairReason,callback:function(e){r.$set(r.ruleForm,"repairReason",e)},expression:"ruleForm.repairReason"}})],1)],1),r._v(" "),1==r.ruleForm.afterType?a("h3",[r._v("车辆信息")]):r._e(),r._v(" "),1==r.ruleForm.afterType?a("div",{staticClass:"h3_part"},[a("el-form-item",{staticClass:"width-50 pr-0",attrs:{label:"品牌车型",prop:"carBrand"}},[a("el-select",{attrs:{disabled:r.isDisabled,placeholder:r.rules.carBrand[0].placeholder},on:{change:r.carBrandChange},model:{value:r.ruleForm.carBrand,callback:function(e){r.$set(r.ruleForm,"carBrand",e)},expression:"ruleForm.carBrand"}},r._l(r.carBrandOptions,function(e,r){return a("el-option",{key:r,attrs:{label:e.label,value:e.value}})}))],1),r._v(" "),a("el-form-item",{staticClass:"width-20 car-style",attrs:{prop:"carSeries"}},[a("el-select",{attrs:{disabled:r.isDisabled,placeholder:r.rules.carSeries[0].placeholder},on:{change:r.carSeriesChange},model:{value:r.ruleForm.carSeries,callback:function(e){r.$set(r.ruleForm,"carSeries",e)},expression:"ruleForm.carSeries"}},r._l(r.carSeriesOptions,function(e,r){return a("el-option",{key:r,attrs:{label:e.label,value:e.value}})}))],1),r._v(" "),a("el-form-item",{staticClass:"width-20 car-style",attrs:{prop:"carType"}},[a("el-select",{attrs:{disabled:r.isDisabled,placeholder:r.rules.carType[0].placeholder},model:{value:r.ruleForm.carType,callback:function(e){r.$set(r.ruleForm,"carType",e)},expression:"ruleForm.carType"}},r._l(r.carTypeOptions,function(e,r){return a("el-option",{key:r,attrs:{label:e.label,value:e.value}})}))],1),r._v(" "),a("el-form-item",{attrs:{label:"车身颜色",prop:"carColor"}},[a("el-input",{attrs:{placeholder:r.rules.carColor[0].placeholder,disabled:r.isDisabled},model:{value:r.ruleForm.carColor,callback:function(e){r.$set(r.ruleForm,"carColor",e)},expression:"ruleForm.carColor"}})],1),r._v(" "),a("el-form-item",{attrs:{label:"车架号",prop:"carVinNo"}},[a("el-input",{attrs:{placeholder:r.rules.carVinNo[0].placeholder,disabled:r.isDisabled},model:{value:r.ruleForm.carVinNo,callback:function(e){r.$set(r.ruleForm,"carVinNo",e)},expression:"ruleForm.carVinNo"}})],1)],1):r._e()])],1)},[],!1,null,"2240c321",null);m.options.__file="after.vue";var f={components:{after:m.exports},props:{params:{type:Object,default:function(){return{}}},fn:{type:Function}},data:function(){return{activeName:"first"}},watch:{},methods:{handleClick:function(e,r){},close:function(){this.fn()}}},h=(a("AhPl"),Object(p.a)(f,function(){var r=this,e=r.$createElement,a=r._self._c||e;return a("div",[a("i",{staticClass:"el-icon-close fr pointer",staticStyle:{"margin-right":"-10px","margin-top":"-10px"},on:{click:r.close}}),r._v(" "),a("el-tabs",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag",value:2,expression:"2"}],staticClass:"dialogDragNoHeader order-after-tab",on:{"tab-click":r.handleClick},model:{value:r.activeName,callback:function(e){r.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"售后详情",name:"first"}},[a("after",{ref:"after",attrs:{params:r.params,fn:r.fn}})],1)],1)],1)},[],!1,null,null,null));h.options.__file="index.vue",r.default=h.exports},fALF:function(e,r,a){},lqJY:function(e,r,a){"use strict";var t=a("2BY2");a.n(t).a},m1cH:function(e,r,a){"use strict";r.__esModule=!0;var t,l=(t=a("rfXi"))&&t.__esModule?t:{default:t};r.default=function(e){if(Array.isArray(e)){for(var r=0,a=Array(e.length);r<e.length;r++)a[r]=e[r];return a}return(0,l.default)(e)}}}]);