2024-07-26 09:54:36 +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.7b9d0c0d.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.8b9de773.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.56ffa17d.js";import{d as ge,b as Fe,e as Be}from"./store_branch_product.f1c8a39e.js";import"./lodash.9dc701ad.js";import{a as ke}from"./system_store.a8fdbebf.js";import{f as Ve}from"./index.3572044d.js";import{_ as ye}from"./edit.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.b1d3e8a0.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.deb06582.js";import"./index.9b589b0d.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.9300cbee.js";import"./index.0ad6d1d6.js";import"./vuedraggable.1648e3a8.js";import"./vue.393dceb0.js";import"./sortablejs.382fadba.js";import"./store_product_unit.db3eb463.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,
|