text: var f=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=e=>f(e,"__esModule",{value:!0});var B=(e,o)=>{for(var n in o)f(e,n,{get:o[n],enumerable:!0})};var p=(e,o,n,c)=>{for(var t=c>1?void 0:c?R(o,n):o,i=e.length-1,a;i>=0;i--)(a=e[i])&&(t=(c?a(o,n,t):a(t))||t);return c&&t&&f(o,n,t),t};D(exports);B(exports,{default:()=>M});var w={11100:{value:11100,amount:0,Jie:0,Dai:0,Dir:1,text:"\u5E93\u5B58\u73B0\u91D1"},11200:{value:11200,amount:0,Jie:0,Dai:0,Dir:1,text:"\u94F6\u884C\u5B58\u6B3E"},12e3:{value:12e3,amount:0,Jie:0,Dai:0,Dir:1,text:"\u5E94\u6536\u8D26\u6B3E"},13e3:{value:13e3,amount:0,Jie:0,Dai:0,Dir:1,text:"\u9884\u4ED8\u8D26\u6B3E"},14200:{value:14200,amount:0,Jie:0,Dai:0,Dir:1,text:"\u5728\u9014\u7269\u8D44"},14400:{value:14400,amount:0,Jie:0,Dai:0,Dir:1,text:"\u5E93\u5B58\u5546\u54C1"},21e3:{value:21e3,amount:0,Jie:0,Dai:0,Dir:-1,text:"\u5E94\u4ED8\u8D26\u6B3E-\u8D27\u6B3E"},21100:{value:21100,amount:0,Jie:0,Dai:0,Dir:-1,text:"\u5E94\u4ED8\u8D26\u6B3E-\u5F80\u6765\u6B3E"},22e3:{value:22e3,amount:0,Jie:0,Dai:0,Dir:-1,text:"\u9884\u6536\u8D26\u6B3E"},23100:{value:23100,amount:0,Jie:0,Dai:0,Dir:-1,text:"\u5E94\u4EA4\u7A0E\u8D39-\u8FDB\u9879\u589E\u503C\u7A0E"},23200:{value:23200,amount:0,Jie:0,Dai:0,Dir:-1,text:"\u5E94\u4EA4\u7A0E\u8D39-\u9500\u9879\u589E\u503C\u7A0E"},41e3:{value:41e3,amount:0,Jie:0,Dai:0,Dir:-1,text:"\u4E3B\u8425\u4E1A\u52A1\u6536\u5165"},51e3:{value:51e3,amount:0,Jie:0,Dai:0,Dir:1,text:"\u4E3B\u8425\u4E1A\u52A1\u6210\u672C"},52e3:{value:52e3,amount:0,Jie:0,Dai:0,Dir:1,text:"\u7BA1\u7406\u8D39\u7528"},6e4:{value:6e4,amount:0,Jie:0,Dai:0,Dir:-1,text:"\u5229\u6DA6"}};var u=window.$common.getRequester("//wqao.top",async e=>{if(e.code!==200)throw new Error(e.message);return e.data});function g(e){let o=window.$store.state.shopInfo._id;if(!o)return Promise.reject("\u8BF7\u9009\u62E9\u5E97\u94FA");let n={shopId:o,contacts:e};return u.request("POST","/qt-shop/contact/create",n,window.$common.getHeaders())}function A(e,o,n,c,t,i){let a=window.$store.state.shopInfo._id;if(!a)return Promise.reject("\u8BF7\u9009\u62E9\u5E97\u94FA");o===1&&(i=!0);let s={shopId:a,type:e,status:o,pageNo:n,pageSize:c,keyword:t,isAll:i};return u.request("POST","/qt-shop/contact/list",s,window.$common.getHeaders())}function y(e){let o=window.$store.state.shopInfo._id;if(!o)return Promise.reject("\u8BF7\u9009\u62E9\u5E97\u94FA");let n={shopId:o,nameList:e};return u.request("POST","/qt-shop/contact/listByName",n,window.$common.getHeaders())}function P(e){let o={customerIds:e};return u.request("POST","/qt-shop/contact/disable",o,window.$common.getHeaders())}function $(e){let o={receiptId:e};return u.request("POST","/qt-shop/receipt/stamper",o,window.$common.getHeaders())}function T(e,o,n,c){let t=window.$store.state.shopInfo._id;if(!t)return Promise.reject("\u8BF7\u9009\u62E9\u5E97\u94FA");let i={records:e,contactId:o,shopId:t,receiptId:n,remark:c};return u.request("POST","/qt-shop/account/proof/create",i,window.$common.getHeaders())}function L(e,o,n,c,t=null){let i=window.$store.state.shopInfo._id;if(!i)return Promise.reject("\u8BF7\u9009\u62E9\u5E97\u94FA");let a={proofId:e,records:o,contactId:n,shopId:i,remark:c,timeCreateDate:t};return u.request("POST","/qt-shop/account/proof/edit",a,window.$common.getHeaders())}function x(e){let o={proofId:e};return u.request("POST","/qt-shop/account/proof/delete",o,window.$common.getHeaders())}function b(e,o,n,c,t){let i=window.$store.state.shopInfo._id;if(!i)return Promise.reject("\u8BF7\u9009\u62E9\u5E97\u94FA");let a={shopId:i,pageNo:e,pageSize:o,keyword:n,startTime:c,endTime:t};return u.request("POST","/qt-shop/account/proof/list",a,window.$common.getHeaders())}function C(e,o,n,c,t,i,a){let s=window.$store.state.shopInfo._id;if(!s)return Promise.reject("\u8BF7\u9009\u62E9\u5E97\u94FA");let r={shopId:s,acBook:e,acAmountType:o,pageNo:n,pageSize:c,keyword:t,startTime:i,endTime:a};return u.request("POST","/qt-shop/account/record/list",r,window.$common.getHeaders())}function I(e,o,n){let c=window.$store.state.shopInfo._id;if(!c||!window.$store.state.houseInfo._id)return Promise.reject("\u8BF7\u9009\u62E9\u4ED3\u5E93");let i={shopId:c,contactId:e,startTime:o,endTime:n};return u.request("POST","/qt-shop/receipt/getAccountMap",i,window.$common.getHeaders())}var O={shopId:"",createrId:"",contactId:"",remark:"",isDisabled:!1,receiptId:"",monthCount:""},v={shopId:"",createrId:"",contactId:"",remark:"",proofId:"",acBook:0,acAmount:0,acAmountType:0};function q(){return(e,o,n)=>{let c=n.value;n.value=function(){window.$common.VM_Modeler(this,Object.assign({VM:"acproof"},O)),this.AccountMap=w,this.AccountList=Object.entries(w).map(t=>t[1]),this.Amount11=0,this.Amount11Sign=0,this.Amount10=0,this.Amount10Sign=0,this.AccountBookList=[{value:1,text:"\u501F"},{value:2,text:"\u8D37"}],this.acproofListHeader=[{text:"\u7F16\u53F7",value:"monthCount"},{text:"\u5F80\u6765",value:"ContactInfo"},{text:"\u5173\u8054\u5355\u636E",value:"ReceiptInfo"},{text:"\u8BB0\u8D26\u4EBA",value:"CreaterInfo"},{text:"\u6DFB\u52A0\u65F6\u95F4",value:"timeCreateChinese"},{text:"\u5907\u6CE8",value:"remark"},{text:"\u64CD\u4F5C",value:"action",width:255},{text:"",value:"data-table-expand"}],this.createAcProof=async(t,i,a,s)=>{await T(t,i,a,s)},this.editAcProof=async(t,i,a,s,r=null)=>{await L(t,i,a,s,r)},this.deleteAcProof=async t=>{await x(t)},this.renderAcProofList=async(t=1,i=18)=>{let a=new Date(this.acproofListTimeSearch[0]+" 00:00").getTime(),s=new Date(this.acproofListTimeSearch[1]+" 23:59").getTime(),r=await b(t,i,this.acproofSearchKey,a,s);this.acproofListTotal=r.total,this.acproofList=Object.assign([],r.list.map(m=>(m.timeCreateChinese=window.$common.getFullTime(m.timeCreate).full,m.AcRecords=m.AcRecords.map(d=>(d.timeCreateChinese=window.$common.getFullTime(d.timeCreate).full,d)),m)))},window.$common.VM_Modeler(this,Object.assign({VM:"acrecord"},v)),this.acrecordListHeader=[{text:"\u6DFB\u52A0\u65F6\u95F4",value:"timeCreateChinese"},{text:"\u5F80\u6765",value:"ContactInfo"},{text:"\u91D1\u989D",value:"acAmount",align:"end"},{text:"\u5907\u6CE8",value:"remark"}],this.Jie=0,this.Dai=0,this.renderAcRecordList=async(t=0,i=null,a=1,s=18)=>{let r=new Date(this.acrecordListTimeSearch[0]+" 00:00").getTime(),m=new Date(this.acrecordListTimeSearch[1]+" 23:59").getTime(),d=await C(t,i,a,s,this.acrecordSearchKey,r,m);this.acrecordListTotal=d.total,this.acrecordList=Object.assign([],d.list.map(l=>(l.timeCreateChinese=window.$common.getFullTime(l.timeCreate).full,l.timeCreateDate=window.$common.getFullTime(l.timeCreate).full.split(" ")[0].replace(/\//g,"-"),l))),this.acrecordListPicked=[],this.Jie=d.CountInfo.Jie,this.Dai=d.CountInfo.Dai},this.receiptStamper=async t=>{await $(t)},this.AccountZiChanList=[],this.AccountFuZhaiList=[],this.AccountQuanYiList=[],this.AccountShouRuList=[],this.AccountFeiYongList=[],this.AccountLiRunList=[],this.renderAccountMap=async t=>{let i=new Date(this.acrecordListTimeSearch[0]+" 00:00").getTime(),a=new Date(this.acrecordListTimeSearch[1]+" 23:59").getTime(),s=await I(t,i,a);return this.AccountMap=Object.assign({},s.AccountMap),this.Amount11=s.Amount11,this.Amount11Sign=s.Amount11Sign,this.Amount10=s.Amount10,this.Amount10Sign=s.Amount10Sign,this.AccountZiChanList=Object.entries(s.AccountMap).map(r=>r[1]).filter(r=>r.value<2e4),this.AccountFuZhaiList=Object.entries(s.AccountMap).map(r=>r[1]).filter(r=>r.value>=2e4&&r.value<3e4),this.AccountQuanYiList=Object.entries(s.AccountMap).map(r=>r[1]).filter(r=>r.value>=3e4&&r.value<4e4),this.AccountShouRuList=Object.entries(s.AccountMap).map(r=>r[1]).filter(r=>r.value>=4e4&&r.value<5e4),this.AccountFeiYongList=Object.entries(s.AccountMap).map(r=>r[1]).filter(r=>r.value>=5e4&&r.value<6e4),this.AccountLiRunList=Object.entries(s.AccountMap).map(r=>r[1]).filter(r=>r.value>=6e4&&r.value<7e4),s},c.apply(this,arguments)}}}var H={_id:null,type:null,name:"",contact:"",remark:"",status:null};function S(){return(e,o,n)=>{let c=n.value;n.value=function(){window.$common.VM_Modeler(this,Object.assign({VM:"contact"},H)),this.contactListHeader=[{text:"\u540D\u79F0",value:"name"},{text:"\u8054\u7CFB\u65B9\u5F0F",value:"contact"},{text:"\u5907\u6CE8",value:"remark"},{text:"\u64CD\u4F5C",value:"action"}],this.renderContactList=async(t=null,i=null,a=1,s)=>{let r=await A(t,i,a,15,this.contactSearchKey,s);this.contactListTotal=r.total,this.contactList=Object.assign([],r.list),this.contactListPicked=[]},this.getContactListByName=async t=>await y(t),this.createContact=async t=>{if(t=JSON.parse(JSON.stringify(t)),!t||t.length===0)throw new Error("\u8BF7\u8F93\u5165\u6570\u636E");let i=200,a=t.length;for(;a>0;)await g(t.splice(0,i)),a=t.length},this.deleteContact=async()=>{await P(this.contactListPicked.filter(t=>t._id).map(t=>t._id))},c.apply(this,arguments)}}}var _=window.$common.Loadding,h=class{constructor(){this.acproofListPage=1;this.acproofListPageLimit=12;this.acBook=null;this.acAmountType=null;this.acrecordListPage=1;this.acrecordListPageLimit=12;this.initReact()}initReact(){}async renderMyAcRecordList(e=0,o=null,n=1,c=12){this.acBook=e,this.acAmountType=o,this.acrecordListPage=n,this.acrecordListPageLimit=c,await this.renderAcRecordList(this.acBook,this.acAmountType,this.acrecordListPage,this.acrecordListPageLimit),this.acrecordListPicked=[],this.acrecordSearchKey?(this.contactSearchKey=this.acrecordSearchKey,await this.renderContactList(null,null,1,!0)):this.contactList=[]}deleteMyAcProof(e){window.$confirm("\u8B66\u544A","\u786E\u5B9E\u8981\u5220\u9664\u8FD9\u6761\u8BB0\u5F55\u5417",async o=>{if(!!o)try{await this.deleteAcProof(e),await this.renderAcRecordList(this.acBook,this.acAmountType,this.acrecordListPage,this.acrecordListPageLimit)}catch(n){window.$common.loadOff(n)}})}deleteMyAcProofMuti(){window.$confirm("\u8B66\u544A",`\u786E\u5B9E\u8981\u5220\u9664 ${this.acrecordListPicked.length} \u6761\u8BB0\u5F55\u5417`,async e=>{if(!!e)try{for(let o in this.acrecordListPicked){let c=this.acrecordListPicked[o].AcProofInfo;c&&c._id&&await this.deleteAcProof(c._id)}await this.renderAcRecordList(this.acBook,this.acAmountType,this.acrecordListPage,this.acrecordListPageLimit)}catch(o){window.$common.loadOff(o)}})}async editMyAcproof(){let e=this.acrecordModel,o=new Date(e.timeCreateDate).getTime();await this.editAcProof(e.proofId,null,e.contactId||null,e.remark,o),await this.renderMyAcRecordList(this.acBook,this.acAmountType,this.acrecordListPage,this.acrecordListPageLimit),this.toggleAcrecordModal()}};p([S(),q()],h.prototype,"initReact",1),p([_()],h.prototype,"renderMyAcRecordList",1),p([_()],h.prototype,"editMyAcproof",1);var M=h;
  