ERP-admin/build/admin/assets/bindGoods.f3512986.js

2 lines
6.8 KiB
JavaScript

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.bccb9376.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_lang.120de7ce.js";import{u as K}from"./usePaging.6a6670f9.js";import{u as M}from"./useDictOptions.f22931fb.js";import{a as X}from"./goods.f07434d1.js";import{g as Y,h as ee,i as oe}from"./supplier.7f753481.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.ac7c1248.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.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.466e9fe4.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.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"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.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"},ie={class:"flex mt-4 justify-end"},ue={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(u=>v.value.includes(u.id)),n=[];a.forEach(u=>{n.push({goods_id:u.id,price:u.sell,goods_name:u.name,supplier_id:m.sid})}),await Y({data:n}),h("offPop")},c=()=>{h("offPop")};return d(),(a,n)=>{const u=z,i=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(i,{label:"\u5546\u54C1\u540D\u79F0",prop:"name"},{default:o(()=>[e(u,{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(i,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit"},{default:o(()=>[e(u,{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(i,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",ie,[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",ue,[e(_,{type:"primary",onClick:x},{default:o(()=>[C("\u786E\u8BA4\u7ED1\u5B9A")]),_:1}),e(_,{onClick:c},{default:o(()=>[C("\u53D6\u6D88")]),_:1})])]),_:1})),[[S,t(s).loading]])])}}}),me={class:"mt-4"},de={class:"flex mt-4 justify-end"},ce=E({name:"merchantLists"}),go=E({...ce,setup(A){const B=ne(),m=g(!1);let h=B.query.id;const r=Q({supplier_id:h}),v=g([]),V=c=>{v.value=c.map(({id:a})=>a)};M("mer_category_type,merchat_type,show_status,off_status,financial_type");const{pager:s,getLists:d,resetParams:L,resetPage:U}=K({fetchFun:oe,params:r});d();const x=async c=>{await le.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ee({id:c}),d()};return(c,a)=>{const n=ae,u=I,i=N,_=R,k=T,b=O,p=j,P=re,$=W,F=te("perms"),S=q;return f(),Z("div",null,[D((f(),y(p,{class:"!border-none",shadow:"never"},{default:o(()=>[D((f(),y(u,{type:"primary",onClick:a[0]||(a[0]=l=>m.value=!0)},{icon:o(()=>[e(n,{name:"el-icon-Plus"})]),default:o(()=>[C(" \u5546\u54C1\u7ED1\u5B9A ")]),_:1})),[[F,["merchat.merchant/add"]]]),w("div",me,[e(k,{data:t(s).lists,onSelectionChange:V},{default:o(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id",width:"55"}),e(i,{label:"\u5546\u54C1\u56FE\u7247",prop:"imgs"},{default:o(({row:l})=>[e(_,{style:{width:"50px",height:"50px"},src:l.imgs},null,8,["src"])]),_:1}),e(i,{label:"\u5546\u54C1\u540D\u79F0",prop:"goods_name","show-overflow-tooltip":""}),e(i,{label:"\u89C4\u683C\u578B\u53F7",prop:"spec","show-overflow-tooltip":""}),e(i,{label:"\u5546\u54C1\u5206\u7C7B",prop:"class_name","show-overflow-tooltip":""}),e(i,{label:"\u5546\u54C1\u5355\u4EF7",prop:"price","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:o(({row:l})=>[D((f(),y(u,{type:"danger",link:"",onClick:_e=>x(l.id)},{default:o(()=>[C(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[F,["supplier.supplier/delete"]]])]),_:1})]),_:1},8,["data"])]),w("div",de,[e(b,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=l=>G(s)?s.value=l:null),onChange:t(d)},null,8,["modelValue","onChange"])])]),_:1})),[[S,t(s).loading]]),e($,{modelValue:t(m),"onUpdate:modelValue":a[3]||(a[3]=l=>G(m)?m.value=l:null),title:"\u7ED1\u5B9A\u5546\u54C1",width:"70%"},{default:o(()=>[e(P,{onOffPop:a[2]||(a[2]=l=>(m.value=!1,t(d)())),sid:t(h)},null,8,["sid"])]),_:1},8,["modelValue"])])}}});export{go as default};