2 lines
6.4 KiB
JavaScript
2 lines
6.4 KiB
JavaScript
import{C as O,D as q,J,K as Q,w as Z,F as z,L as G,M as H,N as X,O as Y}from"./element-plus.a63a26dd.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{f as oe,b as te}from"./index.0a3a642f.js";import{u as ae}from"./usePaging.6a6670f9.js";import{u as le}from"./useDictOptions.b595d96c.js";import{_ as ue,a as re,b as se,c as ne}from"./edit.vue_vue_type_script_setup_true_name_warehouseProductEdit_lang.a2be35b3.js";import{d as A,s as ie,r as V,Z as pe,ap as de,o as s,c as x,U as e,L as t,u as a,T as me,a9 as ce,K as i,R as d,M as m,a as k,S as _e,Q as C,j as fe,n as P}from"./@vue.18505fe0.js";import"./lodash.2473fc51.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.37957c41.js";import"./store_product.424a8e33.js";import"./warehouse_product_storege.c0e7a660.js";import"./warehouse.90b60bbf.js";import"./index.33266560.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const we={class:"mt-4"},he={style:{color:"red"}},ve={class:"flex mt-4 justify-end"},be=A({name:"warehouseProductLists"}),no=A({...be,setup(Ee){const h=ie(),v=V(!1),n=pe({warehouse_id:"",product_id:"",financial_pm:""}),F=V([]),$=r=>{F.value=r.map(({id:l})=>l)},{dictData:y}=le("warehouse_produc_pm"),{pager:c,getLists:_,resetParams:L,resetPage:S}=ae({fetchFun:ne,params:n}),N=async()=>{var r;v.value=!0,await P(),(r=h.value)==null||r.open("add")},R=async r=>{var l,f;v.value=!0,await P(),(l=h.value)==null||l.open("edit"),(f=h.value)==null||f.setFormData(r)},T=async r=>{await re({id:r}),_()},D=async r=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await se({id:r}),_()};return _(),(r,l)=>{const f=O,b=q,g=J,U=Q,p=Z,I=z,B=G,W=te,u=H,j=X,K=ee,w=de("perms"),M=Y;return s(),x("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(I,{class:"mb-[-16px]",model:a(n),inline:""},{default:t(()=>[e(b,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:t(()=>[e(f,{class:"w-[280px]",modelValue:a(n).warehouse_id,"onUpdate:modelValue":l[0]||(l[0]=o=>a(n).warehouse_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(b,{label:"\u5546\u54C1",prop:"product_id"},{default:t(()=>[e(f,{class:"w-[280px]",modelValue:a(n).product_id,"onUpdate:modelValue":l[1]||(l[1]=o=>a(n).product_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(b,{label:"\u51FA\u5165\u5E93\u72B6\u6001",prop:"financial_pm"},{default:t(()=>[e(U,{style:{width:"240px"},modelValue:a(n).financial_pm,"onUpdate:modelValue":l[2]||(l[2]=o=>a(n).financial_pm=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u51FA\u5165\u5E93"},{default:t(()=>[e(g,{label:"\u5168\u90E8",value:""}),(s(!0),x(me,null,ce(a(y).warehouse_produc_pm,(o,E)=>(s(),i(g,{key:E,label:o.name,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(b,null,{default:t(()=>[e(p,{type:"primary",onClick:a(S)},{default:t(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:a(L)},{default:t(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((s(),i(B,{class:"!border-none",shadow:"never"},{default:t(()=>[m((s(),i(p,{type:"primary",onClick:N},{icon:t(()=>[e(W,{name:"el-icon-Plus"})]),default:t(()=>[d(" \u65B0\u589E ")]),_:1})),[[w,["warehouse_product.warehouse_product/add"]]]),m((s(),i(p,{disabled:!a(F).length,onClick:l[3]||(l[3]=o=>D(a(F)))},{default:t(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["warehouse_product.warehouse_product/delete"]]]),k("div",we,[e(j,{data:a(c).lists,onSelectionChange:$},{default:t(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"",prop:"id","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),e(u,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(u,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),e(u,{label:"\u51FA\u5165\u5E93",prop:"financial_pm_name","show-overflow-tooltip":""}),e(u,{label:"\u6279\u6B21",prop:"batch","show-overflow-tooltip":""}),e(u,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(u,{label:"\u751F\u4EA7\u671F",prop:"manufacture","show-overflow-tooltip":""}),e(u,{label:"\u4FDD\u8D28\u671F",prop:"expiration_date","show-overflow-tooltip":""}),e(u,{label:"\u4EF7\u683C",prop:"price","show-overflow-tooltip":""}),e(u,{label:"\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""}),e(u,{label:"\u72B6\u6001",prop:"status_name","show-overflow-tooltip":""}),e(u,{label:"\u5907\u6CE8","show-overflow-tooltip":""},{default:t(({row:o})=>[k("span",he,_e(o.mark),1)]),_:1}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:o})=>[o.status==0?m((s(),i(p,{key:0,type:"primary",link:"",onClick:E=>R(o)},{default:t(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["warehouse_product.warehouse_product/edit"]]]):C("",!0),o.status==0?m((s(),i(p,{key:1,type:"danger",link:"",onClick:E=>D(o.id)},{default:t(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["warehouse_product.warehouse_product/delete"]]]):C("",!0),o.status==0?m((s(),i(p,{key:2,type:"primary",link:"",onClick:E=>T(o.id)},{default:t(()=>[d(" \u786E\u8BA4 ")]),_:2},1032,["onClick"])),[[w,["warehouse_product.warehouse_product/enter"]]]):C("",!0)]),_:1})]),_:1},8,["data"])]),k("div",ve,[e(K,{modelValue:a(c),"onUpdate:modelValue":l[4]||(l[4]=o=>fe(c)?c.value=o:null),onChange:a(_)},null,8,["modelValue","onChange"])])]),_:1})),[[M,a(c).loading]]),a(v)?(s(),i(ue,{key:0,ref_key:"editRef",ref:h,"dict-data":a(y),onSuccess:a(_),onClose:l[5]||(l[5]=o=>v.value=!1)},null,8,["dict-data","onSuccess"])):C("",!0)])}}});export{no as default};
|