6.04
This commit is contained in:
parent
8a152e8cea
commit
1e84e934fd
|
|
@ -84,39 +84,20 @@ export default {
|
||||||
cycle: 'day',
|
cycle: 'day',
|
||||||
span: 30,
|
span: 30,
|
||||||
recently:true,
|
recently:true,
|
||||||
},
|
},
|
||||||
//搜索区
|
ranking:{
|
||||||
searchFormData: {
|
span: 30,
|
||||||
cycle: 'day',
|
},
|
||||||
span: 7,
|
|
||||||
recently:true,
|
|
||||||
},
|
|
||||||
searchFormItems: [
|
|
||||||
{field: 'cycle', title: '类型', span: 5, itemRender: {name: '$select', props: {placeholder: '请输入名称',
|
|
||||||
options:[
|
|
||||||
{label: '按日', value: 'day'},
|
|
||||||
{label: '按周', value: 'week'},
|
|
||||||
{label: '按月', value:'month'},
|
|
||||||
]
|
|
||||||
}}},
|
|
||||||
{field: 'span', title: '条数', span: 5, itemRender: {name: '$input', props: {type:'number'}}},
|
|
||||||
{field: 'recently', title: '从今天开始', span: 5, itemRender: {name: '$radio', options:[
|
|
||||||
{label: '是', value: true},
|
|
||||||
{label: '否', value: false}
|
|
||||||
]
|
|
||||||
}},
|
|
||||||
{
|
|
||||||
align: 'right', span: 4, itemRender: {
|
|
||||||
name: '$buttons', children: [{props: {type: 'submit', content: '筛选', status: 'primary'}},
|
|
||||||
{props: {type: 'reset', content: '重置'}}]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.createChart('month')
|
|
||||||
|
if(this.actions.includes('ranking')){
|
||||||
|
this.createChart('ranking')
|
||||||
|
}else{
|
||||||
|
this.createChart('month')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//选中日期后,创建图表
|
//选中日期后,创建图表
|
||||||
|
|
|
||||||
|
|
@ -1051,7 +1051,7 @@ export default {
|
||||||
handleTotalPrice(){
|
handleTotalPrice(){
|
||||||
this.formOptions.data['total_price'] = this.formOptions.data['customer_warehousing_tonnage']*this.formOptions.data['unit_price'];
|
this.formOptions.data['total_price'] = this.formOptions.data['customer_warehousing_tonnage']*this.formOptions.data['unit_price'];
|
||||||
},
|
},
|
||||||
handleTotalPric1(){
|
handleTotalPrice1(){
|
||||||
this.formOptions.data.train_number[this.nowIndex]['total_price'] = this.formOptions.data.train_number[this.nowIndex]['customer_warehousing_tonnage']*this.formOptions.data.train_number[this.nowIndex]['unit_price']
|
this.formOptions.data.train_number[this.nowIndex]['total_price'] = this.formOptions.data.train_number[this.nowIndex]['customer_warehousing_tonnage']*this.formOptions.data.train_number[this.nowIndex]['unit_price']
|
||||||
},
|
},
|
||||||
handleOilTotalPrice(){
|
handleOilTotalPrice(){
|
||||||
|
|
@ -1122,7 +1122,6 @@ export default {
|
||||||
ok() {
|
ok() {
|
||||||
|
|
||||||
let save = () => {
|
let save = () => {
|
||||||
console.log(this.formOptions.data.return_date)
|
|
||||||
// this.formOptions.data.outsourcing_driver_phone转换为字符串
|
// this.formOptions.data.outsourcing_driver_phone转换为字符串
|
||||||
this.formOptions.data.outsourcing_driver_phone = String(this.formOptions.data.outsourcing_driver_phone)
|
this.formOptions.data.outsourcing_driver_phone = String(this.formOptions.data.outsourcing_driver_phone)
|
||||||
// 将日期2018-01-01 转换为时间戵
|
// 将日期2018-01-01 转换为时间戵
|
||||||
|
|
@ -1172,6 +1171,23 @@ export default {
|
||||||
this.formOptions.data.driver_id = null;
|
this.formOptions.data.driver_id = null;
|
||||||
}
|
}
|
||||||
let postdata = Object.assign({}, this.formOptions.data);
|
let postdata = Object.assign({}, this.formOptions.data);
|
||||||
|
|
||||||
|
//判断如果列表为空,则数组为null
|
||||||
|
if(postdata.maintenance.length == 1){
|
||||||
|
if(!postdata.maintenance[0].maintenance_date&& postdata.maintenance[0].maintenance_name == '' && postdata.maintenance[0].maintenance_price == 0){
|
||||||
|
postdata.maintenance = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(postdata.tire.length == 1){
|
||||||
|
if(!postdata.tire[0].tire_date && !postdata.tire[0].tire_type&& postdata.tire[0].tire_price == 0){
|
||||||
|
postdata.tire = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(postdata.other_expenses_log.length == 1){
|
||||||
|
if(!postdata.other_expenses_log[0].other_expenses_date && postdata.other_expenses_log[0].other_expenses_name == '' && postdata.other_expenses_log[0].other_expenses_amount == 0){
|
||||||
|
postdata.other_expenses_log = null
|
||||||
|
}
|
||||||
|
}
|
||||||
// 如果是编辑模式
|
// 如果是编辑模式
|
||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
// postdata = { TrainNumber: postdata }
|
// postdata = { TrainNumber: postdata }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue