You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
30 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-43da2ac4"],{3761:function(e,t,i){"use strict";var o=i("5530"),s=i("9256"),a={page:{method:"POST",url:"/creditGoods/list"},query:{method:"POST",url:"/creditGoods/query"},update:{method:"PUT",url:"/creditGoods"},save:{method:"POST",url:"/creditGoods"},delete:{method:"DELETE",url:"/creditGoods"},export:{method:"POST",url:"/creditGoods/export"},preview:{method:"POST",url:"/creditGoods/preview"},import:{method:"POST",url:"/creditGoods/import"}};t["a"]={page:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.page),{},{data:e,custom:t}))},query:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.query),{},{data:e,custom:t}))},save:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.save),{},{data:e,custom:t}))},update:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.update),{},{data:e,custom:t}))},delete:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.delete),{},{data:e,custom:t}))},export:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.export),{},{responseType:"blob",data:e,custom:t}))},preview:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.preview),{},{data:e,custom:t}))},import:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s["a"])(Object(o["a"])(Object(o["a"])({},a.import),{},{data:e,custom:t}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gLGKc2bzYLV/rQ2VRUAXRHQAB45PDIxRADyy8RZj+38eax2RG8cLwLDEOTC2rraQyCLsYFogez6xZzBGAFDvbrwZ0v9L5DUcK7ziATBsuV/52521O6+3MihuaAy3lcgJQMwrmo0C4Kvrb0Jinx4rw5Eb3z4ADEv02fMHate2WsimBLJtBCoLKnIfRC/knQXUCUAuvmEFWujOOd27YzbRE1eWms8OO1R9Ze2NUH0mdCi30v/tPwHGzO7BM8+9bn9/q2kEqVVtQsQ9UoW8ASLJmO5vuTkB8C3BKa3MvXbjeGIdEDZV1aYImkD2fK+v22nbEYAQGe/8a7Zm/tMwFk0LTaEOEgeGtAWYDXFIX58EwDdznnYzj27cs3/LAdFP1UGhyOBQOFGKfZ5uvc0IgHfqJmz4mCbVS2uvN300VTTNtIY6MBwgcmTCR7vhjgCEyuwk/Z7ZPFjT6w1j+01VNCXbVjKt0RbI3DiHIgDjZC8C29nTvbv37UNT1TYhyMBQySBpQLB/VIgEYFSGivr/p9RU73r+WFLZatptnbELDjm6c9mcABS1wOPEffb8gfoV27CVfhOKrRdONr7p467YVwJ9Vkybl2WAAJQcCAJAAEqegZIvnxOAAJQ8AyVfPicAASh5Bkq+fE4AAlDyDJR8+ZwAJQfgf2+2R9tsFvimAAAAAElFTkSuQmCC"},5954:function(e,t,i){"use strict";i.r(t);var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[i("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.creditGoods.name")},model:{value:e.queryParams.model.name,callback:function(t){e.$set(e.queryParams.model,"name",t)},expression:"queryParams.model.name"}}),i("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.creditGoods.description")},model:{value:e.queryParams.model.description,callback:function(t){e.$set(e.queryParams.model,"description",t)},expression:"queryParams.model.description"}}),i("el-date-picker",{staticClass:"filter-item search-item date-range-item",attrs:{"range-separator":null,"end-placeholder":"结束日期",format:"yyyy-MM-dd HH:mm:ss","start-placeholder":"开始日期",type:"daterange","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.queryParams.timeRange,callback:function(t){e.$set(e.queryParams,"timeRange",t)},expression:"queryParams.timeRange"}}),i("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.search}},[e._v(" "+e._s(e.$t("table.search"))+" ")]),i("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"warning"},on:{click:e.reset}},[e._v(" "+e._s(e.$t("table.reset"))+" ")]),i("el-button",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoods:add"],expression:"['creditGoods:add']"}],staticClass:"filter-item",attrs:{plain:"",type:"danger"},on:{click:e.add}},[e._v(" "+e._s(e.$t("table.add"))+" ")]),i("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["creditGoods:delete","creditGoods:export","creditGoods:import"],expression:"['creditGoods:delete', 'creditGoods:export',\n 'creditGoods:import']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[i("el-button",[e._v(" "+e._s(e.$t("table.more"))),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoods:delete"],expression:"['creditGoods:delete']"}],nativeOn:{click:function(t){return e.batchDelete(t)}}},[e._v(" "+e._s(e.$t("table.delete"))+" ")]),i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoods:export"],expression:"['creditGoods:export']"}],nativeOn:{click:function(t){return e.exportExcel(t)}}},[e._v(" "+e._s(e.$t("table.export"))+" ")]),i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoods:export"],expression:"['creditGoods:export']"}],nativeOn:{click:function(t){return e.exportExcelPreview(t)}}},[e._v(" "+e._s(e.$t("table.exportPreview"))+" ")]),i("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditGoods:import"],expression:"['creditGoods:import']"}],nativeOn:{click:function(t){return e.importExcel(t)}}},[e._v(" "+e._s(e.$t("table.import"))+" ")])],1)],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],key:e.tableKey,ref:"table",staticStyle:{width:"100%"},attrs:{data:e.tableData.list,border:"",fit:"","row-key":"id"},on:{"cell-click":e.cellClick,"filter-change":e.filterChange,"selection-change":e.onSelectChange,"sort-change":e.sortChange}},[i("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.categoryId"),"show-overflow-tooltip":!0,align:"center",prop:"categoryId",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.categoryId))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.name"),"show-overflow-tooltip":!0,align:"center",prop:"name",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.name))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.description"),"show-overflow-tooltip":!0,align:"center",prop:"description",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.description))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.worth"),"show-overflow-tooltip":!0,align:"center",prop:"worth",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.worth))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.price"),"show-overflow-tooltip":!0,align:"center",prop:"price",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.price))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.stock"),"show-overflow-tooltip":!0,align:"center",prop:"stock",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.stock))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.sales"),"show-overflow-tooltip":!0,align:"center",prop:"sales",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.sales))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.isHot"),"show-overflow-tooltip":!0,align:"center",prop:"isHot","filter-multiple":!1,"column-key":"isHot",filters:[{text:e.$t("common.yes"),value:"true"},{text:e.$t("common.no"),value:"false"}],width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-tag",{attrs:{slot:"",type:t.row.isHot?"success":"danger"},slot:"default"},[e._v(" "+e._s(t.row.isHot?e.$t("common.yes"):e.$t("common.no"))+" ")])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.couponId"),"show-overflow-tooltip":!0,align:"center",prop:"couponId",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.couponId))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.canPick"),"show-overflow-tooltip":!0,align:"center",prop:"canPick","filter-multiple":!1,"column-key":"canPick",filters:[{text:e.$t("common.yes"),value:"true"},{text:e.$t("common.no"),value:"false"}],width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-tag",{attrs:{slot:"",type:t.row.canPick?"success":"danger"},slot:"default"},[e._v(" "+e._s(t.row.canPick?e.$t("common.yes"):e.$t("common.no"))+" ")])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.canDelivery"),"show-overflow-tooltip":!0,align:"center",prop:"canDelivery","filter-multiple":!1,"column-key":"canDelivery",filters:[{text:e.$t("common.yes"),value:"true"},{text:e.$t("common.no"),value:"false"}],width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-tag",{attrs:{slot:"",type:t.row.canDelivery?"success":"danger"},slot:"default"},[e._v(" "+e._s(t.row.canDelivery?e.$t("common.yes"):e.$t("common.no"))+" ")])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.sortOrder"),"show-overflow-tooltip":!0,align:"center",prop:"sortOrder",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.sortOrder))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.state"),"show-overflow-tooltip":!0,align:"center",prop:"state",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.state))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.creditGoods.isDelete"),"show-overflow-tooltip":!0,align:"center",prop:"isDelete",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.isDelete))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.createTime"),align:"center",prop:"createTime",sortable:"custom",width:"170px"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.createTime))])]}}])}),i("el-table-column",{attrs:{label:e.$t("table.operation"),align:"center","column-key":"operation","class-name":"small-padding fixed-width",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[i("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditGoods:add"],expression:"['creditGoods:add']"}],staticClass:"el-icon-copy-document table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.copy(o)}}}),i("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditGoods:update"],expression:"['creditGoods:update']"}],staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.edit(o)}}}),i("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditGoods:delete"],expression:"['creditGoods:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.singleDelete(o)}}}),i("el-link",{directives:[{name:"has-no-permission",rawName:"v-has-no-permission",value:["creditGoods:update","creditGoods:copy","creditGoods:delete"],expression:"['creditGoods:update', 'creditGoods:copy', 'creditGoods:delete']"}],staticClass:"no-perm"},[e._v(" "+e._s(e.$t("tips.noPermission"))+" ")])]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:e.queryParams.size,page:e.queryParams.current,total:Number(e.tableData.total)},on:{"update:limit":function(t){return e.$set(e.queryParams,"size",t)},"update:page":function(t){return e.$set(e.queryParams,"current",t)},pagination:e.fetch}}),i("creditGoods-edit",{ref:"edit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type,classification:e.classification},on:{close:e.editClose,success:e.editSuccess}}),i("creditGoods-import",{ref:"import",attrs:{"dialog-visible":e.fileImport.isVisible,type:e.fileImport.type,action:e.fileImport.action,accept:".xls,.xlsx"},on:{close:e.importClose,success:e.importSuccess}}),i("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:"预览",width:"80%",top:"50px",visible:e.preview.isVisible},on:{"update:visible":function(t){return e.$set(e.preview,"isVisible",t)}}},[i("el-scrollbar",[i("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},s=[],a=(i("4160"),i("caad"),i("d81d"),i("d3b7"),i("ac1f"),i("2532"),i("841c"),i("1276"),i("159b"),i("5530")),r=i("333d"),l=i("a888"),n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:e.title,type:e.type,visible:e.isVisible,width:e.width,top:"50px"},on:{"update:visible":function(t){e.isVisible=t}}},[i("el-form",{ref:"form",attrs:{model:e.creditGoods,rules:e.rules,"label-position":"right","label-width":"100px"}},[i("el-form-item",{attrs:{label:e.$t("table.creditGoods.categoryId"),prop:"categoryId"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:e.creditGoods.categoryId,callback:function(t){e.$set(e.creditGoods,"categoryId",t)},expression:"creditGoods.categoryId"}},e._l(e.classification.records,(function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.name"),prop:"name"}},[i("el-input",{attrs:{type:"",placeholder:"商品名"},model:{value:e.creditGoods.name,callback:function(t){e.$set(e.creditGoods,"name",t)},expression:"creditGoods.name"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.mainImgPath"),prop:"imgPath"}},[i("el-upload",{staticClass:"avatar-uploader",attrs:{headers:e.headers,data:e.dataObj,action:e.action,"show-file-list":!1,"on-success":e.handleAvatarSuccess,disabled:e.unStart}},[e.creditGoods.mainImgPath?i("img",{staticClass:"avatar",attrs:{src:e.creditGoods.mainImgPath,width:"80",height:"80"}}):i("i",{staticClass:"el-icon-plus avatar-uploader-icon"}),i("el-button",{attrs:{size:"small",type:"primary",disabled:e.unStart}},[e._v("点击上传")])],1)],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.viceImgPaths"),prop:"imgPath"}},[i("el-upload",{staticClass:"upload-demo",attrs:{headers:e.headers,action:e.action,data:e.dataObj,"on-preview":e.handlePreview,"on-remove":e.handleRemove,"before-remove":e.beforeRemove,multiple:"",limit:3,"on-exceed":e.handleExceed,"on-success":e.multipleFilesSuccess,"file-list":e.fileList,"list-type":"picture"}},[i("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")]),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 只能上传jpg/png文件,且不超过500kb ")])],1)],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.description"),prop:"description"}},[i("el-input",{attrs:{type:"",placeholder:"描述"},model:{value:e.creditGoods.description,callback:function(t){e.$set(e.creditGoods,"description",t)},expression:"creditGoods.description"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.worth"),prop:"worth"}},[i("el-input",{attrs:{type:"",placeholder:"价值(人民币)"},model:{value:e.creditGoods.worth,callback:function(t){e.$set(e.creditGoods,"worth",t)},expression:"creditGoods.worth"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.price"),prop:"price"}},[i("el-input",{attrs:{type:"",placeholder:"价格(积分)"},model:{value:e.creditGoods.price,callback:function(t){e.$set(e.creditGoods,"price",t)},expression:"creditGoods.price"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.stock"),prop:"stock"}},[i("el-input",{attrs:{type:"",placeholder:"库存"},model:{value:e.creditGoods.stock,callback:function(t){e.$set(e.creditGoods,"stock",t)},expression:"creditGoods.stock"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.sales"),prop:"sales"}},[i("el-input",{attrs:{type:"",placeholder:"销量"},model:{value:e.creditGoods.sales,callback:function(t){e.$set(e.creditGoods,"sales",t)},expression:"creditGoods.sales"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.isHot"),prop:"isHot"}},[i("el-radio-group",{attrs:{size:"medium"},model:{value:e.creditGoods.isHot,callback:function(t){e.$set(e.creditGoods,"isHot",t)},expression:"creditGoods.isHot"}},[i("el-radio-button",{attrs:{label:!0}},[e._v(e._s(e.$t("common.yes")))]),i("el-radio-button",{attrs:{label:!1}},[e._v(e._s(e.$t("common.no")))])],1)],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.canPick"),prop:"canPick"}},[i("el-radio-group",{attrs:{size:"medium"},model:{value:e.creditGoods.canPick,callback:function(t){e.$set(e.creditGoods,"canPick",t)},expression:"creditGoods.canPick"}},[i("el-radio-button",{attrs:{label:!0}},[e._v(e._s(e.$t("common.yes")))]),i("el-radio-button",{attrs:{label:!1}},[e._v(e._s(e.$t("common.no")))])],1)],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.canDelivery"),prop:"canDelivery"}},[i("el-radio-group",{attrs:{size:"medium"},model:{value:e.creditGoods.canDelivery,callback:function(t){e.$set(e.creditGoods,"canDelivery",t)},expression:"creditGoods.canDelivery"}},[i("el-radio-button",{attrs:{label:!0}},[e._v(e._s(e.$t("common.yes")))]),i("el-radio-button",{attrs:{label:!1}},[e._v(e._s(e.$t("common.no")))])],1)],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.sortOrder"),prop:"sortOrder"}},[i("el-input",{attrs:{type:"",placeholder:"显示顺序"},model:{value:e.creditGoods.sortOrder,callback:function(t){e.$set(e.creditGoods,"sortOrder",t)},expression:"creditGoods.sortOrder"}})],1),i("el-form-item",{attrs:{label:e.$t("table.creditGoods.state"),prop:"state"}},[i("el-input",{attrs:{type:"",placeholder:"状态:1-上架,0-下架"},model:{value:e.creditGoods.state,callback:function(t){e.$set(e.creditGoods,"state",t)},expression:"creditGoods.state"}})],1),i("el-form-item",{attrs:{label:"商品详情",prop:"detail"}},[e.isVisible?i("Tinymce",{ref:"content",attrs:{height:200},model:{value:e.creditGoods.detail,callback:function(t){e.$set(e.creditGoods,"detail",t)},expression:"creditGoods.detail"}}):e._e()],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),i("el-button",{attrs:{disabled:e.confirmDisabled,plain:"",type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("common.confirm"))+" ")])],1)],1)},c=[],d=(i("99af"),i("4de4"),i("3761")),u=i("5657"),m=i("8256"),p=(i("5c96"),{name:"CreditGoodsEdit",directives:{elDragDialog:l["a"]},components:{Tinymce:m["a"]},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"},classification:{type:Object,default:function(){}}},data:function(){return{confirmDisabled:!1,creditGoods:this.initCreditGoods(),screenWidth:0,width:this.initWidth(),rules:{},enums:{},dicts:{},headers:{Authorization:""},action:"".concat("https://pos.admin.api.lotus-wallet.com","/file/upload"),dataObj:{folderId:1},unStart:!1,fileList:[{name:" ",url:""}]}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return this.$t("common."+this.type)}},created:function(){this.headers.token="Bearer "+u["a"].get("TOKEN",""),this.headers.tenant="0000"},watch:{},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{multipleFilesSuccess:function(e){var t=e.data.url,i={name:t,url:t};this.fileList.push(i),this.creditGoods.viceImgPaths.push(t),console.log(this.fileList,"this.fileList")},handleAvatarSuccess:function(e){var t=e.data.url;this.creditGoods.mainImgPath=t},handleRemove:function(e,t){console.log(e,t)},handlePreview:function(e){console.log(e)},handleExceed:function(e,t){this.$message.warning("当前限制选择 3 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))},beforeRemove:function(e,t){this.fileList=t,this.creditGoods.viceImgPaths=this.creditGoods.viceImgPaths.filter((function(t){return t!=e.url}))},initCreditGoods:function(){return{id:"",categoryId:null,name:"",mainImgPath:"",viceImgPaths:[],description:"",worth:null,price:null,stock:null,sales:null,isHot:!0,canPick:!0,canDelivery:!0,sortOrder:null,state:null,detail:"(1) 兑换商品中所要求的积分达到方可兑换\n\n(2) 积分仅兑换商城指定商品,不能折算现金或兑换其他非指定商品项目\n\n(3) 兑换商品图片仅供参考,商品以实际领取为准,如商品有多种颜色,则随机发送\n\n(4) 使用积分兑换商品成功后,默认客户主动签收验货,非存在商品质量问题,不得退货或积分退回账户操作,若商品存在质量问题,请于收货后三日内联系客服解决\n\n(5) 兑换商品仅按客户指定地址进行配送,如因客户地址变更未及时通知本中心或客户所提供的联系方式和地址信息错误而导致商品配送失败的,由客户自行承担相关责任\n\n(6) 部分积分商品数量有限,先兑先得,兑完为止"}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},setCreditGoods:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this;this.fileList=[],i.dicts=t["dicts"],i.enums=t["enums"],t["row"]&&(i.creditGoods=Object(a["a"])({},t["row"]));var o=JSON.parse(JSON.stringify(this.creditGoods.viceImgPaths));o.length&&o.forEach((function(t){var i={url:t,name:t};e.fileList.push(i)})),console.log(this.creditGoods.viceImgPaths,"viceImgPaths")},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.confirmDisabled=!1,this.creditGoods=this.initCreditGoods()},submitForm:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return!1;e.editSubmit()}))},editSubmit:function(){var e=this;"edit"===e.type?e.update():e.save()},save:function(){var e=this;e.confirmDisabled=!0,d["a"].save(this.creditGoods).then((function(t){var i=t.data;i.isSuccess&&(e.isVisible=!1,e.$message({message:e.$t("tips.createSuccess"),type:"success"}),e.$emit("success"))})).finally((function(){return e.confirmDisabled=!1}))},update:function(){var e=this,t=this;t.confirmDisabled=!0,d["a"].update(this.creditGoods).then((function(i){var o=i.data;o.isSuccess&&(t.isVisible=!1,t.$message({message:e.$t("tips.updateSuccess"),type:"success"}),t.$emit("success"))})).finally((function(){return t.confirmDisabled=!1}))}}}),h=p,f=i("2877"),b=Object(f["a"])(h,n,c,!1,null,"32a7f564",null),v=b.exports,g=i("6188"),y=(i("fa7d"),i("1771")),w=i("29fa"),G={name:"CreditGoodsManage",directives:{elDragDialog:l["a"]},components:{Pagination:r["a"],CreditGoodsEdit:v,CreditGoodsImport:g["a"]},filters:{},data:function(){return{dialog:{isVisible:!1,type:"add"},preview:{isVisible:!1,context:""},fileImport:{isVisible:!1,type:"import",action:"".concat("/api","/creditGoods/import")},tableKey:0,queryParams:Object(y["e"])(),selection:[],loading:!1,tableData:{total:0},enums:{},dicts:{},classification:{}}},computed:{},watch:{},mounted:function(){this.fetch(),this.getclassification();var e=[],t=[];Object(y["f"])(e,this.enums,"store"),Object(y["b"])(t,this.dicts)},methods:{getclassification:function(){var e=this;this.loading=!0;var t={current:1,size:999,model:{}};w["a"].page(t).then((function(t){var i=t.data;i.isSuccess&&(e.classification=i.data,console.log(e.classification,"this.classification"))})).finally((function(){return e.loading=!1}))},editClose:function(){this.dialog.isVisible=!1},editSuccess:function(){this.search()},onSelectChange:function(e){this.selection=e},search:function(){this.fetch(Object(a["a"])({},this.queryParams))},reset:function(){this.queryParams=Object(y["e"])(),this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},exportExcelPreview:function(){var e=this;this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出数据",d["a"].preview(this.queryParams).then((function(t){var i=t.data;e.preview.isVisible=!0,e.preview.context=i.data}))},exportExcel:function(){this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出数据",d["a"].export(this.queryParams).then((function(e){Object(y["a"])(e)}))},importExcel:function(){this.fileImport.type="upload",this.fileImport.isVisible=!0,this.$refs.import.setModel(!1)},importSuccess:function(){this.search()},importClose:function(){this.fileImport.isVisible=!1},singleDelete:function(e){this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(e,!0),this.batchDelete()},batchDelete:function(){var e=this;this.selection.length?this.$confirm(this.$t("tips.confirmDelete"),this.$t("common.tips"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then((function(){var t=e.selection.map((function(e){return e.id}));e.delete(t)})).catch((function(){e.clearSelections()})):this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(e){var t=this;d["a"].delete({ids:e}).then((function(e){var i=e.data;i.isSuccess&&(t.$message({message:t.$t("tips.deleteSuccess"),type:"success"}),t.search())}))},add:function(){this.dialog.type="add",this.dialog.isVisible=!0,this.$refs.edit.setCreditGoods({enums:this.enums,dicts:this.dicts})},copy:function(e){this.$refs.edit.setCreditGoods({row:e,enums:this.enums,dicts:this.dicts}),this.dialog.type="copy",this.dialog.isVisible=!0},edit:function(e){this.$refs.edit.setCreditGoods({row:e,enums:this.enums,dicts:this.dicts}),this.dialog.type="edit",this.dialog.isVisible=!0},fetch:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.current=t.current?t.current:this.queryParams.current,this.queryParams.size=t.size?t.size:this.queryParams.size,d["a"].page(this.queryParams).then((function(t){var i=t.data;i.isSuccess&&(e.tableData=i.data)})).finally((function(){return e.loading=!1}))},sortChange:function(e){this.queryParams.sort=e.prop,this.queryParams.order=e.order,this.queryParams.sort&&this.search()},filterChange:function(e){for(var t in e)if(t.includes(".")){var i={};i[t.split(".")[1]]=e[t][0],this.queryParams.model[t.split(".")[0]]=i}else this.queryParams.model[t]=e[t][0];this.search()},cellClick:function(e,t){var i=this;if("operation"!==t["columnKey"]){var o=!1;this.selection.forEach((function(t){t.id===e.id&&(o=!0,i.$refs.table.toggleRowSelection(e))})),o||this.$refs.table.toggleRowSelection(e,!0)}}}},A=G,k=Object(f["a"])(A,o,s,!1,null,"0d76baac",null);t["default"]=k.exports},a623:function(e,t,i){"use strict";var o=i("23e7"),s=i("b727").every,a=i("a640"),r=i("ae40"),l=a("every"),n=r("every");o({target:"Array",proto:!0,forced:!l||!n},{every:function(e){return s(this,e,arguments.length>1?arguments[1]:void 0)}})}}]);