订单-修复细节问题

dev
e 3 years ago
parent 944f2113c8
commit 20864440e1
  1. 18
      src/views/order/AddOrder.vue

@ -77,7 +77,7 @@
<el-form-item label="电话"> <el-form-item label="电话">
<el-input disabled v-model="form.phone" placeholder="请输入电话号码" maxlength="11"></el-input> <el-input disabled v-model="form.phone" placeholder="请输入电话号码" maxlength="11"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="订单金额()" prop="orderAmount"> <el-form-item label="订单金额()" prop="orderAmount">
<el-input disabled oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" type="number" v-model="form.orderAmount" placeholder="请输入订单金额"></el-input> <el-input disabled oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" type="number" v-model="form.orderAmount" placeholder="请输入订单金额"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -238,7 +238,7 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 --> <!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 -->
<el-table-column label="总金额()" align="center"> <el-table-column label="总金额()" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :disabled="disabled||editDisabled" @change="[allAmount($event,scope.row),allAmountChange($event,scope.row)]" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.totalAmount" placeholder="请输入"type="text"></el-input> <el-input :disabled="disabled||editDisabled" @change="[allAmount($event,scope.row),allAmountChange($event,scope.row)]" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.totalAmount" placeholder="请输入"type="text"></el-input>
@ -670,10 +670,12 @@ export default {
contract = res.orderDetails.contractInformation?res.orderDetails.contractInformation:{},// contract = res.orderDetails.contractInformation?res.orderDetails.contractInformation:{},//
list = res.orderDetails.orderOther// list = res.orderDetails.orderOther//
list.map(e=>{ 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 e.isEnable?e.isEnable=false:e.isEnable=true
}) })
let dataArr = list.filter(e=>{// let dataArr = list.filter(e=>{//
e.startTime = e.startTime.split(" ")[0]
e.endTime = e.endTime.split(" ")[0]
return e.authority===0 return e.authority===0
}), }),
classArr = list.filter(e=>{// classArr = list.filter(e=>{//
@ -708,13 +710,17 @@ export default {
this.contractTime = [contract.startTime,contract.endTime] this.contractTime = [contract.startTime,contract.endTime]
} }
this.dataPlatform = dataArr this.dataPlatform = dataArr
console.log(this.dataPlatform,'当前的值');
}) })
}, },
// //
addOrder(){ addOrder(){
if(this.dataPlatform.length===0){
return this.$message.error('请选择产品后再确认订单!')
}
let verify = let verify =
this.dataPlatform.some(e=>{ this.dataPlatform.some(e=>{
if(!e.periodOfUse||!e.finalPrice||!e.accountNum||!totalAmount){ if(!e.periodOfUse||!e.finalPrice||!e.accountNum||!e.totalAmount){
return false return false
}else{ }else{
return true return true
@ -960,7 +966,7 @@ export default {
console.log(year,'当前年'); console.log(year,'当前年');
console.log(+year + parseInt((+month+(+e))/12) ,'处理过的年',parseInt((+month+(+e))%12)===0,'处理的值'); console.log(+year + parseInt((+month+(+e))/12) ,'处理过的年',parseInt((+month+(+e))%12)===0,'处理的值');
console.log((+month+(+e))%12,'月份%12'); 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'); console.log(endYear,'endYear');
// //
@ -979,7 +985,7 @@ export default {
// //
dealComputers(e,row){ dealComputers(e,row){
if(row.finalPrice&&row.accountNum){ 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() this.allAmount()
}, },

Loading…
Cancel
Save