erp/public/dist/js/401.7b4eec34.js
2024-10-22 17:19:15 +08:00

2 lines
26 KiB
JavaScript
Vendored
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(self["webpackChunkerp"]=self["webpackChunkerp"]||[]).push([[401],{3717:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return _}});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"pageBox"},[e("div",{staticClass:"cardBox"},[e("div",{staticClass:"searchBox"},[e("div",{staticClass:"row"},[e("span",[t._v("商品名称:")]),e("el-input",{attrs:{clearable:""},model:{value:t.filter.title,callback:function(e){t.$set(t.filter,"title",e)},expression:"filter.title"}})],1),e("div",{staticClass:"row"},[e("span",[t._v("商品编码:")]),e("el-input",{attrs:{clearable:""},model:{value:t.filter.external_sku_id,callback:function(e){t.$set(t.filter,"external_sku_id",e)},expression:"filter.external_sku_id"}})],1),e("div",{staticClass:"row"},[e("span",[t._v("创建时间:")]),e("el-date-picker",{staticStyle:{width:"340px"},attrs:{type:"datetimerange","range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.addTime,callback:function(e){t.addTime=e},expression:"addTime"}})],1),e("div",{staticClass:"row"},[e("span",[t._v("审核状态:")]),e("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.filter.status,callback:function(e){t.$set(t.filter,"status",e)},expression:"filter.status"}},t._l(t.statusList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),e("div",{staticClass:"row"},[e("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.handleSearch}},[t._v("筛选")])],1)])]),e("el-card",[e("div",{staticClass:"opaBox"},[e("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.handleAdd}},[t._v("新增")]),e("el-button",{attrs:{type:"warning",icon:"el-icon-upload2"},on:{click:t.handleImport}},[t._v("导入")])],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.procureList,border:""}},[e("el-table-column",{attrs:{prop:"goods_sku.id",label:"商品id",width:"80",align:"center"}}),e("el-table-column",{attrs:{prop:"goods_sku.name",label:"商品名称"}}),e("el-table-column",{attrs:{prop:"external_sku_id",label:"商品编码"}}),e("el-table-column",{attrs:{prop:"num",label:"采购数量"}}),e("el-table-column",{attrs:{prop:"cost",label:"采购成本"}}),e("el-table-column",{attrs:{prop:"buyer_name",label:"采购人名称"}}),e("el-table-column",{attrs:{prop:"expire_time",label:"到货时间"}}),e("el-table-column",{attrs:{prop:"supplier_name",label:"供应商"},scopedSlots:t._u([{key:"default",fn:function(r){return[r.row.supplier_name?e("span",[t._v(t._s(r.row.supplier_name)+""+t._s(r.row.supplier_id)+"")]):t._e()]}}])}),e("el-table-column",{attrs:{prop:"date",label:"采购时间",align:"center"}}),e("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(r){return[0==r.row.status?e("span",[t._v("待审核")]):1==r.row.status?e("span",{staticStyle:{color:"#6DD230"}},[t._v("审核通过")]):2==r.row.status?e("span",{staticStyle:{color:"#f00"}},[t._v("审核不通过")]):t._e()]}}])}),e("el-table-column",{attrs:{label:"操作",width:"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("el-button",{attrs:{type:"primary",icon:"el-icon-edit",size:"mini"},on:{click:function(e){return t.handleEdit(r.row)}}},[t._v("编辑")])]}}])})],1),e("div",{staticClass:"page-pagination"},[e("el-pagination",{attrs:{"current-page":t.page,"page-sizes":[15,30,50,100],"page-size":t.pageSize,layout:"prev, pager, next, jumper, sizes, total",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),e("el-dialog",{attrs:{title:"新增",visible:t.dialogVisible,width:"900px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("el-form",{attrs:{"label-width":"90px",inline:!0}},[e("el-form-item",{attrs:{label:"采购人:"}},[e("el-select",{ref:"userBatchRef",attrs:{clearable:"",filterable:""},model:{value:t.curInfo.buyer_user_id,callback:function(e){t.$set(t.curInfo,"buyer_user_id",e)},expression:"curInfo.buyer_user_id"}},t._l(t.usersList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:"供应商:"}},[e("el-select",{ref:"supplierBatchRef",attrs:{clearable:"",filterable:""},model:{value:t.curInfo.supplier_id,callback:function(e){t.$set(t.curInfo,"supplier_id",e)},expression:"curInfo.supplier_id"}},t._l(t.supplierList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.supplier_name,value:t.id}})})),1)],1)],1),t._l(t.purchaseOrders,(function(r,i){return e("div",{key:i,staticClass:"bgBox"},[e("div",{staticClass:"close",on:{click:function(e){return t.delItem(i)}}},[e("i",{staticClass:"el-icon-delete-solid"})]),e("el-form",{attrs:{"label-width":"90px",inline:!0}},[e("el-form-item",{attrs:{label:"商品名称:"}},[e("el-select",{attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"商品名称",clearable:"","remote-method":t.remoteMethod,loading:t.searchLoading},model:{value:r.external_sku_id,callback:function(e){t.$set(r,"external_sku_id",e)},expression:"item.external_sku_id"}},t._l(t.goodsList,(function(t){return e("el-option",{key:t.external_sku_id,attrs:{label:t.title,value:t.external_sku_id}})})),1)],1),e("el-form-item",{attrs:{label:"数量:"}},[e("el-input",{attrs:{clearable:""},on:{input:function(e){return t.changeInput(i,r)}},model:{value:r.num,callback:function(e){t.$set(r,"num",e)},expression:"item.num"}})],1),e("el-form-item",{attrs:{label:"成本:"}},[e("el-input",{staticStyle:{width:"215px"},attrs:{clearable:""},on:{input:function(e){return t.changeInput(i,r)}},model:{value:r.cost,callback:function(e){t.$set(r,"cost",e)},expression:"item.cost"}},[e("template",{slot:"append"},[t._v("元")])],2)],1),e("el-form-item",{attrs:{label:"商品总价:"}},[e("el-input",{staticStyle:{width:"215px"},model:{value:r.total_price,callback:function(e){t.$set(r,"total_price",e)},expression:"item.total_price"}},[e("template",{slot:"append"},[t._v("元")])],2)],1),e("el-form-item",{attrs:{label:"采购日期:"}},[e("el-date-picker",{attrs:{type:"date",placeholder:"选择日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:r.date,callback:function(e){t.$set(r,"date",e)},expression:"item.date"}})],1),e("el-form-item",{attrs:{label:"到货时间:"}},[e("el-date-picker",{attrs:{type:"datetime",placeholder:"选择日期",format:"yyyy-MM-dd hh:mm:ss","value-format":"yyyy-MM-dd hh:mm:ss"},model:{value:r.arrived_time,callback:function(e){t.$set(r,"arrived_time",e)},expression:"item.arrived_time"}})],1)],1)],1)})),e("div",{staticClass:"btn",on:{click:function(e){return t.addItem()}}},[e("i",{staticClass:"el-icon-plus"}),t._v("添加采购商品")]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",loading:t.commitloading},on:{click:t.commitAddPurchase}},[t._v("确 定")])],1)],2),e("el-dialog",{attrs:{title:"编辑",visible:t.editDialog,width:"600px"},on:{"update:visible":function(e){t.editDialog=e}}},[e("el-form",{attrs:{"label-width":"90px"}},[e("el-form-item",{attrs:{label:"采购人"}},[e("el-select",{ref:"userRef",attrs:{clearable:"",filterable:"",disabled:""},model:{value:t.curInfo.buyer_user_id,callback:function(e){t.$set(t.curInfo,"buyer_user_id",e)},expression:"curInfo.buyer_user_id"}},t._l(t.usersList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:"供应商"}},[e("el-select",{ref:"supplierRef",attrs:{clearable:"",filterable:""},model:{value:t.curInfo.supplier_id,callback:function(e){t.$set(t.curInfo,"supplier_id",e)},expression:"curInfo.supplier_id"}},t._l(t.supplierList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.supplier_name,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:"商品名称"}},[e("el-select",{attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"商品名称",clearable:"","remote-method":t.editRemoteMethod,loading:t.searchLoading},model:{value:t.curInfo.external_sku_id,callback:function(e){t.$set(t.curInfo,"external_sku_id",e)},expression:"curInfo.external_sku_id"}},t._l(t.editGoodsList,(function(t){return e("el-option",{key:t.external_sku_id,attrs:{label:t.title,value:t.external_sku_id}})})),1)],1),e("el-form-item",{attrs:{label:"数量"}},[e("el-input",{attrs:{disabled:1==t.curInfo.status},model:{value:t.curInfo.num,callback:function(e){t.$set(t.curInfo,"num",e)},expression:"curInfo.num"}})],1),e("el-form-item",{attrs:{label:"成本"}},[e("el-input",{attrs:{disabled:1==t.curInfo.status},model:{value:t.curInfo.cost,callback:function(e){t.$set(t.curInfo,"cost",e)},expression:"curInfo.cost"}})],1),e("el-form-item",{attrs:{label:"商品总价"}},[e("el-input",{attrs:{disabled:1==t.curInfo.status},model:{value:t.curInfo.total_price,callback:function(e){t.$set(t.curInfo,"total_price",e)},expression:"curInfo.total_price"}},[e("template",{slot:"append"},[t._v("元")])],2)],1),e("el-form-item",{attrs:{label:"采购时间"}},[e("el-date-picker",{attrs:{type:"date",placeholder:"选择日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:t.curInfo.date,callback:function(e){t.$set(t.curInfo,"date",e)},expression:"curInfo.date"}})],1),e("el-form-item",{attrs:{label:"到期时间"}},[e("el-date-picker",{attrs:{type:"datetime",placeholder:"到货时间",format:"yyyy-MM-dd hh:mm:ss","value-format":"yyyy-MM-dd hh:mm:ss"},model:{value:t.curInfo.arrived_time,callback:function(e){t.$set(t.curInfo,"arrived_time",e)},expression:"curInfo.arrived_time"}})],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.editDialog=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",loading:t.commitloading},on:{click:t.commitEdit}},[t._v("确 定")])],1)],1),e("el-dialog",{attrs:{title:"导入",visible:t.showImport,width:"500px"},on:{"update:visible":function(e){t.showImport=e}}},[e("div",{staticStyle:{"text-align":"center"}},[e("el-upload",{staticClass:"upload-demo",attrs:{drag:"",action:"",limit:1,multiple:!1,accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel","file-list":t.fileList,"auto-upload":!1,"on-change":t.importFileChange,"on-remove":t.fileRemove}},[e("i",{staticClass:"el-icon-upload"}),e("div",{staticClass:"el-upload__text"},[t._v("将文件拖到此处,或"),e("em",[t._v("点击上传")])])])],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.showImport=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",loading:t.commitloading},on:{click:t.commitUpload}},[t._v("上 传")])],1)])],1)},a=[],n=(r(560),r(3550)),s=r(9669),o=r.n(s),l=r(2900),u=r(9036),c=r(7484),d=r.n(c),p={data(){return{loading:!1,page:1,pageSize:15,total:0,procureList:[],filter:{title:"",external_sku_id:"",status:""},addTime:[],commitloading:!1,dialogVisible:!1,curInfo:{},showImport:!1,fileList:[],usersList:[],supplierList:[],purchaseOrders:[],editDialog:!1,goodsList:[],searchLoading:!1,statusList:[{id:0,name:"待审核"},{id:1,name:"审核通过"},{id:2,name:"审核不通过"}],editGoodsList:[]}},methods:{fetchList(){this.loading=!0;let t={page:this.page,per_page:this.pageSize,...this.filter,start_time:this.addTime?this.addTime[0]:"",end_time:this.addTime?this.addTime[1]:""};(0,n.Js)(t).then((t=>{this.procureList=t.data.data,this.total=t.data.meta.total,this.loading=!1})).catch((()=>{this.loading=!1}))},handleSizeChange(t){this.page=1,this.pageSize=t,this.fetchList()},handleCurrentChange(t){this.page=t,this.fetchList()},handleSearch(){this.page=1,this.fetchList()},handleAdd(){this.curInfo={buyer_user_id:1*localStorage.getItem("userId"),supplier_id:""},this.purchaseOrders=[{external_sku_id:"",num:"",cost:"",total_price:"",date:d()().format("YYYY-MM-DD"),arrived_time:""}],this.dialogVisible=!0},delItem(t){this.purchaseOrders.splice(t,1)},addItem(){this.purchaseOrders.push({external_sku_id:"",num:"",cost:"",total_price:"",date:d()().format("YYYY-MM-DD"),arrived_time:""})},handleEdit(t){this.curInfo=JSON.parse(JSON.stringify(t)),this.editGoodsList=[{external_sku_id:t.external_sku_id,title:t.goods_sku&&t.goods_sku.name}],this.curInfo.total_price=1*t.cost*(1*t.num),this.editDialog=!0},commitAddPurchase(){this.commitloading=!0;let t=[],e={...this.curInfo};e.buyer_name="",e.supplier_name="",e.buyer_user_id&&(e.buyer_name=this.$refs.userBatchRef.selectedLabel),e.supplier_id&&(e.supplier_name=this.$refs.supplierBatchRef.selectedLabel),this.purchaseOrders.forEach((r=>{t.push({...r,buyer_name:e.buyer_name,buyer_user_id:e.buyer_user_id,supplier_id:e.supplier_id,supplier_name:e.supplier_name})})),(0,n.iY)({purchaseOrders:t}).then((t=>{this.page=1,this.fetchList(),this.$message({type:"success",message:"新增成功!"}),this.dialogVisible=!1,this.commitloading=!1})).catch((()=>{this.commitloading=!1}))},commitEdit(){this.commitloading=!0;let t={...this.curInfo};t.buyer_name="",t.supplier_name="",t.buyer_user_id&&(t.buyer_name=this.$refs.userRef.selectedLabel),t.supplier_id&&(t.supplier_name=this.$refs.supplierRef.selectedLabel),(0,n.JI)(this.curInfo.id,t).then((t=>{this.fetchList(),this.$message({type:"success",message:"更新成功!"}),this.editDialog=!1,this.commitloading=!1})).catch((()=>{this.commitloading=!1}))},handleImport(){this.fileList=[],this.showImport=!0},importFileChange(t,e){console.log(e),this.fileList=e},fileRemove(){this.fileList=[]},commitUpload(){if(this.fileList.length){this.commitloading=!0;const t=new FormData;t.append("purchaseFile",this.fileList[0].raw);let e=localStorage.getItem("token");o().post("/api/purchase_record/purchase_import",t,{headers:{Authorization:`Bearer ${e}`}}).then((t=>{200===t.status?(this.$message.success("导入成功"),this.page=1,this.fetchList(),this.commitloading=!1,this.showImport=!1):this.commitloading=!1})).catch((()=>{this.commitloading=!1}))}else this.$message.error("请先上传文件")},getUserList(){let t={page:1,per_page:9999};(0,l.Lh)(t).then((t=>{this.usersList=t.data.data}))},getSupplierList(){let t={page:1,per_page:9999};(0,n.Fb)(t).then((t=>{this.supplierList=t.data.data}))},remoteMethod(t){""!==t?(this.searchLoading=!0,setTimeout((()=>{this.searchLoading=!1,(0,u.NR)(t).then((e=>{this.goodsList=e.data.filter((e=>e.title.toLowerCase().indexOf(t.toLowerCase())>-1))}))}),200)):this.goodsList=[]},changeInput(t,e){this.$set(this.purchaseOrders[t],"total_price",1*e.num*(1*e.cost))},editRemoteMethod(t){""!==t?(this.searchLoading=!0,setTimeout((()=>{this.searchLoading=!1,(0,u.NR)(t).then((e=>{this.editGoodsList=e.data.filter((e=>e.title.toLowerCase().indexOf(t.toLowerCase())>-1))}))}),200)):this.editGoodsList=[]}},mounted(){this.fetchList(),this.getSupplierList(),this.getUserList()}},f=p,h=r(1001),m=(0,h.Z)(f,i,a,!1,null,"453a2678",null),_=m.exports},7484:function(t){!function(e,r){t.exports=r()}(0,(function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",a="second",n="minute",s="hour",o="day",l="week",u="month",c="quarter",d="year",p="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},g=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},b={s:g,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),a=r%60;return(e<=0?"+":"-")+g(i,2,"0")+":"+g(a,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),a=e.clone().add(i,u),n=r-a<0,s=e.clone().add(i+(n?-1:1),u);return+(-(i+(r-a)/(n?a-s:s-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:l,d:o,D:p,h:s,m:n,s:a,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",y={};y[v]=_;var $="$isDayjsObject",k=function(t){return t instanceof L||!(!t||!t[$])},x=function t(e,r,i){var a;if(!e)return v;if("string"==typeof e){var n=e.toLowerCase();y[n]&&(a=n),r&&(y[n]=r,a=n);var s=e.split("-");if(!a&&s.length>1)return t(s[0])}else{var o=e.name;y[o]=e,a=o}return!i&&a&&(v=a),a||!i&&v},w=function(t,e){if(k(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new L(r)},M=b;M.l=x,M.i=k,M.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var L=function(){function _(t){this.$L=x(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[$]=!0}var g=_.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(M.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(h);if(i){var a=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return M},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},g.isAfter=function(t,e){return w(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<w(t)},g.$g=function(t,e,r){return M.u(t)?this[e]:this.set(r,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var r=this,i=!!M.u(e)||e,c=M.p(t),f=function(t,e){var a=M.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?a:a.endOf(o)},h=function(t,e){return M.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},m=this.$W,_=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(c){case d:return i?f(1,0):f(31,11);case u:return i?f(1,_):f(0,_+1);case l:var v=this.$locale().weekStart||0,y=(m<v?m+7:m)-v;return f(i?g-y:g+(6-y),_);case o:case p:return h(b+"Hours",0);case s:return h(b+"Minutes",1);case n:return h(b+"Seconds",2);case a:return h(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,e){var r,l=M.p(t),c="set"+(this.$u?"UTC":""),f=(r={},r[o]=c+"Date",r[p]=c+"Date",r[u]=c+"Month",r[d]=c+"FullYear",r[s]=c+"Hours",r[n]=c+"Minutes",r[a]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],h=l===o?this.$D+(e-this.$W):e;if(l===u||l===d){var m=this.clone().set(p,1);m.$d[f](h),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[M.p(t)]()},g.add=function(i,c){var p,f=this;i=Number(i);var h=M.p(c),m=function(t){var e=w(f);return M.w(e.date(e.date()+Math.round(t*i)),f)};if(h===u)return this.set(u,this.$M+i);if(h===d)return this.set(d,this.$y+i);if(h===o)return m(1);if(h===l)return m(7);var _=(p={},p[n]=e,p[s]=r,p[a]=t,p)[h]||1,g=this.$d.getTime()+i*_;return M.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||f;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=M.z(this),n=this.$H,s=this.$m,o=this.$M,l=r.weekdays,u=r.months,c=r.meridiem,d=function(t,r,a,n){return t&&(t[r]||t(e,i))||a[r].slice(0,n)},p=function(t){return M.s(n%12||12,t,"0")},h=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(m,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return M.s(e.$y,4,"0");case"M":return o+1;case"MM":return M.s(o+1,2,"0");case"MMM":return d(r.monthsShort,o,u,3);case"MMMM":return d(u,o);case"D":return e.$D;case"DD":return M.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return M.s(n,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return h(n,s,!0);case"A":return h(n,s,!1);case"m":return String(s);case"mm":return M.s(s,2,"0");case"s":return String(e.$s);case"ss":return M.s(e.$s,2,"0");case"SSS":return M.s(e.$ms,3,"0");case"Z":return a}return null}(t)||a.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(i,p,f){var h,m=this,_=M.p(p),g=w(i),b=(g.utcOffset()-this.utcOffset())*e,v=this-g,y=function(){return M.m(m,g)};switch(_){case d:h=y()/12;break;case u:h=y();break;case c:h=y()/3;break;case l:h=(v-b)/6048e5;break;case o:h=(v-b)/864e5;break;case s:h=v/r;break;case n:h=v/e;break;case a:h=v/t;break;default:h=v}return f?h:M.a(h)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return y[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=x(t,e,!0);return i&&(r.$L=i),r},g.clone=function(){return M.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},_}(),I=L.prototype;return w.prototype=I,[["$ms",i],["$s",a],["$m",n],["$H",s],["$W",o],["$M",u],["$y",d],["$D",p]].forEach((function(t){I[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,L,w),t.$i=!0),w},w.locale=x,w.isDayjs=k,w.unix=function(t){return w(1e3*t)},w.en=y[v],w.Ls=y,w.p={},w}))},9036:function(t,e,r){"use strict";r.d(e,{CD:function(){return b},JS:function(){return v},K1:function(){return c},NR:function(){return h},Rq:function(){return n},Vx:function(){return u},b9:function(){return y},cM:function(){return d},e3:function(){return l},gM:function(){return g},lO:function(){return a},no:function(){return _},od:function(){return p},rQ:function(){return s},sx:function(){return m},t5:function(){return o},zl:function(){return f}});var i=r(8430);function a(t){return(0,i.Z)({url:"/api/goods_skus",method:"get",params:t})}function n(t){return(0,i.Z)({url:"/api/goods",method:"post",data:t})}function s(t){return(0,i.Z)({url:`/api/goods_skus/${t}`,method:"get"})}function o(t){return(0,i.Z)({url:"/api/goods",method:"get",params:t})}function l(t,e){return(0,i.Z)({url:`/api/goods_skus/${t}`,method:"patch",data:e})}function u(t){return(0,i.Z)({url:"/api/batch/goods_skus",method:"patch",data:t})}function c(t,e){return(0,i.Z)({url:`/api/single/goods_skus/${t}`,method:"patch",data:e})}function d(t,e){return(0,i.Z)({url:"/api/upload",Headers:e,method:"post",data:t})}function p(t){return(0,i.Z)({url:"/api/goodsList",method:"get",params:t})}function f(t){return(0,i.Z)({url:"/api/goods_sku_location",method:"get",params:t})}function h(t){return(0,i.Z)({url:"/api/goodsSkusList",method:"get",params:{title:t}})}function m(){return(0,i.Z)({url:"/api/stock/goods_skus",method:"get"})}function _(t){return(0,i.Z)({url:"/api/goods/filter/"+t,method:"get"})}function g(t){return(0,i.Z)({url:"/api/goods_combination",method:"post",data:t})}function b(t){return(0,i.Z)({url:"/api/goods_combination",method:"get",params:t})}function v(t){return(0,i.Z)({url:"/api/goods_combination/"+t,method:"get"})}function y(t){return(0,i.Z)({url:"/api/batch/goods_skus",method:"patch",data:t})}},3550:function(t,e,r){"use strict";r.d(e,{EY:function(){return h},Fb:function(){return a},GI:function(){return s},JI:function(){return d},Js:function(){return l},Mo:function(){return p},S6:function(){return o},X2:function(){return n},iY:function(){return c},oK:function(){return f},qJ:function(){return u},zB:function(){return m},zo:function(){return _}});var i=r(8430);function a(t){return(0,i.Z)({url:"/api/supplier",method:"get",params:t})}function n(t){return(0,i.Z)({url:`/api/supplier/${t}`,method:"delete"})}function s(t){return(0,i.Z)({url:"/api/supplier",method:"post",data:t})}function o(t,e){return(0,i.Z)({url:`/api/supplier/${t}`,method:"patch",data:e})}function l(t){return(0,i.Z)({url:"/api/supplier/purchase_record",method:"get",params:t})}function u(t){return(0,i.Z)({url:"/api/purchase_record/purchase_batch_check",method:"post",data:t})}function c(t){return(0,i.Z)({url:"/api/purchase_record/purchase_batch_store",method:"post",data:t})}function d(t,e){return(0,i.Z)({url:`/api/supplier/purchase_record/${t}`,method:"patch",data:e})}function p(t){return(0,i.Z)({url:"/api/supplier/loss_record",method:"get",params:t})}function f(t){return(0,i.Z)({url:"/api/loss_record/loss_batch_store",method:"post",data:t})}function h(t,e){return(0,i.Z)({url:`/api/supplier/loss_record/${t}`,method:"patch",data:e})}function m(t){return(0,i.Z)({url:"/api/supplier/daily_stock_record",method:"get",params:t})}function _(t){return(0,i.Z)({url:"/api/daily_stock_record/inventory_batch_store",method:"post",data:t})}},2900:function(t,e,r){"use strict";r.d(e,{A0:function(){return c},AX:function(){return l},Lh:function(){return n},RF:function(){return s},Uy:function(){return a},f7:function(){return o},nO:function(){return u}});var i=r(8430);function a(){return(0,i.Z)({url:"/api/roles",method:"get"})}function n(t){return(0,i.Z)({url:"/api/users",method:"get",params:t})}function s(t){return(0,i.Z)({url:"/api/users",method:"post",data:t})}function o(t){return(0,i.Z)({url:`/api/users/${t}`,method:"get"})}function l(t,e){return(0,i.Z)({url:`/api/users/${t}`,method:"patch",data:e})}function u(t){return(0,i.Z)({url:"/api/website_message",method:"get",params:t})}function c(t,e){return(0,i.Z)({url:`/api/website_message/${t}`,method:"patch",data:e})}}}]);
//# sourceMappingURL=401.7b4eec34.js.map