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
19 KiB
1 lines
19 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6bdd422c"],{"1cac":function(t,e,a){},"756c":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-tabs",{staticClass:"my-tabs",staticStyle:{"margin-top":"20px"},attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[e("el-tab-pane",{attrs:{label:"个人卡记录",name:"roleList"}},[e("div",{staticClass:"main-content"},[e("div",{directives:[{name:"show",rawName:"v-show",value:1==t.viewState,expression:"viewState == 1"}],staticClass:"container"},[e("div",{staticClass:"tab-header"},[e("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.page.params}},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:21}},[e("el-form-item",{attrs:{label:"发行开始日期"}},[e("el-date-picker",{staticStyle:{width:"200px"},attrs:{type:"date",placeholder:"选择日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},on:{change:t.selectTime1},model:{value:t.page.params.startDate,callback:function(e){t.$set(t.page.params,"startDate",e)},expression:"page.params.startDate"}})],1),e("el-form-item",{attrs:{label:"发行结束日期"}},[e("el-date-picker",{staticStyle:{width:"200px"},attrs:{type:"date",placeholder:"选择日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},on:{change:t.selectTime2},model:{value:t.page.params.endDate,callback:function(e){t.$set(t.page.params,"endDate",e)},expression:"page.params.endDate"}})],1),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.getPageList()}}},[t._v("查 询")])],1)],1)],1)],1),e("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.tableData,border:"","row-style":{height:"40px"}}},[e("el-table-column",{attrs:{label:"序号",width:"70px",type:"index",index:t.indexMethod,align:"center"}}),e("el-table-column",{attrs:{label:"操作",width:"150px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.showRow(a.row.sid)}}},[t._v(" 明细 ")])]}}])}),e("el-table-column",{attrs:{prop:"startNumber",label:"序列起始号",align:"center"}}),e("el-table-column",{attrs:{prop:"endNumber",label:"序列结束号",align:"center"}}),e("el-table-column",{attrs:{prop:"buildDate",label:"发行时间",align:"center"}}),e("el-table-column",{attrs:{prop:"countNumber",label:"发行总数",align:"center"}}),e("el-table-column",{attrs:{prop:"bagName",label:"绑定礼包",align:"center"}})],1),e("pagination",{staticStyle:{"padding-bottom":"100px"},attrs:{total:t.page.total,page:t.page.current,limit:t.page.size},on:{"update:page":function(e){return t.$set(t.page,"current",e)},"update:limit":function(e){return t.$set(t.page,"size",e)},pagination:t.getPageList}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2==t.viewState,expression:"viewState == 2"}],staticClass:"container"},[e("div",{staticClass:"tab-header"},[e("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.listQuery.params}},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:20}},[e("el-form-item",{attrs:{label:"卡片序列号"}},[e("el-input",{attrs:{placeholder:"",clearable:""},model:{value:t.listQuery.params.number,callback:function(e){t.$set(t.listQuery.params,"number",e)},expression:"listQuery.params.number"}})],1),e("el-form-item",{attrs:{label:"卡片状态"}},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.listQuery.params.state,callback:function(e){t.$set(t.listQuery.params,"state",e)},expression:"listQuery.params.state"}},t._l(t.stateList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.name,value:t.sid}})})),1)],1),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.getPageList2()}}},[t._v("查 询")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.returnView()}}},[t._v("返 回")])],1),e("el-col",{attrs:{span:4}},[e("el-form-item",{staticStyle:{float:"right"}},[e("div",{staticStyle:{display:"flex","flex-direction":"row","align-items":"center","justify-content":"space-between"}},[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.exportExcel()}}},[t._v("导出Excel")]),e("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:function(e){return t.downloadQR()}}},[t._v("下载二维码")])],1)])],1)],1)],1)],1),e("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.tableData2,border:"","row-style":{height:"40px"}}},[e("el-table-column",{attrs:{label:"序号",width:"70px",type:"index",index:t.indexMethod2,align:"center"}}),e("el-table-column",{attrs:{label:"操作",width:"150px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"primary",disabled:""!=a.row.customerSid||"已作废"==a.row.state,size:"mini"},on:{click:function(e){return t.delectItem(a.row)}}},[t._v(" 作废 ")])]}}])}),e("el-table-column",{attrs:{prop:"serialNumber",label:"序列号",align:"center"}}),e("el-table-column",{attrs:{prop:"code",label:"提货码",align:"center"}}),e("el-table-column",{attrs:{prop:"codeKey",label:"提货密码",align:"center"}}),e("el-table-column",{attrs:{prop:"state",label:"卡片状态",align:"center"}}),e("el-table-column",{attrs:{prop:"buildDate",label:"发放时间",align:"center"}}),e("el-table-column",{attrs:{prop:"name",label:"发放支行",align:"center"}})],1),e("pagination",{staticStyle:{"padding-bottom":"100px"},attrs:{total:t.listQuery.total,page:t.listQuery.current,limit:t.listQuery.size},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:t.getPageList2}})],1)])]),e("el-tab-pane",{attrs:{label:"发行个人卡",name:"addrole"}},[e("div",{staticClass:"listconadd"},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"item"},[e("span",{staticClass:"item_text"},[t._v("区域编码:")]),e("el-input",{staticClass:"item_input",attrs:{placeholder:"",oninput:"value=value.replace(/[^0-9]/g,'')",maxlength:"2",clearable:""},model:{value:t.formobj.cardArea,callback:function(e){t.$set(t.formobj,"cardArea",e)},expression:"formobj.cardArea"}})],1),e("div",{staticClass:"item"},[e("span",{staticClass:"item_text"},[t._v("券卡数量:")]),e("el-input",{staticClass:"item_input",attrs:{placeholder:"",oninput:"value=value.replace(/^(0+)|[^\\d]+/g,'')",clearable:""},model:{value:t.formobj.num,callback:function(e){t.$set(t.formobj,"num",e)},expression:"formobj.num"}})],1),e("div",{staticClass:"item"},[e("span",{staticClass:"item_text"},[t._v("选择礼包:")]),e("el-select",{staticClass:"item_input",staticStyle:{width:"100%"},attrs:{filterable:"",clearable:"",placeholder:"请选择"},on:{change:t.giftPackSelect},model:{value:t.formobj.bagSid,callback:function(e){t.$set(t.formobj,"bagSid",e)},expression:"formobj.bagSid"}},t._l(t.giftPackList,(function(t){return e("el-option",{key:t.sid,attrs:{label:t.name,value:t.sid}})})),1)],1),e("div",{staticStyle:{width:"100%",display:"flex","flex-direction":"row","justify-content":"center","margin-top":"20px"}},[e("el-button",{attrs:{type:"primary",size:"small",disabled:t.submitdisabled},on:{click:t.saveOrUpdate}},[t._v("发行")])],1)])],1)]),e("el-tab-pane",{attrs:{label:"批量发行",name:"batch"}},[e("div",{staticClass:"listconadd"},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"item"},[e("span",{staticClass:"item_text"},[t._v("起始日期:")]),e("el-date-picker",{staticClass:"item_input",attrs:{type:"date",placeholder:"选择日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},on:{change:t.selectbatchInfo1},model:{value:t.batchInfo.startDate,callback:function(e){t.$set(t.batchInfo,"startDate",e)},expression:"batchInfo.startDate"}})],1),e("div",{staticClass:"item"},[e("span",{staticClass:"item_text"},[t._v("终止日期:")]),e("el-date-picker",{staticClass:"item_input",attrs:{type:"date",placeholder:"选择日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd","picker-options":t.pickerOptions},on:{change:t.selectbatchInfo2},model:{value:t.batchInfo.endDate,callback:function(e){t.$set(t.batchInfo,"endDate",e)},expression:"batchInfo.endDate"}})],1),e("div",{staticClass:"item",staticStyle:{"margin-top":"30px"}},[e("span",{staticClass:"item_text"},[t._v("导入数据:")]),e("div",{staticClass:"item_input"},[e("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:t.updateAction,"on-success":t.handleSuccess,"on-remove":t.handleRemove,"file-list":t.uploadFileList,accept:".xls,.xlsx",name:"file","auto-upload":!1,multiple:!1,limit:1,data:t.batchInfo}},[""==t.batchInfo.startDate&&""==t.batchInfo.endDate?e("span",{staticStyle:{color:"#999"}},[t._v("请先选择日期")]):t._e(),""!=t.batchInfo.startDate&&""!=t.batchInfo.endDate?e("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]):t._e(),""!=t.batchInfo.startDate&&""!=t.batchInfo.endDate?e("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"success"},on:{click:t.submitUpload}},[t._v("导入")]):t._e()],1)],1)]),e("div",{directives:[{name:"show",rawName:"v-show",value:""!=t.result,expression:"result!=''"}],staticClass:"item"},[e("span",{staticClass:"item_text"}),e("span",{staticClass:"item_input"},[t._v(t._s(t.result))])])])],1)])],1),e("el-dialog",{attrs:{title:"发放信息",visible:t.editDialog,width:"30%","before-close":t.banClose},on:{"update:visible":function(e){t.editDialog=e}}},[e("table",{staticClass:"e-table",attrs:{cellspacing:"0"}},[e("tr",[e("td",[t._v("起始序列号")]),e("td",[e("el-input",{staticStyle:{width:"100%"},attrs:{oninput:"value=value.replace(/[^0-9]/g,'')"},on:{input:t.input1},model:{value:t.from.start,callback:function(e){t.$set(t.from,"start",e)},expression:"from.start"}})],1)]),e("tr",[e("td",[t._v("结束序列号")]),e("td",[e("el-input",{staticStyle:{width:"100%"},attrs:{oninput:"value=value.replace(/[^0-9]/g,'')"},on:{input:t.input2},model:{value:t.from.end,callback:function(e){t.$set(t.from,"end",e)},expression:"from.end"}})],1)]),e("tr",[e("td",[t._v("发放支行")]),e("td",[e("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",clearable:"",placeholder:"请选择"},on:{change:t.bankSelect},model:{value:t.from.bankSid,callback:function(e){t.$set(t.from,"bankSid",e)},expression:"from.bankSid"}},t._l(t.bankList,(function(t){return e("el-option",{key:t.sid,attrs:{label:t.name,value:t.sid}})})),1)],1)])]),e("div",{staticStyle:{"margin-top":"20px","text-align":"center"}},[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.save()}}},[t._v("保 存")]),e("el-button",{on:{click:t.banClose}},[t._v("关 闭")])],1)])],1)},s=[],n=a("c88c"),l={data:function(){return{pickerOptions:{disabledDate:function(t){return t.getTime()<(new Date).getTime()-864e5}},viewState:1,submitdisabled:!1,page:{total:0,current:1,size:10,params:{startDate:"",endDate:""}},tableData:[],tableData2:[],listQuery:{total:0,current:1,size:10,params:{sid:"",number:"",state:""}},activeName:"roleList",formobj:{cardArea:"",num:"",bagSid:""},giftPackList:[],stateList:[{name:"全部",sid:""},{name:"未发放",sid:"1"},{name:"未绑定用户",sid:"2"},{name:"未提货",sid:"3"},{name:"部分提货",sid:"4"},{name:"提货完成",sid:"5"}],recordId:"",editDialog:!1,from:{start:"",end:"",bankSid:""},bankList:[],batchInfo:{startDate:"",endDate:""},updateAction:"/lpkapi/lpkgiftcard/getExcelInfo2",uploadFileList:[],result:""}},created:function(){this.getPageList(),this.getBankList()},methods:{indexMethod:function(t){var e=(this.page.current-1)*this.page.size,a=t+1+e;return console.log("pageindex",a),a},indexMethod2:function(t){var e=(this.listQuery.current-1)*this.listQuery.size,a=t+1+e;return console.log("pageindex2",a),a},handleDownload:function(){var t=document.createElement("a");t.href="./云菜窖.xls",t.download="云菜窖.xls",t.style.display="none",document.body.appendChild(t),t.click(),t.remove()},handleClick:function(t,e){this.viewState=1,this.listQuery={total:0,current:1,size:10,params:{sid:"",number:"",state:""}},"addrole"==t.name?this.giftBagList():"roleList"==t.name&&this.getPageList()},pagination:function(t){this.page.current=t.pageNum,this.page.size=t.pageSize,this.getPageList(this.page)},pagination2:function(t){this.listQuery.current=t.pageNum,this.listQuery.size=t.pageSize,this.getPageList2(this.listQuery)},selectTime1:function(t){console.log("selectTime1:",t),this.page.params.startDate=t},selectTime2:function(t){console.log("selectTime2:",t),this.page.params.endDate=t},selectbatchInfo1:function(t){console.log("selectbatchInfo1:",t),this.batchInfo.endDate&&new Date(this.batchInfo.startDate).getTime()>new Date(this.batchInfo.endDate).getTime()?(this.$message({showClose:!0,type:"error",message:"起始日期不能大于结束日期"}),this.batchInfo.startDate=""):this.batchInfo.startDate=t},selectbatchInfo2:function(t){console.log("selectbatchInfo2:",t),this.batchInfo.startDate&&new Date(this.batchInfo.startDate).getTime()>new Date(this.batchInfo.endDate).getTime()?(this.$message({showClose:!0,type:"error",message:"起始日期不能大于结束日期"}),this.batchInfo.endDate=""):this.batchInfo.endDate=t},getPageList:function(){var t=this;n["a"].recordListPage(this.page).then((function(e){console.log(">>>>>>>>>getPageList",e.data),t.tableData=e.data.records,t.page.total=e.data.total})).catch((function(){}))},getPageList2:function(){var t=this;n["a"].recordDetails(this.listQuery).then((function(e){console.log(">>>>>>>>>recordDetails",e.data),t.tableData2=e.data.records,t.recordId=e.data.records[0].recordId,t.listQuery.total=e.data.total})).catch((function(){}))},editRow:function(t){this.editDialog=!0},showRow:function(t){var e=this;this.listQuery.params.sid=t,this.viewState=2,n["a"].recordDetails(this.listQuery).then((function(t){console.log(">>>>>>>>>recordDetails",t.data),e.tableData2=t.data.records,e.recordId=t.data.records[0].recordId,e.listQuery.total=t.data.total})).catch((function(){}))},returnView:function(){this.tableData2=[],this.viewState=1,this.listQuery={total:0,current:1,size:10,params:{sid:"",number:"",state:""}}},exportExcel:function(){var t=this,e=this.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});this.listQuery.params.number="",this.listQuery.params.state="",n["a"].exportExcel(this.listQuery.params).then((function(a){e.close();var i=new Blob([a],{type:"application/vnd.ms-excel"}),s="个人卡明细列表(批次号_"+t.recordId+").xls",n=document.createElement("a");n.download=s,n.style.display="nonde",n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),URL.revokeObjectURL(n.href),document.body.removeChild(n)})).catch((function(){e.close()}))},downloadQR:function(){this.$message({showClose:!0,type:"success",message:"功能暂未完善..."})},giftBagList:function(){var t=this;n["a"].giftBagList().then((function(e){console.log(">>>>>>>>>giftBagList",e.data),t.giftPackList=e.data})).catch((function(){}))},giftPackSelect:function(t){console.log(">>>>>>>>>giftPackSelect",t),this.formobj.bagSid=t},saveOrUpdate:function(){var t=this;console.log(">>>>>>>>>saveOrUpdate",this.formobj),this.submitdisabled=!0,n["a"].generateCard(this.formobj).then((function(e){e.success?(t.submitdisabled=!1,t.$message({showClose:!0,type:"success",message:e.msg}),t.handleReturn("true")):t.submitdisabled=!1})).catch((function(){t.submitdisabled=!1}))},handleReturn:function(t){"true"===t&&this.$emit("reloadlist"),this.formobj={cardArea:"",num:"",bagSid:""},this.$emit("doback")},getBankList:function(){var t=this;n["a"].bankList().then((function(e){console.log(">>>>>>>>>getBankList",e.data),t.bankList=e.data})).catch((function(){}))},input1:function(t){console.log("input1》》》》",t)},input2:function(t){console.log("input2》》》》",t)},bankSelect:function(t){console.log("bankSelect》》》》",t);var e=this.bankList.filter((function(e){return e.sid===t}));this.from.bankSid=e[0].sid},save:function(){var t=this;console.log("save》》》》",this.from),n["a"].cardGrant(this.from).then((function(e){e.success&&t.$message({showClose:!0,type:"success",message:e.msg}),t.editDialog=!1,t.from={start:"",end:"",bankSid:""},t.getPageList()})).catch((function(){}))},banClose:function(){this.from={start:"",end:"",bankSid:""},this.editDialog=!1},handleSuccess:function(t,e,a){console.log("resp",t),t.success?this.$message({showClose:!0,type:"success",message:t.msg}):this.$message({showClose:!0,type:"error",message:t.msg}),this.result=t.msg},handleRemove:function(t,e){},submitUpload:function(){this.$refs.upload.submit()},delectItem:function(t){var e=this;console.log("row",t);var a="请确认是否作废所选卡券?";this.$confirm(a,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a=e.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});n["a"].cancelCard(t.sid).then((function(t){a.close(),t.success&&(e.$message({type:"success",message:t.msg,showClose:!0}),e.showRow(e.listQuery.params.sid))})).catch((function(t){a.close()}))})).catch((function(){}))}}},r=l,o=(a("f340"),a("2877")),c=Object(o["a"])(r,i,s,!1,null,null,null);e["default"]=c.exports},c88c:function(t,e,a){"use strict";var i=a("b775");e["a"]={giftBagListPage:function(t){return Object(i["a"])({url:"/lpkgiftbag/giftBagListPage",method:"post",data:t})},updateIsEnable:function(t,e){return Object(i["a"])({url:"/lpkgiftbag/isGrounding/"+t+"/"+e})},bankList:function(t){return Object(i["a"])({url:"/lpkbank/listAll",method:"get",data:t})},getGoods:function(t){return Object(i["a"])({url:"/lpkgoods/getGoods",method:"post",data:t})},saveGiftBag:function(t){return Object(i["a"])({url:"/lpkgiftbag/saveGiftBag",method:"post",data:t})},giftBagInit:function(t){return Object(i["a"])({url:"/lpkgiftbag/giftBagInit/"+t,method:"get"})},recordListPage:function(t){return Object(i["a"])({url:"/lpkcardbuildrecord/recordListPage",method:"post",data:t})},recordDetails:function(t){return Object(i["a"])({url:"/lpkgiftcard/recordDetails",method:"post",data:t})},exportExcel:function(t){return Object(i["a"])({url:"/lpkgiftcard/exportExcel",method:"post",responseType:"blob",data:t,headers:{"Content-Type":"application/json"}})},cancelCard:function(t){return Object(i["a"])({url:"/lpkgiftcard/cancelCard/"+t,method:"get"})},giftBagList:function(t){return Object(i["a"])({url:"/lpkgiftbag/giftBagList",method:"get",data:t})},generateCard:function(t){return Object(i["a"])({url:"/lpkgiftcard/generateCard",method:"post",data:t})},cardGrant:function(t){return Object(i["a"])({url:"/lpkgiftcard/cardGrant",method:"post",data:t})},appletGiftBagListPage:function(t){return Object(i["a"])({url:"/appletgiftbag/giftBagListPage",method:"post",data:t})},updateAppletgiftbagState:function(t,e){return Object(i["a"])({url:"/appletgiftbag/isGrounding//"+t+"/"+e})},saveAppletGiftBag:function(t){return Object(i["a"])({url:"/appletgiftbag/saveGiftBag",method:"post",data:t})},AppletGiftBagInit:function(t){return Object(i["a"])({url:"/appletgiftbag/giftBagInit/"+t,method:"get"})},newUserGiftListPage:function(t){return Object(i["a"])({url:"/ecommendnewuserbag/giftBagListPage",method:"post",data:t})},updateNewUserGiftState:function(t,e){return Object(i["a"])({url:"/ecommendnewuserbag/isGrounding/"+t+"/"+e})},saveNewUserGift:function(t){return Object(i["a"])({url:"/ecommendnewuserbag/saveGiftBag",method:"post",data:t})},newUserGiftInit:function(t){return Object(i["a"])({url:"/ecommendnewuserbag/giftBagInit/"+t,method:"get"})}}},f340:function(t,e,a){"use strict";a("1cac")}}]);
|