2 lines
8.2 KiB
JavaScript
2 lines
8.2 KiB
JavaScript
import{k as j,C as U,D as q,w as Q,F as K,T as W,O as Z,Q as z,R as G}from"./element-plus.d8e0827b.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.b67c1046.js";import{b as X}from"./index.3078ee97.js";import{u as Y}from"./usePaging.6a6670f9.js";import{u as tt}from"./useDictOptions.26f94334.js";import{h as et,i as ot}from"./opurchaseclass.b8e9ee61.js";import{d as V,s as it,r as S,Z as rt,ap as ut,o as g,c as nt,U as o,L as u,u as l,R as x,M as T,K as P,a as F,S as at,j as lt,Q as st}from"./@vue.18505fe0.js";import"./lodash.466e9fe4.js";import{_ as pt}from"./edit.vue_vue_type_script_setup_true_name_opurchaseclassEdit_lang.6ade6306.js";import{a as dt}from"./vue-router.101084e3.js";import{v as E}from"./vue-plugin-hiprint.a2d84e76.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.ea9543a9.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";E.exports.hiprint.init();E.exports.hiprint.hiwebSocket.setHost("http://localhost:17521");window.open("hiprint://");const w=150,b=4,ct=()=>{const v=E.exports.hiprint.hiwebSocket.getPrinterList();console.log(v);let r=0,s=10;var m=new E.exports.hiprint.PrintTemplate,t=m.addPrintPanel({width:58,height:145,paperNumberDisabled:!0});let e=i=>{r+=s;let n={width:w,height:s,top:r,left:b,title:""};return typeof i=="string"?n.title=i:n=Object.assign(n,i),{options:n}},C=()=>{r+=s;let i=Math.floor(w/3);t.addPrintText({options:{width:i,height:10,top:r,left:0,title:"\u5355\u4EF7",textAlign:"center"}}),t.addPrintText({options:{width:i,height:s,top:r,left:i,title:"\u6570\u91CF",textAlign:"center"}}),t.addPrintText({options:{width:i,height:s,top:r,left:i*2,title:"\u5C0F\u8BA1",textAlign:"center"}})},f=(i,n,_)=>{r+=s;let c=Math.floor(w/3);t.addPrintText({options:{width:c,height:10,top:r,left:0,title:i+"",textAlign:"center"}}),t.addPrintText({options:{width:c,height:s,top:r,left:c,title:n+"",textAlign:"center"}}),t.addPrintText({options:{width:c,height:s,top:r,left:c*2,title:_+"",textAlign:"center"}})};t.addPrintText(e({title:"\u6CF8\u4F18\u91C7-\u5C0F\u79680",textAlign:"center"})),t.addPrintText(e("\u5355\u53F7: PF171617436315965155")),t.addPrintText(e("\u914D\u9001\u65F6\u95F4: 2024-05-20 11:06:03")),t.addPrintText(e("\u914D\u9001\u5458: \u4E8C\u72D7")),t.addPrintText(e("\u914D\u9001\u7535\u8BDD: 19330904744")),t.addPrintText(e("======================")),t.addPrintText(e("\u5546\u54C1\u4FE1\u606F: ")),C(),t.addPrintText(e("\u671D\u5929\u6912, \u8FA3\u6912")),f("0.01\u5143","25\u4E2A","0.25\u5143"),t.addPrintText(e("\u671D\u5929\u6912, \u8FA3\u6912")),f("0.01\u5143","25\u4E2A","0.25\u5143"),t.addPrintText(e("\u671D\u5929\u6912, \u8FA3\u6912")),f("0.01\u5143","25\u4E2A","0.25\u5143"),t.addPrintText(e("======================")),t.addPrintText(e("\u5408\u8BA1: 0.75\u5143")),t.addPrintText(e("\u63D0\u8D27\u70B9: \u83B2\u82B1\u519C\u8D38\u5E02\u573A")),t.addPrintText(e("\u63D0\u8D27\u70B9\u7535\u8BDD: 19330904744")),t.addPrintText(e("\u63D0\u8D27\u70B9\u8D1F\u8D23\u4EBA\u7B7E\u5B57:")),t.addPrintImage({options:{width:w,height:50,top:r+15,left:b,title:"",src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/db264202405221455038529.png"}}),r+=60,t.addPrintText(e("\u6536\u8D27\u4EBA: \u963F\u54C8")),t.addPrintText(e("\u6536\u8D27\u5730\u5740: \u91CC\u6D77\u79D1\u6280")),t.addPrintText(e("\u8054\u7CFB\u7535\u8BDD: 17685151643")),t.addPrintText(e("\u6536\u8D27\u4EBA\u7B7E\u5B57:")),t.addPrintImage({options:{width:w,height:50,top:r+15,left:b,title:"",src:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/db264202405221455038529.png"}}),r+=60,t.addPrintText(e("")),t.addPrintText(e("")),t.addPrintText(e("")),t.addPrintText(e("======================")),m.print2({}),m.on("printSuccess",i=>{console.log("printSuccess",i)}),m.on("printError",i=>{console.log("printError",i)})},mt={class:"mt-4"},ht={class:"flex mt-4 justify-end"},ft=V({name:"opurchaseclassLists"}),we=V({...ft,setup(v){const r=()=>{ct()},s=dt(),m=it(),t=S(!1),e=rt({merchant:"",order_arr:"",number:"",is_mer:1}),C=S([]),f=h=>{C.value=h.map(({id:p})=>p)},{dictData:i}=tt(""),{pager:n,getLists:_,resetParams:c,resetPage:L}=Y({fetchFun:ot,params:e}),O=async()=>{et().then(h=>{j.success("\u63D0\u4EA4\u6210\u529F")})},R=async h=>{console.log(h),s.push({path:"detail",query:{id:h.id}})};return _(),(h,p)=>{const I=U,B=q,D=Q,H=K,A=W,y=X,a=Z,N=z,$=J,k=ut("perms"),M=G;return g(),nt("div",null,[o(A,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[o(H,{class:"mb-[-16px]",model:l(e),inline:""},{default:u(()=>[o(B,{label:"\u6240\u5C5E\u5546\u6237",prop:"merchant"},{default:u(()=>[o(I,{class:"w-[280px]",modelValue:l(e).merchant,"onUpdate:modelValue":p[0]||(p[0]=d=>l(e).merchant=d),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u5546\u6237"},null,8,["modelValue"])]),_:1}),o(B,null,{default:u(()=>[o(D,{type:"primary",onClick:l(L)},{default:u(()=>[x("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(D,{onClick:l(c)},{default:u(()=>[x("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),T((g(),P(A,{class:"!border-none",shadow:"never"},{default:u(()=>[T((g(),P(D,{type:"primary",onClick:O},{icon:u(()=>[o(y,{name:"el-icon-Plus"})]),default:u(()=>[x(" \u63D0\u4EA4\u4ECA\u65E5\u5546\u6237\u91C7\u8D2D\u8BA2\u5355 ")]),_:1})),[[k,["operation.opurchaseclass/add"]]]),T((g(),P(D,{type:"success",onClick:r},{icon:u(()=>[o(y,{name:"el-icon-Printer"})]),default:u(()=>[x(" \u6253\u5370 ")]),_:1})),[[k,["operation.opurchaseclass/add"]]]),F("div",mt,[o(N,{data:l(n).lists,onSelectionChange:f},{default:u(()=>[o(a,{type:"selection",width:"55"}),o(a,{label:"ID",prop:"id","show-overflow-tooltip":""}),o(a,{label:"\u6240\u5C5E\u5546\u6237",prop:"merchant_name","show-overflow-tooltip":""}),o(a,{label:"\u96F6\u552E\u8BA2\u5355id",prop:"order_arr","show-overflow-tooltip":""}),o(a,{label:"\u8D2D\u7269\u8F66id",prop:"cart_id","show-overflow-tooltip":""}),o(a,{label:"\u5355\u636E\u7F16\u53F7",prop:"number",width:"220","show-overflow-tooltip":""}),o(a,{label:"\u5355\u636E\u91D1\u989D",prop:"total","show-overflow-tooltip":""}),o(a,{label:"\u62B5\u6263\u91D1\u989D",prop:"deduction_price","show-overflow-tooltip":""}),o(a,{label:"\u5B9E\u9645\u91D1\u989D",prop:"actual","show-overflow-tooltip":""}),o(a,{label:"\u5B9E\u6536\u91D1\u989D",prop:"money","show-overflow-tooltip":""}),o(a,{label:"\u662F\u5426\u652F\u4ED8",prop:"paid","show-overflow-tooltip":""},{default:u(({row:d})=>[F("span",null,at(d.paid?"\u662F":"\u5426"),1)]),_:1}),o(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:d})=>[o(D,{type:"primary",link:"",onClick:_t=>R(d)},{default:u(()=>[x(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),F("div",ht,[o($,{modelValue:l(n),"onUpdate:modelValue":p[1]||(p[1]=d=>lt(n)?n.value=d:null),onChange:l(_)},null,8,["modelValue","onChange"])])]),_:1})),[[M,l(n).loading]]),l(t)?(g(),P(pt,{key:0,ref_key:"editRef",ref:m,"dict-data":l(i),onSuccess:l(_),onClose:p[2]||(p[2]=d=>t.value=!1)},null,8,["dict-data","onSuccess"])):st("",!0)])}}});export{we as default};
|