index-Daguhvqo.js 4.8 KB

1
  1. import{d as u,a2 as c,a as s,av as d,o as _,K as m,e as i,f as b,u as r,y as f,C as h,j as l}from"./vue-A59npLRR.js";import{_ as y}from"./popupForm.vue_vue_type_script_setup_true_lang-Q4XM1SHK.js";import{a1 as g}from"./index-EwE51S_X.js";import{d as z,b as E,T as q}from"./baTable-MdxYOkAk.js";import{T as w}from"./index-K8IR974I.js";import"./index-r6iTpmP6.js";import"./validate-_EUdkMt3.js";import"./echarts-cxb9vJr1.js";import"./index-XALue448.js";const I={class:"default-main ba-table-box"},R=u({name:"asset",__name:"index",setup(F){const{t:e}=c(),o=s(),n=z(["edit","delete"]);s(!1);const a=new E(new g("/admin/Asset/"),{filter:{order:"id,asc",limit:15},pk:"id",column:[{type:"selection",align:"center",operator:!1},{label:e("Id"),prop:"id",fixed:"left",align:"center",width:70,operator:"RANGE",sortable:"custom"},{label:e("asset.asset_id"),fixed:"left",prop:"asset_id",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",width:130},{label:e("asset.asset_name"),fixed:"left",prop:"asset_name",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:150},{label:e("asset.status"),prop:"status",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:100,render:"tag",custom:{0:"success",2:"danger"},replaceValue:{0:e("asset.status 0"),1:e("asset.status 1"),2:e("asset.status 2")}},{label:e("asset.unit_price"),prop:"unit_price",align:"center",operator:"RANGE",sortable:!1,width:100},{label:e("asset.storage_address"),prop:"storage_address",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:150},{label:e("asset.room_id"),prop:"room_id",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE"},{label:e("asset.shelf"),prop:"shelf",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:80},{label:e("asset.usage_unit"),prop:"usage_unit",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:160},{label:e("asset.user"),prop:"user",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1},{label:e("asset.purchasing_form"),prop:"purchasing_form",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:120},{label:e("asset.supplier"),prop:"supplier",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:200},{label:e("asset.factory_id"),prop:"factory_id",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE"},{label:e("asset.service_life"),prop:"service_life",align:"center",operator:"RANGE",sortable:!1,width:120},{label:e("asset.appropriation_item_id"),prop:"appropriation_item_id",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",width:150},{label:e("asset.appropriation_item"),prop:"appropriation_item",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:200},{label:e("asset.direction_use"),prop:"direction_use",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:80},{label:e("asset.asset_class"),prop:"asset_class",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1,width:120},{label:e("Create time"),prop:"create_time",align:"center",render:"datetime",operator:"RANGE",sortable:"custom",width:160,timeFormat:"yyyy-mm-dd hh:MM:ss"},{label:e("asset.remarks"),prop:"remarks",align:"center",operatorPlaceholder:e("Fuzzy query"),operator:"LIKE",sortable:!1},{label:e("Operate"),align:"center",fixed:"right",width:100,render:"buttons",buttons:n,operator:!1}],dblClickNotEditColumn:[void 0]},{defaultItems:{asset_groud_id:null,asset_groud_name:null,factory_id:null,asset_name:null,status:null,unit_price:0,purchase_date:null,accounting_date:null,usage_unit_id:null,usage_unit:null,financial_accounting_date:null,user:null,user_id:null,storage_address:null,origin:null,room_id:null,shelf:null,voucher_number:0,entry_id:null,inputter:null,inputter_id:null,financial_audit_number:0,business_type_id:null,asset_source:null,is_financial_reporting:null,remarks:null,purchasing_form:null,is_import:null,supplier:null,asset_class_id:null,service_life:0,appropriation_item:null,appropriation_item_id:null,direction_use:null,delete_time:null,asset_class:null}});return d("baTable",a),_(()=>{var t;a.table.ref=o.value,a.mount(),(t=a.getIndex())==null||t.then(()=>{a.initSort(),a.dragSort()})}),(t,k)=>{const p=m("el-alert");return i(),b("div",I,[r(a).table.remark?(i(),f(p,{key:0,class:"ba-table-alert",title:r(a).table.remark,type:"info","show-icon":""},null,8,["title"])):h("",!0),l(w,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":r(e)("Quick search placeholder",{fields:r(e)("asset.quick Search Fields")})},null,8,["quick-search-placeholder"]),l(q,{ref_key:"tableRef",ref:o},null,512),l(y)])}}});export{R as default};