{"version":3,"sources":["webpack:///./src/views/product/index.vue?6568","webpack:///./src/views/product/index.vue?25fb","webpack:///src/views/product/D:/Softwares/工作平台源码/对外版本地存储/网站前端/src/views/product/index.vue","webpack:///./src/views/product/index.vue?2ad7","webpack:///./src/views/product/index.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","directives","name","rawName","value","expression","attrs","staticClass","scopedSlots","_u","key","fn","titleInfo","on","handleAdd","drop2Change","searchClick","updateFreeClientFunctions","_v","proxy","tableData","scope","_s","_f","row","Labels","toString","ProductSKUs","IsMarketable","CreateTime","timeFormat","UpdateTime","$event","updateClientFunctions","deleteProduct","changeMarketable","handleView","handlePaginationChange","model","callback","$$v","pageData","ref","indexData","getDataList","staticRenderFns","components","Header","CContent","CTitle","CPages","ProductInfo","data","mockData","loading","search","isMarketable","btnShow","type","ishow","disabled","dropDown","drop_2","placeholder","clear","options","label","searchInput","clearable","pageIndex","pageSize","totalNum","xModalName","filters","truncateText","text","maxWords","length","substring","methods","openWin","val","params","total","mockSrv","productList","then","resp","res","Data","Total","$http","post","catch","err","$message","message","finally","$confirm","confirmButtonText","cancelButtonText","product","Id","ty","obj","$modal","show","$nextTick","$refs","productInfo","changeEditState","mounted","component"],"mappings":"gHAAA,W,gECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,YAAYC,MAAOT,EAAW,QAAEU,WAAW,YAAYC,MAAM,CAAC,GAAK,sBAAsB,CAACP,EAAG,SAAS,CAACQ,YAAY,aAAaD,MAAM,CAAC,MAAQ,OAAO,aAAe,wBAAwBP,EAAG,WAAW,CAACS,YAAYb,EAAIc,GAAG,CAAC,CAACC,IAAI,SAASC,GAAG,WAAW,MAAO,CAACZ,EAAG,SAAS,CAACO,MAAM,CAAC,SAAU,EAAK,MAAQX,EAAIiB,W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,MAAK,SAACC,GACW,GAAZA,EAAKC,MACP,EAAKO,SAAS,CACZC,QAAS,SACTtC,KAAM,YAER,EAAKd,kBAGRiD,OAAM,SAACC,GACN,EAAKC,SAAS,CACZC,QAAS,SACTtC,KAAM,aAGTuC,SAAQ,WACP,EAAK3C,SAAU,QAGpBuC,OAAM,WACL,EAAKE,SAAS,CACZrC,KAAM,OACNsC,QAAS,cAIjB7D,iBA9KO,SA8KUkE,GAAS,WACxBzG,KAAK0D,SAAU,EACf,IAAI4B,EAAS,CACXoB,GAAID,EAAQC,GACZ9C,cAAe6C,EAAQzE,cAEzBhC,KAAK+F,MACFC,KAAK,iCAAkCV,GACvCI,MAAK,SAACC,GACW,GAAZA,EAAKC,MACPa,EAAQzE,cAAgByE,EAAQzE,aAChC,EAAKmE,SAAS,CACZC,SAAUK,EAAQzE,aAAe,KAAO,MAA/B,KACT8B,KAAM,gBAIXmC,OAAM,SAACC,GACN,EAAKC,SAAS,CACZC,QAAS,OACTtC,KAAM,aAGTuC,SAAQ,WACP,EAAK3C,SAAU,MAIrB0B,QA1MO,SA0MCuB,EAAIC,GAAK,WACX9C,EAAO,GACD,IAAN6C,IACF7C,EAAc,OAAP6C,EAAc,MAAQ,QAE/B3G,KAAK+C,UAAUe,KAAOA,EAEpB9D,KAAK+C,UAAUnB,IADP,MAAN+E,EACmBC,EAEA,KAEvB5G,KAAK6G,OAAOC,KAAK,eACjB9G,KAAK+G,WAAU,WACb,EAAKC,MAAMC,YAAYC,uBAI7BC,QA/Ra,WAgSXnH,KAAKgD,gBCnbqV,I,wBCQ1VoE,EAAY,eACd,EACAtH,EACAmD,GACA,EACA,KACA,WACA,MAIa,aAAAmE,E","file":"js/chunk-52c347c5.28fe08bc.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=49568167&lang=less&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],attrs:{\"id\":\"productManagement\"}},[_c('Header',{staticClass:\"baseHeader\",attrs:{\"title\":\"商品管理\",\"titleEnglish\":\"Product Management\"}}),_c('CContent',{scopedSlots:_vm._u([{key:\"search\",fn:function(){return [_c('CTitle',{attrs:{\"showBtn\":true,\"TInfo\":_vm.titleInfo},on:{\"addClick\":_vm.handleAdd,\"drop2Change\":_vm.drop2Change,\"searchClick\":_vm.searchClick},scopedSlots:_vm._u([{key:\"btnGroup\",fn:function(){return [_c('el-button',{attrs:{\"type\":\"warning\",\"size\":\"small\",\"icon\":\"el-icon-refresh\"},on:{\"click\":_vm.updateFreeClientFunctions}},[_vm._v(\"同步免费版客户端功能 \")])]},proxy:true}])})]},proxy:true},{key:\"main\",fn:function(){return [_c('el-table',{attrs:{\"data\":_vm.tableData,\"stripe\":\"\",\"height\":\"100%\"}},[_c('el-table-column',{attrs:{\"label\":\"商品码\",\"width\":\"200px\",\"prop\":\"ProductCode\",\"show-overflow-tooltip\":true}}),_c('el-table-column',{attrs:{\"label\":\"商品名称\",\"width\":\"120\",\"prop\":\"Name\",\"show-overflow-tooltip\":true}}),_c('el-table-column',{attrs:{\"label\":\"商品标签\",\"width\":\"200\",\"prop\":\"Labels\",\"show-overflow-tooltip\":true},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(_vm._f(\"truncateText\")(scope.row.Labels.toString()))+\" \")]}}])}),_c('el-table-column',{attrs:{\"label\":\"货品信息\",\"prop\":\"ProductSKUs\",\"show-overflow-tooltip\":true},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(_vm._f(\"truncateText\")(scope.row.ProductSKUs.toString()))+\" \")]}}])}),_c('el-table-column',{attrs:{\"width\":\"120\",\"label\":\"是否上架\",\"prop\":\"IsMarketable\",\"align\":\"center\",\"show-overflow-tooltip\":true},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(scope.row.IsMarketable ? \"已上架\" : \"已下架\")+\" \")]}}])}),_c('el-table-column',{attrs:{\"width\":\"150\",\"label\":\"创建时间\",\"prop\":\"CreateTime\",\"align\":\"center\",\"show-overflow-tooltip\":true},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(scope.row.CreateTime ? scope.row.CreateTime.timeFormat(\"yyyy-MM-dd HH:mm\") : \"--\")+\" \")]}}])}),_c('el-table-column',{attrs:{\"width\":\"150\",\"label\":\"修改时间\",\"prop\":\"UpdateTime\",\"align\":\"center\",\"show-overflow-tooltip\":true},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(scope.row.UpdateTime ? scope.row.UpdateTime.timeFormat(\"yyyy-MM-dd HH:mm\") : \"--\")+\" \")]}}])}),_c('el-table-column',{attrs:{\"fixed\":\"right\",\"label\":\"操作\",\"width\":\"300\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.updateClientFunctions(scope.row)}}},[_vm._v(\"同步客户端功能\")]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.deleteProduct(scope.row)}}},[_vm._v(\"删除\")]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.changeMarketable(scope.row)}}},[_vm._v(_vm._s(scope.row.IsMarketable ? \"下架\" : \"上架\"))]),_c('el-button',{attrs:{\"type\":\"text\",\"size\":\"small\"},on:{\"click\":function($event){return _vm.handleView(scope.row)}}},[_vm._v(\"编辑\")])]}}])})],1)]},proxy:true},{key:\"pages\",fn:function(){return [_c('CPages',{on:{\"changeEvent\":_vm.handlePaginationChange},model:{value:(_vm.pageData),callback:function ($$v) {_vm.pageData=$$v},expression:\"pageData\"}})]},proxy:true}])}),_c('ProductInfo',{ref:\"productInfo\",attrs:{\"indexData\":_vm.indexData},on:{\"eventComfirm\":_vm.getDataList}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport mockSrv from \"@/api/mockSrv\";\r\nexport default {\r\n components: {\r\n Header: () => import(\"@/components/Header\"),\r\n CContent: () => import(\"@/components/CContent\"),\r\n CTitle: () => import(\"@/components/CTitle\"),\r\n CPages: () => import(\"@/components/CPages\"),\r\n ProductInfo: () => import(\"./productInfo\"),\r\n },\r\n data: () => ({\r\n mockData: false,\r\n loading: false,\r\n search: {\r\n name: \"\",\r\n isMarketable: null,\r\n },\r\n tableData: [],\r\n titleInfo: {\r\n btnShow: [\r\n { type: \"addBtn\", ishow: true },\r\n { type: \"startBtn\", ishow: false, disabled: true },\r\n { type: \"closeBtn\", ishow: false, disabled: true },\r\n { type: \"delBtn\", ishow: false, disabled: true },\r\n ],\r\n dropDown: {\r\n drop_2: {\r\n placeholder: \"上架状态\",\r\n clear: true,\r\n options: [\r\n {\r\n label: \"已上架\",\r\n value: true,\r\n },\r\n {\r\n label: \"已下架\",\r\n value: false,\r\n },\r\n ],\r\n },\r\n searchInput: {\r\n clearable: true,\r\n placeholder: \"商品名称/商品码\",\r\n },\r\n },\r\n },\r\n pageData: {\r\n pageIndex: 1,\r\n pageSize: 10,\r\n totalNum: 0,\r\n },\r\n indexData: {\r\n type: \"\", // Add Edit \"\"\r\n name: \"\",\r\n row: null,\r\n xModalName: \"productInfo\",\r\n },\r\n }),\r\n filters: {\r\n truncateText(text) {\r\n if (!text) {\r\n return \"无\";\r\n }\r\n const maxWords = 80;\r\n if (text.length > maxWords) {\r\n text = text.substring(0, maxWords) + \"...\";\r\n }\r\n return text;\r\n },\r\n },\r\n methods: {\r\n handleAdd() {\r\n this.openWin(\"ad\");\r\n },\r\n /**\r\n * 编辑\r\n */\r\n handleView(row) {\r\n this.openWin(\"ed\", row);\r\n },\r\n drop2Change(isMarketable) {\r\n if (isMarketable == -1 || isMarketable == \"\") {\r\n isMarketable = null;\r\n }\r\n this.search.isMarketable = isMarketable;\r\n },\r\n searchClick(search) {\r\n this.search.name = search;\r\n this.getDataList();\r\n },\r\n handlePaginationChange(val) {\r\n this.pageData = val;\r\n this.getDataList();\r\n },\r\n getDataList() {\r\n this.loading = true;\r\n var params = {\r\n name: this.search.name,\r\n isMarketable: this.search.isMarketable,\r\n total: 200,\r\n pageIndex: this.pageData.pageIndex,\r\n pageSize: this.pageData.pageSize,\r\n };\r\n if (this.mockData) {\r\n mockSrv.productList(params).then((resp) => {\r\n if (resp.res == 0) {\r\n this.tableData = resp.data.Data;\r\n this.pageData.totalNum = resp.data.Total;\r\n }\r\n });\r\n } else {\r\n this.$http\r\n .post(\"/Product/List.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n this.tableData = resp.data.Data;\r\n this.pageData.totalNum = resp.data.Total;\r\n }\r\n })\r\n .catch((err) => {\r\n this.$message({\r\n message: `获取商品列表失败`,\r\n type: \"error\",\r\n });\r\n })\r\n .finally(() => {\r\n this.loading = false;\r\n });\r\n }\r\n },\r\n updateFreeClientFunctions() {\r\n this.$confirm(\"此操作将同步免费版团队功能, 是否继续?\", \"提示\", {\r\n confirmButtonText: \"确定\",\r\n cancelButtonText: \"取消\",\r\n type: \"warning\",\r\n })\r\n .then(() => {\r\n this.loading = true;\r\n this.$http\r\n .post(\"/Product/UpdateFreeClientFunctions.ashx\")\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n this.$message({\r\n message: `同步客户端功能成功`,\r\n type: \"success\",\r\n });\r\n this.getDataList();\r\n }\r\n })\r\n .catch((err) => {\r\n this.$message({\r\n message: `同步客户端功能失败`,\r\n type: \"error\",\r\n });\r\n })\r\n .finally(() => {\r\n this.loading = false;\r\n });\r\n })\r\n .catch(() => {\r\n this.$message({\r\n type: \"info\",\r\n message: \"已取消同步\",\r\n });\r\n });\r\n },\r\n updateClientFunctions(product) {\r\n this.$confirm(\"此操作将同步该商品绑定的团队功能, 是否继续?\", \"提示\", {\r\n confirmButtonText: \"确定\",\r\n cancelButtonText: \"取消\",\r\n type: \"warning\",\r\n })\r\n .then(() => {\r\n this.loading = true;\r\n var params = {\r\n Id: product.Id,\r\n };\r\n this.$http\r\n .post(\"/Product/UpdateClientFunctions.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n this.$message({\r\n message: `同步客户端功能成功`,\r\n type: \"success\",\r\n });\r\n this.getDataList();\r\n }\r\n })\r\n .catch((err) => {\r\n this.$message({\r\n message: `同步客户端功能失败`,\r\n type: \"error\",\r\n });\r\n })\r\n .finally(() => {\r\n this.loading = false;\r\n });\r\n })\r\n .catch(() => {\r\n this.$message({\r\n type: \"info\",\r\n message: \"已取消同步\",\r\n });\r\n });\r\n },\r\n deleteProduct(product) {\r\n this.$confirm(\"此操作将永久删除该商品, 是否继续?\", \"提示\", {\r\n confirmButtonText: \"确定\",\r\n cancelButtonText: \"取消\",\r\n type: \"warning\",\r\n })\r\n .then(() => {\r\n this.loading = true;\r\n var params = {\r\n Id: product.Id,\r\n };\r\n this.$http\r\n .post(\"/Product/Delete.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n this.$message({\r\n message: `删除商品成功`,\r\n type: \"success\",\r\n });\r\n this.getDataList();\r\n }\r\n })\r\n .catch((err) => {\r\n this.$message({\r\n message: `删除商品失败`,\r\n type: \"error\",\r\n });\r\n })\r\n .finally(() => {\r\n this.loading = false;\r\n });\r\n })\r\n .catch(() => {\r\n this.$message({\r\n type: \"info\",\r\n message: \"已取消删除\",\r\n });\r\n });\r\n },\r\n changeMarketable(product) {\r\n this.loading = true;\r\n var params = {\r\n Id: product.Id,\r\n isMarketable: !product.IsMarketable,\r\n };\r\n this.$http\r\n .post(\"/Product/ChangeMarketable.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n product.IsMarketable = !product.IsMarketable;\r\n this.$message({\r\n message: (product.IsMarketable ? \"上架\" : \"下架\") + `成功`,\r\n type: \"success\",\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n this.$message({\r\n message: `操作失败`,\r\n type: \"error\",\r\n });\r\n })\r\n .finally(() => {\r\n this.loading = false;\r\n });\r\n },\r\n // 打开窗口\r\n openWin(ty, obj) {\r\n var type = \"\";\r\n if (ty != \"\") {\r\n type = ty === \"ad\" ? \"Add\" : \"Edit\";\r\n }\r\n this.indexData.type = type;\r\n if (ty != \"ad\") {\r\n this.indexData.row = obj;\r\n } else {\r\n this.indexData.row = null;\r\n }\r\n this.$modal.show(\"productInfo\");\r\n this.$nextTick(() => {\r\n this.$refs.productInfo.changeEditState();\r\n });\r\n },\r\n },\r\n mounted() {\r\n this.getDataList();\r\n },\r\n};\r\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!./index.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!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=49568167&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=49568167&lang=less&scoped=true&\"\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 \"49568167\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}