mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
4 lines
23 KiB
JavaScript
Vendored
4 lines
23 KiB
JavaScript
Vendored
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-088acbde"],{"0a5a":function(t,e,o){"use strict";o.d(e,"a",(function(){return r})),o.d(e,"b",(function(){return a}));var n="admin_token";function r(){return localStorage.getItem("token")}function a(){return localStorage.removeItem(n)}},"23ba":function(t,e,o){"use strict";o.d(e,"e",(function(){return r})),o.d(e,"a",(function(){return a})),o.d(e,"f",(function(){return s})),o.d(e,"c",(function(){return i})),o.d(e,"d",(function(){return u})),o.d(e,"b",(function(){return d}));var n=o("adb5");function r(t){return Object(n["a"])({url:"/api/group",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/api/group",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/api/group/".concat(t),method:"get"})}function i(t,e){return Object(n["a"])({url:"/api/group/".concat(t),method:"patch",data:e})}function u(t){return Object(n["a"])({url:"/api/groupGoods",method:"get",params:t})}function d(t){return Object(n["a"])({url:"/api/groupGoods",method:"post",params:t})}},"323e":function(t,e,o){var n,r;
|
|
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
* @license MIT */(function(a,s){n=s,r="function"===typeof n?n.call(e,o,e,t):n,void 0===r||(t.exports=r)})(0,(function(){var t={version:"0.2.0"},e=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function o(t,e,o){return t<e?e:t>o?o:t}function n(t){return 100*(-1+t)}function r(t,o,r){var a;return a="translate3d"===e.positionUsing?{transform:"translate3d("+n(t)+"%,0,0)"}:"translate"===e.positionUsing?{transform:"translate("+n(t)+"%,0)"}:{"margin-left":n(t)+"%"},a.transition="all "+o+"ms "+r,a}t.configure=function(t){var o,n;for(o in t)n=t[o],void 0!==n&&t.hasOwnProperty(o)&&(e[o]=n);return this},t.status=null,t.set=function(n){var i=t.isStarted();n=o(n,e.minimum,1),t.status=1===n?null:n;var u=t.render(!i),d=u.querySelector(e.barSelector),l=e.speed,c=e.easing;return u.offsetWidth,a((function(o){""===e.positionUsing&&(e.positionUsing=t.getPositioningCSS()),s(d,r(n,l,c)),1===n?(s(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){s(u,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){t.remove(),o()}),l)}),l)):setTimeout(o,l)})),this},t.isStarted=function(){return"number"===typeof t.status},t.start=function(){t.status||t.set(0);var o=function(){setTimeout((function(){t.status&&(t.trickle(),o())}),e.trickleSpeed)};return e.trickle&&o(),this},t.done=function(e){return e||t.status?t.inc(.3+.5*Math.random()).set(1):this},t.inc=function(e){var n=t.status;return n?("number"!==typeof e&&(e=(1-n)*o(Math.random()*n,.1,.95)),n=o(n+e,0,.994),t.set(n)):t.start()},t.trickle=function(){return t.inc(Math.random()*e.trickleRate)},function(){var e=0,o=0;t.promise=function(n){return n&&"resolved"!==n.state()?(0===o&&t.start(),e++,o++,n.always((function(){o--,0===o?(e=0,t.done()):t.set((e-o)/e)})),this):this}}(),t.render=function(o){if(t.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var r=document.createElement("div");r.id="nprogress",r.innerHTML=e.template;var a,i=r.querySelector(e.barSelector),d=o?"-100":n(t.status||0),l=document.querySelector(e.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+d+"%,0,0)"}),e.showSpinner||(a=r.querySelector(e.spinnerSelector),a&&c(a)),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(r),r},t.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(e.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&c(t)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var o=t.shift();o&&o(e)}return function(o){t.push(o),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function o(t){return t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()}))}function n(e){var o=document.body.style;if(e in o)return e;var n,r=t.length,a=e.charAt(0).toUpperCase()+e.slice(1);while(r--)if(n=t[r]+a,n in o)return n;return e}function r(t){return t=o(t),e[t]||(e[t]=n(t))}function a(t,e,o){e=r(e),t.style[e]=o}return function(t,e){var o,n,r=arguments;if(2==r.length)for(o in e)n=e[o],void 0!==n&&e.hasOwnProperty(o)&&a(t,o,n);else a(t,r[1],r[2])}}();function i(t,e){var o="string"==typeof t?t:l(t);return o.indexOf(" "+e+" ")>=0}function u(t,e){var o=l(t),n=o+e;i(o,e)||(t.className=n.substring(1))}function d(t,e){var o,n=l(t);i(t,e)&&(o=n.replace(" "+e+" "," "),t.className=o.substring(1,o.length-1))}function l(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function c(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return t}))},6273:function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"10px"}},[o("el-form",{ref:"group",attrs:{rules:t.rules,model:t.group,"label-width":"80px"}},[o("el-form-item",{attrs:{label:"活动标题",prop:"title"}},[o("el-input",{staticStyle:{width:"500px"},attrs:{type:"textarea"},model:{value:t.group.title,callback:function(e){t.$set(t.group,"title",e)},expression:"group.title"}})],1),o("el-form-item",{attrs:{label:"团购商品"}},[o("el-button",{on:{click:function(e){return t.importGoods()}}},[t._v("从商品列表导入")]),o("el-input",{staticStyle:{"margin-left":"20px",width:"400px"},attrs:{placeholder:"搜索商品名称、编码"},model:{value:t.groupGoodsSearch.external_sku_id,callback:function(e){t.$set(t.groupGoodsSearch,"external_sku_id",e)},expression:"groupGoodsSearch.external_sku_id"}},[o("el-button",{attrs:{slot:"append"},on:{click:function(e){return t.getGroupGoodsList()}},slot:"append"},[t._v("查询")])],1),o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",{staticStyle:{"margin-right":"20px"}},[t._v("商品状态")]),o("el-radio-group",{on:{change:function(e){return t.getGroupGoodsList()}},model:{value:t.groupGoodsSearch.has_stock,callback:function(e){t.$set(t.groupGoodsSearch,"has_stock",e)},expression:"groupGoodsSearch.has_stock"}},[o("el-radio",{attrs:{label:0}},[t._v("全部")]),o("el-radio",{attrs:{label:1}},[t._v("在售中")]),o("el-radio",{attrs:{label:-1}},[t._v("已售罄")])],1)],1),o("div",{staticStyle:{display:"flex","align-items":"center"}},[o("span",{staticStyle:{"margin-right":"20px"}},[t._v("商品分类")]),o("el-radio-group",{attrs:{size:"small"},on:{change:function(e){return t.getGroupGoodsList()}},model:{value:t.groupGoodsSearch.type_id,callback:function(e){t.$set(t.groupGoodsSearch,"type_id",e)},expression:"groupGoodsSearch.type_id"}},[o("el-radio-button",{attrs:{label:"0"}},[t._v("全部")]),t._l(t.types,(function(e){return o("el-radio-button",{key:e.id,attrs:{label:e.id}},[t._v(" "+t._s(e.name))])}))],2)],1),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.groupLoading,expression:"groupLoading"}],ref:"multipleTableGroup",staticStyle:{width:"100%"},attrs:{data:t.groupGoods.data,border:"",height:"800","row-key":t.getRowKeys}},[o("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55"}}),o("el-table-column",{attrs:{prop:"goods_name",label:" 商品名称"}}),o("el-table-column",{attrs:{prop:"external_sku_id",label:"编码"}}),o("el-table-column",{attrs:{prop:"category_name",label:"分类"}}),o("el-table-column",{attrs:{prop:"stock",label:"库存"}}),o("el-table-column",{attrs:{label:"限购数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-input",{attrs:{placeholder:"限购数量"},on:{change:function(o){return t.handleCellChange(e.row)}},model:{value:e.row.limit_buy,callback:function(o){t.$set(e.row,"limit_buy",o)},expression:"scope.row.limit_buy"}})]}}])}),o("el-table-column",{attrs:{label:"价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-input",{attrs:{placeholder:"价格"},on:{change:function(o){return t.handleCellChange(e.row)}},model:{value:e.row.price_in_fen,callback:function(o){t.$set(e.row,"price_in_fen",o)},expression:"scope.row.price_in_fen"}})]}}])}),o("el-table-column",{attrs:{prop:"options",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{type:"text",size:"small"},on:{click:function(o){return t.remove(e.row)}}},[t._v("删除")])]}}])})],1),o("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center","line-height":"32px","margin-top":"20px"}},[o("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(e){return t.batchRemove()}}},[t._v("批量删除")]),o("el-pagination",{attrs:{"current-page":t.groupGoods.meta.current_page,"page-sizes":[20,30,50,100],"page-size":t.groupGoods.meta.per_page,layout:"sizes, prev, pager, next",total:t.groupGoods.meta.total},on:{"size-change":t.handleSizeChangeGroup,"current-change":t.getGroupGoodsList,"update:currentPage":function(e){return t.$set(t.groupGoods.meta,"current_page",e)},"update:current-page":function(e){return t.$set(t.groupGoods.meta,"current_page",e)}}})],1)],1),o("el-form-item",{attrs:{label:"团购时间",prop:"datetimerange"}},[o("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:t.group.datetimerange,callback:function(e){t.$set(t.group,"datetimerange",e)},expression:"group.datetimerange"}})],1),o("el-form-item",{staticStyle:{display:"flex","justify-content":"flex-end"}},[o("el-button",{attrs:{type:"success"},on:{click:function(e){return t.onEdit()}}},[t._v("修改团购")])],1)],1)],1),o("el-dialog",{attrs:{title:t.dialogTitle,visible:t.centerDialogVisible,width:"80%","close-on-click-modal":!1},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[o("el-form",{ref:"goodsList",attrs:{model:t.goodsList,"label-width":"80px"}},[o("el-form-item",{attrs:{label:"商品分类",prop:"type_id"}},[o("el-radio-group",{attrs:{size:"small"},on:{change:function(e){return t.goodsSearch()}},model:{value:t.goodsList.type_id,callback:function(e){t.$set(t.goodsList,"type_id",e)},expression:"goodsList.type_id"}},[o("el-radio-button",{attrs:{label:"0"}},[t._v("全部")]),t._l(t.types,(function(e){return o("el-radio-button",{key:e.id,attrs:{label:e.id}},[t._v(" "+t._s(e.name))])}))],2)],1),o("el-form-item",{attrs:{label:"商品品牌",prop:"brand_id"}},[o("el-radio-group",{attrs:{size:"small"},on:{change:function(e){return t.goodsSearch()}},model:{value:t.goodsList.brand_id,callback:function(e){t.$set(t.goodsList,"brand_id",e)},expression:"goodsList.brand_id"}},[o("el-radio-button",{attrs:{label:"0"}},[t._v("全部")]),t._l(t.brands,(function(e){return o("el-radio-button",{key:e.id,attrs:{label:e.id}},[t._v(" "+t._s(e.name))])}))],2)],1),o("el-form-item",{attrs:{label:"搜索",prop:"goods_keyword"}},[o("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"搜索商品名称、编码"},model:{value:t.goodsList.goods_keyword,callback:function(e){t.$set(t.goodsList,"goods_keyword",e)},expression:"goodsList.goods_keyword"}}),o("el-radio-group",{staticStyle:{margin:"0 30px"},model:{value:t.goodsList.has_stock,callback:function(e){t.$set(t.goodsList,"has_stock",e)},expression:"goodsList.has_stock"}},[o("el-radio",{attrs:{label:1}},[t._v("有库存")]),o("el-radio",{attrs:{label:0}},[t._v("全部")])],1),o("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.goodsSearch()}}},[t._v("查询")]),o("el-button",{attrs:{size:"small"},on:{click:function(e){return t.resetForm()}}},[t._v("重置")])],1)],1),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.goodsLoading,expression:"goodsLoading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.goods.data,border:"",height:"520","row-key":t.getRowKeys},on:{select:t.handleSelect,"select-all":t.selectCurrentGoods}},[o("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55"}}),o("el-table-column",{attrs:{label:"商品信息"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.goods.title+" "+e.row.title)+" ")]}}])}),o("el-table-column",{attrs:{label:"编码"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.goods.goods_code+"_"+e.row.sku_code)+" ")]}}])}),o("el-table-column",{attrs:{label:"品牌"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.goods.brand?e.row.goods.brand.name:"")+" ")]}}])}),o("el-table-column",{attrs:{prop:"goods.type.name",label:"分类"}}),o("el-table-column",{attrs:{prop:"stock",label:"库存"}})],1),o("div",{staticStyle:{display:"flex","flex-direction":"row-reverse","align-items":"center","margin-top":"10px"}},[o("el-pagination",{attrs:{"current-page":t.goods.meta.current_page,"page-sizes":[20,30,50,100],"page-size":t.goods.meta.per_page,layout:"sizes, prev, pager, next",total:t.goods.meta.total},on:{"size-change":t.handleSizeChange,"current-change":t.goodsSearch,"update:currentPage":function(e){return t.$set(t.goods.meta,"current_page",e)},"update:current-page":function(e){return t.$set(t.goods.meta,"current_page",e)}}})],1),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[o("div",[o("el-button",{on:{click:function(e){return t.toggleSelection(1)}}},[t._v("全选")]),o("el-button",{on:{click:function(e){return t.toggleSelection(0)}}},[t._v("取消全选")])],1),o("div",[t._v("已选 "+t._s(t.selectNum)+" 件")]),o("div",[o("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addGoods()}}},[t._v("确 定")]),o("el-button",{on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取 消")])],1)])])],1)],1)},r=[],a=(o("159b"),o("23ba")),s=o("6d71"),i=o("c40e"),u={data:function(){return{group:{title:"",is_save_preview:1,datetimerange:[],start_time:"",end_time:""},rules:{title:[{required:!0,message:"请输入活动标题",trigger:"blur"}],datetimerange:[{required:!0,message:"请选择团购时间",trigger:"blur"}]},groupGoods:{data:[],meta:{total:0,current_page:1,per_page:20}},groupGoodsSearch:{external_sku_id:"",has_stock:0,page:1,per_page:20,group_id:0,delete_ids:[],new_ids:[],type_id:0},groupLoading:!1,goodsLoading:!0,goods:{data:[],meta:{total:0,current_page:1,per_page:20}},centerDialogVisible:!1,types:[],brands:[],goodsList:{goods_keyword:"",has_stock:1,type_id:0,brand_id:0,delete_ids:[],new_ids:[],has_ids:[]},goodsListPage:{page:1,per_page:20},dialogTitle:"您的商品库中已有 0 件商品",selectNum:0,selectGoods:[],deleteGoods:[],allGoods:[],changeData:[]}},mounted:function(){this.groupGoodsSearch.group_id=parseInt(this.$route.query.id),this.getGoupInfo(this.$route.query.id),this.getGroupGoodsList(),this.getbrandType(),this.getgoodsType()},methods:{onEdit:function(){var t=this;this.group.new_ids=this.goodsList.has_ids;var e=[];this.changeData.forEach((function(t,o){t&&e.push(t)})),this.group.change_data=e,this.group.delete_ids=this.groupGoodsSearch.delete_ids,this.$refs.group.validate((function(e){if(!e)return!1;var o=t.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});Object(a["c"])(t.groupGoodsSearch.group_id,t.group).then((function(e){o.close(),t.$message(e.data.message),t.$router.push({path:"GROUP_MANAGEMENT"})}))}))},handleSizeChangeGroup:function(t){this.groupGoodsSearch.per_page=t,this.getGroupGoodsList()},getGroupGoodsList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.groupGoodsSearch.page=e,this.groupGoodsSearch.new_ids=this.goodsList.new_ids,Object(a["d"])(this.groupGoodsSearch).then((function(e){t.groupGoods=e.data,t.groupGoods.data.forEach((function(e,o){void 0!==t.changeData[e.id]&&(t.groupGoods.data[o].limit_buy=t.changeData[e.id].limit_buy,t.groupGoods.data[o].price_in_fen=t.changeData[e.id].price_in_fen)})),t.groupGoods.meta.per_page=parseInt(t.groupGoods.meta.per_page)}))},getGoupInfo:function(t){var e=this;Object(a["f"])(t).then((function(t){void 0===t.data.data.id?(e.$message.error("不可编辑!!!"),e.$router.push({path:"GROUP_MANAGEMENT"})):(e.group=t.data.data,e.group.datetimerange=[e.group.start_time,e.group.end_time])}))},getgoodsType:function(){var t=this,e={per_page:9999};Object(s["h"])(e).then((function(e){t.types=e.data.data}))},getbrandType:function(){var t=this,e={per_page:9999};Object(s["c"])(e).then((function(e){t.brands=e.data.data}))},batchRemove:function(){var t=this;this.$refs.multipleTableGroup.selection.forEach((function(e){t.groupGoodsSearch.delete_ids.push(e.id);var o=t.goodsList.has_ids.indexOf(e.id);o>0&&delete t.goodsList.has_ids[o]})),this.$refs.multipleTableGroup.clearSelection(),this.getGroupGoodsList()},remove:function(t){var e=this;this.groupGoodsSearch.delete_ids.push(t.id),this.goodsList.has_ids.forEach((function(o,n){o==t.id&&delete e.goodsList.has_ids[n]})),this.getGroupGoodsList()},handleCellChange:function(t){this.changeData[t.id]={id:t.id,limit_buy:t.limit_buy,price_in_fen:t.price_in_fen}},importGoods:function(){this.dialogTitle="您的商品库中已有 "+this.groupGoods.meta.total+" 件商品",this.goodsSearch(),this.centerDialogVisible=!0},goodsSearch:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.goodsList.page=e,this.goodsList.per_page=this.goodsListPage.per_page,this.goodsList.group_id=this.groupGoodsSearch.group_id,this.goodsList.delete_ids=this.groupGoodsSearch.delete_ids,this.goodsLoading=!0,Object(i["f"])(this.goodsList).then((function(e){t.goods=e.data,t.goods.meta.per_page=parseInt(t.goods.meta.per_page),t.goods.data.forEach((function(e,o){void 0!==t.selectGoods[e.id]&&t.$refs.multipleTable.toggleRowSelection(e,!0)})),t.goodsLoading=!1})),1===e&&this.getAllGoods(this.goodsList)},getAllGoods:function(t){var e=this;t.page=1,t.per_page=9999,Object(i["f"])(t).then((function(t){e.allGoods=t.data.data}))},handleSizeChange:function(t){this.goodsListPage.per_page=t,this.goodsSearch()},getRowKeys:function(t){return t.id},toggleSelection:function(t){var e=this;t?(this.allGoods.forEach((function(t,o){void 0===e.selectGoods[t.id]&&e.selectNum++,e.selectGoods[t.id]=1})),this.goods.data.forEach((function(t,o){e.$refs.multipleTable.toggleRowSelection(t,!0)}))):(this.allGoods.forEach((function(t,o){void 0!==e.selectGoods[t.id]&&(delete e.selectGoods[t.id],e.selectNum--)})),this.$refs.multipleTable.clearSelection())},handleSelect:function(t,e){void 0===this.selectGoods[e.id]?(this.selectGoods[e.id]=1,this.selectNum++):(delete this.selectGoods[e.id],this.selectNum--)},resetForm:function(){this.$refs.goodsList.resetFields(),this.goodsSearch()},addGoods:function(){var t=this;this.selectGoods.forEach((function(e,o){void 0!==o&&(t.goodsList.new_ids.push(o),t.goodsList.has_ids.push(o))})),this.getGroupGoodsList(),this.$refs.goodsList.resetFields(),this.$refs.multipleTable.clearSelection(),this.selectGoods=[],this.selectNum=0,this.centerDialogVisible=!1},selectCurrentGoods:function(t){var e=this;t.length?(t.forEach((function(t){void 0===e.selectGoods[t.id]&&(e.selectGoods[t.id]=1)})),this.selectNum+=t.length):(this.goods.data.forEach((function(t){void 0!==e.selectGoods[t.id]&&delete e.selectGoods[t.id]})),this.selectNum-=this.goods.data.length)}}},d=u,l=o("2877"),c=Object(l["a"])(d,n,r,!1,null,null,null);e["default"]=c.exports},"6d71":function(t,e,o){"use strict";o.d(e,"h",(function(){return r})),o.d(e,"e",(function(){return a})),o.d(e,"b",(function(){return s})),o.d(e,"g",(function(){return i})),o.d(e,"c",(function(){return u})),o.d(e,"d",(function(){return d})),o.d(e,"a",(function(){return l})),o.d(e,"f",(function(){return c}));var n=o("adb5");function r(t){return Object(n["a"])({url:"/api/goods_types",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/api/goods_types/".concat(t),method:"delete"})}function s(t){return Object(n["a"])({url:"/api/goods_types/",method:"post",data:t})}function i(t,e){return Object(n["a"])({url:"/api/goods_types/".concat(t),method:"patch",data:e})}function u(t){return Object(n["a"])({url:"/api/goods_brands",method:"get",params:t})}function d(t){return Object(n["a"])({url:"/api/goods_brands/".concat(t),method:"delete"})}function l(t){return Object(n["a"])({url:"/api/goods_brands",method:"post",data:t})}function c(t,e){return Object(n["a"])({url:"/api/goods_brands/".concat(t),method:"patch",data:e})}},a5d8:function(t,e,o){},adb5:function(t,e,o){"use strict";o("d3b7");var n=o("bc3a"),r=o.n(n),a=o("0a5a"),s=o("323e"),i=o.n(s),u=(o("a5d8"),o("5c96")),d=r.a.create({timeout:36e4});d.interceptors.request.use((function(t){return t.headers.Authorization="Bearer "+Object(a["a"])(),i.a.start(),t}),(function(t){return Promise.reject(t)})),d.interceptors.response.use((function(t){i.a.done();var e=t.status;if(200===e||201===e)return t}),(function(t){return i.a.done(),400===t.response.status&&Object(u["Message"])({message:t.response.data.errorMessage,type:"error"}),500===t.response.status&&Object(u["Message"])({message:t.response.data.message,type:"error"}),Promise.reject(t)})),e["a"]=d},c40e:function(t,e,o){"use strict";o.d(e,"h",(function(){return r})),o.d(e,"a",(function(){return a})),o.d(e,"c",(function(){return s})),o.d(e,"i",(function(){return i})),o.d(e,"o",(function(){return u})),o.d(e,"n",(function(){return d})),o.d(e,"m",(function(){return l})),o.d(e,"k",(function(){return c})),o.d(e,"f",(function(){return p})),o.d(e,"j",(function(){return g})),o.d(e,"g",(function(){return f})),o.d(e,"e",(function(){return h})),o.d(e,"b",(function(){return m})),o.d(e,"d",(function(){return b})),o.d(e,"l",(function(){return _}));var n=o("adb5");function r(t){return Object(n["a"])({url:"/api/goods_skus",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/api/goods",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/api/goods_skus/".concat(t),method:"get"})}function i(t){return Object(n["a"])({url:"/api/goods",method:"get",params:t})}function u(t,e){return Object(n["a"])({url:"/api/goods_skus/".concat(t),method:"patch",data:e})}function d(t){return Object(n["a"])({url:"/api/batch/goods_skus",method:"patch",data:t})}function l(t,e){return Object(n["a"])({url:"/api/single/goods_skus/".concat(t),method:"patch",data:e})}function c(t,e){return Object(n["a"])({url:"/api/upload",Headers:e,method:"post",data:t})}function p(t){return Object(n["a"])({url:"/api/goodsList",method:"get",params:t})}function g(t){return Object(n["a"])({url:"/api/goods_sku_location",method:"get",params:t})}function f(){return Object(n["a"])({url:"/api/stock/goods_skus",method:"get"})}function h(t){return Object(n["a"])({url:"/api/goods/filter/"+t,method:"get"})}function m(t){return Object(n["a"])({url:"/api/goods_combination",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/api/goods_combination",method:"get",params:t})}function _(t){return Object(n["a"])({url:"/api/goods_combination/"+t,method:"get"})}}}]);
|
|
//# sourceMappingURL=chunk-088acbde.4e79f6d0.js.map
|