Files
aiot-platform-ui/apps/web-antd/dist/js/index-DXwJE2E0.js

2 lines
6.7 KiB
JavaScript
Raw Normal View History

2025-12-28 01:40:21 +08:00
var M=Object.defineProperty,j=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var w=(o,e,i)=>e in o?M(o,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[e]=i,P=(o,e)=>{for(var i in e||(e={}))Y.call(e,i)&&w(o,i,e[i]);if(W)for(var i of W(e))z.call(e,i)&&w(o,i,e[i]);return o},D=(o,e)=>j(o,U(e));var l=(o,e,i)=>new Promise((f,d)=>{var b=c=>{try{m(i.next(c))}catch(h){d(h)}},k=c=>{try{m(i.throw(c))}catch(h){d(h)}},m=c=>c.done?f(c.value):Promise.resolve(c.value).then(b,k);m((i=i.apply(o,e)).next())});import{V as H,ae as J,$ as u,av as $,a9 as g}from"./bootstrap-DZnIDovD.js";import"./vxe-table-aWWk9byK.js";import{c as K,e as Q,g as X,f as Z,h as N}from"./index-C1Fs3r2h.js";import{g as ee}from"./index-CvZWPUcl.js";import{g as te}from"./rangePickerProps-DgJ4_iHj.js";import{dH as ae,cW as v,d8 as ne,m as ie,b9 as A,v as oe,ab as L,b2 as T,bJ as p,j as y,u as a,ad as re,I as le,bb as ce,dh as ue}from"../jse/index-index-DaIpbNAe.js";import{_ as R}from"./table-action.vue_vue_type_script_setup_true_lang-XGb8BSD2.js";import{P as _}from"./biz-mall-enum-CJxJyQZ4.js";import{_ as se}from"./doc-alert.vue_vue_type_script_setup_true_lang-CZkVi6Zq.js";import{_ as de}from"./page.vue_vue_type_script_setup_true_lang-CFtl_Na7.js";import{u as me}from"./use-vxe-grid-o7qNI7zE.js";import{A as s}from"./icons-CieLeI1V.js";import{v as V}from"./AlertBuilder-B8mxPLma.js";import"./dict-tag.vue_vue_type_script_setup_true_lang-CLbQHdZf.js";import"./index-DcHmDPZH.js";import"./circle-check-big-2qqm9p0i.js";import"./x-CurcrhgL.js";let x=[];ee({}).then(o=>{x=ne(o,"id","parentId","children")});function pe(){return[{fieldName:"name",label:"商品名称",component:"Input",componentProps:{placeholder:"请输入商品名称",allowClear:!0}},{fieldName:"categoryId",label:"商品分类",component:"ApiTreeSelect",componentProps:{placeholder:"请选择商品分类",allowClear:!0,options:x,fieldNames:{label:"name",value:"id",children:"children"}}},{fieldName:"createTime",label:"创建时间",component:"RangePicker",componentProps:D(P({},te()),{allowClear:!0})}]}function fe(o){return[{field:"id",title:"商品编号",fixed:"left",minWidth:100},{field:"name",title:"商品名称",fixed:"left",minWidth:200},{field:"picUrl",title:"商品图片",minWidth:100,cellRender:{name:"CellImage"}},{field:"categoryId",title:"商品分类",minWidth:150,formatter:({row:e})=>ae(x,e.categoryId)},{field:"status",title:"销售状态",minWidth:100,cellRender:{attrs:{beforeChange:o},name:"CellSwitch",props:{checkedValue:1,checkedChildren:"上架",unCheckedValue:0,unCheckedChildren:"下架"}}},{field:"price",title:"价格",minWidth:100,formatter:"formatAmount2"},{field:"marketPrice",title:"市场价",minWidth:100,formatter:({row:e})=>`${v(e.marketPrice)}`},{field:"costPrice",title:"成本价",minWidth:100,formatter:({row:e})=>`${v(e.costPrice)}`},{field:"salesCount",title:"销量",minWidth:80},{field:"virtualSalesCount",title:"虚拟销量",minWidth:100},{field:"stock",title:"库存",minWidth:80},{field:"browseCount",title:"浏览量",minWidth:100},{field:"sort",title:"排序",minWidth:80},{field:"createTime",title:"创建时间",minWidth:160,formatter:"formatDateTime"},{title:"操作",width:300,fixed:"right",slots:{default:"actions"}}]}const ve=ie({__name:"index",setup(o){const{push:e}=H(),i=J(),f=A(0),d=A([{name:"出售中",type:0,count:0},{name:"仓库中",type:1,count:0},{name:"已售罄",type:2,count:0},{name:"警戒库存",type:3,count:0},{name:"回收站",type:4,count:0}]);function b(){return l(this,null,function*(){yield C.query(),yield m()})}function k(){return l(this,null,function*(){const t=yield Q(yield C.formApi.getValues());ue({fileName:"商品.xls",source:t})})}function m(){return l(this,null,function*(){const t=yield X();for(const r in t){const n=Number(r);d.value[n]&&(d.value[n].count=t[r])}})}function c(){e({name:"ProductSpuAdd"})}function h(t){e({name:"ProductSpuEdit",params:{id:t.id}})}function O(t){return l(this,null,function*(){const r