![]()
@@ -93,7 +93,7 @@ import getDecimal from '@/utils/decimalUtil.js'
import { calcBranchUsers } from '@/api/branch';
export default {
- props: ['menus'],
+ props: ['modules'],
data() {
return {
menuLoading: false,
@@ -167,7 +167,7 @@ export default {
if(this.branchUsersCpd && this.branchUsersCpd.istatus=='1'){
if(val<=this.branchUsersCpd.maxUsers){
this.form.ousers=this.branchUsersCpd.maxUsers
- this.$notify({position:"bottom-left",message:"您当前在唛盟平台拥有"+this.branchUsersCpd.maxUsers+"个账户资格,企业总人数不能低于"+this.branchUsersCpd.maxUsers,type:"warning"})
+ this.$notify({position:"bottom-left",message:"您当前已拥有创建"+this.branchUsersCpd.maxUsers+"个账户资格,企业总人数不能低于"+this.branchUsersCpd.maxUsers,type:"warning"})
return false;
}
@@ -175,6 +175,12 @@ export default {
}
},
calcOrder:function() {
+ if(!this.form.moduleIds || this.form.moduleIds.length==0){
+ if(this.orders && this.orders.order){
+ this.orders={}
+ }
+ return;
+ }
calcOrder(this.form).then(res=>{
this.orders.order=res.data.data
this.orders.modules=res.data.modules
@@ -227,7 +233,7 @@ export default {
getForm() {
- let obj = {
+ let obj = {
...this.orders,
...this.form
}
@@ -241,7 +247,7 @@ export default {
// Object.assign(this.branchUsersCpd,res.data.data);
if(this.branchUsersCpd.branchId && this.branchUsersCpd.istatus=='1'){
this.form.ousers=this.branchUsersCpd.maxUsers
- this.calcOrder();
+ //this.calcOrder();
}
})
diff --git a/src/views/order/index.vue b/src/views/order/index.vue
index bb3cdd25..7f1fc6d7 100644
--- a/src/views/order/index.vue
+++ b/src/views/order/index.vue
@@ -30,7 +30,7 @@
-
+
@@ -74,7 +74,7 @@ export default {
],
currentSelectVersion: '企业版',
menuLoading: false,
- menus: null,
+ modules: null,
submitLoading: false,
}
},
@@ -121,8 +121,7 @@ export default {
return
}
- window.localStorage.setItem("BUY_MODULES", undefined)
- window.localStorage.setItem("BUY_MODULES", JSON.stringify(data))
+ window.localStorage.setItem("BUY_MODULES", JSON.stringify(data))
this.$router.push('/my/order/create')
}else {
let flagData = this.$refs.flagship.getForm();
@@ -178,7 +177,7 @@ export default {
let xmMenus = tempData.filter(res => {return res.mcate == '2'})
let oaMunus = tempData.filter(res => {return res.mcate == '1'})
let mallMenus = tempData.filter(res => {return res.mcate == '3'})
- this.menus = {
+ this.modules = {
"xmgl": xmMenus,
"oa" : oaMunus,
"mall": mallMenus
@@ -189,15 +188,9 @@ export default {
},
- created() {
- this.getAllModules();
- },
-
-
-
-
-
-
+ mounted(){
+ this.getAllModules();
+ }
}