2024-08-11 20:11:29 +08:00
|
|
|
import{J as G,K as H,D as X,C as Y,w as ee,F as oe,L as te,M as ae,b as le,N as re,O as se}from"./element-plus.9e22693c.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.153a119f.js";import{f as ie,b as ne}from"./index.56c7da87.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.524981cd.js";import{u as de}from"./usePaging.6a6670f9.js";import{u as me}from"./useDictOptions.edc916f4.js";import{a as P,_ as ce,b as _e,c as fe}from"./edit.vue_vue_type_script_setup_true_name_warehouseProductEdit_lang.c504a1a9.js";import{d as T,s as he,r as C,Z as we,i as ve,ap as be,o as u,c as S,U as e,L as l,u as o,a as F,T as Ee,a9 as Ce,K as n,R as d,M as c,S as Fe,Q as k,j as ge,n as $}from"./@vue.18505fe0.js";import"./lodash.419afce2.js";import{a as ke}from"./system_store.9333c3b8.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.129a2796.js";import"./axios.d44c8eec.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.867692c9.js";import"./vue-clipboard3.d30f83bc.js";import"./clipboard.24da1bd3.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.b9cdeb0d.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.f1ed1fb4.js";import"./store_product.102bace4.js";import"./warehouse_product_storege.a5bdefa0.js";import"./warehouse.20a70818.js";const ye={class:"flex items-center mr-4"},De={class:"mt-4"},xe={style:{color:"red"}},Ve={class:"flex mt-4 justify-end"},Be=T({name:"warehouseProductLists"}),Co=T({...Be,setup(Le){const h=he(),w=C(!1),i=we({warehouse_id:"",product_id:"",financial_pm:1,store_id:""}),g=C([]),A=s=>{g.value=s.map(({id:a})=>a)},{dictData:N}=me("warehouse_produc_pm"),{pager:m,getLists:_,resetParams:R,resetPage:y}=de({fetchFun:P,params:i}),U=async()=>{var s;w.value=!0,await $(),(s=h.value)==null||s.open("add")},z=async s=>{var a,b;w.value=!0,await $(),(a=h.value)==null||a.open("edit"),(b=h.value)==null||b.setFormData(s)},I=async s=>{await _e({id:s}),_()},D=async s=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await fe({id:s}),_()},v=C(!1),x=C([]),M=(s="")=>{v.value=!0,ke({name:s,page_size:50}).then(a=>{x.value=a.lists,setTimeout(()=>{v.value=!1},300)}).catch(a=>{setTimeout(()=>{v.value=!1},300)})};return ve(()=>{_()}),(s,a)=>{const b=G,W=H,E=X,V=Y,p=ee,j=pe,K=oe,B=te,O=ne,r=ae,q=le,J=re,Q=ue,f=be("perms"),Z=se;return u(),S("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(K,{class:"mb-[-16px]",model:o(i),inline:""},{default:l(()=>[e(E,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:l(()=>[F("div",ye,[e(W,{modelValue:o(i).store_id,"onUpdate:modelValue":a[0]||(a[0]=t=>o(i).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":M,loading:o(v),style:{width:"240px"},onChange:o(y)},{default:l(()=>[(u(!0),S(Ee,null,Ce(o(x),t=>(u(),n(b,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(E,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:l(()=>[e(V,{class:"w-[280px]",modelValue:o(i).warehouse_id,"onUpdate:modelValue":a[1]||(a[1]=t=>o(i).warehouse_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(E,{label:"\u5546\u54C1",prop:"product_id"},{default:l(()=>[e(V,{class:"w-[280px]",modelValue:o(i).product_id,"onUpdate:model
|