2 lines
7.3 KiB
JavaScript
2 lines
7.3 KiB
JavaScript
import{Y as X,Z as ee,K as te,L as oe,D as le,C as ae,w as ue,F as ne,T as ie,O as se,Q as re,R as pe}from"./element-plus.d8e0827b.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.b67c1046.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang.2914ee54.js";import{f as _e,b as ce}from"./index.58242ff9.js";import{u as fe}from"./usePaging.6a6670f9.js";import{u as ve}from"./useDictOptions.f8f89444.js";import{i as ye,b as Ee,j as Be}from"./supplier.930cb50d.js";import{d as N,s as L,r as g,Z as Fe,af as be,ap as Ce,o as n,c as V,U as e,L as t,u as l,T,a9 as I,K as s,R as r,M as E,a as P,S as we,j as he,Q as U,n as S}from"./@vue.18505fe0.js";import"./lodash.466e9fe4.js";import{_ as ke}from"./edit.vue_vue_type_script_setup_true_name_supplierEdit_lang.37b21666.js";import{_ as De}from"./detail.vue_vue_type_script_setup_true_name_brandEdit_lang.20b0d070.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"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.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.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";import"./picker.197acc10.js";import"./index.432b2bf9.js";import"./index.606807f5.js";import"./index.97ac23f5.js";import"./vuedraggable.9f282753.js";import"./vue.e5198d72.js";import"./sortablejs.6fa237f8.js";import"./address.838098a9.js";const ge={class:"mt-4"},Ve={class:"flex mt-4 justify-end"},Se=N({name:"supplierLists"}),Dt=N({...Se,setup($e){const B=L(),h=L(),F=g(!1),k=g(!1),p=Fe({category_id:"",type_id:"",mer_name:""}),D=g([]),j=i=>{D.value=i.map(({id:a})=>a)},{dictData:_}=ve("show_status,mer_category_type,merchat_type,financial_type"),{pager:f,getLists:v,resetParams:A,resetPage:q}=fe({fetchFun:Be,params:p}),K=async()=>{var i;F.value=!0,await S(),(i=B.value)==null||i.open("add")},O=async i=>{var a,m;F.value=!0,await S(),(a=B.value)==null||a.open("edit"),(m=B.value)==null||m.setFormData(i)},$=async i=>{await _e.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ye({id:i}),v()},Q=async i=>{var m,y;let a=await Ee({id:i});k.value=!0,await S(),(m=h.value)==null||m.open("edit"),(y=h.value)==null||y.setFormData(a)};return v(),(i,a)=>{const m=te,y=oe,b=le,C=X,Z=ae,d=ue,G=ee,M=ne,x=ie,Y=ce,u=se,R=de,z=be("router-link"),H=re,J=me,w=Ce("perms"),W=pe;return n(),V("div",null,[e(x,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(M,{class:"mb-[-16px]",model:l(p),"label-width":"120px"},{default:t(()=>[e(G,null,{default:t(()=>[e(C,{span:6},{default:t(()=>[e(b,{label:"\u4F9B\u5E94\u5546\u5206\u7C7B",prop:"category_id"},{default:t(()=>[e(y,{modelValue:l(p).category_id,"onUpdate:modelValue":a[0]||(a[0]=o=>l(p).category_id=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546\u7C7B\u578B"},{default:t(()=>[(n(!0),V(T,null,I(l(_).mer_category_type,(o,c)=>(n(),s(m,{key:c,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(C,{span:6},{default:t(()=>[e(b,{label:"\u4F9B\u5E94\u5546\u7C7B\u578B",prop:"type_id"},{default:t(()=>[e(y,{modelValue:l(p).type_id,"onUpdate:modelValue":a[1]||(a[1]=o=>l(p).type_id=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546\u7C7B\u578B"},{default:t(()=>[(n(!0),V(T,null,I(l(_).merchat_type,(o,c)=>(n(),s(m,{key:c,label:o.name,value:parseInt(o.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(C,{span:6},{default:t(()=>[e(b,{label:"\u4F9B\u5E94\u5546\u540D\u79F0",prop:"mer_name"},{default:t(()=>[e(Z,{modelValue:l(p).mer_name,"onUpdate:modelValue":a[2]||(a[2]=o=>l(p).mer_name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1}),e(C,{span:6},{default:t(()=>[e(b,null,{default:t(()=>[e(d,{type:"primary",onClick:l(q)},{default:t(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:l(A)},{default:t(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),E((n(),s(x,{class:"!border-none",shadow:"never"},{default:t(()=>[E((n(),s(d,{type:"primary",onClick:K},{icon:t(()=>[e(Y,{name:"el-icon-Plus"})]),default:t(()=>[r(" \u65B0\u589E ")]),_:1})),[[w,["supplier.supplier/add"]]]),E((n(),s(d,{disabled:!l(D).length,onClick:a[3]||(a[3]=o=>$(l(D)))},{default:t(()=>[r(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["supplier.supplier/delete"]]]),P("div",ge,[e(H,{data:l(f).lists,onSelectionChange:j},{default:t(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"ID",prop:"id",width:"55"}),e(u,{label:"\u4F9B\u5E94\u5546\u7C7B\u578B",prop:"type_id","show-overflow-tooltip":""},{default:t(({row:o})=>[e(R,{options:l(_).merchat_type,value:o.type_id},null,8,["options","value"])]),_:1}),e(u,{label:"\u4F9B\u5E94\u5546\u540D\u79F0",prop:"mer_name","show-overflow-tooltip":""}),e(u,{label:"\u7ED3\u7B97\u5468\u671F(\u5929)",prop:"settle_cycle","show-overflow-tooltip":""}),e(u,{label:"\u5229\u7387",prop:"interest_rate","show-overflow-tooltip":""}),e(u,{label:"\u4F9B\u5E94\u5546\u5730\u5740",prop:"mer_address","show-overflow-tooltip":""}),e(u,{label:"\u4F9B\u5E94\u5546\u662F\u5426\u7981\u7528",prop:"status"},{default:t(({row:o})=>[e(R,{options:l(_).show_status,value:o.status},null,8,["options","value"])]),_:1}),e(u,{label:"\u63D0\u6210\u6BD4\u4F8B",prop:"commission_rate","show-overflow-tooltip":""}),e(u,{label:"\u4F9B\u5E94\u5546\u624B\u7EED\u8D39\u5355\u72EC\u8BBE\u7F6E",width:"200",prop:"commission_switch"},{default:t(({row:o})=>[r(we(o.commission_switch?"\u5F00\u542F":"\u5173\u95ED"),1)]),_:1}),e(u,{label:"\u4F9B\u5E94\u5546\u4F59\u989D",prop:"mer_money","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:t(({row:o})=>[E((n(),s(d,{type:"primary",link:"",onClick:c=>O(o)},{default:t(()=>[r(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["supplier.supplier/edit"]]]),E((n(),s(d,{type:"danger",link:"",onClick:c=>$(o.id)},{default:t(()=>[r(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["supplier.supplier/delete"]]]),e(d,{link:"",onClick:c=>Q(o.id)},{default:t(()=>[r(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"]),e(z,{to:{path:"bindGoods",query:{id:o.id}}},{default:t(()=>[e(d,{link:"",type:"primary"},{default:t(()=>[r(" \u5546\u54C1\u7ED1\u5B9A ")]),_:1})]),_:2},1032,["to"])]),_:1})]),_:1},8,["data"])]),P("div",Ve,[e(J,{modelValue:l(f),"onUpdate:modelValue":a[4]||(a[4]=o=>he(f)?f.value=o:null),onChange:l(v)},null,8,["modelValue","onChange"])])]),_:1})),[[W,l(f).loading]]),l(F)?(n(),s(ke,{key:0,ref_key:"editRef",ref:B,"dict-data":l(_),onSuccess:l(v),onClose:a[5]||(a[5]=o=>F.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),l(k)?(n(),s(De,{key:1,ref_key:"detailRef",ref:h,"dict-data":l(_),onSuccess:l(v),onClose:a[6]||(a[6]=o=>k.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0)])}}});export{Dt as default};
|