1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b18622a8"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,a,r){return e/=r/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function s(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,a){var o=i(),n=e-o,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var i=Math.easeInOutQuad(c,o,n,t);s(i),c<t?r(e):a&&"function"===typeof a&&a()};u()}},"0a45":function(e,t,a){"use strict";a("f658")},"673a":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[e._m(0),e._v(" "),a("div",{staticClass:"m-core"},[a("save-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",[a("el-input",{attrs:{clearable:"",placeholder:"维修单号/姓名"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",[a("el-input",{attrs:{type:"number",clearable:"",placeholder:"维护编号"},model:{value:e.searchForm.studentInstrumentId,callback:function(t){e.$set(e.searchForm,"studentInstrumentId",t)},expression:"searchForm.studentInstrumentId"}})],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"是否有特权减免金额",clearable:""},model:{value:e.searchForm.hasExemptionAmount,callback:function(t){e.$set(e.searchForm,"hasExemptionAmount","string"===typeof t?t.trim():t)},expression:"searchForm.hasExemptionAmount"}},[a("el-option",{attrs:{label:"是",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"否",value:"0"}})],1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"维修技师",clearable:"",filterable:""},model:{value:e.searchForm.employeeId,callback:function(t){e.$set(e.searchForm,"employeeId",t)},expression:"searchForm.employeeId"}},e._l(e.selects.roles.REPAIR,(function(e,t){return a("el-option",{key:t,attrs:{label:e.userName,value:e.userId}})})),1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"请选择分部",clearable:""},model:{value:e.searchForm.organIdList,callback:function(t){e.$set(e.searchForm,"organIdList",t)},expression:"searchForm.organIdList"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"维修状态",clearable:""},model:{value:e.searchForm.repairStatus,callback:function(t){e.$set(e.searchForm,"repairStatus",t)},expression:"searchForm.repairStatus"}},[a("el-option",{attrs:{label:"已完成",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"维修中",value:"0"}})],1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"维修类型",clearable:""},model:{value:e.searchForm.type,callback:function(t){e.$set(e.searchForm,"type",t)},expression:"searchForm.type"}},[a("el-option",{attrs:{label:"线上",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"线下",value:"0"}})],1)],1),e._v(" "),a("br"),e._v(" "),a("el-form-item",[a("el-date-picker",{staticStyle:{width:"400px"},attrs:{type:"daterange","value-format":"yyyy-MM-dd","picker-options":{firstDayOfWeek:1},"range-separator":"至","start-placeholder":"送修开始日期","end-placeholder":"送修结束日期"},model:{value:e.searchForm.timer,callback:function(t){e.$set(e.searchForm,"timer","string"===typeof t?t.trim():t)},expression:"searchForm.timer"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger","native-type":"submit"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"studentRepair/export",expression:"'studentRepair/export'"}],attrs:{type:"primary"},on:{click:e.onExport}},[e._v("导出")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[a("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.organName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"transNo",label:"维修单号",width:"175"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.transNo))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentName",label:"学生姓名"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.studentName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentId",label:"学生编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.studentId))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"employeeName",label:"维修技师"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.employeeName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"type",label:"维修类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.type?"线上":"线下"))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"repairName",label:"维修单名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"createTime",label:"送修日期"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatTimer")(t.row.createTime)))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"finishTime",label:"完成日期"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatTimer")(t.row.finishTime)))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"repairStatus",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.repairStatus?"已完成":"维修中"))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.showDetail(t.row)}}},[e._v("详情")])]}}])})],1),e._v(" "),a("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"维修单详情","close-on-click-modal":!1,"close-on-press-escape":!1,visible:e.repairVisible,width:"600px"},on:{"update:visible":function(t){e.repairVisible=t}}},[a("el-form",{attrs:{model:e.visibleForm,inline:!0}},[a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"维修单号:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.transNo)+"\n ")]):e._e()])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"维修单名称:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.repairName)+"\n ")]):e._e()])],1),e._v(" "),e.activeRow&&e.activeRow.studentInstrumentId?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"维护编号:"}},[a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.studentInstrumentId)+"\n ")])])],1):e._e()],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"学生姓名:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.studentName)+"\n ")]):e._e()])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"归属乐团:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.studentSchool)+"\n ")]):e._e()])],1)],1),e._v(" "),e.activeRow&&0!=e.activeRow.sendType?a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"联系人:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.contactName)+"\n ")]):e._e()])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"联系方式:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.contactMobile)+"\n ")]):e._e()])],1)],1):e._e(),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[e.activeRow&&0!=e.activeRow.sendType?a("el-form-item",{attrs:{label:"邮寄地址:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.address)+"\n ")]):e._e()]):e._e()],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"取件方式:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s("0"==e.activeRow.sendType?"自取":"邮寄")+"\n ")]):e._e()])],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"维修服务费:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e._f("moneyFormat")(e.activeRow.amount))+"元\n ")]):e._e()])],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"是否乐保乐器:"}},[e.activeRow?a("p",{staticClass:"visibleCell"},[e._v("\n "+e._s(e.activeRow.maintenanceStatus?"是":"否")+"\n ")]):e._e()])],1)],1),e._v(" "),a("el-row",[e.activeRow&&e.activeRow.maintenanceStatus?a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"特权减免金额"}},[e.activeRow?a("p",[e._v("\n "+e._s(e._f("moneyFormat")(e.activeRow.exemptionAmount))+"元\n ")]):e._e()])],1):e._e(),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"应付金额"}},[e.activeRow?a("p",[e._v("\n "+e._s(e._f("moneyFormat")(e.activeRow.payableAmount))+"元\n ")]):e._e()])],1)],1),e._v(" "),a("el-form-item",{staticStyle:{width:"100%","margin-bottom":"0"},attrs:{label:"问题描述及解决方案:"}}),e._v(" "),a("div",[a("el-row",e._l(e.imgList,(function(t){return a("el-col",{key:t,attrs:{span:5}},[a("el-card",{staticClass:"box-card",attrs:{"body-style":{padding:"0px"}}},[a("el-image",{staticStyle:{width:"100px",height:"100px"},attrs:{src:t,fit:"fill","preview-src-list":e.imgList}})],1)],1)})),1)],1),e._v(" "),e.activeRow?a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:3,disabled:e.activeRow&&Boolean(e.activeRow.finishTime)},model:{value:e.activeRow.description,callback:function(t){e.$set(e.activeRow,"description",t)},expression:"activeRow.description"}}):e._e(),e._v(" "),e.activeRow&&e.activeRow.feeList?a("el-form-item",{staticStyle:{width:"100%","margin-bottom":"0"},attrs:{label:"收费组成:"}}):e._e(),e._v(" "),e.activeRow&&e.activeRow.feeList?a("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:3,disabled:!0},model:{value:e.activeRow.feeList,callback:function(t){e.$set(e.activeRow,"feeList",t)},expression:"activeRow.feeList"}}):e._e(),e._v(" "),a("el-form-item",{staticStyle:{width:"100%","margin-bottom":"0"},attrs:{label:"商品列表:"}}),e._v(" "),e.activeRow?a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.activeRow.goodsList}},[a("el-table-column",{attrs:{align:"center",prop:"name",label:"商品名"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"groupPurchasePrice",label:"商品价格(元)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.groupPurchasePrice))+"\n ")])]}}],null,!1,1653195074)})],1):e._e()],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e.activeRow&&Boolean(e.activeRow.finishTime)?e._e():a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"studentRepair/repairSuccess",expression:"'studentRepair/repairSuccess'"}],attrs:{type:"danger"},on:{click:function(t){return e.repairEnd("save",e.activeRow)}}},[e._v("保存")]),e._v(" "),e.activeRow&&e.activeRow.finishTime?e._e():a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"studentRepair/repairSuccess",expression:"'studentRepair/repairSuccess'"}],attrs:{type:"primary"},on:{click:function(t){return e.repairEnd("end",e.activeRow)}}},[e._v("完成维修")])],1)],1)],1)},s=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("\n 维修单管理\n ")])}],i=(a("28a5"),a("15fd")),o=(a("ac6a"),a("386d"),a("a481"),a("5530")),n=(a("96cf"),a("1da1")),l=(a("bc3a"),a("5f87"),a("333d")),c=(a("3908"),a("1cc7")),u=a("adb21"),m=a("4328"),p=a.n(m),d=a("ed08"),v=a("b775"),f="/api-web";function h(e){return Object(v["a"])({url:f+"/studentRepair/queryPage",method:"get",params:e})}function b(e){return Object(v["a"])({url:f+"/studentRepair/repairSuccess",method:"post",data:p.a.stringify(e)})}var _={components:{pagination:l["a"]},data:function(){return{searchForm:{search:null,employeeId:null,organIdList:null,repairStatus:null,time:[],exemptionAmount:""},repairVisible:!1,tableList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},soundLists:[],soundList:[],isInit:!1,visibleForm:{},activeRow:null,srcList:[]}},created:function(){},mounted:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$route.query.studentInstrumentId&&(this.searchForm=Object(o["a"])(Object(o["a"])({},this.searchForm),this.$route.query),this.$router.replace("/otherManager/repairList")),e.next=3,this.$store.dispatch("setOrganRole");case 3:this.$store.dispatch("setBranchs"),Object(c["Fb"])({tenantId:1,rows:9999}).then((function(e){200==e.code&&200==e.code&&(t.soundList=e.data.rows,t.getSound())})),this.init();case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{init:function(){this.isInit=!0,this.getList()},getList:function(){var e=this,t=JSON.parse(JSON.stringify(this.searchForm));t.page=this.rules.page,t.rows=this.rules.limit,this.searchForm.timer&&this.searchForm.timer.length>0&&(t.startTime=this.searchForm.timer[0],t.endTime=this.searchForm.timer[1]),delete t.timer,h(t).then((function(t){200==t.code&&(e.isInit=!1,e.tableList=t.data.rows,e.rules.total=t.data.total)}))},getSound:function(){for(var e in this.soundLists=[],this.soundList)this.soundList[e].subjects.length>0&&(this.soundLists=this.soundLists.concat(this.soundList[e].subjects))},onReSet:function(){this.searchForm={search:null,employeeId:null,organIdList:null,repairStatus:null,time:[]},this.search()},search:function(){this.rules.page=1,this.getList()},showDetail:function(e){var t=e.goodsJson?JSON.parse(e.goodsJson):[];e.goodsList=t;var a=e.amount;t.forEach((function(e){a+=parseFloat(e.discountPrice?e.discountPrice:e.groupPurchasePrice)})),a=(a-(e.exemptionAmount||0)).toFixed(2),e.payableAmount=a,this.activeRow=e,this.repairVisible=!0},repairEnd:function(e,t){var a=this,r=null;e&&"end"==e&&(r=1),b({repairStatus:r,id:t.id,description:t.description}).then((function(t){200==t.code&&(e&&"end"==e?a.$message.success("完成维修"):a.$message.success("保存成功"),a.repairVisible=!1,a.getList())}))},onExport:function(){var e=this.searchForm,t=e.timer,a=Object(i["a"])(e,["timer"]);Object(u["a"])(this,{url:"/api-web/studentRepair/export",fileName:"维修单.xls",method:"post",params:p.a.stringify(Object(o["a"])(Object(o["a"])({},a),Object(d["a"])(t,["startTime","endTime"])))},"您确定导出维修单列表?")}},watch:{repairVisible:function(e){e||(this.activeRow=null)}},computed:{imgList:function(){var e=this.activeRow,t=null!==e&&void 0!==e&&e.repairImg?e.repairImg.split(","):[];return t}}},w=_,y=(a("0a45"),a("2877")),g=Object(y["a"])(w,r,s,!1,null,"76835a7e",null);t["default"]=g.exports},adb21:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var r=a("bc3a"),s=a.n(r),i=(a("4328"),a("5f87")),o=a("3908"),n=a("e3eb"),l=a.n(n),c=function(e,t,a,r){var n=t.url,c={method:t.method?t.method:"get",headers:{Authorization:Object(i["b"])(),tenantId:Object(i["a"])()},url:n,responseType:"blob"};"post"==c.method?c.data=t.params:c.params=t.params,e.$confirm(a||"您确定下载模板","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){o["a"].startLoading(),s()(l()(c)).then((function(a){var s=new Blob([a.data],{type:"application/vnd.ms-excel;charset=utf-8"}),i=new Response(s).text();i.then((function(a){if(-1!=a.indexOf("code")){var i=JSON.parse(a);if(403==i.code)return e.$message.error("登录过期,请重新登录!"),void setTimeout((function(){e.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);200==i.code?e.$message.success(i.msg):e.$message.error(i.msg),r&&r()}else{var o=URL.createObjectURL(s),n=document.createElement("a"),l=t.fileName||"导出文件.xls";n.href=o,n.setAttribute("download",l),document.body.appendChild(n),n.click(),r&&r()}})),o["a"].endLoading()})).catch((function(t){console.log(t),e.$message.error("下载失败,请联系管理员"),o["a"].endLoading()}))})).catch((function(){}))}},ed08:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return n}));var r=a("ade3"),s=(a("c5f6"),a("28a5"),a("a481"),a("6b54"),a("53ca"),a("5a0c")),i=a.n(s);var o=function(e){var t=[];for(var a in e)if(e.hasOwnProperty(a)){var r=e[a],s=a.toLocaleUpperCase();t.push({label:r,value:"TRUE"===s||"FALSE"===s?"TRUE"===s:a})}return t},n=function(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD";return e&&e.length?(t={},Object(r["a"])(t,a[0]||"start",i()(e[0]).isValid()?i()(e[0]).format(s):""),Object(r["a"])(t,a[1]||"end",i()(e[1]).isValid()?i()(e[1]).format(s):""),t):{}}},f658:function(e,t,a){}}]);
|