| 1 |
- {"code":"/*!\n * build: vue-admin-beautiful \n * copyright: chuzhixin 1204505056@qq.com \n * time: 2022-12-12 09:51:32\n */\n(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-33995d44\"],{\"7b16\":function(t,o,e){},c40e:function(t,o,e){\"use strict\";e.r(o),e.d(o,\"getAllGoodsBasicBySku\",(function(){return n})),e.d(o,\"goodsImport\",(function(){return a})),e.d(o,\"goodsQuickImport\",(function(){return r})),e.d(o,\"searchBasic\",(function(){return u})),e.d(o,\"exportSearchBasic\",(function(){return s})),e.d(o,\"defineSpec\",(function(){return i})),e.d(o,\"addBasicAndPublishGoods\",(function(){return c})),e.d(o,\"editQuickGoods\",(function(){return l})),e.d(o,\"getQuickGoodsInfo\",(function(){return f})),e.d(o,\"addGoodsBasic\",(function(){return p})),e.d(o,\"getAllGoodsBasic\",(function(){return G})),e.d(o,\"exportGetAllGoodsBasic\",(function(){return g})),e.d(o,\"getGoodsBasicInfoById\",(function(){return h})),e.d(o,\"getGoodsByCategory\",(function(){return b})),e.d(o,\"updateEnableStatus\",(function(){return m})),e.d(o,\"delGoodsBasic\",(function(){return O})),e.d(o,\"editGoodsBasic\",(function(){return j})),e.d(o,\"getGoodsBasicOfShopId\",(function(){return B})),e.d(o,\"updateCategory\",(function(){return S})),e.d(o,\"BatchUnloading\",(function(){return y})),e.d(o,\"setTop\",(function(){return C})),e.d(o,\"setSalesNumBatch\",(function(){return v})),e.d(o,\"setSalesNum\",(function(){return _})),e.d(o,\"getAllUnit\",(function(){return M})),e.d(o,\"addUnit\",(function(){return A})),e.d(o,\"editUnit\",(function(){return I})),e.d(o,\"updateEnablesStatus\",(function(){return k})),e.d(o,\"delUnit\",(function(){return x})),e.d(o,\"SpecManageAdd\",(function(){return T})),e.d(o,\"SpecManageedit\",(function(){return w})),e.d(o,\"SpecManagedel\",(function(){return U})),e.d(o,\"SpecManageinfo\",(function(){return E})),e.d(o,\"SpecManagegetAll\",(function(){return P})),e.d(o,\"getAllGoodsBySku\",(function(){return N})),e.d(o,\"searchGood\",(function(){return Q})),e.d(o,\"exportSearchGood\",(function(){return L})),e.d(o,\"addGoods\",(function(){return D})),e.d(o,\"getGoodsInfo\",(function(){return R})),e.d(o,\"delGoods\",(function(){return $})),e.d(o,\"editGoods\",(function(){return X})),e.d(o,\"getAllGoods\",(function(){return q})),e.d(o,\"getAllGoodsList\",(function(){return J})),e.d(o,\"exportGetAllGoodsList\",(function(){return z})),e.d(o,\"exportGetAllGoods\",(function(){return F})),e.d(o,\"auditGoods\",(function(){return H})),e.d(o,\"getGoodsByCondition\",(function(){return K})),e.d(o,\"GoodsUpdateEnableStatus\",(function(){return V})),e.d(o,\"batchGoodsExpress\",(function(){return W})),e.d(o,\"addBrand\",(function(){return Y})),e.d(o,\"editBrand\",(function(){return Z})),e.d(o,\"getBrandInfoById\",(function(){return tt})),e.d(o,\"updateBrandStatus\",(function(){return ot})),e.d(o,\"delBrand\",(function(){return et})),e.d(o,\"getAllBrand\",(function(){return dt})),e.d(o,\"setBrand\",(function(){return nt})),e.d(o,\"setSku\",(function(){return at})),e.d(o,\"setNoSalesShop\",(function(){return rt})),e.d(o,\"addCategory\",(function(){return ut})),e.d(o,\"updateCategoryStatus\",(function(){return st})),e.d(o,\"getCategoryInfoById\",(function(){return it})),e.d(o,\"getAllCategory\",(function(){return ct})),e.d(o,\"delCategory\",(function(){return lt})),e.d(o,\"editCategory\",(function(){return ft})),e.d(o,\"getAllCategoryPost\",(function(){return pt})),e.d(o,\"getGoodsByBarCode\",(function(){return Gt})),e.d(o,\"getRelMap\",(function(){return gt})),e.d(o,\"getPriceTrend\",(function(){return ht})),e.d(o,\"batchSetDistribution\",(function(){return bt})),e.d(o,\"addGoodsSupport\",(function(){return mt})),e.d(o,\"editGoodsSupport\",(function(){return Ot})),e.d(o,\"delGoodsSupport\",(function(){return jt})),e.d(o,\"getAllGoodsSupport\",(function(){return Bt})),e.d(o,\"getGoodsSupportInfo\",(function(){return St})),e.d(o,\"getAllGoodsGroups\",(function(){return yt})),e.d(o,\"addGoodsGroups\",(function(){return Ct})),e.d(o,\"enableGoodsGroups\",(function(){return vt})),e.d(o,\"updateGoodsGroups\",(function(){return _t})),e.d(o,\"getReservoirInfo\",(function(){return Mt})),e.d(o,\"deleteGoodsGroups\",(function(){return At})),e.d(o,\"setSort\",(function(){return It}));var d=e(\"b775\");function n(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/getAllGoodsBasicBySku\",method:\"post\",data:t})}function a(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/goodsImport\",method:\"post\",data:t})}function r(t){return Object(d[\"default\"])({url:\"/Goods/QuickGoods/goodsQuickImport\",method:\"post\",data:t})}function u(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/search\",method:\"post\",data:t})}function s(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/search\",method:\"post\",responseType:\"blob\",data:t})}function i(t){return Object(d[\"default\"])({url:\"/GoodsManage/SpecManage/defineSpec\",method:\"post\",data:t})}function c(t){return Object(d[\"default\"])({url:\"/Goods/QuickGoods/addBasicAndPublishGoods\",method:\"post\",data:t})}function l(t){return Object(d[\"default\"])({url:\"/Goods/QuickGoods/editQuickGoods\",method:\"post\",data:t})}function f(t,o){return Object(d[\"default\"])({url:\"/Goods/QuickGoods/getQuickGoodsInfo/\"+t,method:\"post\",data:o})}function p(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/addGoodsBasic\",method:\"post\",data:t})}function G(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/getAllGoodsBasic\",method:\"post\",data:t})}function g(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/getAllGoodsBasic\",responseType:\"blob\",method:\"post\",data:t})}function h(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/getGoodsBasicInfoById/\"+t,method:\"post\",data:o})}function b(t){return Object(d[\"default\"])({url:\"/Goods/ApiGoods/getGoodsByCategory\",method:\"post\",data:t})}function m(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/updateEnableStatus\",method:\"put\",data:t})}function O(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/delGoodsBasic/\"+t,method:\"delete\",data:o})}function j(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/editGoodsBasic/\"+t,method:\"put\",data:o})}function B(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/getGoodsBasicOfShopId\",method:\"post\",data:t})}function S(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/updateCategory\",method:\"post\",data:t})}function y(t){return Object(d[\"default\"])({url:\"/Goods/Goods/updateEnableStatus\",method:\"post\",data:t})}function C(t,o){return Object(d[\"default\"])({url:\"/Goods/Goods/setTop/\"+t,method:\"get\",data:o})}function v(t){return Object(d[\"default\"])({url:\"/Goods/Goods/setSalesNumBatch\",method:\"post\",data:t})}function _(t){return Object(d[\"default\"])({url:\"/Goods/Goods/setSalesNum\",method:\"post\",data:t})}function M(t){return Object(d[\"default\"])({url:\"/GoodsManage/Units/getAll\",method:\"post\",data:t})}function A(t){return Object(d[\"default\"])({url:\"/GoodsManage/Units/add\",method:\"post\",data:t})}function I(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/Units/edit/\"+t,method:\"put\",data:o})}function k(t){return Object(d[\"default\"])({url:\"/GoodsManage/Units/updateEnablesStatus\",method:\"put\",data:t})}function x(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/Units/del/\"+t,method:\"delete\",data:o})}function T(t){return Object(d[\"default\"])({url:\"/GoodsManage/SpecManage/add\",method:\"post\",data:t})}function w(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/SpecManage/edit/\"+t,method:\"post\",data:o})}function U(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/SpecManage/del/\"+t,method:\"delete\",data:o})}function E(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/SpecManage/info/\"+t,method:\"get\",data:o})}function P(t){return Object(d[\"default\"])({url:\"/GoodsManage/SpecManage/getAll\",method:\"post\",data:t})}function N(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getAllGoodsBySku\",method:\"post\",data:t})}function Q(t){return Object(d[\"default\"])({url:\"/Goods/Goods/search\",method:\"post\",data:t})}function L(t){return Object(d[\"default\"])({url:\"/Goods/Goods/search\",responseType:\"blob\",method:\"post\",data:t})}function D(t){return Object(d[\"default\"])({url:\"/Goods/Goods/addGoods\",method:\"post\",data:t})}function R(t,o){return Object(d[\"default\"])({url:\"/Goods/Goods/getGoodsInfo/\"+t,method:\"post\",data:o})}function $(t,o){return Object(d[\"default\"])({url:\"/Goods/Goods/delGoods/\"+t,method:\"get\",data:o})}function X(t,o){return Object(d[\"default\"])({url:\"/Goods/Goods/editGoods/\"+t,method:\"put\",data:o})}function q(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getAllGoods\",method:\"post\",data:t})}function J(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getAllGoodsList\",method:\"post\",data:t})}function z(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getAllGoodsList\",method:\"post\",responseType:\"blob\",data:t})}function F(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getAllGoods\",method:\"post\",responseType:\"blob\",data:t})}function H(t,o){return Object(d[\"default\"])({url:\"/Goods/Goods/audit/\"+t,method:\"put\",data:o})}function K(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getGoodsByCondition\",method:\"post\",data:t})}function V(t){return Object(d[\"default\"])({url:\"/Goods/Goods/updateEnableStatus\",method:\"post\",data:t})}function W(t){return Object(d[\"default\"])({url:\"/Goods/Goods/batchGoodsExpress\",method:\"post\",data:t})}function Y(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBrand/addBrand\",method:\"post\",data:t})}function Z(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBrand/editBrand/\"+t,method:\"put\",data:o})}function tt(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBrand/getBrandInfoById/\"+t,method:\"put\",data:o})}function ot(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBrand/updateBrandStatus/\"+t,method:\"put\",data:o})}function et(t,o){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBrand/delBrand/\"+t,method:\"delete\",data:o})}function dt(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBrand/getAllBrand\",method:\"post\",data:t})}function nt(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/setBrand\",method:\"put\",data:t})}function at(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/setSku\",method:\"put\",data:t})}function rt(t){return Object(d[\"default\"])({url:\"/GoodsManage/GoodsBasic/setNoSalesShop\",method:\"put\",data:t})}function ut(t){return Object(d[\"default\"])({url:\"/GoodsCategory/GoodsCategory/addCategory\",method:\"post\",data:t})}function st(t,o){return Object(d[\"default\"])({url:\"/GoodsCategory/GoodsCategory/updateCategoryStatus/\"+t,method:\"put\",data:o})}function it(t,o){return Object(d[\"default\"])({url:\"/GoodsCategory/GoodsCategory/getCategoryInfoById/\"+t,method:\"get\",data:o})}function ct(t){return Object(d[\"default\"])({url:\"/GoodsCategory/GoodsCategory/getAllCategory\",method:\"get\",data:t})}function lt(t,o){return Object(d[\"default\"])({url:\"/GoodsCategory/GoodsCategory/delCategory/\"+t,method:\"delete\",data:o})}function ft(t,o){return Object(d[\"default\"])({url:\"/GoodsCategory/GoodsCategory/editCategory/\"+t,method:\"put\",data:o})}function pt(t){return Object(d[\"default\"])({url:\"/GoodsCategory/GoodsCategory/getAllCategory\",method:\"post\",data:t})}function Gt(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getGoodsByBarCode\",method:\"post\",data:t})}function gt(t){return Object(d[\"default\"])({url:\"/Goods/Goods/getRelMap\",method:\"post\",data:t})}function ht(t,o){return Object(d[\"default\"])({url:\"Goods/Goods/getPriceTrend/\"+t,method:\"POST\",data:o})}function bt(t){return Object(d[\"default\"])({url:\"Goods/Goods/batchSetDistribution\",method:\"POST\",data:t})}function mt(t){return Object(d[\"default\"])({url:\"Goods/GoodsSupport/addGoodsSupport\",method:\"post\",data:t})}function Ot(t){return Object(d[\"default\"])({url:\"/Goods/GoodsSupport/editGoodsSupport\",method:\"post\",data:t})}function jt(t,o){return Object(d[\"default\"])({url:\"Goods/GoodsSupport/delGoodsSupport/\"+t,method:\"post\",data:o})}function Bt(t){return Object(d[\"default\"])({url:\"Goods/GoodsSupport/getAllGoodsSupport\",method:\"post\",data:t})}function St(t,o){return Object(d[\"default\"])({url:\"/Goods/GoodsSupport/getGoodsSupportInfo/\"+t,method:\"post\",data:o})}function yt(t){return Object(d[\"default\"])({url:\"Goods/GoodsGroups/getAllGoodsGroups\",method:\"post\",data:t})}function Ct(t){return Object(d[\"default\"])({url:\"Goods/GoodsGroups/addGoodsGroups\",method:\"post\",data:t})}function vt(t,o){return Object(d[\"default\"])({url:\"Goods/GoodsGroups/enableGoodsGroups/\"+t,method:\"post\",data:o})}function _t(t,o){return Object(d[\"default\"])({url:\"Goods/GoodsGroups/updateGoodsGroups/\"+t,method:\"post\",data:o})}function Mt(t,o){return Object(d[\"default\"])({url:\"Goods/GoodsGroups/getReservoirInfo/\"+t,method:\"post\",data:o})}function At(t,o){return Object(d[\"default\"])({url:\"Goods/GoodsGroups/deleteGoodsGroups/\"+t,method:\"post\",data:o})}function It(t){return Object(d[\"default\"])({url:\"Goods/Goods/setSort\",method:\"post\",data:t})}},d07b:function(t,o,e){\"use strict\";e(\"7b16\")},fc91:function(t,o,e){\"use strict\";e.r(o);var d=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e(\"ContainerTit\",{staticClass:\"ContainerTit\"},[e(\"div\",{staticClass:\"header\"},[e(\"el-steps\",{attrs:{\"align-center\":\"\",active:t.steps_active}},[e(\"el-step\",{attrs:{title:\"商品导入文件\",icon:\"el-icon-upload\"}}),e(\"el-step\",{attrs:{title:\"商品导入预览\",icon:\"el-icon-s-order\"}}),e(\"el-step\",{attrs:{title:\"商品导入完成\",icon:\"el-icon-s-claim\"}})],1)],1),0===t.steps_active?e(\"div\",[e(\"div\",{staticClass:\"page-tip-div\",attrs:{slot:\"tip\"},slot:\"tip\"},[e(\"i\",{staticClass:\"el-icon-info\"}),t._v(\" 温馨提示: \"),e(\"span\",[t._v(\"1、商品名称、一级分类、基本单位、销售价为必填项\")]),t._v(\" \"),e(\"span\",[t._v(\"2、单位换算规则:例如商品1件=24袋,表格中填写24即可!\")]),t._v(\" \"),e(\"span\",[t._v(\" 3、单位规则,如只按件进行售卖,基本单位填写“件”即可,如大小单位都卖,基本单位填写最小单位,辅助单位填写最大单位! \")])]),e(\"div\",{staticClass:\"span\"},[e(\"span\",[e(\"a\",{attrs:{href:\"https://upload.qianniao.vip/template/dandianshangping.xlsx\",target:\"_blank\"}},[e(\"i\",{staticClass:\"iconfont icon-xiazai-xue\"}),e(\"span\",[t._v(\"下载模板\")])])])]),e(\"div\",{staticClass:\"content\"},[e(\"p\",{staticClass:\"title\"},[e(\"i\",{staticClass:\"required\"},[t._v(\"*\")]),t._v(\" 商品文件 \")]),e(\"div\",{staticClass:\"input-up\"},[e(\"i\",{staticClass:\"iconfont icon-lianjie\"}),e(\"el-upload\",{ref:\"upload\",attrs:{action:\"#\",accept:\"xlsx,xls\",\"auto-upload\":!1,\"file-list\":t.fileList,\"list-type\":\"text\",\"before-upload\":t.beforeUpload,\"on-remove\":t.onRemove,\"on-change\":t.onChange}},[e(\"div\",{staticStyle:{width:\"360px\",padding:\"0 10px\",\"text-align\":\"left\"},attrs:{slot:\"trigger\"},slot:\"trigger\"},[t.file_name?e(\"span\",[t._v(t._s(t.file_name))]):e(\"span\",{staticStyle:{color:\"#999999\"}},[t._v(\"选取文件\")])])])],1)])]):1===t.steps_active?e(\"div\",{staticClass:\"steps-two\"},[e(\"vxe-grid\",{ref:\"xTable\",attrs:{columns:t.tableColumn,data:t.goods_data}})],1):e(\"div\",{staticClass:\"steps-three\"},[e(\"p\",{staticClass:\"title\"},[t._v(\"导入情况\")]),e(\"div\",{staticClass:\"desc\"},[t._v(\" \"+t._s(t.Import_the_information)+\" \")])]),e(\"div\",{attrs:{slot:\"headr\"},slot:\"headr\"},[e(\"el-button\",{on:{click:t.closePage}},[t._v(\" \"+t._s(2===t.steps_active?\"完成\":\"取消\")+\" \")]),0===t.steps_active?e(\"el-button\",{attrs:{type:\"primary\"},on:{click:t.previewData}},[t._v(\" 下一步 \")]):t._e(),1===t.steps_active?e(\"el-button\",{attrs:{type:\"primary\"},on:{click:t.exportsData}},[t._v(\" 确定导入 \")]):t._e(),2===t.steps_active?e(\"el-button\",{attrs:{type:\"primary\"},on:{click:t.againExport}},[t._v(\" 重新上传 \")]):t._e()],1)])},n=[],a=e(\"c40e\"),r=e(\"2f62\"),u={name:\"SingleGoodsImport\",data(){return{file_name:\"\",file:\"\",fileList:[],goods_data:[],steps_active:0,tableColumn:[{field:\"goodsName\",title:\"商品名称\"},{field:\"describe\",title:\"商品卖点\"},{field:\"categoryName\",title:\"一级分类\"},{field:\"categoryTwo\",title:\"二级分类\"},{field:\"categoryThree\",title:\"三级分类\"},{field:\"merchantName\",title:\"商户名称\"},{field:\"skuName\",title:\"基本单位\"},{field:\"salePrice\",title:\"基本单位销售价\"},{field:\"barCode\",title:\"单位条码\"},{field:\"conversion\",title:\"单位换算\"},{field:\"skuNameTwo\",title:\"辅单位\"},{field:\"salePriceTwo\",title:\"辅单位销售价\"},{field:\"memberPrice\",title:\"会员价\"},{field:\"barCodeTwo\",title:\"辅单位条码\"}],Import_the_information:\"\"}},computed:{...Object(r[\"c\"])({enableLocationManagement:\"MUser/enableLocationManagement\"})},methods:{lookDetail(){},closePage(){1===this.steps_active?this.steps_active=0:this.$closeCurrentGoEdit(\"/goods/sale/PublishGoods\")},previewData(){if(!this.file)return void this.$message.warning(\"请选择要导入的文件\");const t=new FileReader;t.onload=t=>{const o=t.target.result,e=this.$XLSX.read(o,{type:\"binary\"}),d=this.$XLSX.utils.sheet_to_csv(e.Sheets.Sheet1),n=[];console.log(\"csvData\",d.split(\"\\n\")),d.split(\"\\n\").forEach((t,o)=>{if(t&&o>0){const o=t.split(\",\");console.log(\"vCols\",o);const e={};o.forEach((t,o)=>{const d=this.tableColumn[o];d&&d.field&&(e[d.field]=t)}),n.push(e)}}),console.log(\"tableData::\",n),this.goods_data=n},t.readAsBinaryString(this.file),this.steps_active=1},async exportsData(){this.steps_active=2;const{data:t}=await Object(a[\"goodsQuickImport\"])(this.goods_data);this.Import_the_information=t},againExport(){this.steps_active=0},submitUpload(t){console.log(\"submitUpload\",t)},beforeUpload(t){console.log(\"beforeUpload\",t)},onRemove(t,o){console.log(\"onRemove\",t,o)},onChange(t){console.log(\"onChange\",t),this.file_name=t.name,this.file=t.raw}}},s=u,i=(e(\"d07b\"),e(\"2877\")),c=Object(i[\"a\"])(s,d,n,!1,null,\"15caed27\",null);o[\"default\"]=c.exports}}]);","extractedComments":[]}
|