chunk-32f32f00.86a9820c.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32f32f00"],{"2c59":function(t,e,o){"use strict";o("e0e0")},"2f97":function(t,e,o){"use strict";o("6a0c")},"333d":function(t,e,o){"use strict";var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"page-content"},[o("el-pagination",{attrs:{background:"","hide-on-single-page":t.paginationConfig.hideSinglePage,"current-page":t.paginationConfig.page,"page-size":t.paginationConfig.size,"page-sizes":t.paginationConfig.sizeList,layout:t.paginationConfig.layout,"pager-count":5,total:t.paginationConfig.total},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}}),t._v(" "),o("el-button",{attrs:{size:"mini",icon:"el-icon-refresh"},nativeOn:{click:function(e){return e.preventDefault(),t.refresh(e)}}},[t._v("刷新")])],1)},i=[],a=(o("c5f6"),{name:"Pagination",props:{paginationConfig:{hideSinglePage:{type:Boolean,default:function(){return!1}},page:{type:Number,default:function(){return 1}},size:{type:Number,default:function(){return 15}},sizeList:{type:Array,default:function(){return[10,15,30,50]}},layout:{type:String,default:function(){return"total, sizes, prev, pager, next, jumper"}},total:{type:Number,default:function(){return 0}}}},data:function(){return{}},created:function(){},methods:{handleCurrentChange:function(t){this.paginationConfig.page=t,this.$emit("putPagination",this.paginationConfig)},handleSizeChange:function(t){this.paginationConfig.size=t,this.$emit("putPagination",this.paginationConfig)},refresh:function(){this.$emit("putPagination",this.paginationConfig)}}}),s=a,r=(o("5f6c"),o("2877")),c=Object(r["a"])(s,n,i,!1,null,null,null);e["a"]=c.exports},"57cd":function(t,e,o){"use strict";o("ac3a")},"5f6c":function(t,e,o){"use strict";o("ed77")},"6a0c":function(t,e,o){t.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},a883:function(t,e,o){"use strict";o("c86b")},ac3a:function(t,e,o){},c86b:function(t,e,o){},cd62:function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"resource"},[o("div",{staticClass:"header"},[o("span",[t._v("当前资源情况 "+t._s(t.useResCount)+"/"+t._s(t.totalResCount))])]),t._v(" "),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",attrs:{stripe:"",size:"small",height:"80%",data:t.listData,"element-loading-text":"拼命加载中","row-class-name":t.tableRowClassName},on:{"sort-change":t.sortChange}},t._l(t.headerData,(function(e,n){return o("el-table-column",{key:n,attrs:{align:"center",prop:e.prop,label:e.label,sortable:e.sortable,width:"index"==e.prop?60:""},scopedSlots:t._u([{key:"default",fn:function(n){return["operation"==e.prop?o("span",{staticClass:"operation",attrs:{slot:"content"},on:{click:function(e){return t.viewResource(n.row["resId"])}},slot:"content"},[t._v("查看资源")]):"type"==e.prop?o("span",{attrs:{slot:"content",title:t.getType(n.row[e.prop])},slot:"content"},[t._v(t._s(t.getType(n.row[e.prop])))]):"state"==e.prop?o("span",{attrs:{slot:"content",title:t.getState(n.row[e.prop])},slot:"content"},[t._v(t._s(t.getState(n.row[e.prop])))]):"starttime"==e.prop||"endtime"==e.prop?o("span",{attrs:{slot:"content",title:t.formatTime(n.row[e.prop])},slot:"content"},[t._v(t._s(t.formatTime(n.row[e.prop])))]):o("span",{attrs:{slot:"content",title:n.row[e.prop]},slot:"content"},[t._v(t._s(n.row[e.prop]))])]}}],null,!0)})})),1),t._v(" "),o("div",{staticClass:"pagination"},[o("Pagination",{attrs:{"pagination-config":t.paginationConfig},on:{putPagination:t.getPagination}})],1),t._v(" "),o("ViewResource",{attrs:{"view-config":t.viewConfig},on:{putView:t.getView}}),t._v(" "),o("BuyResource",{attrs:{"buy-config":t.buyConfig},on:{putBuy:t.getBuy}})],1)},i=[],a=o("333d"),s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:t.viewConfig.isShow,expression:"viewConfig.isShow"}],staticClass:"marsk"})]),t._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:t.viewConfig.isShow,expression:"viewConfig.isShow"}],staticClass:"action-view"},[o("div",{staticClass:"header"},[o("div",{staticClass:"operation"},[o("i",{staticClass:"el-icon-circle-close",on:{click:t.close}})]),t._v(" "),o("p",[t._v("资源信息")])]),t._v(" "),o("div",{staticClass:"content"},[o("div",{staticClass:"desc"},[o("p",[t._v("\n 资源名称:"),o("span",[t._v(t._s(t.viewConfig.data.name))])]),t._v(" "),o("p",[t._v("\n 资源类型:"),o("span",[t._v(t._s(t.getType(t.viewConfig.data.type)))])]),t._v(" "),o("p",[t._v("\n 资源规格:"),o("span",[t._v(t._s(t.viewConfig.data.capacity))])]),t._v(" "),o("p",[t._v("\n 购买的时段:"),o("span",[t._v(t._s(t.formatTime(t.viewConfig.data.starttime))+" ~\n "+t._s(t.formatTime(t.viewConfig.data.endtime)))])]),t._v(" "),o("p",[t._v("\n 资源状态:"),o("span",[t._v(t._s(t.getState(t.viewConfig.data.state)))])])]),t._v(" "),2==t.viewConfig.data.state?o("div",{staticClass:"desc"},[o("p",[t._v("\n 分配的项目:"),o("span",[t._v(t._s(t.viewConfig.data.distributionProjectName))])]),t._v(" "),o("p",[t._v("\n 分配的用户:"),o("span",[t._v(t._s(t.viewConfig.data.distributionUserName))])]),t._v(" "),o("p",[t._v("\n 分配的时段:"),o("span",[t._v(t._s(t.formatTime(t.viewConfig.data.distributionStarttime))+" ~\n "+t._s(t.formatTime(t.viewConfig.data.distributionEndtime)))])])]):t._e()])])])],1)},r=[],c=o("ed08"),u={name:"ViewInvoice",props:{viewConfig:{isShow:{type:Boolean,default:function(){return!1}},data:{type:Object,default:function(){}}}},methods:{close:function(){this.$emit("putView",!1)},getType:function(t){return Object(c["d"])(t)},getState:function(t){return Object(c["c"])(t)},formatTime:function(t){return Object(c["e"])(t)}}},l=u,f=(o("57cd"),o("2877")),p=Object(f["a"])(l,s,r,!1,null,"312477a6",null),d=p.exports,g=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("transition",{attrs:{name:"marsk-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:t.buyConfig.isShow,expression:"buyConfig.isShow"}],staticClass:"marsk"})]),t._v(" "),o("transition",{attrs:{name:"slide-fade"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:t.buyConfig.isShow,expression:"buyConfig.isShow"}],staticClass:"action-limit"},[o("div",{staticClass:"title"},[o("p",[t._v("购买资源")]),t._v(" "),o("div",{staticClass:"operation"},[o("i",{staticClass:"el-icon-circle-close",on:{click:t.close}})])]),t._v(" "),o("p",{staticClass:"tips"},[t._v("\n 剩余积分:"),o("span",[t._v(t._s(t.buyConfig.point))])]),t._v(" "),o("div",{staticClass:"select"},[t._v("\n 资源类型:\n "),o("el-select",{attrs:{size:"mini",placeholder:"请选择"},on:{change:t.getSelect},model:{value:t.buyConfig.resType,callback:function(e){t.$set(t.buyConfig,"resType",e)},expression:"buyConfig.resType"}},t._l(t.typeList,(function(t){return o("el-option",{key:t.value,attrs:{value:t.value,label:t.label}})})),1)],1),t._v(" "),o("div",{staticClass:"num-list"},t._l(t.buyConfig.numList,(function(e,n){return o("div",{key:n},[0==e.saleUnit?o("el-radio",{attrs:{label:e.returnGoods},on:{change:t.select},model:{value:t.buyConfig.num,callback:function(e){t.$set(t.buyConfig,"num",e)},expression:"buyConfig.num"}},[o("p",[t._v(t._s(e.returnGoods)+"台资源")]),t._v(" "),o("span",[t._v(t._s(e.salePrice)+"积分")])]):t._e()],1)})),0),t._v(" "),o("div",{staticClass:"desc"},[o("p",[t._v("\n 购买时间:\n "),o("el-input",{ref:"times",staticStyle:{width:"150px"},attrs:{type:"number",size:"mini",name:"times",placeholder:"购买时间"},model:{value:t.buyConfig.times,callback:function(e){t.$set(t.buyConfig,"times",e)},expression:"buyConfig.times"}},[o("span",{staticClass:"solt",attrs:{slot:"suffix"},slot:"suffix"},[t._v("天")])])],1),t._v(" "),o("p",[t._v("资源规格:"+t._s(t.buyConfig.specs))])]),t._v(" "),o("div",{staticClass:"btn-group"},[o("el-button",{staticClass:"next-btn",attrs:{type:"danger",size:"small"},nativeOn:{click:function(e){return e.preventDefault(),t.sure(e)}}},[t._v("确认")])],1)])])],1)},_=[],m=(o("6b54"),o("c5f6"),o("b775")),v={name:"BuyResource",props:{buyConfig:{isShow:{type:Boolean,default:function(){return!1}},num:{type:Number,default:function(){return 0}},intergal:{type:Number,default:function(){return 0}},times:{type:Number,default:function(){return 0}},specs:{type:String,default:function(){return""}},resType:{type:String,default:function(){return""}},numList:{type:Array,default:function(){return[]}},selectGoodsCode:{type:String,default:function(){return""}},point:{type:String,default:function(){return"0"}}}},data:function(){return{typeList:[{value:"0",label:"通用"}]}},methods:{close:function(){this.$emit("putBuy",!1)},select:function(){var t=this;this.buyConfig.numList.map((function(e){t.buyConfig.num==e.returnGoods&&(t.buyConfig.intergal=e.salePrice,t.buyConfig.spec=e.remarks,t.buyConfig.selectGoodsCode=e.goodsCode)}))},getSelect:function(t){var e=this,o={transCode:"C00022",type:"4",subType:t,saleUnit:""};Object(m["e"])(o).then((function(o){e.buyConfig={isShow:!0,intergal:o.rows.filter((function(t){return 0==t.saleUnit}))[0].salePrice,num:o.rows.filter((function(t){return 0==t.saleUnit}))[0].returnGoods,times:30,specs:o.rows.filter((function(t){return 0==t.saleUnit}))[0].remarks,resType:t,numList:o.rows.filter((function(t){return 0==t.saleUnit})),selectGoodsCode:o.rows.filter((function(t){return 0==t.saleUnit}))[0].goodsCode}})).catch((function(t){}))},sure:function(){var t=this;if(""==this.buyConfig.times)return this.$message.warning("请输入购买时间!");if(!/(^[1-9]\d*$)/.test(this.buyConfig.times)||-1!=this.buyConfig.times.toString().indexOf("."))return this.$message.warning("购买时间只能是正整数!");var e={transCode:"C00028",resCount:this.buyConfig.num,resType:this.buyConfig.resType,resGoodsCode:this.buyConfig.selectGoodsCode,resPeriod:this.buyConfig.times.toString()};Object(m["e"])(e).then((function(e){t.$message.success("恭喜你,成功购买 ".concat(t.buyConfig.num," 台资源")),t.$emit("putBuy",t.buyConfig)})).catch((function(t){}))}}},C=v,h=(o("a883"),o("2f97"),Object(f["a"])(C,g,_,!1,null,"af16cb80",null)),b=h.exports,y={name:"Resource",components:{Pagination:a["a"],ViewResource:d,BuyResource:b},data:function(){return{userType:this.$store.getters.userType||0,paginationConfig:{hideSinglePage:!1,page:1,size:15,sizeList:[10,15,30,50],layout:"total, sizes, prev, pager, next, jumper",total:0},viewConfig:{isShow:!1,data:{}},buyConfig:{isShow:!1,num:"",intergal:"",selectGoodsCode:"",times:30,specs:"",resType:"0",numList:[],point:"0"},useResCount:"0",totalResCount:"0",point:"0",loading:!1,headerData:[],listData:[],checkedList:[],orderSortName:"",orderSortType:""}},computed:{},created:function(){this.getAccount(),this.addHeader(),this.getData()},methods:{addHeader:function(){var t=[];t.push({label:"序号",prop:"index"}),t.push({label:"资源名称",prop:"name",sortable:"custom"}),t.push({label:"资源编号",prop:"number",sortable:"custom"}),t.push({label:"资源类型",prop:"type",sortable:"custom"}),t.push({label:"开始时间",prop:"starttime",sortable:"custom"}),t.push({label:"结束时间",prop:"endtime",sortable:"custom"}),t.push({label:"规格",prop:"capacity",sortable:"custom"}),t.push({label:"状态",prop:"state",sortable:"custom"}),t.push({label:"操作",prop:"operation"}),this.headerData=t},getData:function(){var t=this,e=this.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});setTimeout((function(){var o={transCode:"C00024",state:"",type:"0",name:"",page:t.paginationConfig.page,count:t.paginationConfig.size};t.orderSortName&&(o.orderSortName=t.orderSortName),t.orderSortType&&(o.orderSortType=t.orderSortType),Object(m["e"])(o).then((function(o){t.listData=[],e.close(),t.listData=o.rows,t.paginationConfig.total=o.total,t.listData.map((function(e,o){e.index=(t.paginationConfig.page-1)*t.paginationConfig.size+o+1}))})).catch((function(t){e.close()}))}),1500)},getAccount:function(){var t=this,e={transCode:"C00001"};Object(m["e"])(e).then((function(e){t.useResCount=e.useResCount,t.totalResCount=e.totalResCount,t.point=e.point})).catch((function(t){}))},getType:function(t){return Object(c["d"])(t)},getState:function(t){return Object(c["c"])(t)},tableRowClassName:function(t,e){return 1==t.row.operation?"selected":""},viewResource:function(t){var e=this,o={transCode:"C00029",resId:t};Object(m["e"])(o).then((function(t){e.viewConfig={isShow:!0,data:t}})).catch((function(t){}))},getResource:function(){var t=this,e={transCode:"C00022",type:"4",subType:"0",saleUnit:""};Object(m["e"])(e).then((function(e){t.buyConfig={isShow:!0,intergal:e.rows.filter((function(t){return 0==t.saleUnit}))[0].salePrice,num:e.rows.filter((function(t){return 0==t.saleUnit}))[0].returnGoods,times:30,specs:e.rows.filter((function(t){return 0==t.saleUnit}))[0].remarks,resType:"0",numList:e.rows.filter((function(t){return 0==t.saleUnit})),selectGoodsCode:e.rows.filter((function(t){return 0==t.saleUnit}))[0].goodsCode,point:t.point}})).catch((function(t){}))},getPagination:function(t){this.paginationConfig=t,this.getData()},getView:function(t){this.viewConfig.isShow=!1},getBuy:function(t){this.buyConfig.isShow=!1,t&&(this.getData(),this.getAccount())},formatTime:function(t){return Object(c["e"])(t)},sortChange:function(t,e,o){"number"==t.prop?this.orderSortName="res_num":"starttime"==t.prop?this.orderSortName="start_time":"endtime"==t.prop?this.orderSortName="end_time":this.orderSortName=t.prop,this.orderSortType="descending"==t.order?"desc":"asc",this.getData()}}},w=y,S=(o("2c59"),o("f52e"),Object(f["a"])(w,n,i,!1,null,"091b2e96",null));e["default"]=S.exports},da8f:function(t,e,o){t.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},e0e0:function(t,e,o){},ed77:function(t,e,o){t.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},f52e:function(t,e,o){"use strict";o("da8f")}}]);