{"version":3,"sources":["webpack:///./src/assets/img/emptyMem.png","webpack:///./src/userview/team-management/buy.vue?6c04","webpack:///./src/userview/team-management/buy.vue?2835","webpack:///src/userview/team-management/D:/Softwares/工作平台源码/对外版本地存储/网站前端/src/userview/team-management/buy.vue","webpack:///./src/userview/team-management/buy.vue?b1e8","webpack:///./src/userview/team-management/buy.vue"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","modalName","url","referer","on","beforeClose","opened","$event","$emit","directives","name","rawName","value","expression","ref","indexData","comSubmit","editClick","model","callback","$$v","editState","productInfo","Clients","length","Storages","formData","Rules","nativeOn","preventDefault","slot","showClients","_v","getCurrenClientInfo","_s","_e","staticStyle","handleCurrentChangeClient","scopedSlots","_u","key","fn","scope","row","Id","$set","getPriceDiscription","style","width","comWidth","getPrice","_n","currentRowClient","Unit","domProps","formatedPromotionInfoClient","AvailableDays","CurrentClient","getAvailableDays","ClientAvailableDays","ClientDueTime","timeFormat","showStorage","getCurrentStorageInfo","handleCurrentChangeStorage","currentRowStorage","FreeStorageCount","formatedPromotionInfoStorage","CurrentStorage","StorageAvailableDays","StorageDueTime","formatedCouponDetail","winTmpSubmiting","totalPriceServer","orderDiscountInfo","orderInfo","OriginalTotalPrice","btnBuyEnable","staticRenderFns","props","type","Object","default","String","components","XModal","CWinTmp","data","loading","attend","promotionInfoClient","promotionInfoStorage","teamId","storageSKUId","storageCount","storagePrice","storageAvailableDays","storagePeriod","storageUnit","clientSKUId","clientCount","clientPrice","clientAvailableDays","clientPeriod","clientUnit","couponCode","couponDetail","required","message","trigger","validator","clientCountValidator","storageCountValidator","clientAvailableDaysValidator","storageAvailableDaysValidator","watch","getCouponDetail","computed","mapState","cmurl","process","totalPrice","calcSKUPrice","total","toFixed","skus","noChange","ClientCount","push","SKUId","Count","StorageCount","info","DiscountInfo","split","OrderSKUPrices","forEach","m","replace","filters","truncateText","text","maxWords","substring","methods","rule","v","minClientCount","clientMinCount","minStorageCount","storageMinCount","Error","Name","Functions","day","skuType","skuId","count","skuAvailableDays","period","price","skuPrice","isTeamProductAvailable","isSameProduct","skuCountNeedPay","newAddCount","oldAvailableDays","newAddAvailableDays","newAddAvailablePeriod","availablePeriod","Math","ceil","$message","round","min","sizeFormat","val","currentUnit","targetUnit","units","currentIndex","indexOf","targetIndex","abs","mod","pow","Price","getPromotions","setCurrentClient","$nextTick","$refs","clientTable","setCurrentRow","setCurrentStorage","storageTable","checkRule","msg","Array","isArray","getProductList","skuIds","params","$http","post","then","resp","res","catch","err","editForm","validate","valid","couponCodes","TotalPrice","finally","find","changeEditState","canEdit","isNew","submiting","winTmp","toggleComfirm","toggleSubmit","baseURL","window","location","protocol","host","returnUrl","html","document","write","$modal","hide","clearValidate","assign","$data","$options","$router","setLoading","component"],"mappings":"sHAAAA,EAAOC,QAAU,IAA0B,6B,6DCA3C,W,yCCAA,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,YAAY,cAAcC,MAAM,CAAC,KAAOP,EAAIQ,UAAU,MAAQ,MAAM,OAAS,MAAM,IAAMR,EAAIS,IAAI,QAAUT,EAAIU,SAASC,GAAG,CAAC,YAAcX,EAAIY,YAAY,OAASZ,EAAIa,OAAO,YAAc,SAASC,GAAQ,OAAOd,EAAIe,MAAM,gBAAgB,WAAa,SAASD,GAAQ,OAAOd,EAAIe,MAAM,iBAAiB,CAACX,EAAG,YAAY,CAACY,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,YAAYC,MAAOnB,EAAW,QAAEoB,WAAW,YAAYC,IAAI,SAASd,MAAM,CAAC,UAAYP,EAAIsB,WAAWX,GAAG,CAAC,UAAYX,EAAIuB,UAAU,aAAevB,EAAIuB,UAAU,UAAYvB,EAAIwB,WAAWC,MAAM,CAACN,MAAOnB,EAAa,UAAE0B,SAAS,SAAUC,GAAM3B,EAAI4B,UAAUD,GAAKP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":["module.exports = __webpack_public_path__ + \"img/emptyMem.6c691878.png\";","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!./buy.vue?vue&type=style&index=0&id=709137fe&lang=less&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('XModal',{staticClass:\"productInfo\",attrs:{\"name\":_vm.modalName,\"width\":'75%',\"height\":\"75%\",\"url\":_vm.url,\"referer\":_vm.referer},on:{\"beforeClose\":_vm.beforeClose,\"opened\":_vm.opened,\"loadSuccess\":function($event){return _vm.$emit('loadSuccess')},\"beforeOpen\":function($event){return _vm.$emit('beforeOpen')}}},[_c('c-win-tmp',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],ref:\"winTmp\",attrs:{\"indexData\":_vm.indexData},on:{\"topSubmit\":_vm.comSubmit,\"comfirmClick\":_vm.comSubmit,\"editClick\":_vm.editClick},model:{value:(_vm.editState),callback:function ($$v) {_vm.editState=$$v},expression:\"editState\"}},[(_vm.productInfo.Clients.length > 0 || _vm.productInfo.Storages.length > 0)?_c('el-form',{ref:\"editForm\",attrs:{\"slot\":\"form\",\"inline\":true,\"model\":_vm.formData,\"rules\":_vm.Rules,\"label-width\":\"100px\"},nativeOn:{\"submit\":function($event){$event.preventDefault();}},slot:\"form\"},[(_vm.showClients && _vm.productInfo.Clients.length > 0)?_c('el-card',{attrs:{\"shadow\":\"never\"}},[_c('div',{staticClass:\"clearfix\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('span',[_vm._v(\"设备\")]),(_vm.productInfo.CurrentClient)?_c('span',{staticClass:\"current-product-info\",attrs:{\"title\":_vm.getCurrenClientInfo()}},[_vm._v(\" (正在使用:\"+_vm._s(_vm.getCurrenClientInfo())+\") \")]):_vm._e()]),_c('el-form-item',{staticStyle:{\"width\":\"100%\"},attrs:{\"label\":\"购买规格:\",\"prop\":\"clientSKUId\"}},[_c('el-table',{ref:\"clientTable\",staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.productInfo.Clients,\"highlight-current-row\":\"\",\"border\":\"\"},on:{\"current-change\":_vm.handleCurrentChangeClient}},[_c('el-table-column',{attrs:{\"property\":\"Id\",\"label\":\"选择\",\"width\":\"200\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-radio',{attrs:{\"name\":\"rdb-client\",\"label\":scope.row.Id},model:{value:(_vm.formData.clientSKUId),callback:function ($$v) {_vm.$set(_vm.formData, \"clientSKUId\", $$v)},expression:\"formData.clientSKUId\"}})]}}],null,false,4283794607)}),_c('el-table-column',{attrs:{\"property\":\"Name\",\"label\":\"名称\",\"width\":\"200\"}}),_c('el-table-column',{attrs:{\"property\":\"Price\",\"label\":\"售价说明\",\"width\":\"200\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(_vm.getPriceDiscription(scope.row))+\" \")]}}],null,false,3444750019)}),_c('el-table-column',{attrs:{\"property\":\"StoreSchema\",\"label\":\"存储方式\"}}),_c('el-table-column',{attrs:{\"property\":\"Functions\",\"label\":\"额外可用功能\"}})],1)],1),_c('el-row',{staticStyle:{\"margin-top\":\"1rem\",\"flex-direction\":\"row\"},attrs:{\"type\":\"flex\"}},[_c('el-form-item',{attrs:{\"prop\":\"clientCount\",\"label-width\":\"100px\"}},[_c('template',{staticStyle:{\"text-align-last\":\"start\"},slot:\"label\"},[_vm._v(\" 设备数量: \")]),_c('el-input',{style:({ width: _vm.comWidth }),attrs:{\"type\":\"number\",\"placeholder\":\"请填写数量\",\"clearable\":\"\",\"min\":0,\"step\":1},on:{\"change\":_vm.getPrice},model:{value:(_vm.formData.clientCount),callback:function ($$v) {_vm.$set(_vm.formData, \"clientCount\", _vm._n($$v))},expression:\"formData.clientCount\"}},[(_vm.currentRowClient)?_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.currentRowClient.Unit))]):_vm._e()],2),_c('p',{staticStyle:{\"color\":\"#e6a23c\",\"font-size\":\"12px\"}},[_c('i',{staticClass:\"el-icon-info\"}),_vm._v(\" 如果与当前规格不一致,则会覆盖数量;相同规格叠加数量 \")])],2),(_vm.formatedPromotionInfoClient)?_c('div',{staticClass:\"promotion\"},[_c('h3',[_c('i',{staticClass:\"el-icon-info\"}),_vm._v(\" 优惠信息\")]),_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.formatedPromotionInfoClient)}})]):_vm._e()],1),(\n _vm.currentRowClient &&\n _vm.currentRowClient.AvailableDays &&\n _vm.currentRowClient.AvailableDays > 0\n )?_c('el-row',{staticStyle:{\"margin-top\":\"1rem\"}},[_c('el-form-item',{attrs:{\"label\":\"设备时长:\",\"prop\":\"clientAvailableDays\"}},[_c('el-input',{style:({ width: _vm.comWidth }),attrs:{\"type\":\"number\",\"placeholder\":\"请填写时长\",\"clearable\":\"\",\"min\":0,\"step\":1},on:{\"change\":_vm.getPrice},model:{value:(_vm.formData.clientAvailableDays),callback:function ($$v) {_vm.$set(_vm.formData, \"clientAvailableDays\", _vm._n($$v))},expression:\"formData.clientAvailableDays\"}},[_c('template',{slot:\"append\"},[_vm._v(\"天\")])],2),(\n _vm.currentRowClient &&\n _vm.productInfo.CurrentClient &&\n _vm.currentRowClient.Id == _vm.productInfo.CurrentClient.Id\n )?_c('p',[_c('span',[_vm._v(\" 剩余时长:\"+_vm._s(_vm.getAvailableDays(_vm.productInfo.ClientAvailableDays))+\"   \")]),(\n _vm.productInfo.ClientAvailableDays &&\n _vm.productInfo.ClientAvailableDays > 0\n )?_c('span',[_vm._v(\" 截止时间:\"+_vm._s(_vm.productInfo.ClientDueTime.timeFormat(\"yyyy-MM-dd HH:mm\")))]):_vm._e()]):_vm._e()],1)],1):_vm._e()],1):_vm._e(),(_vm.showStorage && _vm.productInfo.Storages.length > 0)?_c('el-card',{attrs:{\"shadow\":\"never\"}},[_c('div',{staticClass:\"clearfix\",attrs:{\"slot\":\"header\"},slot:\"header\"},[_c('span',[_vm._v(\"存储量\")]),(_vm.productInfo.CurrentStorage)?_c('span',{staticClass:\"current-product-info\",attrs:{\"title\":_vm.getCurrentStorageInfo()}},[_vm._v(\" (正在使用:\"+_vm._s(_vm.getCurrentStorageInfo())+\") \")]):_vm._e()]),_c('el-form-item',{staticStyle:{\"width\":\"100%\"},attrs:{\"label\":\"购买规格:\",\"prop\":\"storageSKUId\"}},[_c('el-table',{ref:\"storageTable\",staticStyle:{\"width\":\"100%\"},attrs:{\"data\":_vm.productInfo.Storages,\"highlight-current-row\":\"\",\"border\":\"\"},on:{\"current-change\":_vm.handleCurrentChangeStorage}},[_c('el-table-column',{attrs:{\"property\":\"Id\",\"label\":\"选择\",\"width\":\"200\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('el-radio',{attrs:{\"name\":\"rdb-storage\",\"label\":scope.row.Id},model:{value:(_vm.formData.storageSKUId),callback:function ($$v) {_vm.$set(_vm.formData, \"storageSKUId\", $$v)},expression:\"formData.storageSKUId\"}})]}}],null,false,914674639)}),_c('el-table-column',{attrs:{\"property\":\"Name\",\"label\":\"名称\",\"width\":\"200\"}}),_c('el-table-column',{attrs:{\"property\":\"Price\",\"label\":\"售价说明\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_vm._v(\" \"+_vm._s(_vm.getPriceDiscription(scope.row))+\" \")]}}],null,false,3444750019)})],1)],1),_c('el-row',{staticStyle:{\"margin-top\":\"1rem\",\"flex-direction\":\"row\"},attrs:{\"type\":\"flex\"}},[_c('el-form-item',{attrs:{\"prop\":\"storageCount\",\"label-width\":\"100px\"}},[_c('template',{staticStyle:{\"text-align-last\":\"start\"},slot:\"label\"},[_vm._v(\" 存储量: \")]),_c('el-input',{style:({ width: _vm.comWidth }),attrs:{\"type\":\"number\",\"placeholder\":\"请填写存储量\",\"clearable\":\"\",\"min\":0,\"step\":1},on:{\"change\":_vm.getPrice},model:{value:(_vm.formData.storageCount),callback:function ($$v) {_vm.$set(_vm.formData, \"storageCount\", _vm._n($$v))},expression:\"formData.storageCount\"}},[(_vm.currentRowStorage)?_c('template',{slot:\"append\"},[_vm._v(_vm._s(_vm.currentRowStorage.Unit))]):_vm._e()],2),(_vm.productInfo.FreeStorageCount > 0)?_c('p',[_vm._v(\" 可免费使用: \"+_vm._s(_vm.productInfo.FreeStorageCount)+\"MB \")]):_vm._e(),_c('p',{staticStyle:{\"color\":\"#e6a23c\",\"font-size\":\"12px\"}},[_c('i',{staticClass:\"el-icon-info\"}),_vm._v(\" 如果与当前规格不一致,则会覆盖数量;相同规格叠加数量 \")])],2),(_vm.formatedPromotionInfoStorage)?_c('div',{staticClass:\"promotion\"},[_c('h3',[_c('i',{staticClass:\"el-icon-info\"}),_vm._v(\" 优惠信息\")]),_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.formatedPromotionInfoStorage)}})]):_vm._e()],1),(\n _vm.currentRowStorage &&\n _vm.currentRowStorage.AvailableDays &&\n _vm.currentRowStorage.AvailableDays > 0\n )?_c('el-row',{staticStyle:{\"margin-top\":\"1rem\"}},[_c('el-form-item',{attrs:{\"label\":\"存储量时长:\",\"prop\":\"storageAvailableDays\"}},[_c('el-input',{style:({ width: _vm.comWidth }),attrs:{\"type\":\"number\",\"placeholder\":\"请填写时长\",\"clearable\":\"\",\"min\":0,\"step\":1},on:{\"change\":_vm.getPrice},model:{value:(_vm.formData.storageAvailableDays),callback:function ($$v) {_vm.$set(_vm.formData, \"storageAvailableDays\", _vm._n($$v))},expression:\"formData.storageAvailableDays\"}},[_c('template',{slot:\"append\"},[_vm._v(\"天\")])],2),(\n _vm.currentRowStorage &&\n _vm.productInfo.CurrentStorage &&\n _vm.currentRowStorage.Id == _vm.productInfo.CurrentStorage.Id\n )?_c('p',[_c('span',[_vm._v(\" 剩余时长:\"+_vm._s(_vm.getAvailableDays(_vm.productInfo.StorageAvailableDays))+\"   \")]),(_vm.productInfo.StorageAvailableDays)?_c('span',[_vm._v(\" 截止时间:\"+_vm._s(_vm.productInfo.StorageDueTime.timeFormat(\"yyyy-MM-dd HH:mm\")))]):_vm._e()]):_vm._e()],1)],1):_vm._e()],1):_vm._e(),_c('el-row',{staticStyle:{\"margin-top\":\"1rem\",\"flex-direction\":\"row\"},attrs:{\"type\":\"flex\"}},[_c('el-form-item',{attrs:{\"prop\":\"couponCode\",\"label-width\":\"150px\"}},[_c('template',{staticStyle:{\"text-align-last\":\"start\"},slot:\"label\"},[_vm._v(\" 输入企业折扣码: \")]),_c('el-input',{style:({ width: _vm.comWidth }),attrs:{\"type\":\"text\",\"placeholder\":\"企业折扣码\",\"clearable\":\"\"},on:{\"change\":_vm.getPrice},model:{value:(_vm.formData.couponCode),callback:function ($$v) {_vm.$set(_vm.formData, \"couponCode\", $$v)},expression:\"formData.couponCode\"}}),_c('p',{staticStyle:{\"color\":\"#e6a23c\",\"font-size\":\"12px\"}},[_c('i',{staticClass:\"el-icon-info\"}),_vm._v(\" 输入企业折扣码可获得购买优惠 \")])],2),(_vm.formatedCouponDetail)?_c('div',{staticClass:\"promotion\"},[_c('h3',[_c('i',{staticClass:\"el-icon-info\"}),_vm._v(\" 优惠信息\")]),_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.formatedCouponDetail)}})]):_vm._e()],1)],1):_c('div',{staticClass:\"empty-wrapper\",attrs:{\"slot\":\"form\"},slot:\"form\"},[_c('img',{attrs:{\"src\":require(\"../../assets/img/emptyMem.png\"),\"alt\":\"\"}}),_c('p',{staticClass:\"empty-taskList\"},[_vm._v(\"暂无数据\")])]),(_vm.productInfo.Clients.length > 0 || _vm.productInfo.Storages.length > 0)?_c('el-row',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.winTmpSubmiting),expression:\"!winTmpSubmiting\"}],ref:\"bottomContainer\",attrs:{\"slot\":\"form\",\"type\":\"flex\",\"justify\":\"space-between\",\"align\":\"middle\",\"id\":\"bottom-container\"},slot:\"form\"},[_c('span',{staticClass:\"total-price\"},[_c('span',[_vm._v(\"费用:\")]),_c('span',{staticClass:\"price\"},[_vm._v(\"¥ \"+_vm._s(_vm.totalPriceServer))]),(_vm.orderDiscountInfo)?_c('el-tooltip',[_c('div',{attrs:{\"slot\":\"content\"},domProps:{\"innerHTML\":_vm._s(_vm.orderDiscountInfo)},slot:\"content\"}),_c('span',{staticStyle:{\"color\":\"#909399\",\"font-size\":\"12px\",\"cursor\":\"pointer\",\"text-decoration\":\"line-through\",\"margin-left\":\"4px\"}},[_c('i',{staticClass:\"el-icon-info\"}),_vm._v(\" 原价:\"+_vm._s(_vm.orderInfo.OriginalTotalPrice)+\" \")])]):_vm._e()],1),_c('el-button',{attrs:{\"type\":\"primary\",\"id\":\"btn-buy\",\"disabled\":!_vm.btnBuyEnable},on:{\"click\":_vm.comSubmit}},[_vm._v(\"确定订单\")])],1):_vm._e()],1)],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//\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//\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 { mapState } from \"vuex\";\r\nexport default {\r\n props: {\r\n indexData: {\r\n type: Object,\r\n default: () => {\r\n return null;\r\n },\r\n },\r\n url: {\r\n type: String,\r\n default: null,\r\n },\r\n referer: {\r\n type: String,\r\n default: null,\r\n },\r\n modalName: {\r\n type: String,\r\n default: \"productInfo\",\r\n },\r\n },\r\n components: {\r\n XModal: () => import(\"@/components/XModal\"),\r\n CWinTmp: () => import(\"@/components/CWinTmp\"),\r\n },\r\n data() {\r\n return {\r\n showClients: true,\r\n showStorage: false,\r\n winTmpSubmiting: false,\r\n loading: false,\r\n editState: false,\r\n comWidth: \"95%\",\r\n attend: false,\r\n currentRowClient: null,\r\n currentRowStorage: null,\r\n productInfo: {\r\n Clients: [],\r\n Storages: [],\r\n CurrentStorage: null,\r\n CurrentClient: null,\r\n StorageAvailableDays: null,\r\n ClientAvailableDays: null,\r\n },\r\n orderInfo: null,\r\n promotionInfoClient: null,\r\n promotionInfoStorage: null,\r\n totalPriceServer: 0,\r\n formData: {\r\n teamId: 0,\r\n storageSKUId: 0,\r\n storageCount: 0,\r\n storagePrice: 0,\r\n storageAvailableDays: null,\r\n storagePeriod: null,\r\n storageUnit: null,\r\n clientSKUId: 0,\r\n clientCount: 0,\r\n clientPrice: 0,\r\n clientAvailableDays: null,\r\n clientPeriod: null,\r\n clientUnit: null,\r\n couponCode: null,\r\n },\r\n couponDetail: null,\r\n Rules: {\r\n teamId: [\r\n {\r\n required: true,\r\n message: \"请选择团队\",\r\n trigger: \"blur\",\r\n },\r\n ],\r\n storageSKUId: [\r\n {\r\n required: true,\r\n message: \"请选择存储量\",\r\n trigger: \"blur\",\r\n },\r\n ],\r\n clientSKUId: [\r\n {\r\n required: true,\r\n message: \"请选择设备\",\r\n trigger: \"blur\",\r\n },\r\n ],\r\n clientCount: [\r\n {\r\n type: \"number\",\r\n validator: this.clientCountValidator,\r\n },\r\n ],\r\n storageCount: [\r\n { type: \"number\", validator: this.storageCountValidator },\r\n ],\r\n clientAvailableDays: [\r\n { type: \"number\", validator: this.clientAvailableDaysValidator },\r\n ],\r\n storageAvailableDays: [\r\n { type: \"number\", validator: this.storageAvailableDaysValidator },\r\n ],\r\n },\r\n };\r\n },\r\n watch: {\r\n \"formData.couponCode\"() {\r\n this.couponDetail = null;\r\n if (this.formData.couponCode) {\r\n this.getCouponDetail(this.formData.couponCode);\r\n }\r\n },\r\n },\r\n computed: {\r\n ...mapState([\"user\"]),\r\n cmurl() {\r\n return process.env.VUE_APP_CMURL;\r\n },\r\n /**\r\n * 新增、修改或已过期,数量*时长/货品有效时长*货品单价\r\n * 原有货品:(原有数量或减少后的数量*(增加时长/货品有效时长)+增加数量*时长/货品有效时长)*货品单价\r\n * **/\r\n totalPrice() {\r\n var clientPrice = 0;\r\n if (this.formData.clientSKUId && this.formData.clientCount > 0) {\r\n clientPrice = this.calcSKUPrice(\r\n \"client\",\r\n this.formData.clientSKUId,\r\n this.formData.clientCount,\r\n this.formData.clientAvailableDays,\r\n this.formData.clientPeriod,\r\n this.formData.clientPrice\r\n );\r\n }\r\n var storagePrice = 0;\r\n if (this.formData.storageSKUId && this.formData.storageCount > 0) {\r\n storagePrice = this.calcSKUPrice(\r\n \"storage\",\r\n this.formData.storageSKUId,\r\n this.formData.storageCount,\r\n this.formData.storageAvailableDays,\r\n this.formData.storagePeriod,\r\n this.formData.storagePrice\r\n );\r\n }\r\n var total = clientPrice + storagePrice;\r\n total = total.toFixed(2);\r\n if (total < 0) {\r\n total = 0;\r\n }\r\n return total;\r\n },\r\n btnBuyEnable() {\r\n if (this.totalPriceServer == 0) {\r\n return false;\r\n }\r\n var skus = [];\r\n if (\r\n this.formData.clientSKUId > 0 &&\r\n this.formData.clientCount > 0 &&\r\n this.formData.clientAvailableDays != 0\r\n ) {\r\n let noChange = false;\r\n if (\r\n this.productInfo.CurrentClient &&\r\n this.formData.clientSKUId == this.productInfo.CurrentClient.Id &&\r\n this.formData.clientAvailableDays ==\r\n this.productInfo.ClientAvailableDays &&\r\n this.formData.clientCount == this.productInfo.ClientCount\r\n ) {\r\n noChange = true;\r\n }\r\n if (!noChange) {\r\n skus.push({\r\n SKUId: this.formData.clientSKUId,\r\n Count: this.formData.clientCount,\r\n AvailableDays: this.formData.clientAvailableDays,\r\n });\r\n }\r\n }\r\n if (\r\n this.formData.storageSKUId > 0 &&\r\n this.formData.storageCount > 0 &&\r\n this.formData.storageAvailableDays != 0\r\n ) {\r\n let noChange = false;\r\n if (\r\n this.productInfo.CurrentStorage &&\r\n this.formData.storageSKUId == this.productInfo.CurrentStorage.Id &&\r\n this.formData.storageAvailableDays ==\r\n this.productInfo.StorageAvailableDays &&\r\n this.formData.storageCount == this.productInfo.StorageCount\r\n ) {\r\n noChange = true;\r\n }\r\n if (!noChange) {\r\n skus.push({\r\n SKUId: this.formData.storageSKUId,\r\n Count: this.formData.storageCount,\r\n AvailableDays: this.formData.storageAvailableDays,\r\n });\r\n }\r\n }\r\n return skus.length > 0;\r\n },\r\n orderDiscountInfo() {\r\n var info = \"\";\r\n if (this.orderInfo) {\r\n if (this.orderInfo.DiscountInfo) {\r\n info += this.orderInfo.DiscountInfo.split(\"\\r\\n\")[0];\r\n }\r\n this.orderInfo.OrderSKUPrices.forEach((m) => {\r\n if (m.DiscountInfo) {\r\n info += m.DiscountInfo.split(\"\\r\\n\")[0] + \"\\r\\n\";\r\n }\r\n });\r\n }\r\n info = info.replace(/\\r\\n/g, \"
\");\r\n return info;\r\n },\r\n formatedPromotionInfoClient() {\r\n if (!this.promotionInfoClient) {\r\n return \"\";\r\n } else {\r\n return this.promotionInfoClient.replace(/\\r\\n/g, \"
\");\r\n }\r\n },\r\n formatedCouponDetail() {\r\n if (!this.couponDetail) {\r\n return \"\";\r\n } else {\r\n return this.couponDetail.replace(/\\r\\n/g, \"
\");\r\n }\r\n },\r\n formatedPromotionInfoStorage() {\r\n if (!this.promotionInfoStorage) {\r\n return \"\";\r\n } else {\r\n return this.promotionInfoStorage.replace(/\\r\\n/g, \"
\");\r\n }\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 clientCountValidator(rule, v, callback) {\r\n var minClientCount = this.clientMinCount();\r\n var minStorageCount = this.storageMinCount();\r\n if (\r\n v != 0 &&\r\n v < minClientCount &&\r\n this.formData.storageCount < minStorageCount\r\n ) {\r\n callback(new Error(\"客户端数量和存储量不能同时降配\"));\r\n } else {\r\n callback();\r\n }\r\n },\r\n storageCountValidator(rule, v, callback) {\r\n var minClientCount = this.clientMinCount();\r\n var minStorageCount = this.storageMinCount();\r\n if (\r\n v != 0 &&\r\n v < minStorageCount &&\r\n this.formData.clientCount < minClientCount\r\n ) {\r\n callback(new Error(\"客户端数量和存储量不能同时降配\"));\r\n } else {\r\n callback();\r\n }\r\n },\r\n clientAvailableDaysValidator(rule, v, callback) {\r\n if (\r\n this.productInfo.CurrentClient &&\r\n this.formData.clientSKUId == this.productInfo.CurrentClient.Id\r\n ) {\r\n if (\r\n this.formData.clientAvailableDays ==\r\n this.productInfo.ClientAvailableDays\r\n ) {\r\n callback();\r\n } else {\r\n if (\r\n this.formData.clientPeriod &&\r\n (v - this.productInfo.ClientAvailableDays) %\r\n this.formData.clientPeriod !=\r\n 0\r\n ) {\r\n callback(\r\n new Error(\r\n `(设备时长-剩余时长)必须能被最小单位${this.formData.clientPeriod}整除`\r\n )\r\n );\r\n } else {\r\n callback();\r\n }\r\n }\r\n } else if (\r\n this.formData.clientPeriod &&\r\n v % this.formData.clientPeriod != 0\r\n ) {\r\n callback(\r\n new Error(\r\n `(设备时长-剩余时长)必须能被最小单位${this.formData.clientPeriod}整除`\r\n )\r\n );\r\n } else {\r\n callback();\r\n }\r\n },\r\n storageAvailableDaysValidator(rule, v, callback) {\r\n if (\r\n this.productInfo.CurrentStorage &&\r\n this.formData.storageSKUId == this.productInfo.CurrentStorage.Id\r\n ) {\r\n if (\r\n this.formData.storageAvailableDays ==\r\n this.productInfo.StorageAvailableDays\r\n ) {\r\n callback();\r\n } else {\r\n if (\r\n this.formData.storagePeriod &&\r\n (v - this.productInfo.StorageAvailableDays) %\r\n this.formData.storagePeriod !=\r\n 0\r\n ) {\r\n callback(\r\n new Error(\r\n `(存储量时长-剩余时长)必须能被最小单位${this.formData.storagePeriod}整除`\r\n )\r\n );\r\n } else {\r\n callback();\r\n }\r\n }\r\n } else if (\r\n this.formData.storagePeriod &&\r\n v % this.formData.storagePeriod != 0\r\n ) {\r\n callback(\r\n new Error(\r\n `(存储量时长-剩余时长)必须能被最小单位${this.formData.storagePeriod}整除`\r\n )\r\n );\r\n } else {\r\n callback();\r\n }\r\n },\r\n getCurrenClientInfo() {\r\n var info = `${this.productInfo.CurrentClient.Name}:${\r\n this.productInfo.ClientCount + this.productInfo.CurrentClient.Unit\r\n },可用功能:${\r\n this.productInfo.CurrentClient.Functions\r\n },可用时长:${this.getAvailableDays(\r\n this.productInfo.ClientAvailableDays\r\n )}`;\r\n return info;\r\n },\r\n getCurrentStorageInfo() {\r\n var info = `${this.productInfo.CurrentStorage.Name}:${\r\n this.productInfo.StorageCount + this.productInfo.CurrentStorage.Unit\r\n },可用时长:${this.getAvailableDays(\r\n this.productInfo.StorageAvailableDays\r\n )}`;\r\n return info;\r\n },\r\n getAvailableDays(day) {\r\n if (!day || day < 0) {\r\n return \"永久有效\";\r\n } else if (day == 0) {\r\n return \"已过期\";\r\n } else {\r\n return day + \"天\";\r\n }\r\n },\r\n /**\r\n * 新增、修改或已过期,数量*时长/货品有效时长*货品单价\r\n * 原有货品:(原有数量或减少后的数量*(增加时长/货品有效时长)+增加数量*时长/货品有效时长)*货品单价\r\n * **/\r\n calcSKUPrice(skuType, skuId, count, skuAvailableDays, period, price) {\r\n var totalPrice = 0;\r\n var skuPrice = 0;\r\n var isTeamProductAvailable = false;\r\n var isSameProduct = false;\r\n if (skuType == \"client\") {\r\n if (!this.productInfo.ClientAvailableDays) {\r\n isTeamProductAvailable = true;\r\n } else if (this.productInfo.ClientAvailableDays >= 0) {\r\n isTeamProductAvailable = true;\r\n }\r\n if (this.productInfo.CurrentClient) {\r\n isSameProduct = this.productInfo.CurrentClient.Id == skuId; //相同货品且团队有效即可叠加数量\r\n }\r\n } else {\r\n if (!this.productInfo.StorageAvailableDays) {\r\n isTeamProductAvailable = true;\r\n } else if (this.productInfo.StorageAvailableDays >= 0) {\r\n isTeamProductAvailable = true;\r\n }\r\n if (this.productInfo.CurrentClient) {\r\n isSameProduct = this.productInfo.CurrentStorage.Id == skuId; //相同货品且团队有效即可叠加数量\r\n }\r\n }\r\n if (isSameProduct && isTeamProductAvailable) {\r\n var skuCountNeedPay = 0;\r\n if (skuType == \"client\") {\r\n skuCountNeedPay = this.productInfo.ClientCount;\r\n } else {\r\n skuCountNeedPay = this.productInfo.StorageCount;\r\n }\r\n var newAddCount = 0;\r\n if (count >= skuCountNeedPay) {\r\n newAddCount = count - skuCountNeedPay;\r\n } else {\r\n skuCountNeedPay = count;\r\n }\r\n var oldAvailableDays = null;\r\n var newAddAvailableDays = null;\r\n var newAddAvailablePeriod = 0;\r\n if (skuType == \"client\") {\r\n oldAvailableDays = this.productInfo.ClientAvailableDays;\r\n } else {\r\n oldAvailableDays = this.productInfo.StorageAvailableDays;\r\n }\r\n if (skuAvailableDays && skuAvailableDays > oldAvailableDays) {\r\n newAddAvailableDays = skuAvailableDays - oldAvailableDays;\r\n }\r\n\r\n //有效天数计算\r\n let availablePeriod = 0;\r\n if (period) {\r\n if (period > 0) {\r\n //计算可用时长\r\n if (skuAvailableDays && skuAvailableDays > 0) {\r\n availablePeriod = Math.ceil(skuAvailableDays / period);\r\n }\r\n //计算增加可用时长\r\n if (newAddAvailableDays && newAddAvailableDays > 0) {\r\n if (newAddAvailableDays % period != 0) {\r\n this.$message({\r\n message: `货品有效天数必须能被最小单位${period}整除`,\r\n type: \"error\",\r\n });\r\n return 0;\r\n }\r\n newAddAvailablePeriod = newAddAvailableDays / period;\r\n }\r\n } else {\r\n availablePeriod = 1;\r\n }\r\n } else {\r\n availablePeriod = 1;\r\n }\r\n if (newAddAvailablePeriod > 0) {\r\n skuPrice += newAddAvailablePeriod * skuCountNeedPay * price;\r\n }\r\n if (newAddCount > 0) {\r\n skuPrice += availablePeriod * newAddCount * price;\r\n }\r\n skuPrice = Math.round(skuPrice, 2);\r\n if (skuPrice < 0) {\r\n this.$message({\r\n message: `货品售价不能小于0`,\r\n type: \"error\",\r\n });\r\n return 0;\r\n }\r\n totalPrice += skuPrice;\r\n } else {\r\n //有效天数计算\r\n let availablePeriod = 0;\r\n if (period) {\r\n if (period > 0) {\r\n if (skuAvailableDays && skuAvailableDays > 0) {\r\n if (skuAvailableDays % period != 0) {\r\n this.$message({\r\n message: `货品有效天数必须能被最小单位${period}整除`,\r\n type: \"error\",\r\n });\r\n return 0;\r\n }\r\n availablePeriod = skuAvailableDays / period;\r\n }\r\n } else {\r\n availablePeriod = 1;\r\n }\r\n } else {\r\n availablePeriod = 1;\r\n }\r\n if (availablePeriod > 0 && count > 0) {\r\n skuPrice = count * availablePeriod * price;\r\n }\r\n skuPrice = Math.round(skuPrice, 2);\r\n if (skuPrice < 0) {\r\n this.$message({\r\n message: `货品售价不能小于0`,\r\n type: \"error\",\r\n });\r\n return 0;\r\n }\r\n totalPrice += skuPrice;\r\n }\r\n return totalPrice;\r\n },\r\n clientMinCount() {\r\n var min = 0;\r\n if (\r\n this.productInfo.CurrentClient &&\r\n this.formData.clientSKUId == this.productInfo.CurrentClient.Id\r\n ) {\r\n min = this.productInfo.ClientCount;\r\n }\r\n return min;\r\n },\r\n storageMinCount() {\r\n var min = 0;\r\n if (\r\n this.productInfo.CurrentStorage &&\r\n this.formData.storageSKUId == this.productInfo.CurrentStorage.Id\r\n ) {\r\n min = this.productInfo.StorageCount;\r\n }\r\n return min;\r\n },\r\n sizeFormat(val, currentUnit, targetUnit) {\r\n const units = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\r\n var currentIndex = units.indexOf(currentUnit);\r\n var targetIndex = units.indexOf(targetUnit);\r\n if (\r\n currentIndex == targetIndex ||\r\n currentIndex == -1 ||\r\n targetIndex == -1\r\n ) {\r\n return val;\r\n }\r\n var length = Math.abs(currentIndex - targetIndex);\r\n var mod = Math.pow(1024, length);\r\n if (currentIndex > targetIndex) {\r\n return val * mod;\r\n } else {\r\n return val / mod;\r\n }\r\n },\r\n getPriceDiscription(row) {\r\n var day = \"永久使用\";\r\n if (row.AvailableDays > 0) {\r\n day = `${row.AvailableDays}天`;\r\n }\r\n return `${row.Price}元/${row.Unit}/${day}`;\r\n },\r\n handleCurrentChangeClient(val) {\r\n if (\r\n this.productInfo.CurrentClient &&\r\n val.Id == this.productInfo.CurrentClient.Id\r\n ) {\r\n this.formData.clientAvailableDays =\r\n this.productInfo.ClientAvailableDays;\r\n } else {\r\n this.formData.clientAvailableDays = val.AvailableDays;\r\n }\r\n this.currentRowClient = val;\r\n this.formData.clientSKUId = val.Id;\r\n this.formData.clientPrice = val.Price;\r\n this.formData.clientPeriod = val.AvailableDays;\r\n this.formData.clientUnit = val.Unit;\r\n this.getPrice();\r\n this.getPromotions(\"client\");\r\n },\r\n handleCurrentChangeStorage(val) {\r\n if (\r\n this.productInfo.CurrentStorage &&\r\n val.Id == this.productInfo.CurrentStorage.Id\r\n ) {\r\n this.formData.storageAvailableDays =\r\n this.productInfo.StorageAvailableDays;\r\n } else {\r\n this.formData.storageAvailableDays = val.AvailableDays;\r\n }\r\n this.currentRowStorage = val;\r\n this.formData.storageSKUId = val.Id;\r\n this.formData.storagePrice = val.Price;\r\n this.formData.clientPeriod = val.AvailableDays;\r\n this.formData.storageUnit = val.Unit;\r\n this.getPrice();\r\n this.getPromotions(\"storage\");\r\n },\r\n setCurrentClient(row) {\r\n this.$nextTick(() => {\r\n this.$refs.clientTable.setCurrentRow(row);\r\n });\r\n },\r\n setCurrentStorage(row) {\r\n this.$nextTick(() => {\r\n this.$refs.storageTable.setCurrentRow(row);\r\n });\r\n },\r\n checkRule(value, msg) {\r\n return {\r\n validator: (rule, v, callback) => {\r\n if (Array.isArray(value)) {\r\n if (value.length == 0) {\r\n callback(new Error(msg));\r\n } else {\r\n callback();\r\n }\r\n } else if (!value) {\r\n callback(new Error(msg));\r\n } else {\r\n callback();\r\n }\r\n },\r\n required: true,\r\n trigger: [\"blur\", \"change\"],\r\n };\r\n },\r\n opened() {\r\n this.getProductList();\r\n this.formData.teamId = this.indexData.row.Id;\r\n },\r\n getPromotions(type) {\r\n var skuIds = [];\r\n if (type == \"client\" && this.formData.clientSKUId) {\r\n skuIds.push(this.formData.clientSKUId);\r\n }\r\n if (type == \"storage\" && this.formData.storageSKUId) {\r\n skuIds.push(this.formData.storageSKUId);\r\n }\r\n if (skuIds.length == 0) {\r\n return;\r\n }\r\n var params = {\r\n skuIds: skuIds,\r\n };\r\n this.$http\r\n .post(\"/Product/Promotions.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n if (type == \"client\") {\r\n this.promotionInfoClient = resp.data;\r\n } else if (type == \"storage\") {\r\n this.promotionInfoStorage = resp.data;\r\n }\r\n } else {\r\n this.$message({\r\n message: `获取优惠信息失败`,\r\n type: \"error\",\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 },\r\n getCouponDetail(couponCode) {\r\n if (!couponCode) {\r\n return;\r\n }\r\n var params = {\r\n couponCode: couponCode,\r\n };\r\n this.$http\r\n .post(\"/Product/CouponDetail.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n this.couponDetail = resp.data;\r\n } else {\r\n this.$message({\r\n message: `获取折扣码信息失败`,\r\n type: \"error\",\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 },\r\n getPrice() {\r\n this.$refs.editForm.validate((valid) => {\r\n if (valid) {\r\n var skus = [];\r\n if (\r\n this.formData.clientSKUId > 0 &&\r\n this.formData.clientCount > 0 &&\r\n this.formData.clientAvailableDays != 0\r\n ) {\r\n let noChange = false;\r\n if (\r\n this.productInfo.CurrentClient &&\r\n this.formData.clientSKUId == this.productInfo.CurrentClient.Id &&\r\n this.formData.clientAvailableDays ==\r\n this.productInfo.ClientAvailableDays &&\r\n this.formData.clientCount == this.productInfo.ClientCount\r\n ) {\r\n noChange = true;\r\n }\r\n if (!noChange) {\r\n skus.push({\r\n SKUId: this.formData.clientSKUId,\r\n Count: this.formData.clientCount,\r\n AvailableDays: this.formData.clientAvailableDays,\r\n });\r\n }\r\n }\r\n if (\r\n this.formData.storageSKUId > 0 &&\r\n this.formData.storageCount > 0 &&\r\n this.formData.storageAvailableDays != 0\r\n ) {\r\n let noChange = false;\r\n if (\r\n this.productInfo.CurrentStorage &&\r\n this.formData.storageSKUId ==\r\n this.productInfo.CurrentStorage.Id &&\r\n this.formData.storageAvailableDays ==\r\n this.productInfo.StorageAvailableDays &&\r\n this.formData.storageCount == this.productInfo.StorageCount\r\n ) {\r\n noChange = true;\r\n }\r\n if (!noChange) {\r\n skus.push({\r\n SKUId: this.formData.storageSKUId,\r\n Count: this.formData.storageCount,\r\n AvailableDays: this.formData.storageAvailableDays,\r\n });\r\n }\r\n }\r\n if (skus.length == 0) {\r\n this.totalPriceServer = 0;\r\n this.orderInfo = null;\r\n return;\r\n }\r\n\r\n this.totalPriceServer = \"计算中...\";\r\n this.orderInfo = null;\r\n var params = {\r\n teamId: this.indexData.row.Id,\r\n skus: skus,\r\n couponCodes: this.formData.couponCode\r\n ? [this.formData.couponCode]\r\n : [],\r\n };\r\n this.$http\r\n .post(\"/Order/Price.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n this.orderInfo = resp.data;\r\n if (this.orderInfo) {\r\n this.totalPriceServer = resp.data.TotalPrice;\r\n } else {\r\n this.totalPriceServer = 0;\r\n }\r\n } else {\r\n this.totalPriceServer = 0;\r\n this.$message({\r\n message: `计算订单售价失败`,\r\n type: \"error\",\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n this.totalPriceServer = 0;\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 } else {\r\n return false;\r\n }\r\n });\r\n },\r\n getProductList() {\r\n if (!this.indexData.row) {\r\n return;\r\n }\r\n this.loading = true;\r\n var params = {\r\n teamId: this.indexData.row.Id,\r\n };\r\n this.$http\r\n .post(\"/Product/Client.ashx\", params)\r\n .then((resp) => {\r\n if (resp.res == 0) {\r\n this.productInfo = resp.data;\r\n if (this.productInfo.CurrentStorage) {\r\n this.formData.storageSKUId = this.productInfo.CurrentStorage.Id;\r\n this.formData.storagePrice =\r\n this.productInfo.CurrentStorage.Price;\r\n this.formData.storageAvailableDays =\r\n this.productInfo.StorageAvailableDays;\r\n this.formData.storagePeriod =\r\n this.productInfo.CurrentStorage.AvailableDays;\r\n this.formData.storageUnit = this.productInfo.CurrentStorage.Unit;\r\n this.formData.storageCount = this.productInfo.StorageCount;\r\n this.currentRowStorage = this.productInfo.Storages.find(\r\n (m) => m.Id == this.productInfo.CurrentStorage.Id\r\n );\r\n this.formData.storagePrice = this.currentRowStorage.Price;\r\n } else {\r\n if (this.productInfo.Storages.length > 0) {\r\n this.setCurrentStorage(this.productInfo.Storages[0]);\r\n }\r\n this.formData.storageCount = this.productInfo.StorageCount;\r\n }\r\n if (this.productInfo.CurrentClient) {\r\n this.formData.clientSKUId = this.productInfo.CurrentClient.Id;\r\n this.formData.clientPrice = this.productInfo.CurrentClient.Price;\r\n this.formData.clientAvailableDays =\r\n this.productInfo.ClientAvailableDays;\r\n this.formData.clientPeriod =\r\n this.productInfo.CurrentClient.AvailableDays;\r\n this.formData.clientUnit = this.productInfo.CurrentClient.Unit;\r\n this.currentRowClient = this.productInfo.Clients.find(\r\n (m) => m.Id == this.productInfo.CurrentClient.Id\r\n );\r\n } else {\r\n if (this.productInfo.Clients.length > 0) {\r\n this.setCurrentClient(this.productInfo.Clients[0]);\r\n }\r\n }\r\n this.formData.clientCount = this.productInfo.ClientCount;\r\n this.getPromotions(\"client\");\r\n this.getPromotions(\"storage\");\r\n } else {\r\n this.$message({\r\n message: `获取商品信息失败`,\r\n type: \"error\",\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 // 改变窗口状态的,搭配index页 添加和编辑按钮\r\n changeEditState() {\r\n var canEdit = false;\r\n if (!canEdit) {\r\n this.indexData.type = \"\";\r\n this.indexData.name = \"商品详情\";\r\n } else {\r\n var isNew = false;\r\n if (!this.indexData.row) {\r\n isNew = true;\r\n }\r\n this.indexData.type = `${isNew ? \"Add\" : \"Edit\"}`;\r\n this.indexData.name = `${!isNew ? \"编辑商品\" : \"购买商品\"}`;\r\n }\r\n this.editState = this.indexData.type === \"Add\" ? true : false;\r\n },\r\n // 提交... 细节\r\n submiting() {\r\n if (this.formData.teamId) {\r\n this.$refs.winTmp.toggleComfirm();\r\n } else {\r\n this.$refs.winTmp.toggleSubmit();\r\n }\r\n this.winTmpSubmiting = !this.winTmpSubmiting;\r\n },\r\n // 子组件提交共同的接口\r\n comSubmit() {\r\n this.$refs.editForm.validate((valid) => {\r\n if (valid) {\r\n var skus = [];\r\n if (\r\n this.formData.clientSKUId > 0 &&\r\n this.formData.clientCount > 0 &&\r\n this.formData.clientAvailableDays != 0\r\n ) {\r\n let noChange = false;\r\n if (\r\n this.productInfo.CurrentClient &&\r\n this.formData.clientSKUId == this.productInfo.CurrentClient.Id &&\r\n this.formData.clientAvailableDays ==\r\n this.productInfo.ClientAvailableDays &&\r\n this.formData.clientCount == this.productInfo.ClientCount\r\n ) {\r\n noChange = true;\r\n }\r\n if (!noChange) {\r\n skus.push({\r\n SKUId: this.formData.clientSKUId,\r\n Count: this.formData.clientCount,\r\n AvailableDays: this.formData.clientAvailableDays,\r\n });\r\n }\r\n }\r\n if (\r\n this.formData.storageSKUId > 0 &&\r\n this.formData.storageCount > 0 &&\r\n this.formData.storageAvailableDays != 0\r\n ) {\r\n let noChange = false;\r\n if (\r\n this.productInfo.CurrentStorage &&\r\n this.formData.storageSKUId ==\r\n this.productInfo.CurrentStorage.Id &&\r\n this.formData.storageAvailableDays ==\r\n this.productInfo.StorageAvailableDays &&\r\n this.formData.storageCount == this.productInfo.StorageCount\r\n ) {\r\n noChange = true;\r\n }\r\n if (!noChange) {\r\n skus.push({\r\n SKUId: this.formData.storageSKUId,\r\n Count: this.formData.storageCount,\r\n AvailableDays: this.formData.storageAvailableDays,\r\n });\r\n }\r\n }\r\n if (skus.length == 0) {\r\n this.$message({\r\n message: `请选择规格及数量`,\r\n type: \"info\",\r\n });\r\n return;\r\n }\r\n this.submiting();\r\n const baseURL =\r\n window.location.protocol + \"//\" + window.location.host;\r\n var params = {\r\n teamId: this.formData.teamId,\r\n skus: skus,\r\n couponCodes: this.formData.couponCode\r\n ? [this.formData.couponCode]\r\n : [],\r\n returnUrl: baseURL + \"/teamManagement\",\r\n };\r\n this.$http\r\n .post(\"/Order/Pay.ashx\", params)\r\n .then((res) => {\r\n if (res.res == 0) {\r\n if (res.data != \"\") {\r\n let html = '
';\r\n html += res.data;\r\n html += \"
\";\r\n window.document.write(html);\r\n this.$message({\r\n message: `创建订单成功,正在跳转到支付页面...`,\r\n type: \"error\",\r\n });\r\n }\r\n this.submiting();\r\n this.$modal.hide(\"productInfo\");\r\n this.$emit(\"eventComfirm\");\r\n } else {\r\n this.submiting();\r\n }\r\n })\r\n .catch(() => {\r\n this.$message({\r\n message: `创建订单失败`,\r\n type: \"error\",\r\n });\r\n this.submiting();\r\n });\r\n } else {\r\n return false;\r\n }\r\n });\r\n },\r\n // 子组件事件3\r\n editClick() {\r\n this.$refs.editForm.clearValidate();\r\n if (this.editState === false) this.changeEditState();\r\n },\r\n // 关闭弹层前,重置数据\r\n beforeClose() {\r\n this.attend = false;\r\n this.loading = false;\r\n Object.assign(this.$data, this.$options.data());\r\n this.$router.replace({});\r\n },\r\n setLoading(val) {\r\n this.loading = val;\r\n },\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!./buy.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!./buy.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./buy.vue?vue&type=template&id=709137fe&scoped=true&\"\nimport script from \"./buy.vue?vue&type=script&lang=js&\"\nexport * from \"./buy.vue?vue&type=script&lang=js&\"\nimport style0 from \"./buy.vue?vue&type=style&index=0&id=709137fe&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 \"709137fe\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}