admin-itemClass-list.7f1ff88d.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["admin-itemClass-list"],{"06e8":function(t,e,a){var i=a("5acd");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/***\n全局scss 变量和方法 存放处\n */\n/* 引入minxin */\n/* 颜色变量 */\n/*图片地址*/\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.app-content[data-v-04c513aa]{min-height:calc(100vh - %?100?%);padding-bottom:%?100?%}.list-wrap[data-v-04c513aa]{position:relative;background-color:#fff}.list-wrap .list[data-v-04c513aa]{height:%?130?%;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;margin:0 %?30?% 0 %?30?%;color:#999;border-bottom:%?1?% solid #eee}.list-wrap .list .list-index[data-v-04c513aa]{width:%?80?%}.list-wrap .list .list-img img[data-v-04c513aa]{height:100%}.list-wrap .list .list-det[data-v-04c513aa]{width:calc(100% - %?50?%);margin-left:%?10?%}.list-wrap .list .list-det > div[data-v-04c513aa]{margin-top:%?14?%}.list-wrap .list .list-det > div[data-v-04c513aa]:first-child{margin-top:0}.list-wrap .list .list-det .list-operate[data-v-04c513aa]{display:-webkit-box;display:flex;display:-webkit-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.list-wrap .list .list-det .list-operate .operate-det > span[data-v-04c513aa]{margin-left:%?60?%}.list-wrap .list .list-det .list-operate .operate-det > span[data-v-04c513aa]:first-child{margin-left:0}.list-wrap .list .list-det .list-operate .add-price[data-v-04c513aa]{text-decoration:underline;font-size:%?30?%;margin-left:%?10?%}.list-wrap .list .list-det .list-operate .operate-icon[data-v-04c513aa]{margin-left:%?30?%}.app-footer[data-v-04c513aa]{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.app-footer .admin-button-com[data-v-04c513aa]{width:%?200?%;margin-right:%?30?%}.modify-modal .prompt-text[data-v-04c513aa]{color:red;position:relative;right:%?52?%;bottom:%?24?%}.modify-modal .line-label[data-v-04c513aa]{width:%?140?%;-webkit-flex-shrink:0;flex-shrink:0}.modify-modal .switch-wrap[data-v-04c513aa]{margin-top:%?30?%}',""]),t.exports=e},"285c":function(t,e,a){"use strict";a.r(e),a.d(e,"default",(function(){return l}));var i=a("1b0c");function n(t){if(Array.isArray(t))return Object(i["a"])(t)}function o(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}var r=a("3602");function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){return n(t)||o(t)||Object(r["a"])(t)||s()}},"2e69":function(t,e,a){"use strict";var i=a("d669");a("589a"),a("b1d8"),a("e978"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(a("6c85"));a("0bb3");var o=i(a("da6a")),r=i(a("3a8f")),s=i(a("f4e1")),l=i(a("c563")),c=i(a("c078")),d=a("1b62"),u=a("d5b9");a("7adc");function p(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function f(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?p(Object(a),!0).forEach((function(e){(0,n.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):p(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}e.default={name:"item-class-list",components:{ModalModule:r.default,AppUploader:s.default,OperateModule:l.default,AppWrapperEmpty:c.default},mixins:[d.list],data:function(){return{modifyModal:!1,modifyTitle:"添加",replaceForm:{name:"",id:0,inTurn:100},delModal:!1,operateShow:!1,operateData:{},operateIndex:null,operateTop:0}},computed:{btnData:function(){var t=this;return[{text:"编辑",icon:"iconbianji",click:function(){t.modifyModal=!0,t.modifyTitle="编辑",t.modifyForm={name:t.operateData.name,id:t.operateData.id,inTurn:t.operateData.inTurn}}},{text:"删除",icon:"iconshanchu1",click:function(){t.delModal=!0}}]}},onPullDownRefresh:function(){this.resetList(),this._list().then((function(t){uni.stopPullDownRefresh()}))},onReachBottom:function(){this.list.finished?uni.stopPullDownRefresh():this._list().then((function(t){uni.stopPullDownRefresh()}))},onLoad:function(){},methods:{editItem:function(t){this.modifyModal=!0,this.modifyTitle="编辑",this.replaceForm={id:t.id,name:t.name,inTurn:t.inTurn}},operateList:function(t){0===t?(this.modifyModal=!0,this.modifyTitle="编辑",this.replaceForm={id:this.operateData.id,name:this.operateData.name,inTurn:this.operateData.inTurn}):1===t&&(this.delModal=!0)},init:function(){var t=(0,o.default)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this._list();case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),_list:function(){var t=this;return(0,u.getList)({page:this.list.page}).then((function(e){t.completes(e)}))},replaceClass:function(){var t=this;if(!this.replaceForm.name)return this.$msg("请填写分类名称"),!1;var e=0==this.replaceForm.id?u.addClass:u.updateClass,a=JSON.parse(JSON.stringify(this.replaceForm));e(f({},a)).then((function(e){t.$msg("操作成功"),t.modalCancel(),t.operateCancle(),setTimeout((function(){t.resetList(),t._list()}),1e3)}))},addCategoryFn:function(){this.resetForm(),this.modifyModal=!0,this.modifyTitle="新增"},resetForm:function(){this.replaceForm={name:"",inTurn:0,id:0}},replaceModalClick:function(t){0===t.index?this.modalCancel():this.replaceClass()},modalCancel:function(){this.delModal=!1,this.modifyModal=!1},switchChangeFn:function(t){this.replaceForm.status=t.detail.value?1:0},delModalClick:function(t){0===t.index?this.modalCancel():uni.showToast({title:"开发中",duration:2e3,icon:"none"})},operateFn:function(t,e,a){this.operateData=t,this.operateIndex=e,this.operateShow=!0,this.operateTop=a.currentTarget.offsetTop},operateCancle:function(){this.operateData={},this.operateIndex=null,this.operateShow=!1},globalClick:function(){this.operateCancle()},changeStatusFn:function(){uni.showToast({title:"开发中",duration:2e3,icon:"none"})}}}},"352e":function(t,e,a){var i=a("06e8");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("47af").default;n("c8a12d1a",i,!0,{sourceMap:!1,shadowMode:!1})},"7adc":function(t,e,a){"use strict";var i=a("d669");Object.defineProperty(e,"__esModule",{value:!0}),e.updateProduct=e.py=e.pxClassUpdate=e.pxClassDetail=e.pxClassDel=e.pxClassAdd=e.productList=e.print=e.getPxClassDataApi=e.getProductDetail=e.getProductDataApi=e.getGoodsDataApi=e.getGhsProductListV2=e.getGhsProductList=e.getGhsProductDetail=e.getAllProductDataApi=e.generatePriceTable=e.changePriceByIdApi=e.batchChangePrice=e.batchChangeAddPrice=e.autoPriceByIdApi=e.addProduct=void 0;var n=i(a("14bf"));e.print=function(t){return n.default.get("/product/print",t)},e.batchChangeAddPrice=function(t){return n.default.post("/product/batch-change-add-price",t)},e.productList=function(t){return n.default.get("/product/list",t)},e.py=function(t){return n.default.get("/product/py",t)},e.getGhsProductDetail=function(t){return n.default.get("/product/ghs-product-detail",t)},e.getProductDataApi=function(t){return n.default.get("/product/index",t)},e.getAllProductDataApi=function(t){return n.default.get("/product/list",t)},e.autoPriceByIdApi=function(t){return n.default.post("/product/auto-price",t)},e.addProduct=function(t){return n.default.post("/product/add",t)},e.updateProduct=function(t){return n.default.post("/product/update",t)},e.changePriceByIdApi=function(t){return n.default.post("/product/change-price",t)},e.getPxClassDataApi=function(t){return n.default.get("/px-class/list",t)},e.getGoodsDataApi=function(t){return n.default.get("/goods/index",t)},e.pxClassDetail=function(t){return n.default.get("/px-class/detail",t)},e.pxClassUpdate=function(t){return n.default.get("/px-class/update",t)},e.pxClassAdd=function(t){return n.default.get("/px-class/add",t)},e.pxClassDel=function(t){return n.default.get("/px-class/del",t)},e.getGhsProductList=function(t){return n.default.get("/product/ghs-item",t)},e.getGhsProductListV2=function(t){return n.default.get("/product/ghs-item-v2",t)},e.getProductDetail=function(t){return n.default.get("/product/detail",t)},e.batchChangePrice=function(t){return n.default.post("/product/batch-change-price",t)},e.generatePriceTable=function(t){return n.default.get("/product/generate-price-table",t)}},"970a":function(t,e,a){"use strict";a.r(e);var i=a("f2e8"),n=a("97e9");for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("be23");var r,s=a("8aaf"),l=Object(s["a"])(n["default"],i["b"],i["c"],!1,null,"04c513aa",null,!1,i["a"],r);e["default"]=l.exports},"97e9":function(t,e,a){"use strict";a.r(e);var i=a("2e69"),n=a.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},be23:function(t,e,a){"use strict";var i=a("352e"),n=a.n(i);n.a},d5b9:function(t,e,a){"use strict";var i=a("d669");Object.defineProperty(e,"__esModule",{value:!0}),e.updateClass=e.getList=e.getAllItemClass=e.addClass=void 0;var n=i(a("14bf"));e.getList=function(t){return n.default.get("/item-class/list",t)},e.addClass=function(t){return n.default.post("/item-class/add",t)},e.updateClass=function(t){return n.default.post("/item-class/update",t)},e.getAllItemClass=function(t){return n.default.get("/item-class/all",t)}},f2e8:function(t,e,a){"use strict";var i;a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-content",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.globalClick.apply(void 0,arguments)}}},[a("div",{staticClass:"list-wrap"},[t.$util.isEmpty(t.list.data)?[a("app-wrapper-empty",{attrs:{title:"暂无数据","is-empty":t.$util.isEmpty(t.list.data)}})]:[t._l(t.list.data,(function(e,i){return a("div",{key:i,staticClass:"list"},[a("div",{staticClass:"list-index"},[t._v(t._s(e.id))]),a("div",{staticClass:"list-det"},[a("div",{staticClass:"app-size-28 app-color-0"},[t._v(t._s(e.name||""))]),a("div",{staticClass:"list-operate"},[a("div",{staticClass:"operate-det"},[a("span",[t._v("序号:"+t._s(e.inTurn))])]),a("v-uni-text",{staticClass:"add-price",on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a),t.pageTo("/admin/itemClass/addPrice?classId="+e.id)}}},[t._v("加价")]),a("v-uni-text",{staticClass:"add-price",on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a),t.pageTo("/admin/itemClass/more?classId="+e.id)}}},[t._v("排序")]),a("div",{staticClass:"operate-icon",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.editItem(e)}}},[a("i",{staticClass:"iconfont",class:[(t.operateIndex,"iconbianji")],staticStyle:{"font-size":"38upx"}})])],1)])])})),t.operateShow?a("operate-module",{attrs:{top:t.operateTop,right:30,btnData:t.btnData},on:{clickFn:function(e){arguments[0]=e=t.$handleEvent(e),t.operateList.apply(void 0,arguments)}}}):t._e()]],2),a("div",{staticClass:"app-footer"},[a("v-uni-button",{staticClass:"admin-button-com middle blue",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.addCategoryFn.apply(void 0,arguments)}}},[t._v("添加分类")])],1),a("modal-module",{attrs:{show:t.modifyModal,maskClosable:!1,title:t.modifyTitle,padding:"30rpx 30rpx"},on:{cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.modalCancel.apply(void 0,arguments)},click:function(e){arguments[0]=e=t.$handleEvent(e),t.replaceModalClick.apply(void 0,arguments)}},scopedSlots:t._u([{key:"content",fn:function(){return[a("div",{staticClass:"app-modal-input-wrap modify-modal"},[a("div",{staticClass:"inp-list-line"},[a("div",{staticClass:"line-label"},[t._v("名称")]),a("div",{staticClass:"line-input"},[a("v-uni-input",{staticClass:"inp-input",attrs:{type:"text","adjust-position":!1,placeholder:"请填写"},model:{value:t.replaceForm.name,callback:function(e){t.$set(t.replaceForm,"name",e)},expression:"replaceForm.name"}})],1)]),a("div",{staticClass:"inp-list-line"},[a("div",{staticClass:"line-label"},[t._v("顺序")]),a("div",{staticClass:"line-input"},[a("v-uni-input",{staticClass:"inp-input",attrs:{type:"number","adjust-position":!1,placeholder:"越大越靠前"},on:{focus:function(e){arguments[0]=e=t.$handleEvent(e),t.replaceForm.inTurn=""}},model:{value:t.replaceForm.inTurn,callback:function(e){t.$set(t.replaceForm,"inTurn",e)},expression:"replaceForm.inTurn"}})],1)])])]},proxy:!0}])}),a("modal-module",{attrs:{show:t.delModal,maskClosable:!1,content:"确定删除?",color:"#333",size:32,padding:"30rpx 30rpx"},on:{cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.modalCancel.apply(void 0,arguments)},click:function(e){arguments[0]=e=t.$handleEvent(e),t.delModalClick.apply(void 0,arguments)}}})],1)},o=[]}}]);