moreShopAdmin/dist/admin/assets/index.f0943191.js

2 lines
7.2 KiB
JavaScript

import{a2 as Z,H as W,J as X,K as Y,D as ee,C as oe,w as te,F as le,L as ae,M as ue,b as se,t as ne,N as re,O as ie}from"./element-plus.7b9d0c0d.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.8b9de773.js";import{d as U,s as me,r as d,Z as de,ap as ce,o as i,c as y,U as e,L as l,u as t,T as _e,a9 as fe,K as w,aa as D,R as r,M as x,j as S,a as L,Q as he,n as ve}from"./@vue.18505fe0.js";import{u as we}from"./usePaging.6a6670f9.js";import{u as be}from"./useDictOptions.d682158e.js";import{b as Ee,d as Ce}from"./store_branch_product.c59fe1dc.js";import"./lodash.9dc701ad.js";import{a as ge}from"./system_store.52f24937.js";import"./index.dbb361e6.js";import{_ as Fe}from"./edit.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.23e10ee1.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"./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";import"./picker.3fd1d286.js";import"./index.b80273c8.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.124771aa.js";import"./index.51071651.js";import"./vuedraggable.1648e3a8.js";import"./vue.393dceb0.js";import"./sortablejs.382fadba.js";import"./store_product_unit.3ce9ac8f.js";const Be={class:"mt-4"},Ve={class:"flex mt-4 justify-end"},ke=U({name:"storeBranchProductLists"}),Co=U({...ke,setup(ye){const b=me(),E=d(!1),s=de({store_id:"",store_name:"",bar_code:"",exchange:0,status:null,stock:null}),P=d([]),K=u=>{P.value=u.map(({id:a})=>a)},{dictData:R}=be(""),{pager:p,getLists:c,resetParams:T,resetPage:_}=we({fetchFun:Ce,params:s}),A=async u=>{var a,h;E.value=!0,await ve(),(a=b.value)==null||a.open("edit"),(h=b.value)==null||h.setFormData(u)};c();const f=d(!1),B=d([]),N=(u="")=>{f.value=!0,ge({name:u,page_size:50}).then(a=>{B.value=a.lists,setTimeout(()=>{f.value=!1},300)}).catch(a=>{setTimeout(()=>{f.value=!1},300)})},$=u=>{Ee({id:u.id,store_name:u.store_name,image:u.image,price:u.price,unit:u.unit,status:u.status})},C=d("0"),I=u=>{u==0?(s.status=null,s.stock=null):u==1?(s.status=1,s.stock=null):u==2?(s.status=0,s.stock=null):u==3?(s.status=null,s.stock=10):u==4&&(s.status=null,s.stock=0),c()};return(u,a)=>{const h=X,M=Y,v=ee,V=oe,g=te,j=le,k=ae,m=Z,z=W,n=ue,O=se,q=ne,G=re,H=pe,J=ce("prems"),Q=ie;return i(),y("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(j,{class:"mb-[-16px]",model:t(s),inline:""},{default:l(()=>[e(v,{label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[e(M,{modelValue:t(s).store_id,"onUpdate:modelValue":a[0]||(a[0]=o=>t(s).store_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":N,loading:t(f),style:{width:"240px"},onChange:t(_)},{default:l(()=>[(i(!0),y(_e,null,fe(t(B),o=>(i(),w(h,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),e(v,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:l(()=>[e(V,{class:"w-[280px]",modelValue:t(s).store_name,"onUpdate:modelValue":a[1]||(a[1]=o=>t(s).store_name=o),onKeydown:D(t(_),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),e(v,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:l(()=>[e(V,{class:"w-[280px]",modelValue:t(s).bar_code,"onUpdate:modelValue":a[2]||(a[2]=o=>t(s).bar_code=o),onKeydown:D(t(_),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue","onKeydown"])]),_:1}),e(v,null,{default:l(()=>[e(g,{type:"primary",onClick:t(_)},{default:l(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(g,{onClick:t(T)},{default:l(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),x((i(),w(k,{class:"!border-none",shadow:"never"},{default:l(()=>[e(z,{modelValue:t(C),"onUpdate:modelValue":a[3]||(a[3]=o=>S(C)?C.value=o:null),onChange:I},{default:l(()=>[e(m,{label:"0"},{default:l(()=>[r("\u5168\u90E8")]),_:1}),e(m,{label:"1"},{default:l(()=>[r("\u4E0A\u67B6")]),_:1}),e(m,{label:"2"},{default:l(()=>[r("\u4E0B\u67B6")]),_:1}),e(m,{label:"3"},{default:l(()=>[r("\u5E93\u5B58\u8B66\u544A")]),_:1}),e(m,{label:"4"},{default:l(()=>[r("\u5DF2\u552E\u7F44")]),_:1})]),_:1},8,["modelValue"]),L("div",Be,[e(G,{data:t(p).lists,onSelectionChange:K},{default:l(()=>[e(n,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(n,{label:"\u95E8\u5E97",prop:"system_store_name","show-overflow-tooltip":""}),e(n,{label:"\u5206\u7C7B",prop:"cate_name","show-overflow-tooltip":""}),e(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),e(n,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","show-overflow-tooltip":""},{default:l(({row:o})=>[e(O,{class:"w-[40px] h-[40px]",src:o.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(n,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(n,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"120","show-overflow-tooltip":""}),e(n,{label:"\u4F1A\u5458\u4EF7",prop:"vip_price","min-width":"120","show-overflow-tooltip":""}),e(n,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(n,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code","show-overflow-tooltip":""}),e(n,{label:"\u9500\u91CF",prop:"sales","show-overflow-tooltip":""}),e(n,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),e(n,{label:"\u5151\u6362\u5E93\u5B58",prop:"swap","show-overflow-tooltip":""}),e(n,{label:"\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(n,{label:"\u72B6\u6001",prop:"status"},{default:l(({row:o})=>[e(q,{size:"large",onChange:F=>$(o),modelValue:o.status,"onUpdate:modelValue":F=>o.status=F,"active-value":1,"inactive-value":0,"active-text":"\u4E0A\u67B6","inactive-text":"\u4E0B\u67B6","inline-prompt":""},null,8,["onChange","modelValue","onUpdate:modelValue"])]),_:1}),e(n,{label:"\u64CD\u4F5C","min-width":"140",fixed:"right",align:"center","show-overflow-tooltip":""},{default:l(({row:o})=>[x((i(),w(g,{type:"primary",link:"",onClick:F=>A(o)},{default:l(()=>[r("\u7F16\u8F91")]),_:2},1032,["onClick"])),[[J,["store_branch_product.store_branch_product/deit"]]])]),_:1})]),_:1},8,["data"])]),L("div",Ve,[e(H,{modelValue:t(p),"onUpdate:modelValue":a[4]||(a[4]=o=>S(p)?p.value=o:null),onChange:t(c)},null,8,["modelValue","onChange"])])]),_:1})),[[Q,t(p).loading]]),t(E)?(i(),w(Fe,{key:0,ref_key:"editRef",ref:b,"dict-data":t(R),onSuccess:t(c),onClose:a[5]||(a[5]=o=>E.value=!1)},null,8,["dict-data","onSuccess"])):he("",!0)])}}});export{Co as default};