moreShopAdmin/build/admin/assets/index.dd980120.js

2 lines
8.5 KiB
JavaScript

import{U as le,J as ae,K as ue,D as re,C as se,w as ie,F as ne,L as pe,M as de,b as me,N as ce,O as _e}from"./element-plus.4a7d92a3.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as he}from"./index.vue_vue_type_script_setup_true_lang.d79217e3.js";import{u as we}from"./usePaging.6a6670f9.js";import{u as ve}from"./useDictOptions.2608869e.js";import{d as U,e as Ee,f as be}from"./warehouse_product.a52a3e99.js";import{d as N,s as Fe,r as d,Z as Ce,i as ge,af as De,ap as ke,o as i,c as D,U as e,L as a,u as t,a as b,T as M,a9 as P,K as _,j as S,R as f,M as F,S as ye,Q as Y,n as Ve}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{f as xe}from"./index.4e463299.js";import"./warehousing.vue_vue_type_script_setup_true_name_storeProductEdit_lang.97eed734.js";import{a as Be}from"./system_store.89791c2c.js";import{h as A}from"./moment.40bc58bf.js";import{a as Le}from"./supplier.ffa586de.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"./index.db9416bc.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.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.d4197bfa.js";import"./store_product.f6a993ce.js";import"./store_branch_product.ea8351bc.js";import"./warehouse_product_storege.4fb48b7a.js";import"./warehouse.f7698d62.js";const Te={class:"flex items-center mr-4"},Ue={class:"mt-4"},Me={style:{color:"red"}},Pe={class:"flex mt-4 justify-end"},Se=N({name:"warehouseProductLists"}),To=N({...Se,setup(Ye){const k=Fe(),$=d(!1),u=Ce({warehouse_id:"",product_id:"",financial_pm:1,store_id:"",bar_code:"",start_time:"",end_time:"",supplier_id:""}),z=d([]),I=s=>{z.value=s.map(({id:l})=>l)};ve("warehouse_produc_pm");const{pager:m,getLists:h,resetParams:R,resetPage:y}=we({fetchFun:U,params:u}),W=async s=>{var l,w;$.value=!0,await Ve(),(l=k.value)==null||l.open("edit"),(w=k.value)==null||w.setFormData(s)},j=async s=>{await Ee({id:s}),h()},K=async s=>{await xe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await be({id:s}),h()},n=d([]),O=()=>{n.value[0]&&n.value[1]?(u.start_time=A(n.value[0]).format("YYYY-MM-DD")+" 00:00:00",u.end_time=A(n.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(u.start_time="",u.end_time=""),h()},v=d(!1),V=d([]),q=(s="")=>{v.value=!0,Be({name:s,page_size:50}).then(l=>{V.value=l.lists,setTimeout(()=>{v.value=!1},300)}).catch(l=>{setTimeout(()=>{v.value=!1},300)})},E=d(!1),x=d([]),J=(s="")=>{E.value=!0,Le({}).then(l=>{x.value=l.lists,setTimeout(()=>{E.value=!1},300)}).catch(l=>{setTimeout(()=>{E.value=!1},300)})};return ge(()=>{h()}),(s,l)=>{const w=ae,B=ue,p=re,C=se,Q=le,c=ie,Z=he,G=ne,L=pe,H=De("router-link"),r=de,X=me,ee=ce,oe=fe,g=ke("perms"),te=_e;return i(),D("div",null,[e(L,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(G,{class:"mb-[-16px]",model:t(u),inline:""},{default:a(()=>[e(p,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:a(()=>[b("div",Te,[e(B,{modelValue:t(u).store_id,"onUpdate:modelValue":l[0]||(l[0]=o=>t(u).store_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":q,loading:t(v),style:{width:"240px"},onChange:t(y)},{default:a(()=>[(i(!0),D(M,null,P(t(V),o=>(i(),_(w,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(p,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:a(()=>[e(C,{class:"w-[280px]",modelValue:t(u).warehouse_id,"onUpdate:modelValue":l[1]||(l[1]=o=>t(u).warehouse_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u4F9B\u5E94\u5546",prop:"supplier_id"},{default:a(()=>[e(B,{modelValue:t(u).supplier_id,"onUpdate:modelValue":l[2]||(l[2]=o=>t(u).supplier_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":J,loading:t(E),style:{width:"240px"}},{default:a(()=>[(i(!0),D(M,null,P(t(x),o=>(i(),_(w,{key:o.id,label:o.mer_name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(p,{label:"\u5546\u54C1",prop:"product_id"},{default:a(()=>[e(C,{class:"w-[280px]",modelValue:t(u).product_id,"onUpdate:modelValue":l[3]||(l[3]=o=>t(u).product_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:a(()=>[e(C,{class:"w-[280px]",modelValue:t(u).bar_code,"onUpdate:modelValue":l[4]||(l[4]=o=>t(u).bar_code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u65E5\u671F",prop:"create_time"},{default:a(()=>[e(Q,{modelValue:t(n),"onUpdate:modelValue":l[5]||(l[5]=o=>S(n)?n.value=o:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:O},null,8,["modelValue"])]),_:1}),e(p,null,{default:a(()=>[e(c,{type:"primary",onClick:t(y)},{default:a(()=>[f("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(c,{onClick:t(R)},{default:a(()=>[f("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(Z,{class:"ml-2.5","fetch-fun":t(U),params:t(u),"page-size":t(m).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),F((i(),_(L,{class:"!border-none",shadow:"never"},{default:a(()=>[e(H,{to:{path:"warehousing"},class:"ml-4"},{default:a(()=>[e(c,{type:"primary"},{default:a(()=>[f(" \u5165\u5E93 ")]),_:1})]),_:1}),b("div",Ue,[e(ee,{data:t(m).lists,onSelectionChange:I},{default:a(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"id",prop:"id","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),e(r,{label:"\u4F9B\u5E94\u5546",prop:"supplier_name","show-overflow-tooltip":""}),e(r,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(r,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),e(r,{label:"\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:o})=>[e(X,{style:{width:"50px",height:"50px"},src:o.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(r,{label:"\u51FA\u5165\u5E93",prop:"financial_pm_name","show-overflow-tooltip":""}),e(r,{label:"\u6279\u6B21",prop:"batch","show-overflow-tooltip":""}),e(r,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(r,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(r,{label:"\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(r,{label:"\u751F\u4EA7\u671F",prop:"manufacture","show-overflow-tooltip":""}),e(r,{label:"\u4FDD\u8D28\u671F",prop:"expiration_date","show-overflow-tooltip":""}),e(r,{label:"\u5907\u6CE8","show-overflow-tooltip":""},{default:a(({row:o})=>[b("span",Me,ye(o.mark),1)]),_:1}),e(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:o})=>[o.status==0?F((i(),_(c,{key:0,type:"primary",link:"",onClick:T=>W(o)},{default:a(()=>[f(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["warehouse_product.warehouse_product/edit"]]]):Y("",!0),F((i(),_(c,{type:"danger",link:"",onClick:T=>K(o.id)},{default:a(()=>[f(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["warehouse_product.warehouse_product/delete"]]]),o.status==0?F((i(),_(c,{key:1,type:"primary",link:"",onClick:T=>j(o.id)},{default:a(()=>[f(" \u786E\u8BA4 ")]),_:2},1032,["onClick"])),[[g,["warehouse_product.warehouse_product/enter"]]]):Y("",!0)]),_:1})]),_:1},8,["data"])]),b("div",Pe,[e(oe,{modelValue:t(m),"onUpdate:modelValue":l[6]||(l[6]=o=>S(m)?m.value=o:null),onChange:t(h)},null,8,["modelValue","onChange"])])]),_:1})),[[te,t(m).loading]])])}}});export{To as default};