admin-goodsManage-add.5fcb891b.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["admin-goodsManage-add"],{"01ea":function(t,e,r){"use strict";var a=r("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.getLevel=d,e.getCategory=p,e.getUsage=v,e.getFest=g,e.getOrderShop=y,r("96cf");var n=a(r("3b8d")),i=a(r("4360")),o=(a(r("267e")),a(r("ca00"))),s=r("caac"),u=r("d084"),c=r("b26e"),l=r("3a10");function d(t){return f.apply(this,arguments)}function f(){return f=(0,n.default)(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=i.default.getters.getLevel,o.default.isEmpty(r)||e){t.next=3;break}return t.abrupt("return",r);case 3:return t.next=5,(0,s.getList)().then((function(t){r=t.data,i.default.dispatch("setLevel",r)})).catch((function(){return!1}));case 5:return t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)}))),f.apply(this,arguments)}function p(t){return m.apply(this,arguments)}function m(){return m=(0,n.default)(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=i.default.getters.getCategory,o.default.isEmpty(r)||e){t.next=3;break}return t.abrupt("return",r);case 3:return t.next=5,(0,u.categoryListB)().then((function(t){r=t.data,i.default.dispatch("setCategory",r)})).catch((function(){return!1}));case 5:return t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)}))),m.apply(this,arguments)}function v(t){return h.apply(this,arguments)}function h(){return h=(0,n.default)(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=i.default.getters.getUsage,o.default.isEmpty(r)||e){t.next=3;break}return t.abrupt("return",r);case 3:return t.next=5,(0,u.usageListB)().then((function(t){r=t.data,i.default.dispatch("setUsage",r)})).catch((function(){return!1}));case 5:return t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)}))),h.apply(this,arguments)}function g(t){return b.apply(this,arguments)}function b(){return b=(0,n.default)(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=i.default.getters.getFest,o.default.isEmpty(r)||e){t.next=3;break}return t.abrupt("return",r);case 3:return t.next=5,(0,c.getFestList)().then((function(t){r=t.data,i.default.dispatch("setFest",r)})).catch((function(){return!1}));case 5:return t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)}))),b.apply(this,arguments)}function y(t){return C.apply(this,arguments)}function C(){return C=(0,n.default)(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=i.default.getters.getOrderShop,o.default.isEmpty(r)||e){t.next=3;break}return t.abrupt("return",r);case 3:return t.next=5,(0,l.orderRelate)().then((function(t){r=t.data,i.default.dispatch("setOrderShop",r)})).catch((function(){return!1}));case 5:return t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)}))),C.apply(this,arguments)}},"3a10":function(t,e,r){"use strict";var a=r("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.orderUpdatePrice=e.orderClass=e.updateSheet=e.orderReach=e.orderSend=e.printOrder=e.orderSendDet=e.freeShipping=e.getDetB=e.getListB=e.wxPay=e.balancePay=e.orderRelate=e.createOrder=e.comment=e.getDetail=e.getList=void 0;var n=a(r("14bf")),i=function(t){return n.default.get("/order/list",t)};e.getList=i;var o=function(t){return n.default.get("/order/detail",t)};e.getDetail=o;var s=function(t){return n.default.post("/order/comment",t)};e.comment=s;var u=function(t){return n.default.post("/order/create-order",t)};e.createOrder=u;var c=function(t){return n.default.get("/order/order-relate",t)};e.orderRelate=c;var l=function(t){return n.default.post("/order/balance-pay",t)};e.balancePay=l;var d=function(t){return n.default.post("/order/wx-pay",t)};e.wxPay=d;var f=function(t){return n.default.get("/order/list",t)};e.getListB=f;var p=function(t){return n.default.get("/order/detail",t)};e.getDetB=p;var m=function(t){return n.default.get("/order/without-send",t)};e.freeShipping=m;var v=function(t){return n.default.get("/order-send/detail",t)};e.orderSendDet=v;var h=function(t){return n.default.post("/order-send/print-order",t)};e.printOrder=h;var g=function(t){return n.default.post("/order-send/deliver",t)};e.orderSend=g;var b=function(t){return n.default.post("/order-send/reach",t)};e.orderReach=b;var y=function(t){return n.default.post("/order/update-sheet",t)};e.updateSheet=y;var C=function(t){return n.default.post("/order/classify",t)};e.orderClass=C;var w=function(t){return n.default.get("/order/update-price",t)};e.orderUpdatePrice=w},"3d33":function(t,e,r){var a=r("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/***\r\n全局scss 变量和方法 存放处\r\n */\n/* 引入minxin */\n/* 颜色变量 */\n/*图片地址*/\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.app-content[data-v-15220bd7]{min-height:calc(100vh - %?100?%);padding-bottom:%?100?%}.module-com[data-v-15220bd7]{margin-bottom:%?20?%;background-color:#fff;color:#666}.module-com .module-tit[data-v-15220bd7]{padding:%?20?% %?30?%;font-size:%?28?%}.module-com .module-det[data-v-15220bd7]{padding:0 %?30?%}.category-wrap[data-v-15220bd7]{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start;padding-bottom:0!important}.category-wrap .tui-input[data-v-15220bd7]{display:-webkit-box;display:flex;display:-webkit-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:wrap;flex-wrap:wrap}.category-wrap .tui-input .admin-button-com[data-v-15220bd7]{margin-right:%?20?%;margin-bottom:%?20?%}.summary-wrap .goods-summary[data-v-15220bd7]{height:%?400?%}.app-footer[data-v-15220bd7]{-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;justify-content:space-evenly}.app-footer .admin-button-com[data-v-15220bd7]{width:46%}',""]),t.exports=e},6703:function(t,e,r){"use strict";(function(t){var a=r("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r("8e6e"),r("20d6"),r("456d"),r("ac6a");var n=a(r("bd86")),i=r("2f62"),o=a(r("1861")),s=a(r("f4e1")),u=r("01ea"),c=r("d084");function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f=r("90f4"),p={name:"goods-add",components:{TuiListCell:o.default,AppUploader:s.default},data:function(){return{status:1,form:{goodsName:"",stock:"",price:"",categoryIdList:[],autoRise:"1",needSend:"0",freightType:"0",shopImg:[]}}},computed:d({},(0,i.mapGetters)({categoryData:"getCategory"})),onLoad:function(){},methods:{init:function(){var t=this;(0,u.getCategory)().then((function(){t.option.id&&t._getDet()}))},_getDet:function(){var t=this;return(0,c.getDetailB)({id:this.option.id}).then((function(e){t.$util.isEmpty(e.data)||Object.keys(t.form).forEach((function(r,a){t.form[r]=e.data[r]}))}))},confirmFn:function(){var t=this,e=this.option.id?c.updateB:c.addB,r=JSON.parse(JSON.stringify(this.form));r.shopImg=this.$util.imgSubstr(r.shopImg),e(d({status:this.status},r)).then((function(e){t.$msg("操作成功!")}))},selCategoryFn:function(e){var r=this.form.categoryIdList.findIndex((function(t){return t==e.id}));-1==r?this.form.categoryIdList.push(e.id):this.form.categoryIdList.splice(r,1),t.log(this.form.categoryIdList)},autoRiseChange:function(t){this.form.autoRise="0"==t?"1":"0"},needSendChange:function(t){this.form.needSend="0"==t?"1":"0"},freightChange:function(t){this.form.freightType=t.detail.value},formSubmit:function(t){var e=this,r=[{name:"goodsName",rule:["required"],msg:["请输入商品名"]}],a=t.detail.value,n=f.validation(a,r);n?this.$msg(n):setTimeout((function(){e.confirmFn()}))}}};e.default=p}).call(this,r("5a52")["default"])},"6cad":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-content"},[r("v-uni-form",{on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.formSubmit.apply(void 0,arguments)}}},[r("div",{staticClass:"module-com input-line-wrap"},[r("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[r("div",{staticClass:"tui-title required"},[t._v("名称")]),r("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"goodsName",placeholder:"请输入",maxlength:"50",type:"text"},model:{value:t.form.goodsName,callback:function(e){t.$set(t.form,"goodsName",e)},expression:"form.goodsName"}})],1),r("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[r("div",{staticClass:"tui-title"},[t._v("已售")]),r("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"sold",placeholder:"请输入",maxlength:"50",type:"number"},model:{value:t.form.sold,callback:function(e){t.$set(t.form,"sold",e)},expression:"form.sold"}})],1),r("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[r("div",{staticClass:"tui-title"},[t._v("库存")]),r("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"stock",placeholder:"请输入",maxlength:"50",type:"number"},model:{value:t.form.stock,callback:function(e){t.$set(t.form,"stock",e)},expression:"form.stock"}})],1),r("tui-list-cell",{staticClass:"line-cell category-wrap",attrs:{hover:!1}},[r("div",{staticClass:"tui-title"},[t._v("类型")]),r("div",{staticClass:"tui-input"},[t._l(t.categoryData,(function(e,a){return[r("v-uni-button",{key:a+"_0",staticClass:"admin-button-com",class:[t.form.categoryIdList.includes(e.id)?"":"default"],on:{click:function(r){arguments[0]=r=t.$handleEvent(r),t.selCategoryFn(e)}}},[t._v(t._s(e.categoryName||"暂无"))])]}))],2)]),r("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[r("div",{staticClass:"tui-title"},[t._v("价格")]),r("v-uni-input",{staticClass:"tui-input",attrs:{"placeholder-class":"phcolor",name:"price",placeholder:"请输入",maxlength:"50",type:"number"},model:{value:t.form.price,callback:function(e){t.$set(t.form,"price",e)},expression:"form.price"}}),r("div",{staticClass:"tui-prompt"},[t._v("元")])],1),r("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[r("div",{staticClass:"tui-title"},[t._v("节假日自动涨价")]),r("v-uni-label",{staticClass:"tui-input",attrs:{for:"autoPrice"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.autoRiseChange(t.form.autoRise)}}},[r("v-uni-checkbox",{staticClass:"ljd-checkbox",attrs:{id:"autoPrice",checked:1==t.form.autoRise}}),r("span",[t._v("需要")])],1)],1),r("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[r("div",{staticClass:"tui-title"},[t._v("配送方式")]),r("v-uni-label",{staticClass:"tui-input",attrs:{for:"autoPrice"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.needSendChange(t.form.needSend)}}},[r("v-uni-checkbox",{staticClass:"ljd-checkbox",attrs:{id:"autoPrice",checked:1==t.form.needSend},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.giftChange.apply(void 0,arguments)}}}),r("span",[t._v("到店自提")])],1)],1),r("tui-list-cell",{staticClass:"line-cell",attrs:{hover:!1}},[r("div",{staticClass:"tui-title"},[t._v("运费")]),r("v-uni-radio-group",{staticClass:"tui-input flex-center-between",on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.freightChange.apply(void 0,arguments)}}},[r("v-uni-label",{staticClass:"list",attrs:{for:"customLink"}},[r("v-uni-radio",{attrs:{id:"customLink",value:"0",checked:0==t.form.freightType}}),r("span",{staticClass:"checkbox-text"},[t._v("按距离收费")])],1),r("v-uni-label",{staticClass:"list",attrs:{for:"goodsLink"}},[r("v-uni-radio",{attrs:{id:"goodsLink",value:"1",checked:1==t.form.freightType}}),r("span",{staticClass:"checkbox-text"},[t._v("免运费")])],1)],1)],1)],1),r("div",{staticClass:"module-com input-line-wrap goods-wrap"},[r("div",{staticClass:"module-tit"},[r("span",[t._v("商品图片")]),r("span",{staticClass:"app-color-3"},[t._v("(最多上传4张)")])]),r("div",{staticClass:"module-det"},[r("app-uploader",{ref:"appUploader",attrs:{imgList:t.form.shopImg,isMain:!0,num:4},on:{"update:imgList":function(e){arguments[0]=e=t.$handleEvent(e),t.$set(t.form,"shopImg",e)},"update:img-list":function(e){arguments[0]=e=t.$handleEvent(e),t.$set(t.form,"shopImg",e)}}})],1)]),r("div",{staticClass:"module-com input-line-wrap summary-wrap"},[r("div",{staticClass:"module-tit"},[t._v("商品简介")]),r("div",{staticClass:"module-det",staticStyle:{"padding-bottom":"10px"}},[r("v-uni-textarea",{staticClass:"goods-summary",attrs:{"placeholder-class":"phcolor",placeholder:"请输入商品简介"},model:{value:t.form.briefContent,callback:function(e){t.$set(t.form,"briefContent",e)},expression:"form.briefContent"}})],1)]),r("div",{staticClass:"app-footer"},[r("v-uni-button",{staticClass:"admin-button-com middle default",attrs:{formType:"submit"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.status=1}}},[t._v("上架出售")]),r("v-uni-button",{staticClass:"admin-button-com middle blue",attrs:{formType:"submit"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.status=0}}},[t._v("加入仓库")])],1)])],1)},n=[];r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return n}))},caac:function(t,e,r){"use strict";var a=r("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.updateLevel=e.getList=void 0;var n=a(r("14bf")),i=function(t){return n.default.post("/merchant/member-level",t)};e.getList=i;var o=function(t){return n.default.post("/merchant/member-level-update",t)};e.updateLevel=o},cacd:function(t,e,r){"use strict";var a=r("f15d"),n=r.n(a);n.a},f15d:function(t,e,r){var a=r("3d33");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=r("4f06").default;n("114b51e5",a,!0,{sourceMap:!1,shadowMode:!1})},f749:function(t,e,r){"use strict";r.r(e);var a=r("6703"),n=r.n(a);for(var i in a)"default"!==i&&function(t){r.d(e,t,(function(){return a[t]}))}(i);e["default"]=n.a},fcd3:function(t,e,r){"use strict";r.r(e);var a=r("6cad"),n=r("f749");for(var i in n)"default"!==i&&function(t){r.d(e,t,(function(){return n[t]}))}(i);r("cacd");var o=r("f0c5"),s=Object(o["a"])(n["default"],a["a"],a["b"],!1,null,"15220bd7",null);e["default"]=s.exports}}]);