moreShopAdmin/build/admin/assets/index.9ed61e3c.js

2 lines
16 KiB
JavaScript
Raw Normal View History

2024-11-15 19:58:31 +08:00
import{m as M,aT as ue,r as v,e as ve,p as C,q as U,t as e,v as o,u as a,aV as R,a2 as _,L as oe,x as F,i as L,a3 as Fe,aW as ae,aX as te,ae as re,aY as de,b6 as ne,J as se,b7 as pe,b8 as ie,b as Ve,aZ as ye,a_ as we,V as O,W as Y,y as S,G as le,A as De,b3 as Be,b4 as Ee,b5 as ge,b0 as he}from"./.pnpm.1b0299fb.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.b077f234.js";import{u as _e}from"./usePaging.00aa976d.js";import{c as fe,a as ke,f as Ue}from"./purchase_product_offer.bc978b00.js";import{a as xe}from"./supplier.f974764b.js";import{e as Pe}from"./delivery_service.aefcbcad.js";import"./index.689cfa31.js";import"./@vueuse.72d44d91.js";import"./lodash.c3b66c05.js";import"./@vue.9d708d7c.js";const Ae={class:"mt-4"},Se={class:"flex mt-4 justify-end"},Le=M({name:"systemStoreLists"}),$e=M({...Le,props:["order_id"],emits:["onBindStore"],setup(Z,{emit:w}){const V=Z,p=ue({buyer_confirm:0,order_id:""}),t=v([]),y=b=>{t.value=b.map(({id:n})=>n)},$=()=>{x()},{pager:D,getLists:x,resetParams:j,resetPage:B}=_e({fetchFun:fe,params:p});x();const P=w,q=()=>{const b=D.lists.filter(n=>t.value.includes(n.id));if(!b.length)return Fe.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");P("onBindStore",b)};return ve(()=>{p.order_id!=V.order_id&&(p.order_id=V.order_id,setTimeout(()=>{B()},1e3))}),(b,n)=>{const G=ae,I=te,h=re,K=de,f=ne,E=se,k=pe,W=me,g=ie;return C(),U("div",null,[e(K,{class:"mb-[-16px]",model:a(p),inline:""},{default:o(()=>[e(I,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(G,{class:"w-[200px]",modelValue:a(p).store_name,"onUpdate:modelValue":n[0]||(n[0]=r=>a(p).store_name=r),onKeydown:n[1]||(n[1]=R(r=>$(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(I,null,{default:o(()=>[e(h,{type:"primary",onClick:a(B)},{default:o(()=>n[3]||(n[3]=[_("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(h,{onClick:a(j)},{default:o(()=>n[4]||(n[4]=[_("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),oe((C(),U("div",Ae,[e(k,{data:a(D).lists,onSelectionChange:y,height:300},{default:o(()=>[e(f,{type:"selection",width:"55"}),e(f,{label:"id",prop:"id","show-overflow-tooltip":""}),e(f,{label:"\u8BA2\u5355id",prop:"order_id","show-overflow-tooltip":""}),e(f,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),e(f,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:r})=>[e(E,{style:{width:"50px",height:"50px"},src:r.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(f,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(f,{label:"\u5206\u7C7B",prop:"cate_name","show-overflow-tooltip":""}),e(f,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(f,{label:"\u9700\u6C42\u6570\u91CF",prop:"need_num","show-overflow-tooltip":""}),e(f,{label:"\u91C7\u8D2D\u4EF7",prop:"price","show-overflow-tooltip":""}),e(f,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[g,a(D).loading]]),F("div",Se,[e(W,{modelValue:a(D),"onUpdate:modelValue":n[2]||(n[2]=r=>L(D)?D.value=r:null),onChange:a(x)},null,8,["modelValue","onChange"])]),e(h,{class:"w-full mt-4",type:"primary",onClick:q},{default:o(()=>n[5]||(n[5]=[_("\u6DFB\u52A0\u5546\u54C1")])),_:1})])}}}),qe={class:"flex items-center mr-4"},Ie={class:"mt-4"},Ke={class:"flex mt-4 justify-end"},Te={class:"dialog-footer"},Ne={class:"flex-1 w-full"},Oe={class:"mb-2"},Re={class:"dialog-footer"},Me=M({name:"storeProductLists"}),el=M({...Me,setup(Z){const w=v(!1),V=v(!1),p=ue({buyer_id:"",order_id:"",store_name:"",buyer_confirm:"",order_sn:"",is_user:1}),t=v({id:"",bhoid:0,supplier_id:"",purchase:0,outbound_price:0,total_price:0,buyer_nums:0,package:"",store_info:"",marques:"",after_sales:"",pay_type:1}),y=v({supplier_id:"",order_id:""}),$=()=>{t.value.total_price=(t.value.buyer_nums*t.value.purchase).toFixed(2)},D=r=>{t.value.id=r.id,t.value.bhoid=r.order_id,t.value.buyer_nums=r.need_num,t.value.purchase=r.price,t.value.total_price=r.total_price,t.value.package=r.packa