ERP-admin/build/admin/assets/bindGoods.1006ca4a.js

2 lines
6.1 KiB
JavaScript
Raw Normal View History

2024-05-20 18:04:36 +08:00
import{C as z,D as H,w as I,F as J,T as j,O as N,b as R,Q as T,R as q,G as W}from"./element-plus.c0c1189d.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_lang.79ff4a10.js";import{u as K}from"./usePaging.6a6670f9.js";import{u as M}from"./useDictOptions.4b8bdc26.js";import{a as X}from"./goods.6504e3b0.js";import{f as Y,g as ee,h as oe}from"./supplier.32b3eacc.js";import{d as E,r as g,Z as Q,o as f,c as Z,U as e,L as o,u as t,R as C,M as D,K as y,a as w,j as G,ap as te}from"./@vue.18505fe0.js";import{f as le,b as ae}from"./index.13b023cd.js";import{u as ne}from"./vue-router.101084e3.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.3f38f327.js";import"./axios.18becb61.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.403d4198.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.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.48cb4095.js";import"./vue-clipboard3.6d09ff6e.js";import"./clipboard.564aa4b9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const se={class:"mt-4"},ue={class:"flex mt-4 justify-end"},ie={class:"flex mt-4 justify-end"},pe=E({name:"supplierGoodsPop"}),re=E({...pe,props:{sid:{type:[Number,String],default:0}},emits:["offPop"],setup(A,{emit:B}){let m=A;g(!1),g(!1);const h=B,r=Q({name:"",class:"",brand:"",unit:"",code:"",warehouse:"",retail_name:"",sort:""}),v=g([]),V=a=>{v.value=a.map(({id:n})=>n)};M("");const{pager:s,getLists:d,resetParams:L,resetPage:U}=K({fetchFun:X,params:r}),x=async()=>{let a=s.lists.filter(i=>v.value.includes(i.id)),n=[];a.forEach(i=>{n.push({goods_id:i.id,price:i.sell,goods_name:i.name,supplier_id:m.sid})}),await Y({data:n}),h("offPop")},c=()=>{h("offPop")};return d(),(a,n)=>{const i=z,u=H,_=I,k=J,b=j,p=N,P=R,$=T,F=O,S=q;return f(),Z("div",null,[e(b,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(k,{class:"mb-[-16px]",model:t(r),inline:""},{default:o(()=>[e(u,{label:"\u5546\u54C1\u540D\u79F0",prop:"name"},{default:o(()=>[e(i,{class:"w-[280px]",modelValue:t(r).name,"onUpdate:modelValue":n[0]||(n[0]=l=>t(r).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit"},{default:o(()=>[e(i,{class:"w-[280px]",modelValue:t(r).unit,"onUpdate:modelValue":n[1]||(n[1]=l=>t(r).unit=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5355\u4F4D"},null,8,["modelValue"])]),_:1}),e(u,null,{default:o(()=>[e(_,{type:"primary",onClick:t(U)},{default:o(()=>[C("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(_,{onClick:t(L)},{default:o(()=>[C("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),D((f(),y(b,{class:"!border-none",shadow:"never"},{default:o(()=>[w("div",se,[e($,{data:t(s).lists,onSelectionChange:V},{default:o(()=>[e(p,{type:"selection",width:"55"}),e(p,{label:"ID",prop:"id",width:"55"}),e(p,{label:"\u5546\u54C1\u56FE\u7247",prop:"imgs"},{default:o(({row:l})=>[e(P,{style:{width:"50px",height:"50px"},src:l.imgs},null,8,["src"])]),_:1}),e(p,{label:"\u5546\u54C1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(p,{label:"\u89C4\u683C\u578B\u53F7",prop:"spec","show-overflow-tooltip":""}),e(p,{label:"\u5546\u54C1\u5206\u7C7B",prop:"class_name","show-overflow-tooltip":""}),e(p,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""})]),_:1},8,["data"])]),w("div",ue,[e(F,{modelValue:t(s),"onUpdate:modelValue":n[2]||(n[2]=l=>G(s)?s.value=l:null),onChange:t(d)},null,8,["modelValue","onChange"])]),w("div",ie,[e(_,{type:"primary",onClick:x},{default:o(()=>[C("\u786E\u8BA4\u7ED1\u5B9A")]),_:1}),e(_,{onClick:c},{default:o(()=>[C("\u53D6\