chunk-12a94041.3c26ff63.js 5.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12a94041"],{"1aad":function(e,t,n){"use strict";n("30f3")},"1b4b":function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"app-list-content"},[t("x-crud",{staticClass:"liu-crud-wrap",on:{load:e.onLoad},scopedSlots:e._u([{key:"slot-tabs",fn:function(){return[t("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":e.handleClick},model:{value:e.tabIndex,callback:function(t){e.tabIndex=t},expression:"tabIndex"}},e._l(e.tabsData,(function(e,n){return t("el-tab-pane",{key:n,attrs:{label:""+e.text,name:e.key}})})),1)]},proxy:!0},{key:"table-column-mobile",fn:function({scope:n}){return[""!=n.row.mobile?t("span",[e._v(e._s(n.row.mobile))]):t("span",[e._v("-")])]}},{key:"table-column-debtAmount",fn:function({scope:t}){return[e._v(" "+e._s(t.row.debtAmount?parseFloat(t.row.debtAmount):0)+" ")]}},{key:"table-column-balance",fn:function({scope:n}){return[t("span",{staticStyle:{cursor:"pointer"},on:{click:function(t){return e.goBalanceChange(n.row)}}},[e._v(e._s(n.row.balance))])]}},{key:"table-column-actDebt",fn:function({scope:n}){return[Number(n.row.debtAmount)>Number(n.row.balance)?t("span",{staticStyle:{color:"blue","font-weight":"bold",cursor:"pointer"},on:{click:function(t){return e.goChange(n.row)}}},[e._v(" "+e._s(parseFloat((Number(n.row.debtAmount)-Number(n.row.balance)).toFixed(2)))+" ")]):t("span",{staticStyle:{"font-weight":"bold",cursor:"pointer"},on:{click:function(t){return e.goChange(n.row)}}},[e._v("-")])]}},{key:"table-column-buyAmount",fn:function({scope:n}){return[t("span",[e._v(e._s(n.row.buyAmount?parseFloat(n.row.buyAmount):0))])]}},{key:"slot-column-option",fn:function({scope:n}){return[t("el-button",{staticStyle:{"margin-left":"30px"},attrs:{size:"small",type:"primary"},on:{click:function(t){return e.kd(n.row,0)}}},[e._v("开新订单")])]}},{key:"table-column-recentExpend",fn:function({scope:n}){return["0000-00-00 00:00:00"==n.row.recentExpend?t("span",[e._v("没有下过单")]):t("span",[e._v(e._s(n.row.recentExpend?n.row.recentExpend.substr(0,11):0))])]}},{key:"table-column-visitTime",fn:function({scope:n}){return[t("span",[e._v(e._s(n.row.visitTime?n.row.visitTime.substr(0,11):0))])]}},{key:"slot-top-element",fn:function(){return[t("el-input",{ref:"customSearchRef",staticStyle:{width:"400px"},attrs:{placeholder:"搜索客户",size:"big"},on:{input:function(t){return e.changeText()}},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})]},proxy:!0}])})],1)},a=[],s=(n("b138"),n("5880")),r=n("51be"),l={components:{},data(){return{app:null,tabIndex:"0",tabsData:[{text:"客户列表",key:"0",val:0}],modalData:{},drapShow:!1,confirmMobile1:"",addPop:!1,name:"",fileUrl:"",shopInfo:{}}},computed:{...Object(s["mapGetters"])({levelData:"level"}),...Object(s["mapGetters"])(["token"])},created(){this.fileUrl=r["baseUrl"]+"/order/import-create",this.getLevel()},mounted(){this.$nextTick(()=>{this.$refs.customSearchRef.focus()})},methods:{...Object(s["mapActions"])(["getLevel"]),cancelBook(){this.$refs["openCloseBookRef"].doClose()},changeBook(e){this.$refs["openCloseBookRef"].doClose();let t=0==e?1:0;return this.$service.book.changeBook({status:t}).then(e=>{this.$message.success("操作成功"),this.app.refresh({status:this.tabIndex,search:this.search})})},fileUpSuccess(e){if(1==e.code){this.$notify({title:"提交成功",message:"success",type:"success"});let e=this;setTimeout(()=>{e.$router.push({path:"/order/list"})},1e3)}else this.$message.error(e.msg)},changeText(){this.app.refresh({type:this.tabIndex,name:this.name})},goChange(e){let t={};t.customId=e.id,t.endTime="",this.$router.push({path:"/custom/pastAccountChange",query:t})},goBalanceChange(e){let t={};t.customId=e.id,t.customName=e.name,this.$router.push({path:"/member/custom-balance-list",query:t})},kd(e,t){let n={};n.customId=e.id,n.customName=e.name,n.book=t,this.$router.push({path:"/order/confirm",query:n})},handleClick(e,t){this.app.refresh({type:this.tabIndex,name:this.name})},onLoad({ctx:e,app:t}){this.app=t,this.$route.query.type&&(this.tabIndex=this.$route.query.type),e.service(this.$service.custom).set("table",{columns:[{prop:"name",label:"名称",align:"center",width:160},{prop:"mobile",label:"手机号",align:"center",width:110},{prop:"id",label:"ID",align:"center",width:90},{prop:"debtAmount",label:"欠款",align:"center",width:100},{prop:"balance",label:"余额",align:"center",width:90},{prop:"actDebt",label:"待结欠款",align:"center",width:100},{prop:"buyNum",label:"消费次数",align:"center",width:90},{prop:"buyAmount",label:"累计消费",align:"center",width:110},{prop:"recentExpend",label:"最近下单",align:"center",width:120},{prop:"visitTime",label:"最近访问",align:"center",width:120}],op:{visible:!0,props:{width:360,align:"center",fixed:"left",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-top-element","flex1"],["data-table"],["flex1","pagination"]]).on("refresh",async(e,{next:t})=>{let n=await t(e);this.shopInfo=n.shopInfo}).done(),t.refresh({type:this.tabIndex,name:this.name})}}},i=l,c=(n("1aad"),n("1805")),u=Object(c["a"])(i,o,a,!1,null,"468a50b1",null);t["default"]=u.exports},"30f3":function(e,t,n){}}]);