moreShopAdmin/build/admin/assets/index.22bf3900.js

2 lines
7.5 KiB
JavaScript
Raw Normal View History

2024-08-06 20:14:31 +08:00
import{a2 as Y,H as ee,J as oe,K as te,D as le,C as ae,w as ue,F as se,L as ne,M as re,b as ie,t as pe,N as me,O as de}from"./element-plus.a63a26dd.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{d as U,s as _e,r as c,Z as fe,ap as D,o as i,c as x,U as e,L as t,u as l,T as he,a9 as ve,K as _,aa as S,R as r,M as B,j as L,a as P,Q as we,n as be}from"./@vue.18505fe0.js";import{u as Ee}from"./usePaging.6a6670f9.js";import{u as Ce}from"./useDictOptions.01b6a4d4.js";import{d as ge,b as Fe,e as Be}from"./store_branch_product.1f8bb3c3.js";import"./lodash.2473fc51.js";import{a as ke}from"./system_store.cd137b2d.js";import{f as Ve}from"./index.038cab91.js";import{_ as ye}from"./edit.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.b7228e33.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.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.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.679dac0e.js";import"./index.95a86d91.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.7e1b5528.js";import"./index.14f8da85.js";import"./vuedraggable.ac9cc40f.js";import"./vue.7b0b04ca.js";import"./sortablejs.82ef1d94.js";import"./store_product_unit.b764fef2.js";const De={class:"mt-4"},xe={class:"flex mt-4 justify-end"},Se=U({name:"storeBranchProductLists"}),ko=U({...Se,setup(Le){const C=_e(),g=c(!1),s=fe({store_id:"",store_name:"",bar_code:"",exchange:0,status:null,stock:null}),K=c([]),R=a=>{K.value=a.map(({id:u})=>u)},{dictData:T}=Ce(""),{pager:p,getLists:m,resetParams:A,resetPage:f}=Ee({fetchFun:Be,params:s}),$=async a=>{var u,v;g.value=!0,await be(),(u=C.value)==null||u.open("edit"),(v=C.value)==null||v.setFormData(a)},N=async a=>{await Ve.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ge({id:a}),m()};m();const h=c(!1),k=c([]),I=(a="")=>{h.value=!0,ke({name:a,page_size:50}).then(u=>{k.value=u.lists,setTimeout(()=>{h.value=!1},300)}).catch(u=>{setTimeout(()=>{h.value=!1},300)})},M=a=>{Fe({id:a.id,store_name:a.store_name,image:a.image,price:a.price,unit:a.unit,status:a.status})},F=c("0"),j=a=>{a==0?(s.status=null,s.stock=null):a==1?(s.status=1,s.stock=null):a==2?(s.status=0,s.stock=null):a==3?(s.status=null,s.stock=10):a==4&&(s.status=null,s.stock=0),m()};return(a,u)=>{const v=oe,z=te,w=le,V=ae,b=ue,O=se,y=ne,d=Y,q=ee,n=re,G=ie,H=pe,J=me,Q=ce,Z=D("prems"),W=D("perms"),X=de;return i(),x("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(O,{class:"mb-[-16px]",model:l(s),inline:""},{default:t(()=>[e(w,{label:"\u95E8\u5E97",prop:"store_id"},{default:t(()=>[e(z,{modelValue:l(s).store_id,"onUpdate:modelValue":u[0]||(u[0]=o=>l(s).store_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":I,loading:l(h),style:{width:"240px"},onChange:l(f)},{default:t(()=>[(i(!0),x(he,null,ve(l(k),o=>(i(),_(v,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),e(w,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(V,{class:"w-[280px]",modelValue:l(s).store_name,"onUpdate:modelValue":u[1]||(u[1]=o=>l(s).store_name=o),onKeydown:S(l(f),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,