moreShopAdmin/build/admin/assets/index.4a4f1e04.js

2 lines
14 KiB
JavaScript

import{k as ve,C as ee,D as le,w as oe,F as ue,M as te,b as ae,N as re,O as ne,G as Ce,H as he,J as we,K as De,L as ye,I as Fe}from"./element-plus.4a7d92a3.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{d as M,Z as ie,r as C,o as h,c as x,U as e,L as o,u as t,aa as z,R as i,M as de,a as D,j as L,i as Ee,T as R,a9 as Z,K as T}from"./@vue.18505fe0.js";import{u as se}from"./usePaging.6a6670f9.js";import{b as me,a as Be,e as Ve}from"./purchase_product_offer.194bc808.js";import{a as ge}from"./supplier.c18f43b6.js";import{e as ke}from"./delivery_service.1302cb6b.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.86cdc1b4.js";import"./lodash.9dc701ad.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const xe={class:"mt-4"},Ue={class:"flex mt-4 justify-end"},Pe=M({name:"systemStoreLists"}),Se=M({...Pe,emits:["onBindStore"],setup(_e,{emit:y}){const _=ie({buyer_confirm:0}),s=C([]),n=F=>{s.value=F.map(({id:d})=>d)},g=()=>{U()},{pager:w,getLists:U,resetParams:N,resetPage:j}=se({fetchFun:me,params:_});U();const B=y,P=()=>{const F=w.lists.filter(d=>s.value.includes(d.id));if(!F.length)return ve.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");B("onBindStore",F)};return(F,d)=>{const E=ee,$=le,S=oe,I=ue,p=te,q=ae,V=re,k=pe,G=ne;return h(),x("div",null,[e(I,{class:"mb-[-16px]",model:t(_),inline:""},{default:o(()=>[e($,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(E,{class:"w-[200px]",modelValue:t(_).store_name,"onUpdate:modelValue":d[0]||(d[0]=f=>t(_).store_name=f),onKeydown:d[1]||(d[1]=z(f=>g(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e($,null,{default:o(()=>[e(S,{type:"primary",onClick:t(j)},{default:o(()=>[i("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(S,{onClick:t(N)},{default:o(()=>[i("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),de((h(),x("div",xe,[e(V,{data:t(w).lists,onSelectionChange:n,height:300},{default:o(()=>[e(p,{type:"selection",width:"55"}),e(p,{label:"id",prop:"id","show-overflow-tooltip":""}),e(p,{label:"\u8BA2\u5355id",prop:"order_id","show-overflow-tooltip":""}),e(p,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),e(p,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:f})=>[e(q,{style:{width:"50px",height:"50px"},src:f.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(p,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(p,{label:"\u5206\u7C7B",prop:"cate_name","show-overflow-tooltip":""}),e(p,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(p,{label:"\u4F9B\u5E94\u5546",prop:"supplier_name","show-overflow-tooltip":""}),e(p,{label:"\u9700\u6C42\u6570\u91CF",prop:"need_num","show-overflow-tooltip":""}),e(p,{label:"\u91C7\u8D2D\u6570\u91CF",prop:"buyer_nums","show-overflow-tooltip":""}),e(p,{label:"\u91C7\u8D2D\u4EF7",prop:"price","show-overflow-tooltip":""}),e(p,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""}),e(p,{label:"\u91C7\u8D2D\u4EBA\u5458",prop:"buyer_name","show-overflow-tooltip":""}),e(p,{label:"\u91C7\u8D2D\u72B6\u6001",prop:"buyer_confirm_name","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[G,t(w).loading]]),D("div",Ue,[e(k,{modelValue:t(w),"onUpdate:modelValue":d[2]||(d[2]=f=>L(w)?w.value=f:null),onChange:t(U)},null,8,["modelValue","onChange"])]),e(S,{class:"w-full mt-4",type:"primary",onClick:P},{default:o(()=>[i("\u6DFB\u52A0\u5546\u54C1")]),_:1})])}}}),Ae={class:"flex items-center mr-4"},Le={class:"mt-4"},$e={class:"flex mt-4 justify-end"},Ie={class:"dialog-footer"},Ke={class:"flex-1 w-full"},Oe={class:"mb-2"},Re={class:"dialog-footer"},Te=M({name:"storeProductLists"}),Fl=M({...Te,setup(_e){const y=C(!1),_=C(!1),s=ie({buyer_id:"",order_id:"",store_name:"",buyer_confirm:""}),n=C({id:"",bhoid:0,supplier_id:"",purchase:0,outbound_price:0,total_price:0,buyer_nums:0,pay_type:1}),g=C({supplier_id:""}),w=()=>{n.value.total_price=(n.value.buyer_nums*n.value.purchase).toFixed(2)},U=r=>{n.value.id=r.id,n.value.bhoid=r.order_id,n.value.buyer_nums=r.need_num,n.value.purchase=r.price,n.value.total_price=r.total_price,y.value=!0},N=()=>{Be(n.value).then(r=>{y.value=!1,k()})},j=()=>{const r=E.value.map(u=>({id:u.id,buyer_nums:u.buyer_nums,purchase:u.purchase,total_price:u.total_price,pay_type:u.pay_type}));Ve({supplier_id:g.value.supplier_id,product_arr:r}).then(u=>{_.value=!1,k()})},B=C(!1),P=C([]),F=(r="")=>{B.value=!0,ge({mer_name:r}).then(u=>{P.value=u.lists,setTimeout(()=>{B.value=!1},300)}).catch(u=>{setTimeout(()=>{B.value=!1},300)})},d=C(!1),E=C([]),$=r=>{E.value=E.value.filter(u=>u.id!==r)},S=r=>{r.forEach(u=>{E.value.find(b=>b.id==u.id)||E.value.push(u)}),d.value=!1};function I(r){r.buyer_nums>0&&r.purchase>0&&(r.total_price=(r.buyer_nums*r.purchase).toFixed(2))}const p=C([]),q=()=>{ke({type:3}).then(r=>{p.value=r.lists})},{pager:V,getLists:k,resetParams:G,resetPage:f}=se({fetchFun:me,params:s});return Ee(()=>{k(),q()}),(r,u)=>{const b=ee,m=le,A=we,K=De,v=oe,H=ue,Q=ye,a=te,W=ae,X=re,fe=pe,O=Ce,Y=he,J=Fe,ce=Se,be=ne;return h(),x(R,null,[D("div",null,[e(Q,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(H,{class:"mb-[-16px]",model:t(s),inline:""},{default:o(()=>[e(m,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(b,{class:"w-[280px]",modelValue:t(s).store_name,"onUpdate:modelValue":u[0]||(u[0]=l=>t(s).store_name=l),onKeydown:z(t(f),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),e(m,{label:"\u8BA2\u5355id",prop:"order_id"},{default:o(()=>[e(b,{class:"w-[280px]",modelValue:t(s).order_id,"onUpdate:modelValue":u[1]||(u[1]=l=>t(s).order_id=l),onKeydown:z(t(f),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355id"},null,8,["modelValue","onKeydown"])]),_:1}),e(m,{label:"\u91C7\u8D2D\u4EBA\u5458",prop:"buyer_id"},{default:o(()=>[D("div",Ae,[e(K,{modelValue:t(s).buyer_id,"onUpdate:modelValue":u[2]||(u[2]=l=>t(s).buyer_id=l),placeholder:"\u9009\u62E9\u9009\u62E9\u91C7\u8D2D\u4EBA\u5458",style:{width:"240px"},onChange:t(f)},{default:o(()=>[(h(!0),x(R,null,Z(t(p),l=>(h(),T(A,{key:l.uid,label:l.nickname,value:l.uid},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])])]),_:1}),e(m,{label:"\u91C7\u8D2D\u72B6\u6001"},{default:o(()=>[e(K,{modelValue:t(s).buyer_confirm,"onUpdate:modelValue":u[3]||(u[3]=l=>t(s).buyer_confirm=l),placeholder:"\u8BF7\u9009\u62E9\u91C7\u8D2D\u72B6\u6001",style:{width:"240px"}},{default:o(()=>[e(A,{label:"\u91C7\u8D2D\u5B8C\u6210",value:"1"}),e(A,{label:"\u672A\u5B8C\u6210",value:"0"})]),_:1},8,["modelValue"])]),_:1}),e(m,null,{default:o(()=>[e(v,{type:"primary",onClick:t(f)},{default:o(()=>[i("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(v,{onClick:t(G)},{default:o(()=>[i("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),de((h(),T(Q,{class:"!border-none",shadow:"never"},{default:o(()=>[e(v,{type:"primary",onClick:u[4]||(u[4]=l=>_.value=!0)},{default:o(()=>[i(" \u6279\u91CF\u91C7\u8D2D\u4FE1\u606F\u8BBE\u7F6E ")]),_:1}),D("div",Le,[e(X,{data:t(V).lists},{default:o(()=>[e(a,{type:"selection",width:"55"}),e(a,{label:"id",prop:"id","show-overflow-tooltip":""}),e(a,{label:"\u8BA2\u5355id",prop:"order_id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:l})=>[e(W,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(a,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(a,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(a,{label:"\u4F9B\u5E94\u5546",prop:"supplier_name","show-overflow-tooltip":""}),e(a,{label:"\u9700\u6C42\u6570\u91CF",prop:"need_num","show-overflow-tooltip":""}),e(a,{label:"\u91C7\u8D2D\u6570\u91CF",prop:"buyer_nums","show-overflow-tooltip":""}),e(a,{label:"\u91C7\u8D2D\u4EF7",prop:"price","show-overflow-tooltip":""}),e(a,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""}),e(a,{label:"\u91C7\u8D2D\u4EBA\u5458",prop:"buyer_name","show-overflow-tooltip":""}),e(a,{label:"\u91C7\u8D2D\u72B6\u6001",prop:"buyer_confirm_name","show-overflow-tooltip":""}),e(a,{label:"\u662F\u5426\u5165\u5E93",prop:"is_storage_name","show-overflow-tooltip":""}),e(a,{label:"\u64CD\u4F5C",fixed:"right"},{default:o(({row:l})=>[e(v,{type:"primary",link:"",onClick:c=>U(l)},{default:o(()=>[i("\u8BBE\u7F6E\u91C7\u8D2D\u4FE1\u606F")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),D("div",$e,[e(fe,{modelValue:t(V),"onUpdate:modelValue":u[5]||(u[5]=l=>L(V)?V.value=l:null),onChange:t(k)},null,8,["modelValue","onChange"])])]),_:1})),[[be,t(V).loading]])]),e(J,{modelValue:t(y),"onUpdate:modelValue":u[12]||(u[12]=l=>L(y)?y.value=l:null),title:"\u91C7\u8D2D\u4FE1\u606F\u8BBE\u7F6E",width:"600"},{footer:o(()=>[D("div",Ie,[e(v,{onClick:u[11]||(u[11]=l=>y.value=!1)},{default:o(()=>[i("\u53D6\u6D88")]),_:1}),e(v,{type:"primary",onClick:N},{default:o(()=>[i(" \u786E\u8BA4 ")]),_:1})])]),default:o(()=>[e(H,{ref:"formRef",model:t(n),"label-width":"90px"},{default:o(()=>[e(m,{label:"\u4F9B\u5E94\u5546"},{default:o(()=>[e(K,{modelValue:t(n).supplier_id,"onUpdate:modelValue":u[6]||(u[6]=l=>t(n).supplier_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":F,loading:t(B),style:{width:"240px"}},{default:o(()=>[(h(!0),x(R,null,Z(t(P),l=>(h(),T(A,{key:l.id,label:l.mer_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(m,{label:"\u6570\u91CF",prop:"buyer_nums"},{default:o(()=>[e(b,{modelValue:t(n).buyer_nums,"onUpdate:modelValue":u[7]||(u[7]=l=>t(n).buyer_nums=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91C7\u8D2D\u6570\u91CF",readonly:!1,onChange:w},null,8,["modelValue"])]),_:1}),e(m,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase"},{default:o(()=>[e(b,{modelValue:t(n).purchase,"onUpdate:modelValue":u[8]||(u[8]=l=>t(n).purchase=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91C7\u8D2D\u4EF7",readonly:!1,onChange:w},null,8,["modelValue"])]),_:1}),e(m,{label:"\u91C7\u8D2D\u603B\u4EF7",prop:"total_price"},{default:o(()=>[e(b,{modelValue:t(n).total_price,"onUpdate:modelValue":u[9]||(u[9]=l=>t(n).total_price=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91C7\u8D2D\u603B\u4EF7",readonly:!1},null,8,["modelValue"])]),_:1}),e(m,{label:"\u4ED8\u6B3E\u65B9\u5F0F",prop:"pay_type"},{default:o(()=>[e(Y,{modelValue:t(n).pay_type,"onUpdate:modelValue":u[10]||(u[10]=l=>t(n).pay_type=l)},{default:o(()=>[e(O,{label:1},{default:o(()=>[i("\u8D4A\u8D26")]),_:1}),e(O,{label:2},{default:o(()=>[i("\u73B0\u91D1")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e(J,{modelValue:t(_),"onUpdate:modelValue":u[16]||(u[16]=l=>L(_)?_.value=l:null),title:"\u6279\u91CF\u91C7\u8D2D\u4FE1\u606F\u8BBE\u7F6E",width:"1200"},{footer:o(()=>[D("div",Re,[e(v,{onClick:u[15]||(u[15]=l=>_.value=!1)},{default:o(()=>[i("\u53D6\u6D88")]),_:1}),e(v,{type:"primary",onClick:j},{default:o(()=>[i(" \u786E\u8BA4 ")]),_:1})])]),default:o(()=>[e(H,{ref:"formRef",model:t(g)},{default:o(()=>[e(m,{label:"\u4F9B\u5E94\u5546"},{default:o(()=>[e(K,{modelValue:t(g).supplier_id,"onUpdate:modelValue":u[13]||(u[13]=l=>t(g).supplier_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":F,loading:t(B),style:{width:"240px"}},{default:o(()=>[(h(!0),x(R,null,Z(t(P),l=>(h(),T(A,{key:l.id,label:l.mer_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(m,{label:"\u5546\u54C1",prop:"store_id"},{default:o(()=>[D("div",Ke,[D("div",Oe,[e(v,{type:"primary",onClick:u[14]||(u[14]=l=>d.value=!0)},{default:o(()=>[i("\u6DFB\u52A0\u5546\u54C1")]),_:1})]),e(X,{data:t(E)},{default:o(()=>[e(a,{label:"id",prop:"id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),e(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:l})=>[e(W,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(a,{label:"\u6570\u91CF"},{default:o(({row:l})=>[e(b,{modelValue:l.buyer_nums,"onUpdate:modelValue":c=>l.buyer_nums=c,onChange:c=>I(l)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),e(a,{label:"\u91C7\u8D2D\u4EF7"},{default:o(({row:l})=>[e(b,{modelValue:l.purchase,"onUpdate:modelValue":c=>l.purchase=c,onChange:c=>I(l)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),e(a,{label:"\u91C7\u8D2D\u603B\u4EF7"},{default:o(({row:l})=>[e(b,{modelValue:l.total_price,"onUpdate:modelValue":c=>l.total_price=c},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(a,{label:"\u652F\u4ED8\u7C7B\u578B",width:"180"},{default:o(({row:l})=>[e(Y,{modelValue:l.pay_type,"onUpdate:modelValue":c=>l.pay_type=c},{default:o(()=>[e(O,{label:1},{default:o(()=>[i("\u8D4A\u8D26")]),_:1}),e(O,{label:2},{default:o(()=>[i("\u73B0\u91D1")]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1}),e(a,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:l})=>[e(v,{type:"danger",link:"",onClick:c=>$(l.id)},{default:o(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e(J,{modelValue:t(d),"onUpdate:modelValue":u[17]||(u[17]=l=>L(d)?d.value=l:null),title:"\u9009\u62E9\u5546\u54C1",width:"70%"},{default:o(()=>[e(ce,{onOnBindStore:S})]),_:1},8,["modelValue"])],64)}}});export{Fl as default};