2 lines
7.0 KiB
JavaScript
2 lines
7.0 KiB
JavaScript
|
import{J as H,K as W,D as X,C as Y,w as ee,F as oe,L as te,M as ae,b as le,t as se,N as re,O as ne}from"./element-plus.573d45d4.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.ffc076c1.js";import{d as P,s as ie,r as b,Z as pe,ap as D,o as u,c as E,U as e,L as l,u as t,T as x,a9 as S,K as c,aa as L,R as w,M as F,a as U,j as me,Q as de,n as ce}from"./@vue.18505fe0.js";import{u as _e}from"./usePaging.6a6670f9.js";import{u as fe}from"./useDictOptions.8f7adb99.js";import{d as ve,b as he,e as be}from"./store_branch_product.1f193f21.js";import"./lodash.60201f64.js";import{a as we}from"./system_store.ff4c815b.js";import{f as Ce}from"./index.ad128f8c.js";import{_ as ge}from"./edit.vue_vue_type_script_setup_true_name_storeBranchProductEdit_lang.51b79136.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.366fba37.js";import"./index.4ac26464.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.d455cf9a.js";import"./index.af27a3ac.js";import"./vuedraggable.d1fd737a.js";import"./vue.feef8fd6.js";import"./sortablejs.c8f4cbb7.js";import"./store_product_unit.8d64482f.js";const Ee={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},Be=P({name:"storeBranchProductLists"}),wo=P({...Be,setup(ye){const C=ie(),g=b(!1),n=pe({store_id:"",store_name:"",bar_code:"",status:"",exchange:0}),K=b([]),T=s=>{K.value=s.map(({id:a})=>a)},{dictData:$}=fe(""),{pager:i,getLists:_,resetParams:N,resetPage:p}=_e({fetchFun:be,params:n}),R=async s=>{var a,m;g.value=!0,await ce(),(a=C.value)==null||a.open("edit"),(m=C.value)==null||m.setFormData(s)},I=async s=>{await Ce.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ve({id:s}),_()};_();const f=b(!1),B=b([]),A=(s="")=>{f.value=!0,we({name:s,page_size:50}).then(a=>{B.value=a.lists,setTimeout(()=>{f.value=!1},300)}).catch(a=>{setTimeout(()=>{f.value=!1},300)})},M=s=>{he({id:s.id,store_name:s.store_name,image:s.image,price:s.price,unit:s.unit,status:s.status})};return(s,a)=>{const m=H,y=W,d=X,V=Y,v=ee,j=oe,k=te,r=ae,z=le,O=se,q=re,J=ue,Q=D("prems"),Z=D("perms"),G=ne;return u(),E("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(j,{class:"mb-[-16px]",model:t(n),inline:""},{default:l(()=>[e(d,{label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[e(y,{modelValue:t(n).store_id,"onUpdate:modelValue":a[0]||(a[0]=o=>t(n).store_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":A,loading:t(f),style:{width:"240px"},onChange:t(p)},{default:l(()=>[(u(!0),E(x,null,S(t(B),o=>(u(),c(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(V,{class:"w-[280px]",modelValue:t(n).store_name,"onUpdate:modelValue":a[1]||(a[1]=o=>t(n).store_name=o),onKeydown:L(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(V,{class:"w-[280px]",modelValue:t(n).bar_code,"onUpdate:modelValue":a[2]||(a[2]=o=>t(n).bar_code=o),onKeydown:L(t(p),["e
|