cpop_nftmeta_sdm/web/admin-web/static/js/chunk-4927341e.75bc0555.js
2024-10-25 16:17:26 +08:00

1 line
12 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4927341e","chunk-9cb42332"],{"101b":function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:"合成计划",visible:t.show,width:"52.5rem","append-to-body":""},on:{"update:visible":function(e){t.show=e}}},[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"110px",rules:t.rules}},[n("el-form-item",{attrs:{label:"合成计划",prop:"code"}},[n("el-input",{model:{value:t.form.compoundName,callback:function(e){t.$set(t.form,"compoundName",e)},expression:"form.compoundName"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"合成编号",prop:"name"}},[n("el-input",{model:{value:t.form.compoundCode,callback:function(e){t.$set(t.form,"compoundCode",e)},expression:"form.compoundCode"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"开始时间",prop:"subname"}},[n("SelectDateTime",{model:{value:t.form.startTime,callback:function(e){t.$set(t.form,"startTime",e)},expression:"form.startTime"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"结束时间",prop:"branderId"}},[n("SelectDateTime",{model:{value:t.form.endTime,callback:function(e){t.$set(t.form,"endTime",e)},expression:"form.endTime"}})],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{type:"primary"},on:{click:t.saveHandler}},[t._v(t._s(t.btn_title))]),t._v(" "),n("el-button",{on:{click:t.close}},[t._v("取消")])],1)],1)},r=[],a=n("5c31"),l=n("d9a9"),u=n("f6fb"),i={components:{SelectDateTime:u["default"]},name:"zNftForm",data:function(){return{status:l["g"],blindflagType:l["a"],form:{},show:!1,loading:!1,rules:{}}},props:{branderList:{typeof:Array,default:function(){return[]}},publishList:{typeof:Array,default:function(){return[]}},categoryList:{typeof:Array,default:function(){return[]}}},computed:{formState:function(){return!this.form.compoundId},btn_title:function(){return this.formState?"新建计划":"保存计划"}},methods:{open:function(t){t&&t.nftId?(t&&(this.form=Object.assign({},t)),this.show=!0):this.$message.error("未知藏品")},close:function(){this.show=!1},saveHandler:function(){var t=this;this.$refs.form.validate((function(e){e&&(t.loading=!0,t.formState?t.createHandler():t.editHandler())}))},createHandler:function(){var t=this;Object(a["b"])(this.form).then((function(e){"success"===e.code&&(t.$message.success(e.msg),t.finish())})).finally((function(){t.loading=!1}))},editHandler:function(){var t=this;Object(a["g"])(this.form).then((function(e){"success"===e.code?(t.finish(),t.$message.success(e.msg)):t.$message.error(e.msg)})).finally((function(){t.loading=!1}))},finish:function(){this.close(),this.$emit("reloadTable")}}},c=i,s=n("2877"),d=Object(s["a"])(c,o,r,!1,null,null,null);e["default"]=d.exports},"15ad":function(t,e,n){"use strict";n("be3e")},"5c31":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"g",(function(){return a})),n.d(e,"e",(function(){return l})),n.d(e,"d",(function(){return u})),n.d(e,"h",(function(){return i})),n.d(e,"a",(function(){return c})),n.d(e,"f",(function(){return s})),n.d(e,"c",(function(){return d}));var o=n("b775");function r(t){return Object(o["a"])({url:"/admin/znftcompound",method:"post",data:t})}function a(t){return Object(o["a"])({url:"/admin/znftcompound",method:"put",data:t})}function l(t){return Object(o["a"])({url:"/admin/znftcompounddetails/list/"+t,method:"get"})}function u(t){return Object(o["a"])({url:"/admin/znftcompound/"+t,method:"delete"})}function i(t){return Object(o["a"])({url:"/admin/znftcompound/nft/list/"+t,method:"get"})}function c(t){return Object(o["a"])({url:"/admin/znftcompounddetails",method:"post",data:t})}function s(t){return Object(o["a"])({url:"/admin/znftcompounddetails",method:"put",data:t})}function d(t){return Object(o["a"])({url:"/admin/znftcompounddetails/"+t,method:"delete"})}},9484:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:"合成列表",visible:t.show,width:"52.5rem"},on:{"update:visible":function(e){t.show=e}}},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:5}},[t._v("当前藏品:")]),t._v(" "),n("el-col",{attrs:{span:15}},[t._v(t._s(t.form.name))])],1),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.insertCompoundHandler}},[t._v("添加合成")]),t._v(" "),n("el-table",{attrs:{loading:t.loading,"highlight-current-row":"",data:t.compoundList},on:{"row-click":t.selectCompoundHandler}},[n("el-table-column",{attrs:{label:"合成计划",prop:"compoundName"}}),t._v(" "),n("el-table-column",{attrs:{label:"合成编号",prop:"compoundCode"}}),t._v(" "),n("el-table-column",{attrs:{label:"开始时间",prop:"startTime"}}),t._v(" "),n("el-table-column",{attrs:{label:"结束时间",prop:"endTime"}}),t._v(" "),n("el-table-column",{attrs:{label:"藏品类型",prop:"compoundCount"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"danger",icon:"el-icon-edit",circle:""},on:{click:function(n){return t.editCompoundHandler(e.row)}}}),t._v(" "),n("el-button",{attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(n){return t.removeCompoundHandler(e.row)}}})]}}])})],1),t._v(" "),t.currentCompound?n("div",[n("custom-select",{attrs:{search:!0,placeholder:"请选择系列",options:t.categorylist,prop:{label:"name",value:"id"}},model:{value:t.currentCategory,callback:function(e){t.currentCategory=e},expression:"currentCategory"}}),t._v(" "),n("custom-select",{attrs:{search:!0,placeholder:"请选择藏品",options:t.nftList,prop:{label:"name",value:"nftId"}},on:{change:t.insertItemHandler},model:{value:t.currentDetailsNft,callback:function(e){t.currentDetailsNft=e},expression:"currentDetailsNft"}}),t._v(" "),n("el-table",{attrs:{loading:t.loading,"highlight-current-row":"",data:t.detailsNfts}},[n("el-table-column",{attrs:{prop:"nftName",label:"碎片藏品"}}),t._v(" "),n("el-table-column",{attrs:{prop:"nftNumber",label:"数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input-number",{on:{change:function(n){return t.changeDetailsNftNumberHandler(e.row)}},model:{value:e.row.nftNumber,callback:function(n){t.$set(e.row,"nftNumber",n)},expression:"scope.row.nftNumber"}})]}}],null,!1,563449598)}),t._v(" "),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(n){return t.removeItemHandler(e.row)}}})]}}],null,!1,2706524444)})],1)],1):t._e(),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.close}},[t._v("关闭")])],1),t._v(" "),n("AddSynthesis",{ref:"addSynthesis",on:{reloadTable:function(e){return t.reloadTable()}}})],1)},r=[],a=n("ce7a"),l=n("5c31"),u=n("e1c8"),i=n("101b"),c={name:"compoundManager",components:{customSelect:u["default"],AddSynthesis:i["default"]},data:function(){return{currentCategory:null,currentCompound:null,currentDetailsNft:null,compoundList:[],nftList:[],detailsNfts:[],form:{},show:!1,loading:!1,rules:{},page:{current:1,size:10}}},props:{categorylist:{type:Array,default:function(){return[]}}},watch:{currentCategory:{handler:function(t){this.currentDetailsNft=null,t&&this.getNftList(t)}},show:{handler:function(t){t||(this.currentCompound=null,this.currentCategory=null,this.currentDetailsNft=null)}}},computed:{seriesList:{get:function(){return this.categorylist},set:function(t){return t}}},methods:{getNftList:function(t){var e=this;Object(a["e"])(t).then((function(t){"success"==t.code&&(e.nftList=t.data)}))},reloadTable:function(){var t=this;Object(l["h"])(this.form.nftId).then((function(e){"success"===e.code&&(t.compoundList=e.data)})).finally((function(){t.loading=!1}))},insertCompoundHandler:function(){this.$refs.addSynthesis.open({nftId:this.form.nftId})},editCompoundHandler:function(t){this.$refs.addSynthesis.open(t)},removeCompoundHandler:function(t){var e=this;this.$confirm("是否删除 ".concat(t.compoundName," ?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,Object(l["d"])(t.compoundId).then((function(t){"success"===t.code?(e.$message.success("删除成功!"),e.currentCompound=null,e.reloadTable()):e.$message.error(t.msg)})).finally((function(){e.loading=!1}))})).catch((function(){}))},reloadDetails:function(){var t=this;this.currentCompound&&Object(l["e"])(this.currentCompound).then((function(e){"success"===e.code&&(t.detailsNfts=e.data)}))},insertItemHandler:function(t){var e=this,n={compoundId:this.currentCompound,nftId:t.nftId,nftNumber:1};this.loading=!0,Object(l["a"])(n).then((function(t){"success"===t.code?(e.reloadTable(),e.reloadDetails()):e.$message.error(t.msg)})).finally((function(){e.loading=!1}))},removeItemHandler:function(t){var e=this;Object(l["c"])(t.detailsId).then((function(t){"success"!==t.code&&e.$message.error(t.msg),e.reloadDetails(),e.reloadTable()}))},selectCompoundHandler:function(t){this.currentCompound=t.compoundId,this.reloadDetails()},changeDetailsNftNumberHandler:function(t){var e=this;this.loading=!0,Object(l["f"])(t).then((function(t){"success"!==t.code&&e.$message.error(t.msg)})).finally((function(){return e.loading=!1}))},open:function(t){if(t){var e=Object.assign({},t);this.form=e,this.reloadTable()}else this.form={};this.show=!0},close:function(){this.show=!1}}},s=c,d=(n("15ad"),n("2877")),f=Object(d["a"])(s,o,r,!1,null,"6455283a",null);e["default"]=f.exports},be3e:function(t,e,n){},ce7a:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return i})),n.d(e,"i",(function(){return c})),n.d(e,"f",(function(){return s})),n.d(e,"e",(function(){return d})),n.d(e,"g",(function(){return f}));var o=n("b775");function r(){return Object(o["a"])({url:"/admin/znft/list",method:"get"})}function a(t){return Object(o["a"])({url:"/admin/znft/page",method:"get",params:t})}function l(t){return Object(o["a"])({url:"/admin/znft",method:"post",data:t})}function u(t){return Object(o["a"])({url:"/admin/znft",method:"put",data:t})}function i(t){return Object(o["a"])({url:"/admin/znft/"+t,method:"delete"})}function c(t){return Object(o["a"])({url:"/admin/zwhitelist",method:"post",data:t})}function s(t){return Object(o["a"])({url:"/admin/zwhitelist/"+t,method:"get"})}function d(t){return Object(o["a"])({url:"/admin/zcategory/nft/"+t,method:"get"})}function f(t){return Object(o["a"])({url:"/admin/znft/stock/fixed/"+t,method:"put"})}},d9a9:function(t,e,n){"use strict";n.d(e,"g",(function(){return o})),n.d(e,"i",(function(){return r})),n.d(e,"f",(function(){return a})),n.d(e,"a",(function(){return l})),n.d(e,"e",(function(){return u})),n.d(e,"d",(function(){return i})),n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return s})),n.d(e,"h",(function(){return d}));var o=[{label:"禁用",value:0},{label:"启用",value:1}],r=[{label:"待销毁",value:0},{label:"正在销毁",value:1},{label:"销毁完成",value:2}],a=[{label:"预售",value:1},{label:"盲盒",value:2}],l=[{label:"盲盒",value:0},{label:"合成材料",value:1}],u=[{label:"普通藏品",value:"NFT"},{label:"DIY",value:"DIYNFT"},{label:"核销藏品",value:"VERIFICATION"},{label:"优惠券",value:"INTERESTS"}],i=[{label:"图片",value:1},{label:"视频",value:2}],c=[{label:"兑换券",value:1}],s=[{label:"启用",value:"ENABLE"},{label:"禁用",value:"DISABLE"}],d=[{label:"免费",value:"FREE"},{label:"折扣",value:"DISCOUNT"}]}}]);