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
37 KiB
1 lines
37 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e6273170"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,r,i){return e/=i/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,r){var n=o(),s=e-n,l=20,c=0;t="undefined"===typeof t?500:t;var d=function e(){c+=l;var o=Math.easeInOutQuad(c,n,s,t);a(o),c<t?i(e):r&&"function"===typeof r&&r()};d()}},1771:function(e,t,r){"use strict";r.d(t,"f",(function(){return l})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return d})),r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return m})),r.d(t,"e",(function(){return p}));r("caad"),r("d3b7"),r("ac1f"),r("8a79"),r("2532"),r("3ca3"),r("1276"),r("2ca0"),r("498a"),r("ddb0"),r("2b3d");var i=r("5530"),a=r("b85c"),o=r("c2cf"),n=r("ebb5"),s=void 0,l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authority";"string"===typeof e&&(e=[e]),e&&e.length>0&&o["a"].enums({codes:e},r).then((function(r){var i,o=r.data,n=Object(a["a"])(e);try{for(n.s();!(i=n.n()).done;){var s=i.value;t[s]=o.data[s]}}catch(l){n.e(l)}finally{n.f()}}))},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(e,t,"authority")},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(e,t,"msgs")},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof e&&(e=[e]),e&&e.length>0&&n["a"].list({codes:e}).then((function(r){var i,o=r.data,n=Object(a["a"])(e);try{for(n.s();!(i=n.n()).done;){var s=i.value;t[s]=o.data[s]}}catch(l){n.e(l)}finally{n.f()}}))},m=function(e){console.log(e,12);var t=e.data,r=t.type;if(r&&r.includes("application/json")){var i=new FileReader;i.onload=function(e){if(2===e.target.readyState){var t=JSON.parse(e.target.result);s.$message({message:t.msg,type:"warning"})}},i.readAsText(t)}else{var a=e.headers["content-disposition"],o="下载文件.zip";if(a)for(var n=a.split(";"),l=0;l<n.length;l++){var c=n[l];if(null!==c&&""!==c){var d=c.split("=");if(null!==d&&d.length>0&&"filename"===d[0].trim().toLowerCase()){o=decodeURI(d[1]);break}}}(o.startsWith("'")||o.startsWith('"'))&&(o.endsWith("'")||o.endsWith('"'))&&(o=o.substring(1,o.length-1));var u=new Blob([t]),m=document.createElement("a");m.href=window.URL.createObjectURL(u),m.download=o,m.click(),window.URL.revokeObjectURL(m.href)}},p=function(e){var t={size:10,current:1,sort:"id",order:"descending",model:{},map:{},timeRange:null};return e?Object(i["a"])(Object(i["a"])({},t),e):t}},"27ae":function(e,t,r){(function(r){var i,a;(function(t,r){e.exports=r(t)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof r?r:this,(function(r){"use strict";r=r||{};var o,n=r.Base64,s="2.6.4",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=function(e){for(var t={},r=0,i=e.length;r<i;r++)t[e.charAt(r)]=r;return t}(l),d=String.fromCharCode,u=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(m,u)},f=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0),i=[l.charAt(r>>>18),l.charAt(r>>>12&63),t>=2?"=":l.charAt(r>>>6&63),t>=1?"=":l.charAt(63&r)];return i.join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},b=function(e){return h(p(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?g(b(e)):b(e)},y=function(e){return v(e,!0)};r.Uint8Array&&(o=function(e,t){for(var r="",i=0,a=e.length;i<a;i+=3){var o=e[i],n=e[i+1],s=e[i+2],c=o<<16|n<<8|s;r+=l.charAt(c>>>18)+l.charAt(c>>>12&63)+("undefined"!=typeof n?l.charAt(c>>>6&63):"=")+("undefined"!=typeof s?l.charAt(63&c):"=")}return t?g(r):r});var O,w=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,D=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return d(55296+(r>>>10))+d(56320+(1023&r));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){return e.replace(w,D)},$=function(e){var t=e.length,r=t%4,i=(t>0?c[e.charAt(0)]<<18:0)|(t>1?c[e.charAt(1)]<<12:0)|(t>2?c[e.charAt(2)]<<6:0)|(t>3?c[e.charAt(3)]:0),a=[d(i>>>16),d(i>>>8&255),d(255&i)];return a.length-=[0,0,2,1][r],a.join("")},P=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,$)},_=function(e){return P(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},I=function(e){return x(P(e))},k=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},j=function(e){return I(k(e))};r.Uint8Array&&(O=function(e){return Uint8Array.from(_(k(e)),(function(e){return e.charCodeAt(0)}))});var S=function(){var e=r.Base64;return r.Base64=n,e};if(r.Base64={VERSION:s,atob:_,btoa:h,fromBase64:j,toBase64:v,utob:p,encode:v,encodeURI:y,btou:x,decode:j,noConflict:S,fromUint8Array:o,toUint8Array:O},"function"===typeof Object.defineProperty){var C=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",C((function(){return j(this)}))),Object.defineProperty(String.prototype,"toBase64",C((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",C((function(){return v(this,!0)})))}}return r["Meteor"]&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:(i=[],a=function(){return r.Base64}.apply(t,i),void 0===a||(e.exports=a)),{Base64:r.Base64}}))}).call(this,r("c8ba"))},"4fad":function(e,t,r){var i=r("23e7"),a=r("6f53").entries;i({target:"Object",stat:!0},{entries:function(e){return a(e)}})},"6f53":function(e,t,r){var i=r("83ab"),a=r("df75"),o=r("fc6a"),n=r("d1e7").f,s=function(e){return function(t){var r,s=o(t),l=a(s),c=l.length,d=0,u=[];while(c>d)r=l[d++],i&&!n.call(s,r)||u.push(e?[r,s[r]]:s[r]);return u}};e.exports={entries:s(!0),values:s(!1)}},"8a79":function(e,t,r){"use strict";var i=r("23e7"),a=r("06cf").f,o=r("50c4"),n=r("5a34"),s=r("1d80"),l=r("ab13"),c=r("c430"),d="".endsWith,u=Math.min,m=l("endsWith"),p=!c&&!m&&!!function(){var e=a(String.prototype,"endsWith");return e&&!e.writable}();i({target:"String",proto:!0,forced:!p&&!m},{endsWith:function(e){var t=String(s(this));n(e);var r=arguments.length>1?arguments[1]:void 0,i=o(t.length),a=void 0===r?i:u(o(r),i),l=String(e);return d?d.call(t,l,a):t.slice(a-l.length,a)===l}})},9243:function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("div",{staticClass:"filter-container"},[r("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.creditOrderDetail.name")},model:{value:e.queryParams.model.name,callback:function(t){e.$set(e.queryParams.model,"name",t)},expression:"queryParams.model.name"}}),r("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.creditOrderDetail.description")},model:{value:e.queryParams.model.description,callback:function(t){e.$set(e.queryParams.model,"description",t)},expression:"queryParams.model.description"}}),r("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.creditOrderDetail.goodsMainImg")},model:{value:e.queryParams.model.goodsMainImg,callback:function(t){e.$set(e.queryParams.model,"goodsMainImg",t)},expression:"queryParams.model.goodsMainImg"}}),r("el-input",{staticClass:"filter-item search-item",attrs:{placeholder:e.$t("table.creditOrderDetail.goodsViceImg")},model:{value:e.queryParams.model.goodsViceImg,callback:function(t){e.$set(e.queryParams.model,"goodsViceImg",t)},expression:"queryParams.model.goodsViceImg"}}),r("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"}}),r("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"primary"},on:{click:e.search}},[e._v(" "+e._s(e.$t("table.search"))+" ")]),r("el-button",{staticClass:"filter-item",attrs:{plain:"",type:"warning"},on:{click:e.reset}},[e._v(" "+e._s(e.$t("table.reset"))+" ")]),r("el-button",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditOrderDetail:add"],expression:"['creditOrderDetail:add']"}],staticClass:"filter-item",attrs:{plain:"",type:"danger"},on:{click:e.add}},[e._v(" "+e._s(e.$t("table.add"))+" ")]),r("el-dropdown",{directives:[{name:"has-any-permission",rawName:"v-has-any-permission",value:["creditOrderDetail:delete","creditOrderDetail:export","creditOrderDetail:import"],expression:"['creditOrderDetail:delete', 'creditOrderDetail:export',\n 'creditOrderDetail:import']"}],staticClass:"filter-item",attrs:{trigger:"click"}},[r("el-button",[e._v(" "+e._s(e.$t("table.more"))),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditOrderDetail:delete"],expression:"['creditOrderDetail:delete']"}],nativeOn:{click:function(t){return e.batchDelete(t)}}},[e._v(" "+e._s(e.$t("table.delete"))+" ")]),r("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditOrderDetail:export"],expression:"['creditOrderDetail:export']"}],nativeOn:{click:function(t){return e.exportExcel(t)}}},[e._v(" "+e._s(e.$t("table.export"))+" ")]),r("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditOrderDetail:export"],expression:"['creditOrderDetail:export']"}],nativeOn:{click:function(t){return e.exportExcelPreview(t)}}},[e._v(" "+e._s(e.$t("table.exportPreview"))+" ")]),r("el-dropdown-item",{directives:[{name:"has-permission",rawName:"v-has-permission",value:["creditOrderDetail:import"],expression:"['creditOrderDetail:import']"}],nativeOn:{click:function(t){return e.importExcel(t)}}},[e._v(" "+e._s(e.$t("table.import"))+" ")])],1)],1)],1),r("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.records,border:"",fit:"","row-key":"id"},on:{"cell-click":e.cellClick,"filter-change":e.filterChange,"selection-change":e.onSelectChange,"sort-change":e.sortChange}},[r("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.orderId"),"show-overflow-tooltip":!0,align:"center",prop:"orderId",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.orderId))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.goodsId"),"show-overflow-tooltip":!0,align:"center",prop:"goodsId",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.goodsId))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.categoryId"),"show-overflow-tooltip":!0,align:"center",prop:"categoryId",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.categoryId))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.name"),"show-overflow-tooltip":!0,align:"center",prop:"name",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.name))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.description"),"show-overflow-tooltip":!0,align:"center",prop:"description",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.description))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.worth"),"show-overflow-tooltip":!0,align:"center",prop:"worth",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.worth))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.price"),"show-overflow-tooltip":!0,align:"center",prop:"price",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.price))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.couponId"),"show-overflow-tooltip":!0,align:"center",prop:"couponId",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.couponId))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.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[r("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"))+" ")])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.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[r("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"))+" ")])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.goodsMainImg"),"show-overflow-tooltip":!0,align:"center",prop:"goodsMainImg",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.goodsMainImg))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.goodsViceImg"),"show-overflow-tooltip":!0,align:"center",prop:"goodsViceImg",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.goodsViceImg))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.goodsNumber"),"show-overflow-tooltip":!0,align:"center",prop:"goodsNumber",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.goodsNumber))])]}}])}),r("el-table-column",{attrs:{label:e.$t("table.creditOrderDetail.isDelete"),"show-overflow-tooltip":!0,align:"center",prop:"isDelete",width:""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.isDelete))])]}}])}),r("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[r("span",[e._v(e._s(t.row.createTime))])]}}])}),r("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 i=t.row;return[r("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditOrderDetail:add"],expression:"['creditOrderDetail:add']"}],staticClass:"el-icon-copy-document table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.copy(i)}}}),r("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditOrderDetail:update"],expression:"['creditOrderDetail:update']"}],staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.edit(i)}}}),r("i",{directives:[{name:"hasPermission",rawName:"v-hasPermission",value:["creditOrderDetail:delete"],expression:"['creditOrderDetail:delete']"}],staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},attrs:{title:e.$t("common.delete")},on:{click:function(t){return e.singleDelete(i)}}}),r("el-link",{directives:[{name:"has-no-permission",rawName:"v-has-no-permission",value:["creditOrderDetail:update","creditOrderDetail:copy","creditOrderDetail:delete"],expression:"['creditOrderDetail:update', 'creditOrderDetail:copy', 'creditOrderDetail:delete']"}],staticClass:"no-perm"},[e._v(" "+e._s(e.$t("tips.noPermission"))+" ")])]}}])})],1),r("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}}),r("creditOrderDetail-edit",{ref:"edit",attrs:{"dialog-visible":e.dialog.isVisible,type:e.dialog.type},on:{close:e.editClose,success:e.editSuccess}}),r("creditOrderDetail-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}}),r("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)}}},[r("el-scrollbar",[r("div",{domProps:{innerHTML:e._s(e.preview.context)}})])],1)],1)},a=[],o=(r("4160"),r("caad"),r("d81d"),r("d3b7"),r("ac1f"),r("2532"),r("841c"),r("1276"),r("159b"),r("5530")),n=r("333d"),s=r("a888"),l=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("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}}},[r("el-form",{ref:"form",attrs:{model:e.creditOrderDetail,rules:e.rules,"label-position":"right","label-width":"100px"}},[r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.orderId"),prop:"orderId"}},[r("el-input",{attrs:{type:"",placeholder:"订单ID"},model:{value:e.creditOrderDetail.orderId,callback:function(t){e.$set(e.creditOrderDetail,"orderId",t)},expression:"creditOrderDetail.orderId"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.goodsId"),prop:"goodsId"}},[r("el-input",{attrs:{type:"",placeholder:"商品ID"},model:{value:e.creditOrderDetail.goodsId,callback:function(t){e.$set(e.creditOrderDetail,"goodsId",t)},expression:"creditOrderDetail.goodsId"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.categoryId"),prop:"categoryId"}},[r("el-input",{attrs:{type:"",placeholder:"商品分类ID"},model:{value:e.creditOrderDetail.categoryId,callback:function(t){e.$set(e.creditOrderDetail,"categoryId",t)},expression:"creditOrderDetail.categoryId"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.name"),prop:"name"}},[r("el-input",{attrs:{type:"",placeholder:"商品名"},model:{value:e.creditOrderDetail.name,callback:function(t){e.$set(e.creditOrderDetail,"name",t)},expression:"creditOrderDetail.name"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.description"),prop:"description"}},[r("el-input",{attrs:{type:"",placeholder:"商品描述"},model:{value:e.creditOrderDetail.description,callback:function(t){e.$set(e.creditOrderDetail,"description",t)},expression:"creditOrderDetail.description"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.worth"),prop:"worth"}},[r("el-input",{attrs:{type:"",placeholder:"商品价值(人民币)"},model:{value:e.creditOrderDetail.worth,callback:function(t){e.$set(e.creditOrderDetail,"worth",t)},expression:"creditOrderDetail.worth"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.price"),prop:"price"}},[r("el-input",{attrs:{type:"",placeholder:"商品价格(积分)"},model:{value:e.creditOrderDetail.price,callback:function(t){e.$set(e.creditOrderDetail,"price",t)},expression:"creditOrderDetail.price"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.couponId"),prop:"couponId"}},[r("el-input",{attrs:{type:"",placeholder:"优惠券ID(如果该值大于0,则购买之后赠送相应的优惠券)"},model:{value:e.creditOrderDetail.couponId,callback:function(t){e.$set(e.creditOrderDetail,"couponId",t)},expression:"creditOrderDetail.couponId"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.canPick"),prop:"canPick"}},[r("el-radio-group",{attrs:{size:"medium"},model:{value:e.creditOrderDetail.canPick,callback:function(t){e.$set(e.creditOrderDetail,"canPick",t)},expression:"creditOrderDetail.canPick"}},[r("el-radio-button",{attrs:{label:!0}},[e._v(e._s(e.$t("common.yes")))]),r("el-radio-button",{attrs:{label:!1}},[e._v(e._s(e.$t("common.no")))])],1)],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.canDelivery"),prop:"canDelivery"}},[r("el-radio-group",{attrs:{size:"medium"},model:{value:e.creditOrderDetail.canDelivery,callback:function(t){e.$set(e.creditOrderDetail,"canDelivery",t)},expression:"creditOrderDetail.canDelivery"}},[r("el-radio-button",{attrs:{label:!0}},[e._v(e._s(e.$t("common.yes")))]),r("el-radio-button",{attrs:{label:!1}},[e._v(e._s(e.$t("common.no")))])],1)],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.goodsMainImg"),prop:"goodsMainImg"}},[r("el-input",{attrs:{type:"",placeholder:"商品主图路径"},model:{value:e.creditOrderDetail.goodsMainImg,callback:function(t){e.$set(e.creditOrderDetail,"goodsMainImg",t)},expression:"creditOrderDetail.goodsMainImg"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.goodsViceImg"),prop:"goodsViceImg"}},[r("el-input",{attrs:{type:"",placeholder:"商品副图的路径集合"},model:{value:e.creditOrderDetail.goodsViceImg,callback:function(t){e.$set(e.creditOrderDetail,"goodsViceImg",t)},expression:"creditOrderDetail.goodsViceImg"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.goodsNumber"),prop:"goodsNumber"}},[r("el-input",{attrs:{type:"",placeholder:"商品数量"},model:{value:e.creditOrderDetail.goodsNumber,callback:function(t){e.$set(e.creditOrderDetail,"goodsNumber",t)},expression:"creditOrderDetail.goodsNumber"}})],1),r("el-form-item",{attrs:{label:e.$t("table.creditOrderDetail.isDelete"),prop:"isDelete"}},[r("el-input",{attrs:{type:"",placeholder:"逻辑删除:1-删除 0-未删除"},model:{value:e.creditOrderDetail.isDelete,callback:function(t){e.$set(e.creditOrderDetail,"isDelete",t)},expression:"creditOrderDetail.isDelete"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(t){e.isVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),r("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=r("9256"),u={page:{method:"POST",url:"/store/creditOrderDetail/page"},query:{method:"POST",url:"/store/creditOrderDetail/query"},update:{method:"PUT",url:"/store/creditOrderDetail"},save:{method:"POST",url:"/store/creditOrderDetail"},delete:{method:"DELETE",url:"/store/creditOrderDetail"},export:{method:"POST",url:"/store/creditOrderDetail/export"},preview:{method:"POST",url:"/store/creditOrderDetail/preview"},import:{method:"POST",url:"/store/creditOrderDetail/import"}},m={page:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.page),{},{data:e,custom:t}))},query:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.query),{},{data:e,custom:t}))},save:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.save),{},{data:e,custom:t}))},update:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.update),{},{data:e,custom:t}))},delete:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.delete),{},{data:e,custom:t}))},export:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.export),{},{responseType:"blob",data:e,custom:t}))},preview:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.preview),{},{data:e,custom:t}))},import:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d["a"])(Object(o["a"])(Object(o["a"])({},u.import),{},{data:e,custom:t}))}},p={name:"CreditOrderDetailEdit",directives:{elDragDialog:s["a"]},components:{},props:{dialogVisible:{type:Boolean,default:!1},type:{type:String,default:"add"}},data:function(){return{confirmDisabled:!1,creditOrderDetail:this.initCreditOrderDetail(),screenWidth:0,width:this.initWidth(),rules:{},enums:{},dicts:{}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}},title:function(){return this.$t("common."+this.type)}},watch:{},mounted:function(){var e=this;window.onresize=function(){return function(){e.width=e.initWidth()}()}},methods:{initCreditOrderDetail:function(){return{id:"",orderId:null,goodsId:null,categoryId:null,name:"",description:"",worth:null,price:null,couponId:null,canPick:!0,canDelivery:!0,goodsMainImg:"",goodsViceImg:"",goodsNumber:null,isDelete:null}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},setCreditOrderDetail:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this;t.dicts=e["dicts"],t.enums=e["enums"],e["row"]&&(t.creditOrderDetail=Object(o["a"])({},e["row"]))},close:function(){this.$emit("close")},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.confirmDisabled=!1,this.creditOrderDetail=this.initCreditOrderDetail()},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,m.save(this.creditOrderDetail).then((function(t){var r=t.data;r.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,m.update(this.creditOrderDetail).then((function(r){var i=r.data;i.isSuccess&&(t.isVisible=!1,t.$message({message:e.$t("tips.updateSuccess"),type:"success"}),t.$emit("success"))})).finally((function(){return t.confirmDisabled=!1}))}}},f=p,h=r("2877"),b=Object(h["a"])(f,l,c,!1,null,"c8d083a4",null),g=b.exports,v=r("6188"),y=(r("fa7d"),r("1771")),O={name:"CreditOrderDetailManage",directives:{elDragDialog:s["a"]},components:{Pagination:n["a"],CreditOrderDetailEdit:g,CreditOrderDetailImport:v["a"]},filters:{},data:function(){return{dialog:{isVisible:!1,type:"add"},preview:{isVisible:!1,context:""},fileImport:{isVisible:!1,type:"import",action:"".concat("/api","/store/creditOrderDetail/import")},tableKey:0,queryParams:Object(y["e"])(),selection:[],loading:!1,tableData:{total:0},enums:{},dicts:{}}},computed:{},watch:{},mounted:function(){this.fetch();var e=[],t=[];Object(y["f"])(e,this.enums,"store"),Object(y["b"])(t,this.dicts)},methods:{editClose:function(){this.dialog.isVisible=!1},editSuccess:function(){this.search()},onSelectChange:function(e){this.selection=e},search:function(){this.fetch(Object(o["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="导出数据",m.preview(this.queryParams).then((function(t){var r=t.data;e.preview.isVisible=!0,e.preview.context=r.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="导出数据",m.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;m.delete({ids:e}).then((function(e){var r=e.data;r.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.setCreditOrderDetail({enums:this.enums,dicts:this.dicts})},copy:function(e){this.$refs.edit.setCreditOrderDetail({row:e,enums:this.enums,dicts:this.dicts}),this.dialog.type="copy",this.dialog.isVisible=!0},edit:function(e){this.$refs.edit.setCreditOrderDetail({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,m.page(this.queryParams).then((function(t){var r=t.data;r.isSuccess&&(e.tableData=r.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 r={};r[t.split(".")[1]]=e[t][0],this.queryParams.model[t.split(".")[0]]=r}else this.queryParams.model[t]=e[t][0];this.search()},cellClick:function(e,t){var r=this;if("operation"!==t["columnKey"]){var i=!1;this.selection.forEach((function(t){t.id===e.id&&(i=!0,r.$refs.table.toggleRowSelection(e))})),i||this.$refs.table.toggleRowSelection(e,!0)}}}},w=O,D=Object(h["a"])(w,i,a,!1,null,"9ab30bd6",null);t["default"]=D.exports},9256:function(e,t,r){"use strict";r("99af"),r("4160"),r("caad"),r("4fad"),r("d3b7"),r("159b");var i=r("5530"),a=r("bc3a"),o=r.n(a),n=r("5c96"),s=r("5657");r("27ae");function l(e,t){"ECONNABORTED"===e.code?Object(n["Message"])({message:"请求超时"}):e.response&&e.response.data?Object(n["Message"])({message:e.response.data}):e.message&&Object(n["Message"])({message:e.message}),t(e)}function c(e,t){e.data.isError&&(4e4===e.data.code||40001===e.data.code||40002===e.data.code||40003===e.data.code||40005===e.data.code||40006===e.data.code||40008===e.data.code?n["MessageBox"].alert(e.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):n["Message"].error(e.data.msg)),t(e)}o.a.interceptors.request.use((function(e){var t=!1!==e.headers["X-isToken"]||e.headers["X-isToken"],r=s["a"].get("TOKEN","");r&&t&&(e.headers.token="Bearer "+r);var i="ceres_admin_web",a="ceres_admin_web";return e.headers["Authorization"]="Basic ".concat("".concat(i,":").concat(a)),e}),(function(e){return Promise.reject(e)})),o.a.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)}));var d=function(e){console.log(e,"opts");var t={ts:Date.now()},r=e.method.toUpperCase(),a={method:r,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(e.url),responseType:e.responseType||"",timeout:2e4},n=["PUT","POST","PATCH"];n.includes(r)?a.data=e.data||{}:a.params=Object(i["a"])(Object(i["a"])({},t),e.data||{}),e.formData&&(a.transformRequest=[function(e){var t=new FormData;return e&&Object.entries(e).forEach((function(e){t.append(e[0],e[1])})),t}]);var s=new Promise((function(e,t){o()(a).then((function(t){c(t,e)})).catch((function(e){l(e,t)}))}));return s};t["a"]=d},a888:function(e,t,r){"use strict";r("99af"),r("caad"),r("ac1f"),r("2532"),r("5319");var i={bind:function(e,t,r){var i=e.querySelector(".el-dialog__header"),a=e.querySelector(".el-dialog");i.style.cssText+=";cursor:move;",a.style.cssText+=";top:0px;";var o=function(){return window.document.currentStyle?function(e,t){return e.currentStyle[t]}:function(e,t){return getComputedStyle(e,!1)[t]}}();i.onmousedown=function(e){var t=e.clientX-i.offsetLeft,n=e.clientY-i.offsetTop,s=a.offsetWidth,l=a.offsetHeight,c=document.body.clientWidth,d=document.body.clientHeight,u=a.offsetLeft,m=c-a.offsetLeft-s,p=a.offsetTop,f=d-a.offsetTop-l,h=o(a,"left"),b=o(a,"top");h.includes("%")?(h=+document.body.clientWidth*(+h.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(h=+h.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(e){var i=e.clientX-t,o=e.clientY-n;-i>u?i=-u:i>m&&(i=m),-o>p?o=-p:o>f&&(o=f),a.style.cssText+=";left:".concat(i+h,"px;top:").concat(o+b,"px;"),r.child.$emit("dragDialog")},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null}}}},a=function(e){e.directive("el-drag-dialog",i)};window.Vue&&(window["el-drag-dialog"]=i,Vue.use(a)),i.install=a;t["a"]=i},c2cf:function(e,t,r){"use strict";var i=r("5530"),a=r("9256"),o={enums:{method:"GET",url:"/enums"}};t["a"]={uploadFile:"".concat("https://pos.admin.api.lotus-wallet.com","/attachment/upload"),enums:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.enums),{},{data:e}))}}},ebb5:function(e,t,r){"use strict";var i=r("5530"),a=r("9256"),o={page:{method:"POST",url:"/dictionaryItem/page"},update:{method:"PUT",url:"/dictionaryItem"},save:{method:"POST",url:"/dictionaryItem"},delete:{method:"DELETE",url:"/dictionaryItem"},list:{method:"GET",url:"/dictionaryItem/codes"},preview:{method:"POST",url:"/dictionaryItem/preview"},export:{method:"POST",url:"/dictionaryItem/export"},import:{method:"POST",url:"/dictionaryItem/import"}};t["a"]={page:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.page),{},{data:e}))},save:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.save),{},{data:e}))},update:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.update),{},{data:e}))},delete:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.delete),{},{data:e}))},list:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.list),{},{data:e}))},preview:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.preview),{},{data:e}))},export:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.export),{},{responseType:"blob",data:e}))},import:function(e){return Object(a["a"])(Object(i["a"])(Object(i["a"])({},o.import),{},{data:e}))}}},fa7d:function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o}));r("c975"),r("b680"),r("ac1f"),r("466d");var i=function(e){var t={terminal:"",browser:"",terminalType:{}};return t.terminalType={trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&-1===e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,iPhone:e.indexOf("iPhone")>-1,iPad:e.indexOf("iPad")>-1,webApp:-1===e.indexOf("Safari"),weixin:e.indexOf("MicroMessenger")>-1,qq:" qq"===e.match(/\sQQ/i)},t.terminalType.ios||t.terminalType.iPhone||t.terminalType.iPad?t.terminal="苹果":t.terminalType.android?t.terminal="安卓":t.terminal="PC",/msie/i.test(e)&&!/opera/.test(e)?t.browser="IE":/firefox/i.test(e)?t.browser="Firefox":/chrome/i.test(e)&&/webkit/i.test(e)&&/mozilla/i.test(e)?t.browser="Chrome":/opera/i.test(e)?t.browser="Opera":/iPad/i.test(e)?t.browser="iPad":!/webkit/i.test(e)||/chrome/i.test(e)&&/webkit/i.test(e)&&/mozilla/i.test(e)?t.browser="未知":t.browser="Safari",t},a=function(e){var t=[];if(e)for(var r in e)t.push({text:e[r],value:r});return t},o=function(e){if(e){var t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),t.className="oInput",t.style.display="none"}}}}]); |