2024-08-06 20:14: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.a63a26dd.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{f as re,b as se}from"./index.038cab91.js";import{u as ne}from"./usePaging.6a6670f9.js";import{u as ie}from"./useDictOptions.01b6a4d4.js";import{_ as pe,a as de,b as me,c as ce}from"./edit.vue_vue_type_script_setup_true_name_warehouseProductEdit_lang.4c0d61a2.js";import{d as N,s as _e,r as F,Z as fe,ap as we,o as s,c as g,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 k,j as ve,n as U}from"./@vue.18505fe0.js";import"./lodash.2473fc51.js";import{a as be}from"./system_store.cd137b2d.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"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.25896ae1.js";import"./store_product.2d7e1c11.js";import"./warehouse_product_storege.5f4584bd.js";import"./warehouse.5676e381.js";import"./index.95a86d91.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:""}),D=F([]),R=r=>{D.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(),g("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),g($,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
|