@@ -670,10 +670,12 @@ export default {
contract = res.orderDetails.contractInformation?res.orderDetails.contractInformation:{},// 合同
list = res.orderDetails.orderOther// 俩列表
list.map(e=>{
- e.ship?e.ship=true:e.ship = false
+ e.ship===1?e.ship=true:e.ship = false
e.isEnable?e.isEnable=false:e.isEnable=true
})
let dataArr = list.filter(e=>{// 数据平台
+ e.startTime = e.startTime.split(" ")[0]
+ e.endTime = e.endTime.split(" ")[0]
return e.authority===0
}),
classArr = list.filter(e=>{// 课程权限
@@ -708,13 +710,17 @@ export default {
this.contractTime = [contract.startTime,contract.endTime]
}
this.dataPlatform = dataArr
+ console.log(this.dataPlatform,'当前的值');
})
},
// 新增订单
addOrder(){
+ if(this.dataPlatform.length===0){
+ return this.$message.error('请选择产品后再确认订单!')
+ }
let verify =
this.dataPlatform.some(e=>{
- if(!e.periodOfUse||!e.finalPrice||!e.accountNum||!totalAmount){
+ if(!e.periodOfUse||!e.finalPrice||!e.accountNum||!e.totalAmount){
return false
}else{
return true
@@ -960,7 +966,7 @@ export default {
console.log(year,'当前年');
console.log(+year + parseInt((+month+(+e))/12) ,'处理过的年',parseInt((+month+(+e))%12)===0,'处理的值');
console.log((+month+(+e))%12,'月份%12');
- let endYear = year + (parseInt((+month+(+e))/12)?0:parseInt((+month+(+e))/12)) + char + completeDate((+month+(+e))%12) + char +completeDate(day);
+ let endYear = year + (parseInt((+month+(+e))/12)===0?0:parseInt((+month+(+e))/12)) + char + completeDate((+month+(+e))%12) + char +completeDate(day);
console.log(endYear,'endYear');
// 得出起始年月日
@@ -979,7 +985,7 @@ export default {
// 计算成交总额
dealComputers(e,row){
if(row.finalPrice&&row.accountNum){
- row.totalAmount = (row.finalPrice*row.accountNum/10000).toFixed(2);
+ row.totalAmount = (((row.finalPrice*100)*(row.accountNum*100))/100).toFixed(2);
}
this.allAmount()
},