You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rcgy_xmf_qrcode/js/chunk-9dab12da.e7aff1b8.js.map

1 line
41 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"version":3,"sources":["webpack:///./src/views/commodity/page/commodityManagement.vue","webpack:///src/views/commodity/page/commodityManagement.vue","webpack:///./src/views/commodity/page/commodityManagement.vue?dcf8","webpack:///./src/views/commodity/page/commodityManagement.vue?e157","webpack:///./src/api/shop.js"],"names":["render","_vm","this","_c","_self","staticClass","_m","attrs","on","$event","add","_v","ref","config","tableCheck","slot","handleClick","model","value","activeName","callback","$$v","expression","sploading","table_row","unloading","del","add_vrisible","addClose","staticStyle","addForm","addRuleSuccess","scopedSlots","_u","key","fn","remoteMethod","loading","change","sefocus","ruleForm","supplierId","$set","_l","supplierOptions","item","id","name","proxy","category","cateOptions","$baseUrl","ImgeSuccess","imglist","handleExceed","beforeAvatarUpload","addSubmit","staticRenderFns","data","addDate","imgUrls","rules","required","message","trigger","categoryId","title","recommend","detail","sellingPrice","markingPrice","stock","status","arrivalTime","form_item","type","label","placeholder","width","prop","slotName","options","thead","table_data","url","search_item","startDate","endDate","pageNum","size","methods","getUserList","shopSupplierList","console","shopCategoryList","parentId","res","sChange","shopGoodsInsert","shopGoodsLoading","shopGoodsUnloading","arr","confirmButtonText","cancelButtonText","confirmButtonClass","cancelButtonClass","then","catch","action","files","component","shopSupplierInsert","service","request","method","params","orderArrivalGoods","shopCategoryUpdate","shopCategoryDelete","shopCategoryInsert","shopOrderDeliverGoods","refundExchangeGoods","shopRefundExamine","shopEvaluationReply"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACJ,EAAIK,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AD,cACA,CAAAF,WAAAG,aAAAD,cACA,CAAAF,YAAAG,oBAAAD,cACA,CACAF,WACAG,cACAD,aACAH,gBACAvD,cACA,iBACA,OACA,WAEA,OACA,cAKA,CAAAwD,aAAAG,kBAAAD,cAEAK,cACAC,oBACAC,aACA,CACAV,aACAC,aACAC,kBACAE,aAEA,CACAJ,aACAC,aACAC,kBACAE,cAEA,CACAJ,cACAC,WACAC,kBACA3D,WACA+D,SACA,CAAA/D,QAAA0D,YACA,CAAA1D,QAAA0D,aAEAG,eAEA,CACAJ,cACAC,aACAC,kBACAE,YACAO,4BACAC,wBACAT,gBAIApB,MACA8B,UACAC,YAKAC,SACAC,eACA,OACAH,UACAC,SAEA,gBACAG,2BACAC,eACA,iCACA,kBAEAC,gBAAAC,aAAA,SAEA,wBAEA,mBAGA3D,gBACA,qBAEAG,UACA,oBAEAD,UACAuD,eACA,qCACA,OACAE,YAEAD,2BACAD,eACAG,mBACA,OACA9E,WACA0D,cAEA,4CAEAiB,+CACA,mBAIAI,WACAJ,eACA,qCACA,OACAE,YAEAD,2BACAD,eAEAG,wBACA,OACA9E,WACA0D,oBAEA,4CAEAiB,+CACA,mBAGAnF,MACA,sBAGAkB,WACA,2BACA,qBACA,mCAEAG,iBACA,UACA,uBAEAmE,2BACA,WACA,eACAnC,kBACAY,iBAEA,4BACA,oBAIAnB,YACA,iCAGAjC,aACA,WACA,gCAGA,SAIA,eACA,eACAwC,eACAY,eAGAwB,gBAAArD,aAAA,SACA+C,eACA,WACA,eACA9B,kBACAY,iBAEA,+BAhBA,4BAsBAlD,aACAoE,qBACA,WACA,gCAGA,SAIAO,gBAAAtD,aAAA,SACA+C,eACA,WACA,eACA9B,kBACAY,iBAEA,+BAVA,4BAgBA3D,iBACA,WAEAwD,EADA,mBACAA,gBAEAA,KAEA,SACAgB,UACAC,QACAjB,UAEA,iCAGA9C,OACA,aACA,SACA,wCACA2E,6BAEA,oCACAC,uBACAC,sBACAC,mCACAC,mCAEAC,KAAA,KACA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sB9D,GAClC,OAAOsD,OAAQC,QAAQ,CACnBC,OAAO,OACP9B,IAAI,0BACJ1B,KAAMA,IAIP,SAAS+D,EAAoB/D,GAChC,OAAOsD,OAAQC,QAAQ,CACnBC,OAAO,MACP9B,IAAI,4BACJ+B,OAAOzD,IAIR,SAASgE,EAAkBhE,GAC9B,OAAOsD,OAAQC,QAAQ,CACnBC,OAAO,OACP9B,IAAI,sBACJ1B,KAAMA,IAIP,SAASiE,EAAoBjE,GAChC,OAAOsD,OAAQC,QAAQ,CACnBC,OAAO,OACP9B,IAAI,wBACJ1B,KAAMA","file":"js/chunk-9dab12da.e7aff1b8.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',{staticClass:\"main-content\"},[_vm._m(0),_c('div',{staticClass:\"content\"},[_c('div',{staticClass:\"content-btn\"},[_c('el-button',{staticClass:\"init-button\",attrs:{\"icon\":\"el-icon-plus\"},on:{\"click\":function($event){return _vm.add()}}},[_vm._v(\"商品创建\")])],1),_c('div',{},[_c('VueTable',{ref:\"table\",attrs:{\"config\":_vm.config},on:{\"tableCheck\":_vm.tableCheck}},[_c('template',{slot:\"tabs\"},[_c('el-tabs',{on:{\"tab-click\":_vm.handleClick},model:{value:(_vm.activeName),callback:function ($$v) {_vm.activeName=$$v},expression:\"activeName\"}},[_c('el-tab-pane',{attrs:{\"label\":\"全部\",\"name\":\"0\"}}),_c('el-tab-pane',{attrs:{\"label\":\"已上架\",\"name\":\"1\"}}),_c('el-tab-pane',{attrs:{\"label\":\"已下架\",\"name\":\"2\"}})],1)],1),_c('template',{slot:\"footer\"},[_c('div',{staticClass:\"table-footer\"},[_c('button',{on:{\"click\":function($event){return _vm.sploading(_vm.table_row)}}},[_vm._v(\" 上架 \")]),_c('button',{on:{\"click\":function($event){return _vm.unloading(_vm.table_row)}}},[_vm._v(\" 下架 \")]),_c('button',{on:{\"click\":function($event){return _vm.del(_vm.table_row)}}},[_vm._v(\"删除\")])])])],2)],1),_c('Drawer',{attrs:{\"drawerTitle\":\"商品创建\",\"drawerVrisible\":_vm.add_vrisible},on:{\"drawerClose\":_vm.addClose}},[_c('div',{staticStyle:{\"padding\":\"30px\"}},[_c('FromCard',[_c('template',{slot:\"title\"},[_vm._v(\"填写商品信息\")]),[_c('VueForm',{ref:\"addForm\",attrs:{\"formObj\":_vm.addForm},on:{\"ruleSuccess\":_vm.addRuleSuccess},scopedSlots:_vm._u([{key:\"supplierId\",fn:function(){return [_c('el-select',{staticStyle:{\"width\":\"240px\"},attrs:{\"remote-method\":_vm.remoteMethod,\"loading\":_vm.loading,\"remote\":\"\",\"filterable\":\"\",\"placeholder\":\"请选择\"},on:{\"change\":_vm.change,\"focus\":_vm.sefocus},model:{value:(\n _vm.addForm.ruleForm.supplierId\n ),callback:function ($$v) {_vm.$set(_vm.addForm.ruleForm, \"supplierId\", $$v)},expression:\"\\n addForm.ruleForm.supplierId\\n \"}},_vm._l((_vm.supplierOptions),function(item){return _c('el-option',{key:item.id,attrs:{\"label\":item.name,\"value\":item.id}})}),1)]},proxy:true},{key:\"category\",fn:function(){return [_c('el-select',{staticStyle:{\"width\":\"240px\"},attrs:{\"remote-method\":_vm.remoteMethod,\"loading\":_vm.loading,\"remote\":\"\",\"filterable\":\"\",\"placeholder\":\"请选择\"},on:{\"change\":_vm.change,\"focus\":_vm.sefocus},model:{value:(_vm.addForm.ruleForm.category),callback:function ($$v) {_vm.$set(_vm.addForm.ruleForm, \"category\", $$v)},expression:\"addForm.ruleForm.category\"}},_vm._l((_vm.cateOptions),function(item){return _c('el-option',{key:item.id,attrs:{\"label\":item.name,\"value\":item.id}})}),1)]},proxy:true}])},[_c('template',{slot:\"imgUrls\"},[[_c('el-upload',{ref:\"myUpload1\",attrs:{\"action\":`${_vm.$baseUrl}upload/uploadShoppingGoods`,\"on-success\":_vm.ImgeSuccess,\"file-list\":_vm.imglist,\"on-exceed\":_vm.handleExceed,\"limit\":5,\"accept\":\".jpg,.png,.JPG,.PNG\",\"before-upload\":_vm.beforeAvatarUpload}},[_c('el-button',{attrs:{\"icon\":\"el-icon-edit\",\"size\":\"small\"}},[_vm._v(\"上传图片\")]),_c('span',{staticStyle:{\"margin-left\":\"10px\",\"font-size\":\"12px\",\"color\":\"#444444\"}},[_vm._v(\"建议比例3:2\")]),_c('div',{staticClass:\"el-upload__tip\",attrs:{\"slot\":\"tip\"},slot:\"tip\"},[_c('span',[_vm._v(\"支持扩展名png,jpg\")])])],1)]],2)],2)]],2)],1),_c('div',{attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('button',{staticClass:\"btn-orange\",on:{\"click\":function($event){return _vm.addSubmit()}}},[_c('span',[_c('i',{staticClass:\"el-icon-circle-check\"}),_vm._v(\"提交\")])]),_c('button',{staticClass:\"btn-gray\",on:{\"click\":_vm.addClose}},[_c('span',[_vm._v(\"取消\")])])])])],1)])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"main-titel\"},[_c('span',[_vm._v(\"商品管理\")])])\n}]\n\nexport { render, staticRenderFns }","<template>\n <div>\n <div class=\"main-content\">\n <div class=\"main-titel\">\n <span>商品管理</span>\n </div>\n <div class=\"content\">\n <div class=\"content-btn\">\n <el-button\n class=\"init-button\"\n @click=\"add()\"\n icon=\"el-icon-plus\"\n >商品创建</el-button\n >\n </div>\n\n <div class=\"\">\n <VueTable\n ref=\"table\"\n :config=\"config\"\n @tableCheck=\"tableCheck\"\n >\n <template slot=\"tabs\">\n <el-tabs\n v-model=\"activeName\"\n @tab-click=\"handleClick\"\n >\n <el-tab-pane\n label=\"全部\"\n name=\"0\"\n ></el-tab-pane>\n <el-tab-pane\n label=\"已上架\"\n name=\"1\"\n ></el-tab-pane>\n <el-tab-pane\n label=\"已下架\"\n name=\"2\"\n ></el-tab-pane>\n </el-tabs>\n </template>\n <template slot=\"footer\">\n <div class=\"table-footer\">\n <button @click=\"sploading(table_row)\">\n 上架\n </button>\n <button @click=\"unloading(table_row)\">\n 下架\n </button>\n <button @click=\"del(table_row)\">删除</button>\n </div>\n </template>\n </VueTable>\n </div>\n <Drawer\n drawerTitle=\"商品创建\"\n @drawerClose=\"addClose\"\n :drawerVrisible=\"add_vrisible\"\n >\n <div style=\"padding: 30px\">\n <FromCard>\n <template slot=\"title\">填写商品信息</template>\n <template>\n <VueForm ref=\"addForm\" :formObj=\"addForm\" @ruleSuccess=\"addRuleSuccess\">\n <!-- Slot -->\n <template slot=\"imgUrls\">\n <template>\n <el-upload\n :action=\"`${$baseUrl}upload/uploadShoppingGoods`\"\n :on-success=\"ImgeSuccess\"\n ref=\"myUpload1\"\n :file-list=\"imglist\"\n :on-exceed=\"handleExceed\"\n :limit=\"5\"\n accept=\".jpg,.png,.JPG,.PNG\"\n :before-upload=\"\n beforeAvatarUpload\n \"\n >\n <el-button\n icon=\"el-icon-edit\"\n size=\"small\"\n >上传图片</el-button\n >\n <span\n style=\"\n margin-left: 10px;\n font-size: 12px;\n color: #444444;\n \"\n >建议比例3:2</span\n >\n <div\n slot=\"tip\"\n class=\"el-upload__tip\"\n >\n <span\n >支持扩展名png,jpg</span\n >\n </div>\n </el-upload>\n </template>\n </template>\n <template v-slot:supplierId>\n <el-select\n v-model=\"\n addForm.ruleForm.supplierId\n \"\n :remote-method=\"remoteMethod\"\n @change=\"change\"\n @focus=\"sefocus\"\n :loading=\"loading\"\n remote\n style=\"width: 240px\"\n filterable\n placeholder=\"请选择\"\n >\n <el-option\n v-for=\"item in supplierOptions\"\n :key=\"item.id\"\n :label=\"item.name\"\n :value=\"item.id\"\n >\n </el-option>\n </el-select>\n </template>\n <!-- 商品分类 -->\n <template v-slot:category>\n <el-select\n v-model=\"addForm.ruleForm.category\"\n :remote-method=\"remoteMethod\"\n @change=\"change\"\n @focus=\"sefocus\"\n :loading=\"loading\"\n remote\n style=\"width: 240px\"\n filterable\n placeholder=\"请选择\"\n >\n <el-option\n v-for=\"item in cateOptions\"\n :key=\"item.id\"\n :label=\"item.name\"\n :value=\"item.id\"\n >\n </el-option>\n </el-select>\n </template>\n </VueForm>\n </template>\n </FromCard>\n </div>\n <div slot=\"footer\">\n <button class=\"btn-orange\" @click=\"addSubmit()\">\n <span>\n <i class=\"el-icon-circle-check\"></i>提交</span\n >\n </button>\n <button class=\"btn-gray\" @click=\"addClose\">\n <span>取消</span>\n </button>\n </div>\n </Drawer>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n shopGoodsLoading,\n shopGoodsUnloading,\n shopSupplierList,\n shopCategoryList,\n shopGoodsInsert\n} from '@/api/shop.js'\nexport default {\n data() {\n return {\n add_vrisible: false,\n addDate: null,\n table_row: [],\n loading: false,\n cateOptions: [],\n supplierOptions: [],\n addForm: {\n ruleForm: {\n imgUrls: []\n },\n rules: {\n // 表单必填\n category: [\n { required: true, message: '请输入', trigger: 'change' }\n ],\n categoryId: [\n { required: true, message: '请输入', trigger: 'change' }\n ],\n title: [\n { required: true, message: '请选择', trigger: 'change' }\n ],\n recommend: [\n { required: true, message: '请选择', trigger: 'change' }\n ],\n supplierId: [\n { required: true, message: '请选择', trigger: 'change' }\n ],\n detail: [\n { required: true, message: '请输入', trigger: 'change' }\n ],\n sellingPrice: [\n { required: true, message: '请选择', trigger: 'change' }\n ],\n markingPrice: [\n { required: true, message: '请选择', trigger: 'change' }\n ],\n stock: [\n { required: true, message: '请选择', trigger: 'change' }\n ],\n status: [\n { required: true, message: '请选择', trigger: 'change' }\n ],\n arrivalTime: [\n { required: true, message: '请选择', trigger: 'change' }\n ]\n },\n form_item: [\n {\n type: 'Slot',\n label: '所属大类',\n placeholder: '请选择',\n width: '50%',\n prop: 'category',\n slotName: 'category'\n },\n {\n type: 'Select',\n label: '所属小类',\n placeholder: '请选择',\n width: '50%',\n prop: 'categoryId',\n options: []\n },\n {\n type: 'Input',\n label: '商品标题',\n placeholder: '请输入',\n width: '50%',\n prop: 'title'\n },\n {\n type: 'Input',\n label: '推荐语',\n placeholder: '请输入',\n width: '50%',\n prop: 'recommend'\n },\n {\n type: 'Slot',\n label: '供应商',\n placeholder: '请输入',\n width: '50%',\n prop: 'supplierId',\n slotName: 'supplierId'\n },\n {\n type: 'textarea',\n label: '商品详情',\n placeholder: '请输入',\n width: '100%',\n prop: 'detail'\n },\n {\n type: 'Input',\n label: '售卖价',\n placeholder: '请输入',\n width: '50%',\n prop: 'sellingPrice'\n },\n {\n type: 'Input',\n label: '划线价',\n placeholder: '请输入',\n width: '50%',\n prop: 'markingPrice'\n },\n {\n type: 'Int',\n label: '库存',\n placeholder: '请输入',\n width: '50%',\n prop: 'stock'\n },\n {\n type: 'Select',\n label: '状态',\n placeholder: '请输入',\n width: '50%',\n prop: 'status',\n options: [\n {\n value: '1',\n label: '立即上架'\n },\n {\n value: '2',\n label: '手动上架'\n }\n ]\n },\n {\n type: 'Input',\n label: '到货时间说明',\n placeholder: '请输入',\n width: '50%',\n prop: 'arrivalTime'\n },\n {\n type: 'Slot',\n label: '图片上传',\n placeholder: '请输入',\n width: '100%',\n prop: 'imgUrls',\n slotName: 'imgUrls'\n }\n ]\n },\n // 上传img文件\n imglist: [],\n activeName: '0',\n config: {\n thead: [\n { label: '序号', type: 'index', width: '80' },\n { label: '商品编号', prop: 'code', width: 'auto' },\n {\n label: '商品标题',\n prop: 'title',\n width: 'auto'\n },\n { label: '售价', prop: 'sellingPrice', width: 'auto' },\n { label: '划线价', prop: 'markingPrice', width: 'auto' },\n { label: '库存', prop: 'stock', width: 'auto' },\n { label: '预约量', prop: 'subscribeNum', width: 'auto' },\n {\n label: '状态',\n prop: 'status',\n width: 'auto',\n type: 'function',\n callback(row, prop) {\n switch (row.status) {\n case 1:\n return '上架'\n break\n case 2:\n return '下架'\n break\n }\n }\n },\n { label: '创建时间', prop: 'createDate', width: '220' }\n ],\n table_data: [],\n url: 'shopGoodsList',\n search_item: [\n {\n type: 'Input',\n label: '商品编号',\n placeholder: '请输入',\n prop: 'code'\n },\n {\n type: 'Input',\n label: '商品标题',\n placeholder: '请输入',\n prop: 'title'\n },\n {\n type: 'select',\n label: '状态',\n placeholder: '请选择',\n value: null,\n options: [\n { value: 1, label: '上架' },\n { value: 2, label: '下架' }\n ],\n prop: 'status'\n },\n {\n type: 'picker',\n label: '创建时间',\n placeholder: '请输入',\n prop: 'date',\n startDate: 'createDateStart',\n endDate: 'createDateEnd',\n width: '280px'\n }\n // Slot\n ],\n data: {\n pageNum: 1,\n size: 10\n }\n }\n }\n },\n methods: {\n getUserList(val) {\n let reeData = {\n pageNum: 1,\n size: 20\n }\n this.loading = true\n shopSupplierList(reeData).then((res) => {\n console.log(res)\n this.supplierOptions = res.tableList\n this.loading = false\n })\n shopCategoryList({ parentId: 0 }).then((res) => {\n // console.log(res)\n this.cateOptions = res.data\n // console.log(this.sysOptions);\n this.loading = false\n })\n },\n remoteMethod(val) {\n this.getUserList(val)\n },\n sefocus() {\n this.getUserList()\n },\n change(value) {\n console.log(value) //sysUserList\n this.addForm.form_item[1].options = []\n let sData = {\n parentId: value\n }\n shopCategoryList(sData).then((res) => {\n console.log(res)\n res.data.forEach((ele)=>{\n let obj = {\n value: ele.id,\n label: ele.name\n }\n this.addForm.form_item[1].options.push(obj)\n })\n console.log(this.addForm.form_item[1].options)\n this.loading = false\n })\n },\n //根据部门获取人员\n sChange(value) {\n console.log(value)\n this.addForm.form_item[1].options = []\n let sData = {\n parentId: value\n }\n shopCategoryList(sData).then((res) => {\n console.log(res)\n\n res.tableList.forEach((element) => {\n let obj = {\n value: element.id,\n label: element.actualName\n }\n this.addForm.form_item[1].options.push(obj)\n })\n console.log(this.addForm.form_item[1].options)\n this.loading = false\n })\n },\n add() {\n this.add_vrisible = true\n // this.getUserList()\n },\n addClose() {\n this.$refs.addForm.reset()\n this.add_vrisible = false\n this.$refs.myUpload1.clearFiles()\n },\n addRuleSuccess() {\n let resData = {\n ...this.addForm.ruleForm\n }\n shopGoodsInsert(resData).then((res) => {\n if (res.status) {\n this.$message({\n message: res.message,\n type: 'success'\n })\n this.$refs.table.loadData()\n this.addClose()\n }\n })\n },\n addSubmit() {\n this.$refs.addForm.submitForm()\n },\n //shangija\n sploading(data) {\n if (data.length > 1) {\n this.$message.error('只能操作一条数据')\n return\n }\n if (!data.length) {\n this.$message.error('请选择')\n return\n } else {\n if (data[0].status == 1) {\n this.$message({\n message: '上架失败',\n type: 'error'\n })\n } else {\n shopGoodsLoading({ id: data[0].id }).then((res) => {\n console.log(res)\n if (res.status) {\n this.$message({\n message: res.message,\n type: 'success'\n })\n this.$refs.table.loadData()\n }\n })\n }\n }\n },\n unloading(data) {\n console.log(data[0].id)\n if (data.length > 1) {\n this.$message.error('只能操作一条数据')\n return\n }\n if (!data.length) {\n this.$message.error('请选择')\n return\n } else {\n shopGoodsUnloading({ id: data[0].id }).then((res) => {\n console.log(res)\n if (res.status) {\n this.$message({\n message: res.message,\n type: 'success'\n })\n this.$refs.table.loadData()\n }\n })\n }\n },\n // tabs切换\n handleClick(tab, event) {\n let status = null\n if (this.activeName != 0) {\n status = this.activeName\n } else {\n status = null\n }\n const requestData = {\n pageNum: 1,\n size: 10,\n status: status\n }\n this.$refs.table.requestData(requestData)\n },\n // 删除\n del(data) {\n if (data.length) {\n let arr = []\n for (let i = 0; i < this.table_row.length; i++) {\n arr.push(this.table_row[i].id)\n }\n this.$confirm('是否确认删除?删除不可恢复', '删除', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n confirmButtonClass: 'confirmButton',\n cancelButtonClass: 'cancelButton'\n })\n .then(() => {\n this.$refs.table.tableDelete(arr)\n })\n .catch((action) => {})\n } else {\n this.$message.error('请选中需要删除的数据')\n }\n },\n // 表格选中\n tableCheck(data) {\n this.table_row = data\n },\n // 图片上传成功\n ImgeSuccess(res, file) {\n this.addForm.ruleForm.imgUrls[0] = file.response.url\n },\n // 图片文件上传之前\n beforeAvatarUpload(file) {\n const isLt2M = file.size / 1024 / 1024 < 2\n const isJPG = file.type === 'image/png'\n const isPNG = file.type === 'image/jpeg'\n if (!isJPG && !isPNG) {\n this.$message.error('上传头像图片只能是 JPG/PNG 格式!')\n }\n if (!isLt2M) {\n this.$message.error('上传头像图片大小不能超过 2MB!')\n }\n return (isJPG || isPNG) && isLt2M\n },\n // 上传限制提示\n handleExceed(files, fileList) {\n this.$message.warning(\n `当前限制选择 5 个文件,本次选择了 ${\n files.length\n } 个文件,共选择了 ${files.length + fileList.length} 个文件`\n )\n }\n }\n}\n</script>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./commodityManagement.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./commodityManagement.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./commodityManagement.vue?vue&type=template&id=ef56a2bc&\"\nimport script from \"./commodityManagement.vue?vue&type=script&lang=js&\"\nexport * from \"./commodityManagement.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import service from '../utils/request'\nimport requestUrl from './requestUrl'\n\n//supplierManagement供应商 shop/supplier/list\nexport function shopSupplierInsert(data){\n return service.request({\n method:'POST',\n url:'shop/supplier/insert',\n data: data\n })\n}\n//shop/goods/insert\nexport function shopGoodsInsert(data){\n return service.request({\n method:'POST',\n url:'shop/goods/insert',\n data: data\n })\n}\nexport function shopSupplierList(data){\n return service.request({\n method:'GET',\n url:'shop/supplier/list',\n params: data\n })\n}\n//到货order/arrivalGoods\nexport function orderArrivalGoods(data){\n return service.request({\n method:'POST',\n url:'shop/order/arrivalGoods',\n data: data\n })\n}\n//分类'shop/category/list'\nexport function shopCategoryList(data){\n return service.request({\n method:'GET',\n url:'shop/category/list',\n params: data\n })\n}\n//shop/category/update\nexport function shopCategoryUpdate(data){\n return service.request({\n method:'POST',\n url:'shop/category/update',\n data: data\n })\n}\n// shop/category/delete shop/category/insert\nexport function shopCategoryDelete(data){\n return service.request({\n method:'GET',\n url:'shop/category/delete',\n params: data\n })\n}\nexport function shopCategoryInsert(data){\n return service.request({\n method:'POST',\n url:'shop/category/insert',\n data: data\n })\n}\n\n//商品管理 上架shop/goods/loading 下架shop/goods/unloading\nexport function shopGoodsLoading(data){\n return service.request({\n method:'GET',\n url:'shop/goods/loading',\n params: data\n })\n}\nexport function shopGoodsUnloading(data){\n return service.request({\n method:'GET',\n url:'shop/goods/unloading',\n params: data\n })\n}\n//shop/order/deliverGoods 发货\nexport function shopOrderDeliverGoods(data){\n return service.request({\n method:'POST',\n url:'shop/order/deliverGoods',\n data: data\n })\n}\n//shop/refund/exchangeGoods\nexport function refundExchangeGoods(data){\n return service.request({\n method:'GET',\n url:'shop/refund/exchangeGoods',\n params:data\n })\n}\n//shop/refund/examine\nexport function shopRefundExamine(data){\n return service.request({\n method:'POST',\n url:'shop/refund/examine',\n data: data\n })\n}\n//商城评价回复 shop/evaluation/reply\nexport function shopEvaluationReply(data){\n return service.request({\n method:'POST',\n url:'shop/evaluation/reply',\n data: data\n })\n}"],"sourceRoot":""}