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

2 lines
8.3 KiB
JavaScript

import{U as te,J as le,K as ae,D as ue,C as re,w as se,F as ie,L as ne,M as pe,b as de,N as me,O as ce}from"./element-plus.a63a26dd.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang.b83fac3c.js";import{u as he}from"./usePaging.6a6670f9.js";import{u as we}from"./useDictOptions.2bd5fc35.js";import{c as U,e as ve,f as be}from"./warehouse_product.e0c4d560.js";import{d as N,s as Ee,r as d,Z as Fe,i as Ce,ap as ge,o as i,c as D,U as e,L as a,u as t,a as E,T as M,a9 as P,K as c,j as S,R as w,M as F,S as De,Q as Y,n as ke}from"./@vue.18505fe0.js";import"./lodash.2473fc51.js";import{f as ye}from"./index.30c5ea5f.js";import"./warehousing.vue_vue_type_script_setup_true_name_storeProductEdit_lang.6c3d35b5.js";import{a as Ve}from"./system_store.7ee6138f.js";import{h as A}from"./moment.40bc58bf.js";import{a as xe}from"./supplier.21d92776.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"./index.b2bf8985.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.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.b91aed03.js";import"./store_product.450808ed.js";import"./store_branch_product.96c1666a.js";import"./warehouse_product_storege.ceafa3dd.js";import"./warehouse_order.027f31c0.js";import"./warehouse.2b491d86.js";const Be={class:"flex items-center mr-4"},Le={class:"mt-4"},Te={style:{color:"red"}},Ue={class:"flex mt-4 justify-end"},Me=N({name:"warehouseProductLists"}),Lo=N({...Me,setup(Pe){const k=Ee(),$=d(!1),u=Fe({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)};we("warehouse_produc_pm");const{pager:m,getLists:_,resetParams:R,resetPage:y}=he({fetchFun:U,params:u}),W=async s=>{var l,f;$.value=!0,await ke(),(l=k.value)==null||l.open("edit"),(f=k.value)==null||f.setFormData(s)},j=async s=>{await ve({id:s}),_()},K=async s=>{await ye.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await be({id:s}),_()},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=""),_()},v=d(!1),V=d([]),q=(s="")=>{v.value=!0,Ve({name:s,page_size:50}).then(l=>{V.value=l.lists,setTimeout(()=>{v.value=!1},300)}).catch(l=>{setTimeout(()=>{v.value=!1},300)})},b=d(!1),x=d([]),J=(s="")=>{b.value=!0,xe({}).then(l=>{x.value=l.lists,setTimeout(()=>{b.value=!1},300)}).catch(l=>{setTimeout(()=>{b.value=!1},300)})};return Ce(()=>{_()}),(s,l)=>{const f=le,B=ae,p=ue,C=re,Q=te,h=se,Z=fe,G=ie,L=ne,r=pe,H=de,X=me,ee=_e,g=ge("perms"),oe=ce;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(()=>[E("div",Be,[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(),c(f,{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(b),style:{width:"240px"}},{default:a(()=>[(i(!0),D(M,null,P(t(x),o=>(i(),c(f,{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(h,{type:"primary",onClick:t(y)},{default:a(()=>[w("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(h,{onClick:t(R)},{default:a(()=>[w("\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(),c(L,{class:"!border-none",shadow:"never"},{default:a(()=>[E("div",Le,[e(X,{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(H,{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})=>[E("span",Te,De(o.mark),1)]),_:1}),e(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:o})=>[o.status==0?F((i(),c(h,{key:0,type:"primary",link:"",onClick:T=>W(o)},{default:a(()=>[w(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["warehouse_product.warehouse_product/edit"]]]):Y("",!0),F((i(),c(h,{type:"danger",link:"",onClick:T=>K(o.id)},{default:a(()=>[w(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["warehouse_product.warehouse_product/delete"]]]),o.status==0?F((i(),c(h,{key:1,type:"primary",link:"",onClick:T=>j(o.id)},{default:a(()=>[w(" \u786E\u8BA4 ")]),_:2},1032,["onClick"])),[[g,["warehouse_product.warehouse_product/enter"]]]):Y("",!0)]),_:1})]),_:1},8,["data"])]),E("div",Ue,[e(ee,{modelValue:t(m),"onUpdate:modelValue":l[6]||(l[6]=o=>S(m)?m.value=o:null),onChange:t(_)},null,8,["modelValue","onChange"])])]),_:1})),[[oe,t(m).loading]])])}}});export{Lo as default};