2024-08-07 13:42:31 +08:00
|
|
|
import{J as Z,K as G,D as H,C as X,w as Y,F as ee,L as oe,M as te,N as ae,O as le}from"./element-plus.4a7d92a3.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{f as re,b as se}from"./index.bdce7f5b.js";import{u as ne}from"./usePaging.6a6670f9.js";import{u as ie}from"./useDictOptions.1f7a351b.js";import{_ as pe,a as de,b as me,c as ce}from"./edit.vue_vue_type_script_setup_true_name_warehouseProductEdit_lang.7fca3e4d.js";import{d as N,s as _e,r as F,Z as fe,ap as we,o as s,c as D,U as e,L as l,u as t,a as y,T as $,a9 as T,K as i,R as d,M as c,S as he,Q as g,j as ve,n as U}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{a as be}from"./system_store.72701eea.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"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.03b24b0a.js";import"./store_product.acd569c1.js";import"./warehouse_product_storege.3d7504fb.js";import"./warehouse.d00ded66.js";import"./index.41928498.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const Ee={class:"flex items-center mr-4"},Ce={class:"mt-4"},Fe={style:{color:"red"}},ye={class:"flex mt-4 justify-end"},ke=N({name:"warehouseProductLists"}),fo=N({...ke,setup(De){const v=_e(),b=F(!1),n=fe({warehouse_id:"",product_id:"",financial_pm:"",store_id:""}),k=F([]),R=r=>{k.value=r.map(({id:a})=>a)},{dictData:V}=ie("warehouse_produc_pm"),{pager:_,getLists:f,resetParams:I,resetPage:B}=ne({fetchFun:ce,params:n}),M=async()=>{var r;b.value=!0,await U(),(r=v.value)==null||r.open("add")},W=async r=>{var a,m;b.value=!0,await U(),(a=v.value)==null||a.open("edit"),(m=v.value)==null||m.setFormData(r)},j=async r=>{await de({id:r}),f()},x=async r=>{await re.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:r}),f()},E=F(!1),L=F([]),K=(r="")=>{E.value=!0,be({name:r,page_size:50}).then(a=>{L.value=a.lists,setTimeout(()=>{E.value=!1},300)}).catch(a=>{setTimeout(()=>{E.value=!1},300)})};return f(),(r,a)=>{const m=Z,P=G,w=H,S=X,p=Y,O=ee,A=oe,q=se,u=te,z=ae,J=ue,h=we("perms"),Q=le;return s(),D("div",null,[e(A,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(O,{class:"mb-[-16px]",model:t(n),inline:""},{default:l(()=>[e(w,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:l(()=>[y("div",Ee,[e(P,{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":K,loading:t(E),style:{width:"240px"},onChange:t(B)},{default:l(()=>[(s(!0),D($,null,T(t(L),o=>(s(),i(m,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(w,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:l(()=>[e(S,{class:"w-[280px]",modelValue:t(n).warehouse_id,"onUpdate:modelValue":a[1]||(a[1]=o=>t(n).warehouse_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(w,{label:"\u5546\u54C1",prop:"product_id"},{default:l(()=>[e(S,{class:"w-[280px]",modelValue:t(n).product_id,"onUpdate:modelValue":a[2]||(a[2]=o=>t(n).product_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelVa
|