2 lines
30 KiB
JavaScript
Vendored
2 lines
30 KiB
JavaScript
Vendored
(self["webpackChunkerp"]=self["webpackChunkerp"]||[]).push([[267],{9402:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return g}});var n=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:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSearch.apply(null,arguments)}},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:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSearch.apply(null,arguments)}},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"},on:{change:function(e){return t.handleSearch()}},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:""},on:{change:function(e){return t.handleSearch()}},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,n){return e("div",{key:n,staticClass:"bgBox"},[e("div",{staticClass:"close",on:{click:function(e){return t.delItem(n)}}},[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(n,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(n,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)},i=[],a=(r(560),r(3550)),s=r(9669),o=r.n(s),u=r(2900),l=r(9036),c=r(7484),d=r.n(c),f={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,a.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,a.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,a.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,u.Lh)(t).then((t=>{this.usersList=t.data.data}))},getSupplierList(){let t={page:1,per_page:9999};(0,a.Fb)(t).then((t=>{this.supplierList=t.data.data}))},remoteMethod(t){""!==t?(this.searchLoading=!0,setTimeout((()=>{this.searchLoading=!1,(0,l.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,l.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()}},p=f,h=r(1001),m=(0,h.Z)(p,n,i,!1,null,"44368138",null),g=m.exports},7484:function(t){!function(e,r){t.exports=r()}(0,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",o="day",u="week",l="month",c="quarter",d="year",f="date",p="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,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])+"]"}},_=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},b={s:_,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+_(n,2,"0")+":"+_(i,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),i=e.clone().add(n,l),a=r-i<0,s=e.clone().add(n+(a?-1:1),l);return+(-(n+(r-i)/(a?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:d,w:u,d:o,D:f,h:s,m:a,s:i,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",v={};v[y]=g;var $="$isDayjsObject",k=function(t){return t instanceof L||!(!t||!t[$])},x=function t(e,r,n){var i;if(!e)return y;if("string"==typeof e){var a=e.toLowerCase();v[a]&&(i=a),r&&(v[a]=r,i=a);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var o=e.name;v[o]=e,i=o}return!n&&i&&(y=i),i||!n&&y},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 g(t){this.$L=x(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[$]=!0}var _=g.prototype;return _.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 n=e.match(h);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(e)}(t),this.init()},_.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()},_.$utils=function(){return M},_.isValid=function(){return!(this.$d.toString()===p)},_.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},_.isAfter=function(t,e){return w(t)<this.startOf(e)},_.isBefore=function(t,e){return this.endOf(e)<w(t)},_.$g=function(t,e,r){return M.u(t)?this[e]:this.set(r,t)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(t,e){var r=this,n=!!M.u(e)||e,c=M.p(t),p=function(t,e){var i=M.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?i:i.endOf(o)},h=function(t,e){return M.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},m=this.$W,g=this.$M,_=this.$D,b="set"+(this.$u?"UTC":"");switch(c){case d:return n?p(1,0):p(31,11);case l:return n?p(1,g):p(0,g+1);case u:var y=this.$locale().weekStart||0,v=(m<y?m+7:m)-y;return p(n?_-v:_+(6-v),g);case o:case f:return h(b+"Hours",0);case s:return h(b+"Minutes",1);case a:return h(b+"Seconds",2);case i:return h(b+"Milliseconds",3);default:return this.clone()}},_.endOf=function(t){return this.startOf(t,!1)},_.$set=function(t,e){var r,u=M.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[o]=c+"Date",r[f]=c+"Date",r[l]=c+"Month",r[d]=c+"FullYear",r[s]=c+"Hours",r[a]=c+"Minutes",r[i]=c+"Seconds",r[n]=c+"Milliseconds",r)[u],h=u===o?this.$D+(e-this.$W):e;if(u===l||u===d){var m=this.clone().set(f,1);m.$d[p](h),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},_.set=function(t,e){return this.clone().$set(t,e)},_.get=function(t){return this[M.p(t)]()},_.add=function(n,c){var f,p=this;n=Number(n);var h=M.p(c),m=function(t){var e=w(p);return M.w(e.date(e.date()+Math.round(t*n)),p)};if(h===l)return this.set(l,this.$M+n);if(h===d)return this.set(d,this.$y+n);if(h===o)return m(1);if(h===u)return m(7);var g=(f={},f[a]=e,f[s]=r,f[i]=t,f)[h]||1,_=this.$d.getTime()+n*g;return M.w(_,this)},_.subtract=function(t,e){return this.add(-1*t,e)},_.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=M.z(this),a=this.$H,s=this.$m,o=this.$M,u=r.weekdays,l=r.months,c=r.meridiem,d=function(t,r,i,a){return t&&(t[r]||t(e,n))||i[r].slice(0,a)},f=function(t){return M.s(a%12||12,t,"0")},h=c||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,(function(t,n){return n||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,l,3);case"MMMM":return d(l,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,u,2);case"ddd":return d(r.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(a);case"HH":return M.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return h(a,s,!0);case"A":return h(a,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 i}return null}(t)||i.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(n,f,p){var h,m=this,g=M.p(f),_=w(n),b=(_.utcOffset()-this.utcOffset())*e,y=this-_,v=function(){return M.m(m,_)};switch(g){case d:h=v()/12;break;case l:h=v();break;case c:h=v()/3;break;case u:h=(y-b)/6048e5;break;case o:h=(y-b)/864e5;break;case s:h=y/r;break;case a:h=y/e;break;case i:h=y/t;break;default:h=y}return p?h:M.a(h)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return v[this.$L]},_.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=x(t,e,!0);return n&&(r.$L=n),r},_.clone=function(){return M.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),I=L.prototype;return w.prototype=I,[["$ms",n],["$s",i],["$m",a],["$H",s],["$W",o],["$M",l],["$y",d],["$D",f]].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=v[y],w.Ls=v,w.p={},w}))},9036:function(t,e,r){"use strict";r.d(e,{CD:function(){return b},JS:function(){return y},K1:function(){return c},NR:function(){return h},Rq:function(){return a},Vx:function(){return l},b9:function(){return v},cM:function(){return d},e3:function(){return u},gM:function(){return _},lO:function(){return i},no:function(){return g},od:function(){return f},rQ:function(){return s},sx:function(){return m},t5:function(){return o},zl:function(){return p}});var n=r(8430);function i(t){return(0,n.Z)({url:"/api/goods_skus",method:"get",params:t})}function a(t){return(0,n.Z)({url:"/api/goods",method:"post",data:t})}function s(t){return(0,n.Z)({url:`/api/goods_skus/${t}`,method:"get"})}function o(t){return(0,n.Z)({url:"/api/goods",method:"get",params:t})}function u(t,e){return(0,n.Z)({url:`/api/goods_skus/${t}`,method:"patch",data:e})}function l(t){return(0,n.Z)({url:"/api/batch/goods_skus",method:"patch",data:t})}function c(t,e){return(0,n.Z)({url:`/api/single/goods_skus/${t}`,method:"patch",data:e})}function d(t,e){return(0,n.Z)({url:"/api/upload",Headers:e,method:"post",data:t})}function f(t){return(0,n.Z)({url:"/api/goodsList",method:"get",params:t})}function p(t){return(0,n.Z)({url:"/api/goods_sku_location",method:"get",params:t})}function h(t){return(0,n.Z)({url:"/api/goodsSkusList",method:"get",params:{title:t}})}function m(){return(0,n.Z)({url:"/api/stock/goods_skus",method:"get"})}function g(t){return(0,n.Z)({url:"/api/goods/filter/"+t,method:"get"})}function _(t){return(0,n.Z)({url:"/api/goods_combination",method:"post",data:t})}function b(t){return(0,n.Z)({url:"/api/goods_combination",method:"get",params:t})}function y(t){return(0,n.Z)({url:"/api/goods_combination/"+t,method:"get"})}function v(t){return(0,n.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 i},GI:function(){return s},JI:function(){return d},Js:function(){return u},Mo:function(){return f},S6:function(){return o},X2:function(){return a},iY:function(){return c},oK:function(){return p},qJ:function(){return l},zB:function(){return m},zo:function(){return g}});var n=r(8430);function i(t){return(0,n.Z)({url:"/api/supplier",method:"get",params:t})}function a(t){return(0,n.Z)({url:`/api/supplier/${t}`,method:"delete"})}function s(t){return(0,n.Z)({url:"/api/supplier",method:"post",data:t})}function o(t,e){return(0,n.Z)({url:`/api/supplier/${t}`,method:"patch",data:e})}function u(t){return(0,n.Z)({url:"/api/supplier/purchase_record",method:"get",params:t})}function l(t){return(0,n.Z)({url:"/api/purchase_record/purchase_batch_check",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/api/purchase_record/purchase_batch_store",method:"post",data:t})}function d(t,e){return(0,n.Z)({url:`/api/supplier/purchase_record/${t}`,method:"patch",data:e})}function f(t){return(0,n.Z)({url:"/api/supplier/loss_record",method:"get",params:t})}function p(t){return(0,n.Z)({url:"/api/loss_record/loss_batch_store",method:"post",data:t})}function h(t,e){return(0,n.Z)({url:`/api/supplier/loss_record/${t}`,method:"patch",data:e})}function m(t){return(0,n.Z)({url:"/api/supplier/daily_stock_record",method:"get",params:t})}function g(t){return(0,n.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 u},Lh:function(){return a},RF:function(){return s},Uy:function(){return i},f7:function(){return o},nO:function(){return l}});var n=r(8430);function i(){return(0,n.Z)({url:"/api/roles",method:"get"})}function a(t){return(0,n.Z)({url:"/api/users",method:"get",params:t})}function s(t){return(0,n.Z)({url:"/api/users",method:"post",data:t})}function o(t){return(0,n.Z)({url:`/api/users/${t}`,method:"get"})}function u(t,e){return(0,n.Z)({url:`/api/users/${t}`,method:"patch",data:e})}function l(t){return(0,n.Z)({url:"/api/website_message",method:"get",params:t})}function c(t,e){return(0,n.Z)({url:`/api/website_message/${t}`,method:"patch",data:e})}},4328:function(t,e,r){"use strict";var n=r(5290),i=r(7578),a=r(6310),s=function(t){return function(e,r,s){var o,u=n(e),l=a(u),c=i(s,l);if(t&&r!==r){while(l>c)if(o=u[c++],o!==o)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===r)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},5649:function(t,e,r){"use strict";var n=r(7697),i=r(2297),a=TypeError,s=Object.getOwnPropertyDescriptor,o=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=o?function(t,e){if(i(t)&&!s(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},8758:function(t,e,r){"use strict";var n=r(6812),i=r(9152),a=r(2474),s=r(2560);t.exports=function(t,e,r){for(var o=i(e),u=s.f,l=a.f,c=0;c<o.length;c++){var d=o[c];n(t,d)||r&&n(r,d)||u(t,d,l(e,d))}}},5565:function(t){"use strict";var e=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw e("Maximum allowed index exceeded");return t}},2739:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:function(t,e,r){"use strict";var n=r(9037),i=r(2474).f,a=r(5773),s=r(1880),o=r(5014),u=r(8758),l=r(5266);t.exports=function(t,e){var r,c,d,f,p,h,m=t.target,g=t.global,_=t.stat;if(c=g?n:_?n[m]||o(m,{}):n[m]&&n[m].prototype,c)for(d in e){if(p=e[d],t.dontCallGetSet?(h=i(c,d),f=h&&h.value):f=c[d],r=l(g?d:m+(_?".":"#")+d,t.forced),!r&&void 0!==f){if(typeof p==typeof f)continue;u(p,f)}(t.sham||f&&f.sham)&&a(p,"sham",!0),s(c,d,p,t)}}},4413:function(t,e,r){"use strict";var n=r(8844),i=r(3689),a=r(6648),s=Object,o=n("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===a(t)?o(t,""):s(t)}:s},2297:function(t,e,r){"use strict";var n=r(6648);t.exports=Array.isArray||function(t){return"Array"===n(t)}},5266:function(t,e,r){"use strict";var n=r(3689),i=r(9985),a=/#|\.prototype\./,s=function(t,e){var r=u[o(t)];return r===c||r!==l&&(i(e)?n(e):!!e)},o=s.normalize=function(t){return String(t).replace(a,".").toLowerCase()},u=s.data={},l=s.NATIVE="N",c=s.POLYFILL="P";t.exports=s},6310:function(t,e,r){"use strict";var n=r(3126);t.exports=function(t){return n(t.length)}},8828:function(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},2474:function(t,e,r){"use strict";var n=r(7697),i=r(2615),a=r(9556),s=r(5684),o=r(5290),u=r(8360),l=r(6812),c=r(8506),d=Object.getOwnPropertyDescriptor;e.f=n?d:function(t,e){if(t=o(t),e=u(e),c)try{return d(t,e)}catch(r){}if(l(t,e))return s(!i(a.f,t,e),t[e])}},2741:function(t,e,r){"use strict";var n=r(4948),i=r(2739),a=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,a)}},7518:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},4948:function(t,e,r){"use strict";var n=r(8844),i=r(6812),a=r(5290),s=r(4328).indexOf,o=r(7248),u=n([].push);t.exports=function(t,e){var r,n=a(t),l=0,c=[];for(r in n)!i(o,r)&&i(n,r)&&u(c,r);while(e.length>l)i(n,r=e[l++])&&(~s(c,r)||u(c,r));return c}},9556:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},9152:function(t,e,r){"use strict";var n=r(6058),i=r(8844),a=r(2741),s=r(7518),o=r(5027),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=a.f(o(t)),r=s.f;return r?u(e,r(t)):e}},7578:function(t,e,r){"use strict";var n=r(8700),i=Math.max,a=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):a(r,e)}},5290:function(t,e,r){"use strict";var n=r(4413),i=r(4684);t.exports=function(t){return n(i(t))}},8700:function(t,e,r){"use strict";var n=r(8828);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},3126:function(t,e,r){"use strict";var n=r(8700),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},560:function(t,e,r){"use strict";var n=r(9989),i=r(690),a=r(6310),s=r(5649),o=r(5565),u=r(3689),l=u((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},d=l||!c();n({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=i(this),r=a(e),n=arguments.length;o(r+n);for(var u=0;u<n;u++)e[r]=arguments[u],r++;return s(e,r),r}})}}]);
|
||
//# sourceMappingURL=267.fb84098f.js.map
|