import{B as O,C as z,R as G,S as Q,w as W,D as X,H as Y,I as Z,J as ee,K as te}from"./element-plus.c4a2af8a.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang.2a46e71f.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import{t as ae,f as ue,b as ne}from"./index.c9d608d6.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.d8a052c5.js";import{u as ie}from"./vue-router.12d45bc3.js";import{u as re}from"./usePaging.160b82b8.js";import{u as de}from"./useDictOptions.69040b0c.js";import{_ as pe,a as me,b as ce}from"./edit.vue_vue_type_script_setup_true_name_productEdit_lang.80f19dc1.js";import{d as T,s as _e,r as B,$ as fe,af as ve,o as i,c as x,U as e,L as l,M as f,u as n,K as p,R as Fe,V as be,a7 as Ce,a as V,T as Ee,k as we,S as c,n as A}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./axios.eb055ccc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.ec5da75f.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";import"./index.fe2bdaff.js";const De=c("\u67E5\u8BE2"),ye=c("\u91CD\u7F6E"),Ve=c(" \u65B0\u589E "),he=c(" \u5220\u9664 "),ke={class:"mt-4"},ge=c(" \u7F16\u8F91 "),Be=c(" \u5220\u9664 "),xe={class:"flex mt-4 justify-end"},Ae=T({name:"productLists"}),Ct=T({...Ae,setup(Te){const{query:I}=ie(),v=_e(),F=B(!1);var E=I.land_id;typeof E>"u"&&(E="");const a=fe({user_id:"",land_id:E,code:"",name:"",status:"",create_time:""}),w=B([]),$=s=>{w.value=s.map(({id:o})=>o)},{dictData:D}=de("product_status"),{pager:_,getLists:b,resetParams:U,resetPage:S}=re({fetchFun:me,params:a}),P=async()=>{var s;F.value=!0,await A(),(s=v.value)==null||s.open("add")},R=async s=>{var o,r;F.value=!0,await A(),(o=v.value)==null||o.open("edit"),(r=v.value)==null||r.setFormData(s)},h=async s=>{await ue.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:s}),b()};return b(),(s,o)=>{const r=O,d=z,k=G,L=Q,N=se,m=W,M=X,g=Y,q=ne,u=Z,K=le,j=ee,H=oe,C=ve("perms"),J=te;return i(),x("div",null,[e(g,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(M,{class:"mb-[-16px]",model:a,inline:""},{default:l(()=>[e(d,{label:"\u7528\u6237ID",prop:"user_id"},{default:l(()=>[e(r,{class:"w-[280px]",modelValue:a.user_id,"onUpdate:modelValue":o[0]||(o[0]=t=>a.user_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u571F\u5730ID",prop:"land_id"},{default:l(()=>[e(r,{class:"w-[280px]",modelValue:a.land_id,"onUpdate:modelValue":o[1]||(o[1]=t=>a.land_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u571F\u5730ID"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u4EA7\u54C1\u7F16\u53F7",prop:"code"},{default:l(()=>[e(r,{class:"w-[280px]",modelValue:a.code,"onUpdate:modelValue":o[2]||(o[2]=t=>a.code=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name"},{default:l(()=>[e(r,{class:"w-[280px]",modelValue:a.name,"onUpdate:modelValue":o[3]||(o[3]=t=>a.name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u4EA7\u54C1\u72B6\u6001",prop:"status"},{default:l(()=>[e(L,{class:"w-[280px]",modelValue:a.status,"onUpdate:modelValue":o[4]||(o[4]=t=>a.status=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1\u72B6\u6001"},{default:l(()=>[e(k,{label:"\u5168\u90E8",value:""}),(i(!0),x(be,null,Ce(n(D).product_status,(t,y)=>(i(),p(k,{key:y,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"},{default:l(()=>[e(N,{startTime:a.start_time,"onUpdate:startTime":o[5]||(o[5]=t=>a.start_time=t),endTime:a.end_time,"onUpdate:endTime":o[6]||(o[6]=t=>a.end_time=t)},null,8,["startTime","endTime"])]),_:1}),e(d,null,{default:l(()=>[e(m,{type:"primary",onClick:n(S)},{default:l(()=>[De]),_:1},8,["onClick"]),e(m,{onClick:n(U)},{default:l(()=>[ye]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),p(g,{class:"!border-none",shadow:"never"},{default:l(()=>[f((i(),p(m,{type:"primary",onClick:P},{icon:l(()=>[e(q,{name:"el-icon-Plus"})]),default:l(()=>[Ve]),_:1})),[[C,["land.product/add"]]]),f((i(),p(m,{disabled:!w.value.length,onClick:o[7]||(o[7]=t=>h(w.value))},{default:l(()=>[he]),_:1},8,["disabled"])),[[C,["land.product/delete"]]]),V("div",ke,[e(j,{data:n(_).lists,onSelectionChange:$},{default:l(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(u,{label:"\u4EA7\u54C1\u7F16\u53F7",prop:"code","show-overflow-tooltip":""}),e(u,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(u,{label:"\u7528\u6237ID",prop:"user_id","show-overflow-tooltip":""}),e(u,{label:"\u6240\u5C5E\u7528\u6237",prop:"account","show-overflow-tooltip":""}),e(u,{label:"\u571F\u5730ID",prop:"land_id","show-overflow-tooltip":""}),e(u,{label:"\u571F\u5730\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),e(u,{label:"\u4EA7\u54C1\u72B6\u6001",prop:"status"},{default:l(({row:t})=>[e(K,{options:n(D).product_status,value:t.status},null,8,["options","value"])]),_:1}),e(u,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"},{default:l(({row:t})=>[V("span",null,Ee(t.create_time?n(ae)(t.create_time,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),e(u,{label:"\u64CD\u4F5C",width:"140",align:"center",fixed:"right"},{default:l(({row:t})=>[f((i(),p(m,{type:"primary",link:"",onClick:y=>R(t)},{default:l(()=>[ge]),_:2},1032,["onClick"])),[[C,["land.product/edit"]]]),f((i(),p(m,{type:"danger",link:"",onClick:y=>h(t.id)},{default:l(()=>[Be]),_:2},1032,["onClick"])),[[C,["land.product/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",xe,[e(H,{modelValue:n(_),"onUpdate:modelValue":o[8]||(o[8]=t=>we(_)?_.value=t:null),onChange:n(b)},null,8,["modelValue","onChange"])])]),_:1})),[[J,n(_).loading]]),F.value?(i(),p(pe,{key:0,ref_key:"editRef",ref:v,"dict-data":n(D),onSuccess:n(b),onClose:o[9]||(o[9]=t=>F.value=!1)},null,8,["dict-data","onSuccess"])):Fe("",!0)])}}});export{Ct as default};