chunk-5e4eab64.97b88e20.js 8.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e4eab64","chunk-2d0a3cda","chunk-2d210058"],{"0477":function(e,t,r){"use strict";r.r(t),r.d(t,"urlPrefix",(function(){return n})),r.d(t,"GetList",(function(){return o})),r.d(t,"AddObj",(function(){return i})),r.d(t,"UpdateObj",(function(){return s})),r.d(t,"DelObj",(function(){return l})),r.d(t,"exportData",(function(){return d}));var a=r("22ce"),n="/api/myapp/hdd/";function o(e){return Object(a["c"])({url:n,method:"get",params:e})}function i(e){return Object(a["c"])({url:n,method:"post",data:e})}function s(e){return Object(a["c"])({url:n+e.id+"/",method:"put",data:e})}function l(e){return Object(a["c"])({url:n+e+"/",method:"delete",data:{id:e}})}function d(e){return Object(a["a"])({url:n+"export/",params:e,method:"post"})}},b5b1:function(e,t,r){"use strict";r.r(t),r.d(t,"crudOptions",(function(){return p}));var a=r("5530");function n(e){return null==e||""===e}function o(...e){for(const t of e)if(null!=t&&""!==t)return!1;return!1}function i(...e){for(const t of e)if(null==t||""===t)return!0;return!1}const s={isEmpty:n,isAllEmpty:o,hasEmpty:i};var l=s,d=[],p=function(e){return{pageOptions:{compact:!0},options:{size:"medium",tableType:"vxe-table",rowKey:!0,rowId:"id",height:"100%",highlightCurrentRow:!0,events:{"sort-change":function(t){var r=t.field,n=t.order,o="desc"===n?"-":"",i=o+r,s=e.getSearch().getForm(),l=Object(a["a"])({ordering:i},s);e.doSearch(l)}}},rowHandle:{fixed:"right",align:"center",width:"170px",view:{thin:!0,text:"",disabled:function(){return!e.hasPermissions("Retrieve")}},edit:{thin:!0,text:"",disabled:function(){return!e.hasPermissions("Update")}},remove:{thin:!0,text:"",disabled:function(){return!e.hasPermissions("Delete")}}},indexRow:{title:"序号",align:"center",resizable:!0,fixed:"left",width:90},viewOptions:{componentType:"form"},formOptions:{defaultSpan:24,width:"35%"},columns:[{title:"ID",key:"id",show:!1,disabled:!0,width:70,form:{disabled:!0}},{title:"序列号",key:"sn",fixed:"left",resizable:!0,width:"auto",align:"center",search:{component:{props:{clearable:!0}}},type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"序列号必填"}],component:{props:{clearable:!0},placeholder:"请输入序列号"},itemProps:{class:{yxtInput:!0}}}},{title:"产品型号",key:"product_model",resizable:!0,align:"center",width:"auto",search:{component:{props:{clearable:!0}}},type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"产品型号必填"}],component:{props:{clearable:!0},placeholder:"请输入产品型号"},itemProps:{class:{yxtInput:!0}}}},{title:"板号",key:"board_no",resizable:!0,align:"center",width:"auto",search:{component:{props:{clearable:!0}}},type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"板号必填"}],component:{props:{clearable:!0},placeholder:"请输入板号"},itemProps:{class:{yxtInput:!0}}}},{title:"箱号",key:"case_no",align:"center",resizable:!0,width:"auto",search:{component:{props:{clearable:!0}}},type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"箱号必填"}],component:{props:{clearable:!0},placeholder:"请输入箱号"},itemProps:{class:{yxtInput:!0}}}},{title:"进货发票号",key:"purchase_invoice_no",width:"auto",align:"center",resizable:!0,type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"进货发票号必填"}],component:{props:{clearable:!0},placeholder:"请输入进货发票号"},itemProps:{class:{yxtInput:!0}}}},{title:"进货日期",key:"purchase_date",sortable:!0,align:"center",width:"auto",resizable:!0,type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"进货日期必填"}],component:{props:{clearable:!0},placeholder:"请输入进货日期"},itemProps:{class:{yxtInput:!0}}}},{title:"出货单号",key:"shipping_no",align:"center",width:"auto",resizable:!0,search:{component:{props:{clearable:!0}}},type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"出货单号必填"}],component:{props:{clearable:!0},placeholder:"请输入出货单号"},itemProps:{class:{yxtInput:!0}}}},{title:"数量",key:"num",sortable:!0,align:"center",resizable:!0,width:"auto",type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"数量必填"}],component:{props:{clearable:!0},placeholder:"请输入数量"},itemProps:{class:{yxtInput:!0}}}},{title:"仓位",key:"freight_space",align:"center",width:"auto",resizable:!0,search:{component:{props:{clearable:!0}}},type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"仓位必填"}],component:{props:{clearable:!0},placeholder:"请输入仓位"},itemProps:{class:{yxtInput:!0}}}},{title:"扫描类型",key:"scan_type",align:"center",width:"auto",resizable:!0,search:{component:{props:{clearable:!0}}},type:"input",form:{editDisabled:!0,rules:[{required:!0,message:"扫描类型必填"}],component:{props:{clearable:!0},placeholder:"请输入扫描类型"},itemProps:{class:{yxtInput:!0}}}},{title:"状态",key:"status",align:"center",width:"auto",resizable:!0,search:{disabled:!1},type:"select",dict:{data:e.dictionary("hdd_status")},form:{show:!1,value:0,component:{span:12},itemProps:{class:{yxtInput:!0}}}},{title:"更新时间",key:"daterange",sortable:!0,type:"daterange",show:!1,search:{disabled:!1,width:380},form:{disabled:!0,component:{props:{"time-arrow-control":!1,"picker-options":{shortcuts:d},format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss"}}},valueBuilder:function(e,t){l.hasEmpty(e.daterangeStart,e.daterangeEnd)||(e.daterange=[new Date(e.daterangeStart),new Date(e.daterangeEnd)])},valueResolve:function(e,t){null!=e.daterange&&e.daterange.length>1?(e.start_time=e.daterange[0],e.stop_time=e.daterange[1]):(e.start_time=null,e.stop_time=null)}},{title:"备注",key:"remark",align:"center",width:"200px",resizable:!0,showOverflowTooltip:!0,type:"input",form:{editDisabled:!0,component:{props:{clearable:!0},placeholder:"请输入备注"},itemProps:{class:{yxtInput:!0}}}},{title:"更新时间",key:"update_datetime",width:160,align:"center",show:!0,type:"datetime",sortable:!0,form:{disabled:!0}},{title:"创建时间",key:"create_datetime",align:"center",width:"auto",search:{disabled:!0,width:360,component:{name:"el-date-picker",props:{type:"daterange","range-separator":"至","start-placeholder":"开始","end-placeholder":"结束",valueFormat:"yyyy-MM-dd"}}},show:!0,type:"datetime",sortable:!0,form:{disabled:!0}}]}}},efc2:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("d2-container",{class:{"page-compact":e.crud.pageOptions.compact}},[t("template",{slot:"header"},[e._v("库存列表")]),t("d2-crud-x",e._g(e._b({directives:[{name:"loading",rawName:"v-loading",value:e.exportLoading,expression:"exportLoading"}],ref:"d2Crud"},"d2-crud-x",e._crudProps,!1),e._crudListeners),[t("div",{attrs:{slot:"header"},slot:"header"},[t("crud-search",{ref:"search",attrs:{options:e.crud.searchOptions},on:{submit:e.handleSearch}}),t("el-button-group",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.addRow}},[t("i",{staticClass:"el-icon-plus"}),e._v("新增 ")]),t("importExcel",{directives:[{name:"permission",rawName:"v-permission",value:"Import",expression:"'Import'"}],attrs:{importApi:"api/myapp/hdd/import/"}},[e._v("导入 ")]),t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"Export",expression:"'Export'"}],attrs:{size:"small",type:"warning"},on:{click:e.onExport}},[t("i",{staticClass:"el-icon-download"}),e._v("导出 ")])],1),t("crud-toolbar",e._g(e._b({},"crud-toolbar",e._crudToolbarProps,!1),e._crudToolbarListeners))],1)])],2)},n=[],o=r("5530"),i=(r("d3b7"),r("b5b1")),s=r("1fbf"),l=r("0477"),d=r("22ce"),p={data:function(){return{exportLoading:!1}},name:"hdd",mixins:[s["d2CrudPlus"].crud],methods:{getCrudOptions:function(){return Object(i["crudOptions"])(this)},pageRequest:function(e){var t=Object(o["a"])({ordering:this.ordering},e);return Object(l["GetList"])(t)},addRequest:function(e){return Object(l["AddObj"])(e)},updateRequest:function(e){return Object(l["UpdateObj"])(e)},delRequest:function(e){return Object(l["DelObj"])(e.id)},onExport:function(){var e=this;this.$confirm("是否确认导出所有数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=e.getSearch().getForm();e.exportLoading=!0;var r="/api/myapp/hdd/export/";Object(d["a"])({url:r,params:Object(o["a"])({ordering:e.ordering},t),method:"post"}).finally((function(){e.exportLoading=!1}))})).catch((function(){e.exportLoading=!1}))}}},c=p,u=r("2877"),m=Object(u["a"])(c,a,n,!1,null,null,null);t["default"]=m.exports}}]);