2 lines
7.0 KiB
JavaScript
2 lines
7.0 KiB
JavaScript
import{k as H,C as q,D as I,w as U,F as J,T as M,O as Q,Q as K,R as W}from"./element-plus.d8e0827b.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.b67c1046.js";import{b as z}from"./index.58242ff9.js";import{u as G}from"./usePaging.6a6670f9.js";import{u as X}from"./useDictOptions.f8f89444.js";import{h as Y,i as oo}from"./opurchaseclass.b030cd9b.js";import{d as y,s as eo,r as g,Z as to,ap as io,o as u,c as ro,U as o,L as e,u as r,R as p,M as h,K as c,a as D,S as ao,j as lo,Q as no}from"./@vue.18505fe0.js";import"./lodash.466e9fe4.js";import{_ as so}from"./edit.vue_vue_type_script_setup_true_name_opurchaseclassEdit_lang.1b358ccd.js";import{a as uo}from"./vue-router.101084e3.js";import{p as po}from"./print-js.cfc301d2.js";import{v as _}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.432b2bf9.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";const mo={class:"mt-4"},co={class:"flex mt-4 justify-end"},ho=y({name:"opurchaseclassLists"}),Ce=y({...ho,setup(_o){_.exports.hiprint.init(),_.exports.hiprint.hiwebSocket.setHost("http://localhost:17521");const F=()=>{window.open("hiprint://");const a=_.exports.hiprint.hiwebSocket.getPrinterList();console.log(a);var t=new _.exports.hiprint.PrintTemplate;console.log(t.getPrinterList());var n=t.addPrintPanel({width:100,height:130,paperFooter:340,paperHeader:10});n.addPrintText({options:{width:140,height:15,top:20,left:20,title:"hiprint\u63D2\u4EF6\u624B\u52A8\u6DFB\u52A0text",textAlign:"center"}}),n.addPrintText({options:{width:140,height:35,top:40,left:20,title:"123456",textType:"barcode"}}),n.addPrintText({options:{width:35,height:35,top:40,left:165,title:"123456",textType:"qrcode"}}),n.addPrintLongText({options:{width:180,height:35,top:90,left:20,title:"\u957F\u6587\u672C\uFF1Ahiprint\u662F\u4E00\u4E2A\u5F88\u597D\u7684webjs\u6253\u5370,\u6D4F\u89C8\u5668\u5728\u7684\u5730\u65B9\u4ED6\u90FD\u53EF\u4EE5\u8FD0\u884C"}}),t.print2({})},x=uo(),B=eo(),b=g(!1),d=to({merchant:"",order_arr:"",number:"",is_mer:1}),A=g([]),P=a=>{A.value=a.map(({id:t})=>t)},{dictData:k}=X(""),{pager:m,getLists:f,resetParams:T,resetPage:S}=G({fetchFun:oo,params:d}),V=async()=>{Y().then(a=>{H.success("\u63D0\u4EA4\u6210\u529F")})},L=async()=>{var a=[{name:"John Doe",email:"john@doe.com",phone:"111-111-1111"},{name:"Barry Allen",email:"barry@flash.com",phone:"222-222-2222"},{name:"Cool Dude",email:"cool@dude.com",phone:"333-333-3333"}];po({printable:a,type:"json",properties:[{field:"name",displayName:"\u81EA\u5B9A\u4E49\u8868\u5934"},{field:"email",displayName:"\u81EA\u5B9A\u4E49\u8868\u5934"},{field:"phone",displayName:"\u81EA\u5B9A\u4E49\u8868\u5934"}],maxWidth:58,gridHeaderStyle:"color: red; border: 2px solid #3971A5;",gridStyle:"border: 2px solid #3971A5;"})},N=async a=>{console.log(a),x.push({path:"detail",query:{id:a.id}})};return f(),(a,t)=>{const n=q,C=I,s=U,R=J,v=M,w=z,i=Q,O=K,j=Z,E=io("perms"),$=W;return u(),ro("div",null,[o(v,{class:"!border-none mb-4",shadow:"never"},{default:e(()=>[o(R,{class:"mb-[-16px]",model:r(d),inline:""},{default:e(()=>[o(C,{label:"\u6240\u5C5E\u5546\u6237",prop:"merchant"},{default:e(()=>[o(n,{class:"w-[280px]",modelValue:r(d).merchant,"onUpdate:modelValue":t[0]||(t[0]=l=>r(d).merchant=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u5546\u6237"},null,8,["modelValue"])]),_:1}),o(C,null,{default:e(()=>[o(s,{type:"primary",onClick:r(S)},{default:e(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(s,{onClick:r(T)},{default:e(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),h((u(),c(v,{class:"!border-none",shadow:"never"},{default:e(()=>[h((u(),c(s,{type:"primary",onClick:V},{icon:e(()=>[o(w,{name:"el-icon-Plus"})]),default:e(()=>[p(" \u63D0\u4EA4\u4ECA\u65E5\u5546\u6237\u91C7\u8D2D\u8BA2\u5355 ")]),_:1})),[[E,["operation.opurchaseclass/add"]]]),h((u(),c(s,{type:"success",onClick:L},{icon:e(()=>[o(w,{name:"el-icon-Printer"})]),default:e(()=>[p(" \u6253\u5370 ")]),_:1})),[[E,["operation.opurchaseclass/add"]]]),h((u(),c(s,{type:"success",onClick:F},{icon:e(()=>[o(w,{name:"el-icon-Printer"})]),default:e(()=>[p(" \u6D4B\u8BD5 ")]),_:1})),[[E,["operation.opurchaseclass/add"]]]),D("div",mo,[o(O,{data:r(m).lists,onSelectionChange:P},{default:e(()=>[o(i,{type:"selection",width:"55"}),o(i,{label:"ID",prop:"id","show-overflow-tooltip":""}),o(i,{label:"\u6240\u5C5E\u5546\u6237",prop:"merchant_name","show-overflow-tooltip":""}),o(i,{label:"\u96F6\u552E\u8BA2\u5355id",prop:"order_arr","show-overflow-tooltip":""}),o(i,{label:"\u8D2D\u7269\u8F66id",prop:"cart_id","show-overflow-tooltip":""}),o(i,{label:"\u5355\u636E\u7F16\u53F7",prop:"number",width:"220","show-overflow-tooltip":""}),o(i,{label:"\u5355\u636E\u91D1\u989D",prop:"total","show-overflow-tooltip":""}),o(i,{label:"\u62B5\u6263\u91D1\u989D",prop:"deduction_price","show-overflow-tooltip":""}),o(i,{label:"\u5B9E\u9645\u91D1\u989D",prop:"actual","show-overflow-tooltip":""}),o(i,{label:"\u5B9E\u6536\u91D1\u989D",prop:"money","show-overflow-tooltip":""}),o(i,{label:"\u662F\u5426\u652F\u4ED8",prop:"paid","show-overflow-tooltip":""},{default:e(({row:l})=>[D("span",null,ao(l.paid?"\u662F":"\u5426"),1)]),_:1}),o(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:e(({row:l})=>[o(s,{type:"primary",link:"",onClick:fo=>N(l)},{default:e(()=>[p(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),D("div",co,[o(j,{modelValue:r(m),"onUpdate:modelValue":t[1]||(t[1]=l=>lo(m)?m.value=l:null),onChange:r(f)},null,8,["modelValue","onChange"])])]),_:1})),[[$,r(m).loading]]),r(b)?(u(),c(so,{key:0,ref_key:"editRef",ref:B,"dict-data":r(k),onSuccess:r(f),onClose:t[2]||(t[2]=l=>b.value=!1)},null,8,["dict-data","onSuccess"])):no("",!0)])}}});export{Ce as default};
|