2024-05-16 10:05:14 +08:00
|
|
|
import{C as H,D as J,w as I,F as W,T as N,O as R,b as S,Q as T,R as q,G as X}from"./element-plus.8c800afc.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_lang.7b224fce.js";import{u as K}from"./usePaging.6a6670f9.js";import{u as M}from"./useDictOptions.080d297e.js";import{a as Y,b as oo}from"./goods.a5b72a03.js";import{d as E,r as w,Z as Q,o as h,c as Z,U as o,L as l,u as t,R as b,M as U,K as L,a as g,j as $,ap as eo}from"./@vue.18505fe0.js";import{b as lo}from"./index.2398c167.js";import{a as to}from"./merchant.ef5e36f5.js";import{u as ao}from"./vue-router.886c5f5a.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.ef95d8c0.js";import"./axios.77245e3c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.be6e4bb5.js";import"./pinia.a969beab.js";import"./css-color-function.6061d63f.js";import"./color.1580a89c.js";import"./clone.4ed29f58.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.b29ee5e2.js";import"./vue-clipboard3.15c43b43.js";import"./clipboard.4a3580c9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const uo={class:"mt-4"},no={class:"flex mt-4 justify-end"},so={class:"flex mt-4 justify-end"},io=E({name:"goodsLists"}),ro=E({...io,props:{mer_id:Number},emits:["offPop"],setup(j,{emit:y}){let m=j;w(!1),w(!1);const C=y,r=Q({name:"",class:"",brand:"",unit:"",code:"",warehouse:"",retail_name:"",sort:""}),v=w([]),V=_=>{v.value=_.map(({id:a})=>a)};M("");const{pager:n,getLists:d,resetParams:A,resetPage:G}=K({fetchFun:Y,params:r}),F=async()=>{let _=n.lists.filter(e=>v.value.includes(e.id)),a={mer_id:m.mer_id,bind_data:[]};_.forEach(e=>{a.bind_data.push({goods_id:e.id,nums:e.num})}),await oo(a),C("offPop")},s=()=>{C("offPop")};return d(),(_,a)=>{const e=H,c=J,f=I,B=W,D=N,u=R,x=S,P=T,k=O,p=q;return h(),Z("div",null,[o(D,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(B,{class:"mb-[-16px]",model:t(r),inline:""},{default:l(()=>[o(c,{label:"\u5546\u54C1\u540D\u79F0",prop:"name"},{default:l(()=>[o(e,{class:"w-[280px]",modelValue:t(r).name,"onUpdate:modelValue":a[0]||(a[0]=i=>t(r).name=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(c,{label:"\u5546\u54C1\u54C1\u724C",prop:"brand"},{default:l(()=>[o(e,{class:"w-[280px]",modelValue:t(r).brand,"onUpdate:modelValue":a[1]||(a[1]=i=>t(r).brand=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u54C1\u724C"},null,8,["modelValue"])]),_:1}),o(c,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit"},{default:l(()=>[o(e,{class:"w-[280px]",modelValue:t(r).unit,"onUpdate:modelValue":a[2]||(a[2]=i=>t(r).unit=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5355\u4F4D"},null,8,["modelValue"])]),_:1}),o(c,null,{default:l(()=>[o(f,{type:"primary",onClick:t(G)},{default:l(()=>[b("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(f,{onClick:t(A)},{default:l(()=>[b("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),U((h(),L(D,{class:"!border-none",shadow:"never"},{default:l(()=>[g("div",uo,[o(P,{data:t(n).lists,onSelectionChange:V},{default:l(()=>[o(u,{type:"selection",width:"55"}),o(u,{label:"ID",prop:"id",width:"55"}),o(u,{label:"\u5546\u54C1\u56FE\u7247",prop:"imgs"},{default:l(({row:i})=>[o(x,{style:{width:"50px",height:"50px"},src:i.imgs},null,8,["src"])]),_:1}),o(u,{label:"\u5546\u54C1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(u,{label:"\u89C4\u683C\u578B\u53F7",prop:"spec","show-overflow-tooltip":""}),o(u,{label:"\u5546\u54C1\u5206\u7C7B",prop:"class_name","show-overflow-tooltip":""}),o(u,{label:"\u5546\u54C1\u54C1\u724C",prop:"brand_name","show-overflow-tooltip":""}),o(u,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),o
|