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

2 lines
8.2 KiB
JavaScript
Raw Normal View History

2024-08-11 17:34:03 +08:00
import{a2 as ae,H as le,J as se,K as ue,D as ne,C as re,w as ie,F as pe,L as ce,M as me,b as de,t as _e,N as fe,O as he}from"./element-plus.ebe4edc1.js";import{_ as ve}from"./index.vue_vue_type_script_setup_true_lang.311652af.js";import{_ as we}from"./index.vue_vue_type_script_setup_true_lang.34868847.js";import{d as T,s as be,r as _,Z as Ee,ap as L,o as i,c as P,U as e,L as t,u as a,T as ge,a9 as Ce,K as f,aa as U,R as r,M as x,j as K,a as c,a0 as C,S as F,Q as Fe,n as ye}from"./@vue.18505fe0.js";import{u as Be}from"./usePaging.6a6670f9.js";import{u as ke}from"./useDictOptions.b19b6c11.js";import{d as R,e as xe,b as Ve}from"./store_branch_product.00a5cfbf.js";import"./lodash.9da25972.js";import{a as De}from"./system_store.53207144.js";import{f as Se}from"./index.97d0e487.js";import{_ as Le}from"./edit.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.9c3b5015.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.2abc406c.js";import"./axios.9e25675c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.16bffd29.js";import"./index.vue_vue_type_style_index_0_scoped_b8e715d9_lang.220569d0.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.ae040c61.js";import"./color.130f7952.js";import"./clone.4a149bdb.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.e75c9f38.js";import"./vue-clipboard3.cacf014a.js";import"./clipboard.1f8f6543.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.375b8b4c.js";import"./index.a00b7819.js";import"./index.53ec9cfa.js";import"./vuedraggable.d0c2add0.js";import"./vue.fcb68125.js";import"./sortablejs.430f5f4d.js";import"./store_product_unit.bac71e51.js";const Pe={class:"mt-4"},Ue={class:"flex mt-4 justify-end"},Ke=T({name:"storeBranchProductLists"}),So=T({...Ke,setup(Re){const y=be(),B=_(!1),u=Ee({store_id:"",store_name:"",bar_code:"",exchange:0,status:null,stock:null}),$=_([]),z=l=>{$.value=l.map(({id:s})=>s)},{dictData:A}=ke(""),{pager:p,getLists:m,resetParams:N,resetPage:h}=Be({fetchFun:R,params:u}),I=async l=>{var s,w;B.value=!0,await ye(),(s=y.value)==null||s.open("edit"),(w=y.value)==null||w.setFormData(l)},M=async l=>{await Se.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await xe({id:l}),m()};m();const v=_(!1),V=_([]),j=(l="")=>{v.value=!0,De({name:l,page_size:50}).then(s=>{V.value=s.lists,setTimeout(()=>{v.value=!1},300)}).catch(s=>{setTimeout(()=>{v.value=!1},300)})},O=l=>{Ve({id:l.id,store_name:l.store_name,image:l.image,price:l.price,unit:l.unit,status:l.status})},k=_("0"),q=l=>{l==0?(u.status=null,u.stock=null):l==1?(u.status=1,u.stock=null):l==2?(u.status=0,u.stock=null):l==3?(u.status=null,u.stock=10):l==4&&(u.status=null,u.stock=0),m()};return(l,s)=>{const w=se,G=ue,b=ne,D=re,E=ie,H=we,J=pe,S=ce,d=ae,Q=le,n=me,Z=de,W=_e,X=fe,Y=ve,ee=L("prems"),oe=L("perms"),te=he;return i(),P("div",null,[e(S,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(J,{class:"mb-[-16px]",model:a(u),inline:""},{default:t(()=>[e(b,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[e(G,{modelValue:a(u).store_id,"onUpdate:modelValue":s[0]||(s[0]=o=>a(u).store_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":j,loading:a(v),style:{width:"240px"},onChange:a(h)},{default:t(()=>[(i(!0),P(ge,null,Ce(a(V),o=>(i(),f(w,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),e(b,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(D,{class:"w-[280px]",modelValue:a(u).store_name,"onUpdate:modelValue":s[1]||(s[1]=o=>a(u).store_name=o),onKeyd