mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-29 01:40:16 +00:00
2 lines
7.1 KiB
JavaScript
2 lines
7.1 KiB
JavaScript
/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-7eafba5f.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css */import{a as H,E as I}from"./el-form-item-1b16c9fc.js";/* empty css *//* empty css */import{t as l}from"./index-0ca94763.js";import{f as Y,Z as G,_ as L}from"./vipcard-ea2ff005.js";import{c as M}from"./common-c3be41fd.js";import{u as O,a as A}from"./vue-router-48fdc1e3.js";import{E as Z}from"./index-c5914bde.js";import{E as q}from"./index-e27c3bb0.js";import{a as J,E as K}from"./index-4601cf3b.js";import{E as Q}from"./index-51138976.js";import{E as W}from"./index-9ecd3f93.js";import{a as X,E as ee}from"./index-fe3867fe.js";import{E as te}from"./index-dbeb412e.js";import{E as oe}from"./index-21f38393.js";import{v as ae}from"./directive-64fb15dc.js";import{d as le,O as re,r as ie,e as g,f as y,y as o,x as i,g as d,B as n,u as e,A as c,M as se,v as k,H as h}from"./plugin-vue_export-helper-85a4d40b.js";import"./index-bcd7a424.js";import"./index-cf9a2dd7.js";import"./index-e513479b.js";import"./el-main-86eb724f.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-b9e5f5cb.js";import"./el-overlay-08181e74.js";import"./event-f85d77b0.js";import"./index-313cd2ce.js";import"./focus-trap-64c402c5.js";import"./index-1ad115d7.js";import"./index-de1d3b53.js";import"./index-d469ae66.js";import"./index-4d8f36c6.js";import"./index-ebc73046.js";import"./_baseClone-3dbf39d6.js";import"./index-99b65a15.js";import"./strings-53351eda.js";import"./isEqual-0b9509fd.js";import"./debounce-6c3123a6.js";import"./index-bd04154b.js";import"./validator-bcf701e4.js";import"./customParseFormat-40c50080.js";import"./arrays-e667dc24.js";import"./flatten-749195f8.js";import"./index-6c0acd90.js";import"./index-95b00894.js";import"./_isIterateeCall-47526406.js";const ne={class:"main-container"},me={class:"flex justify-between items-center"},pe={class:"text-[20px]"},de={class:"mt-[10px]"},ce={class:"flex items-center"},ue=["src"],_e=["title"],ge={key:0},fe={key:1},he={class:"mt-[16px] flex justify-end"},Vt=le({__name:"list",setup(ve){const V=O().meta.title;let r=re({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{goods_name:"",goods_type:"",category_id:"",status:"",card_type:"",create_time:""}});const E=ie(),u=(s=1)=>{r.loading=!0,r.page=s,Y({page:r.page,limit:r.limit,...r.searchParam}).then(a=>{r.loading=!1,r.data=a.data.data,r.total=a.data.total}).catch(()=>{r.loading=!1})};u();const v=A(),w=s=>{let a={};a.goods_id=s.goods_id,a.sort=s.sort,G({...a}).then(m=>{})},P=()=>{v.push("/vipcard/goods/service/edit")},D=s=>{v.push("/vipcard/goods/service/edit?id="+s.goods_id)},N=s=>{v.push("/vipcard/goods/service/record_list?id="+s.goods_id)},x=(s,a)=>{L({goods_id:s.goods_id,status:a}).then(()=>{u()})},S=s=>{s&&(s.resetFields(),u())};return(s,a)=>{const m=Z,U=q,f=H,b=J,$=K,z=Q,B=I,C=W,p=X,F=te,T=ee,j=oe,R=ae;return g(),y("div",ne,[o(C,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[d("div",me,[d("span",pe,n(e(V)),1),o(m,{type:"primary",class:"w-[100px]",onClick:P},{default:i(()=>[c(n(e(l)("addGoods")),1)]),_:1})]),o(C,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:i(()=>[o(B,{inline:!0,model:e(r).searchParam,ref_key:"searchFormRef",ref:E},{default:i(()=>[o(f,{label:e(l)("goodsName"),prop:"goods_name"},{default:i(()=>[o(U,{modelValue:e(r).searchParam.goods_name,"onUpdate:modelValue":a[0]||(a[0]=t=>e(r).searchParam.goods_name=t),placeholder:e(l)("goodsNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(f,{label:"项目状态",prop:"status"},{default:i(()=>[o($,{modelValue:e(r).searchParam.status,"onUpdate:modelValue":a[1]||(a[1]=t=>e(r).searchParam.status=t),clearable:"",class:"input-width"},{default:i(()=>[o(b,{label:"全部",value:""}),o(b,{label:e(l)("tooUp"),value:"1"},null,8,["label"]),o(b,{label:e(l)("tooDown"),value:"0"},null,8,["label"])]),_:1},8,["modelValue"])]),_:1}),o(f,{label:e(l)("createTime"),prop:"create_time"},{default:i(()=>[o(z,{modelValue:e(r).searchParam.create_time,"onUpdate:modelValue":a[2]||(a[2]=t=>e(r).searchParam.create_time=t),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":e(l)("startDate"),"end-placeholder":e(l)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),o(f,null,{default:i(()=>[o(m,{type:"primary",onClick:a[3]||(a[3]=t=>u())},{default:i(()=>[c(n(e(l)("search")),1)]),_:1}),o(m,{onClick:a[4]||(a[4]=t=>S(E.value))},{default:i(()=>[c(n(e(l)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),d("div",de,[se((g(),k(T,{data:e(r).data,size:"large"},{empty:i(()=>[d("span",null,n(e(r).loading?"":e(l)("emptyData")),1)]),default:i(()=>[o(p,{label:e(l)("goodsInfo"),"show-overflow-tooltip":!0,"min-width":"240",align:"left"},{default:i(({row:t})=>[d("div",ce,[d("img",{class:"max-w-[60px] w-[60px] max-h-[60px]",src:e(M)(t.cover_thumb_small)},null,8,ue),d("a",{href:"javascript:;",class:"flex-1 multi-hidden ml-2",title:t.goods_name},n(t.goods_name),9,_e)])]),_:1},8,["label"]),o(p,{prop:"category_name",label:e(l)("categoryName"),"min-width":"120"},null,8,["label"]),o(p,{prop:"price",label:e(l)("price"),"min-width":"120"},null,8,["label"]),o(p,{prop:"sale_num",label:e(l)("saleNum"),"min-width":"120"},null,8,["label"]),o(p,{prop:"create_time",label:e(l)("createTime"),"min-width":"150"},null,8,["label"]),o(p,{prop:"status",label:e(l)("status"),"min-width":"120"},{default:i(({row:t})=>[t.status==1?(g(),y("span",ge,n(e(l)("tooUp")),1)):h("",!0),t.status==0?(g(),y("span",fe,n(e(l)("tooDown")),1)):h("",!0)]),_:1},8,["label"]),o(p,{prop:"sort",label:e(l)("sort"),"min-width":"120"},{default:i(({row:t})=>[o(F,{modelValue:t.sort,"onUpdate:modelValue":_=>t.sort=_,class:"!w-[90%]",min:0,"controls-position":"right",onChange:_=>w(t)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1},8,["label"]),o(p,{label:e(l)("operation"),fixed:"right",align:"right","min-width":"240"},{default:i(({row:t})=>[o(m,{type:"primary",link:"",onClick:_=>N(t)},{default:i(()=>[c(n(e(l)("collectionRecord")),1)]),_:2},1032,["onClick"]),t.status==0?(g(),k(m,{key:0,type:"primary",link:"",onClick:_=>x(t,1)},{default:i(()=>[c(n(e(l)("up")),1)]),_:2},1032,["onClick"])):h("",!0),t.status==1?(g(),k(m,{key:1,type:"primary",link:"",onClick:_=>x(t,0)},{default:i(()=>[c(n(e(l)("down")),1)]),_:2},1032,["onClick"])):h("",!0),o(m,{type:"primary",link:"",onClick:_=>D(t)},{default:i(()=>[c(n(e(l)("edit")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[R,e(r).loading]]),d("div",he,[o(j,{"current-page":e(r).page,"onUpdate:currentPage":a[5]||(a[5]=t=>e(r).page=t),"page-size":e(r).limit,"onUpdate:pageSize":a[6]||(a[6]=t=>e(r).limit=t),layout:"total, sizes, prev, pager, next, jumper",total:e(r).total,onSizeChange:a[7]||(a[7]=t=>u()),onCurrentChange:u},null,8,["current-page","page-size","total"])])])]),_:1})])}}});export{Vt as default};
|