import{al as o,a$ as p,bN as B,_ as C,d as y,w as _,Z as v,r as d,o as E,G as x,C as k,j as c,l}from"./index.js";import{h as P,a as W,l as g,M as S}from"./modal.d0980a.js";import{u as q}from"./use-page-search.f7bc460e.js";import{u as A}from"./use-page-modal.5cf2c59f.js";import"./useTask.8a645393.js";const D=[{prop:"gyscode",label:"\u4F9B\u5E94\u5546\u7F16\u53F7",minWidth:"140px"},{prop:"gysname",label:"\u4F9B\u5E94\u5546\u540D\u79F0",minWidth:"140px"},{prop:"brand_name",label:"\u54C1\u724C",minWidth:"100px"},{prop:"status",label:"\u72B6\u6001",minWidth:"60",_slot_:"status"},{label:"\u72B6\u6001",prop:"status",width:100,cellRenderer:({row:e})=>o(p,{type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})},{prop:"brand_book",label:"\u6388\u6743\u56FE",minWidth:"60px",cellRenderer({row:e}){return(e.brand_book?e.brand_book.split(","):[]).map(r=>o(B,{src:r,style:{height:"20px"},previewSrcList:[r],previewTeleported:!0}))}},{prop:"long",label:"\u6388\u6743\u7C7B\u578B",minWidth:"70",cellRenderer:({row:e})=>o(p,{type:String(e.long)==="0"?"success":"danger"},{default:()=>String(e.long)==="1"?"\u975E\u957F\u671F":"\u957F\u671F"})},{prop:"longTime",label:"\u6388\u6743\u65E5\u671F",minWidth:"180",cellRenderer({row:e}){return e.starttime.split(" ")[0]+" ~ "+(String(e.long)==="0"?"\u957F\u671F\u6709\u6548":e.endtime.split(" ")[0])}},{prop:"creater",label:"\u521B\u5EFA\u4EBA",minWidth:"60px"},{prop:"addtime",label:"\u6DFB\u52A0\u65F6\u95F4",minWidth:"145px"},{prop:"",label:"\u64CD\u4F5C",fixed:"right",width:"140px",_noset_:!0,slot:"operation"}],R={title:"\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u67E5\u8BE2",columns:D,apis:{httpList:P,httpAdd:!0,httpStatus:W,httpUpdate:!0}},m={formItems:[{field:"gyscode",type:"supplier-query",placeholder:"\u4F9B\u5E94\u5546"}]},w={title:"\u54C1\u724C\u652F\u6301",support:["brand"],colLayout:{span:24},itemStyle:{},labelWidth:"120px",formItems:[{field:"gyscode",type:"supplier-query",label:"\u4F9B\u5E94\u5546",labelWidth:"120px",placeholder:"\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4F9B\u5E94\u5546"}]},{field:"brand_id",type:"brand-query",label:"\u652F\u6301\u54C1\u724C",labelWidth:"120px",placeholder:"\u8BF7\u9009\u62E9\u652F\u6301\u54C1\u724C",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u652F\u6301\u54C1\u724C"}]},{field:"long",type:"radio",label:"\u6388\u6743\u7C7B\u578B",options:g,rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6388\u6743\u7C7B\u578B"}]},{field:"create_timer",type:"date_picker",label:"\u6388\u6743\u65F6\u95F4",otherOptions:{type:"daterange",startProp:"starttime",endProp:"endtime",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}},{field:"brand_book",type:"img_upload",label:"\u6388\u6743\u56FE\u7247",options:g,rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6388\u6743\u56FE\u7247"}],otherOptions:{size:"small"}},{field:"remark",type:"input",label:"\u5907\u6CE8",placeholder:"\u5907\u6CE8",otherOptions:{type:"textarea"}}]},M=y({__name:"index",setup(e){const s="supplierBrand",r=_(null),u=v({visible:!1,type:"create",id:""}),F={pageSearchHook:()=>q(void 0,void 0,m),pageModalHook:t=>A(t)},h={content:{create(){u.id="",u.type="create",u.visible=!0},update(t){u.id=t.id,u.type="update",u.visible=!0},preview(t){u.id=t.id,u.type="preview",u.visible=!0}}};return(t,a)=>{const b=d("PageContainer"),f=d("PageAuth");return E(),x(f,{pageName:s},{default:k(()=>[c(b,{hooks:F,events:h,"content-config":l(R),"search-config":l(m),"modal-config":l(w),"get-content-ref":i=>r.value=i},null,8,["content-config","search-config","modal-config","get-content-ref"]),c(S,{visible:u.visible,"onUpdate:visible":a[0]||(a[0]=i=>u.visible=i),type:u.type,id:u.id,onRefresh:a[1]||(a[1]=i=>{var n;return(n=r.value)==null?void 0:n.onSearch()})},null,8,["visible","type","id"])]),_:1})}}});var U=C(M,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/supplierBrand/index.vue"]]);export{U as default};
