出行配置
This commit is contained in:
parent
e062e79861
commit
442eb46108
|
@ -559,7 +559,10 @@
|
|||
<!-- 是否 -->
|
||||
<el-switch v-model="form.value" active-value="true" inactive-value="false" active-text="动态价格" inactive-text="固定价格"/>
|
||||
</template>
|
||||
|
||||
<template v-else-if="form.type == 450">
|
||||
<!-- 是否 -->
|
||||
<el-switch v-model="form.value" active-value="true" inactive-value="false" active-text="往返" inactive-text="单程"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="form.value" style="width:65%;"></el-input>
|
||||
</template>
|
||||
|
|
|
@ -35,28 +35,28 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 2 && dataForm.travelType != 1">
|
||||
<el-form-item label="起步价(元)" prop="startingPrice">
|
||||
<el-input-number v-model="dataForm.startingPrice" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12" v-if="dataForm.pricingType == 2 && dataForm.travelType != 1">
|
||||
<el-form-item label="免费公里数(元)" prop="freeKilometers">
|
||||
<el-input-number v-model="dataForm.freeKilometers" controls-position="right" :precision="2" :min="0" :step="1" label="免费公里数"/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 2 && dataForm.travelType != 1">
|
||||
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 2">
|
||||
<el-form-item label="夜间出行费(元)" prop="nightTravelExpenses">
|
||||
<el-input-number v-model="dataForm.nightTravelExpenses" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 2 && dataForm.travelType != 1">
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 2">
|
||||
<el-form-item label="起步价(元)" prop="startingPrice">
|
||||
<el-input-number v-model="dataForm.startingPrice" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 2">
|
||||
<el-form-item label="每公里价格(元)" prop="pricePerKilometer">
|
||||
<el-input-number v-model="dataForm.pricePerKilometer" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 1 && dataForm.travelType != 1">
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 2 && dataForm.travelType != 1">
|
||||
<el-form-item label="起步公里数" prop="freeKilometers">
|
||||
<el-input-number v-model="dataForm.freeKilometers" controls-position="right" :precision="2" :min="0" :step="1" label="起步公里数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 1">
|
||||
<el-form-item label="固定价格类型" prop="fixedType">
|
||||
<el-radio-group v-model="dataForm.fixedType">
|
||||
<el-radio :label="1">往返</el-radio>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 1 && dataForm.travelType != 1">
|
||||
<el-col :span="12" v-if="dataForm.pricingType == 1">
|
||||
<el-form-item label="固定价格(元)" prop="fixedPrice">
|
||||
<el-input-number v-model="dataForm.fixedPrice" controls-position="right" :precision="2" :min="0" :step="1"/>
|
||||
</el-form-item>
|
||||
|
@ -161,19 +161,8 @@
|
|||
let cleanField = [];
|
||||
if(saveData.pricingType == 1){
|
||||
cleanField = [ 'seasonsType', 'timeIntervalType', 'startingPrice', 'freeKilometers', 'nightTravelExpenses', 'pricePerKilometer' ];
|
||||
if(saveData.travelType == 1) {
|
||||
//免费的,重置价格
|
||||
saveData.fixedPrice = 0;
|
||||
}
|
||||
}else if(saveData.pricingType == 2) {
|
||||
cleanField = [ 'fixedType', 'fixedPrice' ];
|
||||
if(saveData.travelType == 1) {
|
||||
//免费的,重置价格
|
||||
saveData.startingPrice = 0;
|
||||
saveData.freeKilometers = 0;
|
||||
saveData.nightTravelExpenses = 0;
|
||||
saveData.pricePerKilometer = 0;
|
||||
}
|
||||
}
|
||||
if(cleanField.length){
|
||||
cleanField.forEach(key => {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<!-- <el-button v-if="isAuth('travelConf:main:save')" type="primary" @click="addOrUpdateHandle(1)">新增</el-button> -->
|
||||
<!-- <el-button v-if="isAuth('travelConf:main:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button> -->
|
||||
<!-- <el-button v-if="isAuth('travelConf:main:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
|
||||
|
@ -66,14 +66,19 @@
|
|||
<span v-if="scope.row.timeIntervalType == 2" class="people">夜间</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column prop="freeKilometers" header-align="center" align="center" width="180" label="起步价(元)"/> -->
|
||||
<el-table-column prop="nightTravelExpenses" header-align="center" align="center" width="180" label="夜间出行费(元)"/>
|
||||
<el-table-column prop="pricePerKilometer" header-align="center" align="center" width="180" label="每公里价格(元)"/>
|
||||
<el-table-column prop="fixedPrice" header-align="center" align="center" width="180" label="固定价格(元)"/>
|
||||
|
||||
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<el-table-column prop="nightTravelExpenses" header-align="center" align="center" width="140" label="夜间出行费(元)"/>
|
||||
<el-table-column prop="startingPrice" header-align="center" align="center" width="140" label="起步价格(元)"/>
|
||||
<el-table-column prop="freeKilometers" header-align="center" align="center" width="140" label="起步公里数"/>
|
||||
<el-table-column prop="pricePerKilometer" header-align="center" align="center" width="140" label="每公里价格(元)"/>
|
||||
<el-table-column prop="fixedType" header-align="center" align="center" label="固定价格往返">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.fixedType == 1" class="people">往返</span>
|
||||
<span v-if="scope.row.fixedType == 2" class="people">单程</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fixedPrice" header-align="center" align="center" width="140" label="固定价格(元)"/>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="120" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="isAuth('travelConf:main:update')" type="text" size="small" @click="addOrUpdateHandle(1,scope.row.id,scope.row.parentId)">修改</el-button>
|
||||
<!-- <el-button v-if="isAuth('travelConf:main:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> -->
|
||||
|
@ -164,31 +169,43 @@
|
|||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
let ids = (id ? [id] : this.dataListSelections.map(item => item.id)).join(',');
|
||||
this.$confirm(`确定[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('travelConf/deleteById' + (id?'':'s')),
|
||||
method: 'delete',
|
||||
params: this.$http.adornParams({ id: ids}, false)
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
// let ids = (id ? [id] : this.dataListSelections.map(item => item.id)).join(',');
|
||||
// this.$confirm(`确定[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// this.$http({
|
||||
// url: this.$http.adornUrl('travelConf/deleteById' + (id?'':'s')),
|
||||
// method: 'delete',
|
||||
// params: this.$http.adornParams({ id: ids}, false)
|
||||
// }).then(({ data }) => {
|
||||
// if (data && data.code === 0) {
|
||||
// this.$message({
|
||||
// message: '操作成功',
|
||||
// type: 'success',
|
||||
// duration: 1500,
|
||||
// onClose: () => {
|
||||
// this.getDataList()
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.$message.error(data.msg)
|
||||
// }
|
||||
// })
|
||||
// }).catch(() => {})
|
||||
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('travelConf/getTaxiMoney'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({ artificerId: 116,toLongitude:"125.423736",toLatitude:"43.878001"}, false)
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
console.log(data.data);
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue