2024-06-24 15:37:24 +08:00
|
|
|
import{J,K as Q,D as Z,C as G,w as H,F as W,L as X,M as Y,b as ee,t as oe,N as te,O as ae}from"./element-plus.e226cbd2.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.11f62324.js";import{d as L,s as ue,r as h,Z as ne,o as r,c as g,U as e,L as l,u as t,T as k,a9 as x,K as E,aa as D,R as w,M as se,a as S,j as re,Q as ie,n as pe}from"./@vue.18505fe0.js";import{u as me}from"./usePaging.6a6670f9.js";import{u as de}from"./useDictOptions.f6cd4436.js";import{d as ce,b as _e,e as fe}from"./store_branch_product.97f686c3.js";import"./lodash.60201f64.js";import{a as ve}from"./system_store.ad689051.js";import{f as he}from"./index.fed05481.js";import{_ as we}from"./edit.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.511cf8c2.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.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.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.96e8ace0.js";import"./index.e14cd4aa.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.fd11a68a.js";import"./index.1b9d84c5.js";import"./vuedraggable.d1fd737a.js";import"./vue.feef8fd6.js";import"./sortablejs.c8f4cbb7.js";import"./store_product_unit.1ae8da95.js";const be={class:"mt-4"},Ce={class:"flex mt-4 justify-end"},ge=L({name:"storeBranchProductLists"}),vo=L({...ge,setup(Ee){const b=ue(),C=h(!1),s=ne({store_id:"",store_name:"",bar_code:"",status:"",exchange:0}),U=h([]),P=u=>{U.value=u.map(({id:a})=>a)},{dictData:K}=de(""),{pager:i,getLists:c,resetParams:T,resetPage:p}=me({fetchFun:fe,params:s}),$=async u=>{var a,m;C.value=!0,await pe(),(a=b.value)==null||a.open("edit"),(m=b.value)==null||m.setFormData(u)},N=async u=>{await he.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:u}),c()};c();const _=h(!1),F=h([]),R=(u="")=>{_.value=!0,ve({name:u,page_size:50}).then(a=>{F.value=a.lists,setTimeout(()=>{_.value=!1},300)}).catch(a=>{setTimeout(()=>{_.value=!1},300)})},I=u=>{_e({id:u.id,store_name:u.store_name,image:u.image,price:u.price,unit:u.unit,status:u.status})};return(u,a)=>{const m=J,B=Q,d=Z,y=G,f=H,A=W,V=X,n=Y,M=ee,j=oe,z=te,O=le,q=ae;return r(),g("div",null,[e(V,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(A,{class:"mb-[-16px]",model:t(s),inline:""},{default:l(()=>[e(d,{label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[e(B,{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":R,loading:t(_),style:{width:"240px"},onChange:t(p)},{default:l(()=>[(r(!0),g(k,null,x(t(F),o=>(r(),E(m,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),e(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:l(()=>[e(y,{class:"w-[280px]",modelValue:t(s).store_name,"onUpdate:modelValue":a[1]||(a[1]=o=>t(s).store_name=o),onKeydown:D(t(p),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),e(d,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:l(()=>[e(y,{class:"w-[280px]",modelValue:t(s).bar_code,"onUpdate:modelValue":a[2]||(a[2]=o=>t(s).bar_code=o),onKeydown:D(t(p),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93
|