Commit 69af77b4 authored by 黄奎's avatar 黄奎

页面修改

parent e1042558
...@@ -163,15 +163,8 @@ ...@@ -163,15 +163,8 @@
<thead> <thead>
<tr> <tr>
<th> <th>
图片 时间
</th> </th>
<th>
地区/车辆类型
</th>
<th>
使用人数
</th>
<th> <th>
接送价格 接送价格
</th> </th>
...@@ -201,49 +194,36 @@ ...@@ -201,49 +194,36 @@
<tbody v-for="item in dataList" :key="item.subCode"> <tbody v-for="item in dataList" :key="item.subCode">
<tr> <tr>
<td> <td>
<img v-if="item.ShowBusImage" :src="item.ShowBusImage" style="width:230px;height:60px;" /> {{item.MonthStr}}
<img v-else src="../../assets/img/suplier.jpg" style="width:230px;height:60px;" />
</td> </td>
<td> <td>
{{getArea(item.AreaType)}}-{{item.BusTypeStr}} {{item.S_ReceivePrice}}
</td> </td>
<td> <td>
{{item.UseNum}} {{item.S_AllDayPrice}}
</td> </td>
<td> <td>
{{item.ReceivePrice}} {{item.S_HalfDayPrice}}
</td> </td>
<td> <td>
{{item.AllDayPrice}} {{item.S_AllDayHighSpeedFee}}
</td> </td>
<td> <td>
{{item.HalfDayPrice}} {{item.S_PickUpHighSpeedFee}}
</td> </td>
<td>{{item.S_AllDayChaDaiFee}}</td>
<td>{{item.S_PickUpChaDaiFee}}</td>
<td> <td>
{{item.AllDayHighSpeedFee}}
</td>
<td>
{{item.PickUpHighSpeedFee}}
</td>
<td>{{item.AllDayChaDaiFee}}</td>
<td>{{item.PickUpChaDaiFee}}</td>
<td rowspan="2">
<input type="button" class="normalBtn" @click="managePrice(item.Id)" value="管理报价"> <input type="button" class="normalBtn" @click="managePrice(item.Id)" value="管理报价">
<a >详情</a>
<a @click="isdelete(item.Id)">删除</a> <a @click="isdelete(item.Id)">删除</a>
</td> </td>
</tr> </tr>
<tr>
<td colspan="8">
备注: {{item.Remark}}
</td>
</tr>
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="9"> <td colspan="9">
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total"> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total">
</el-pagination> </el-pagination>
</td> </td>
</tr> </tr>
...@@ -260,107 +240,68 @@ ...@@ -260,107 +240,68 @@
<input type="button" class="normalBtn" @click="submitForm('addMsg')" value="保存" /> <input type="button" class="normalBtn" @click="submitForm('addMsg')" value="保存" />
</el-col> </el-col>
</el-row> </el-row>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px"> <el-form :model="addMsg" ref="addMsg" label-width="100px">
<el-row> <el-row>
<template v-if="addMsg.Id==0">
<el-col :span="5"> <el-col :span="5">
<el-form-item label="地区" prop="AreaType"> <el-form-item label="开始月份">
<el-select filterable placeholder="请选择" v-model="addMsg.AreaType"> <el-date-picker v-model="addMsg.StartDateStr" type="month" value-format="yyyy-MM">
<el-option label='不限' :value="selectDefauleValue"></el-option> </el-date-picker>
<el-option v-for="item in AreaList" :key="item.Id" :label="item.Name" :value="item.Id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车辆类型" prop="BusType">
<el-select filterable placeholder="请选择" v-model="addMsg.BusType">
<el-option v-for="item in BusTypeList" :key="item.Id" :label="item.Name" :value="item.Id"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="座位数" prop="UseNum"> <el-form-item label="结束月份">
<el-input placeholder="座位数" v-model="addMsg.UseNum" @keyup.native="checkInteger(addMsg,'UseNum')" <el-date-picker v-model="addMsg.EndDateStr" type="month" value-format="yyyy-MM">
class="busUsePeople"> </el-date-picker>
<template slot="append"></template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="接送报价" prop="ReceivePrice"> <el-form-item label="接送报价">
<el-input v-model="addMsg.ReceivePrice" @keyup.native="checkPrice(addMsg,'ReceivePrice')"></el-input> <el-input v-model="addMsg.S_ReceivePrice" @keyup.native="checkPrice(addMsg,'S_ReceivePrice')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="送机报价" prop="SendPrice" style="display:none;"> <el-form-item label="送机报价" style="display:none;">
<el-input v-model="addMsg.SendPrice" @keyup.native="checkPrice(addMsg,'SendPrice')"></el-input> <el-input v-model="addMsg.S_SendPrice" @keyup.native="checkPrice(addMsg,'S_SendPrice')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="全天报价" prop="AllDayPrice"> <el-form-item label="全天报价">
<el-input v-model="addMsg.AllDayPrice" @keyup.native="checkPrice(addMsg,'AllDayPrice')"></el-input> <el-input v-model="addMsg.S_AllDayPrice" @keyup.native="checkPrice(addMsg,'S_AllDayPrice')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="半天报价" prop="HalfDayPrice"> <el-form-item label="半天报价">
<el-input v-model="addMsg.HalfDayPrice" @keyup.native="checkPrice(addMsg,'HalfDayPrice')"></el-input> <el-input v-model="addMsg.S_HalfDayPrice" @keyup.native="checkPrice(addMsg,'S_HalfDayPrice')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5" style="display:none;"> <el-col :span="5" style="display:none;">
<el-form-item label="小时报价" prop="HourPrice"> <el-form-item label="小时报价">
<el-input v-model="addMsg.HourPrice" @keyup.native="checkPrice(addMsg,'HourPrice')"></el-input> <el-input v-model="addMsg.S_HourPrice" @keyup.native="checkPrice(addMsg,'S_HourPrice')"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="全天高速" prop="AllDayHighSpeedFee"> <el-form-item label="全天高速">
<el-input v-model="addMsg.AllDayHighSpeedFee" @keyup.native="checkPrice(addMsg,'HourPrice')"></el-input> <el-input v-model="addMsg.S_AllDayHighSpeedFee" @keyup.native="checkPrice(addMsg,'S_AllDayHighSpeedFee')">
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="接送高速" prop="PickUpHighSpeedFee">
<el-input v-model="addMsg.PickUpHighSpeedFee" @keyup.native="checkPrice(addMsg,'PickUpHighSpeedFee')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="全天茶代" prop="AllDayChaDaiFee"> <el-form-item label="接送高速">
<el-input v-model="addMsg.AllDayChaDaiFee" @keyup.native="checkPrice(addMsg,'AllDayChaDaiFee')"> <el-input v-model="addMsg.S_PickUpHighSpeedFee" @keyup.native="checkPrice(addMsg,'S_PickUpHighSpeedFee')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="接送茶代" prop="PickUpChaDaiFee"> <el-form-item label="全天茶代">
<el-input v-model="addMsg.PickUpChaDaiFee" @keyup.native="checkPrice(addMsg,'PickUpChaDaiFee')"> <el-input v-model="addMsg.S_AllDayChaDaiFee" @keyup.native="checkPrice(addMsg,'S_AllDayChaDaiFee')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5">
<el-form-item label="币种" prop="CurrencyId">
<el-select filterable v-model='addMsg.CurrencyId' @change="getRate(addMsg.CurrencyId)">
<el-option label='不限' :value="selectDefauleValue"></el-option>
<el-option v-for="item in currencyTypeList" :key="item.ID" :value="item.ID" :label="item.Name">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="汇率" prop="CurrentRate">
<el-input v-model="addMsg.CurrentRate" @keyup.native="checkRate(addMsg,'CurrentRate')"></el-input>
</el-form-item>
</el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="车辆图片"> <el-form-item label="接送茶代">
<el-upload class="avatar-uploader" :http-request="UploadImage" :multiple="false" <el-input v-model="addMsg.S_PickUpChaDaiFee" @keyup.native="checkPrice(addMsg,'S_PickUpChaDaiFee')">
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<img v-if="addMsg.ShowBusImage&&addMsg.ShowBusImage!=''" :src="addMsg.ShowBusImage"
style="width:200px;height:100px">
<i class="el-icon-upload2 avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="说明" prop="Remark">
<el-input type="textarea" autosize placeholder="请输入内容" v-model="addMsg.Remark">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -372,159 +313,54 @@ ...@@ -372,159 +313,54 @@
<script> <script>
export default { export default {
data() { data() {
var DealAreaValidate = (rule, value, callback) => {
if (value === 0) {
callback(new Error("请选择地区"));
} else {
callback();
}
};
var validateCurrency = (rule, value, callback) => {
if (value === 0) {
callback(new Error("请选择币种"));
} else {
callback();
}
};
return { return {
total: 0,
currentPage: 1,
dataList: "", dataList: "",
loading: false, loading: false,
isShow: false, isShow: false,
BusTypeList: "",
selectDefauleValue: 0,
AreaList: [],
currencyTypeList: [],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 18 pageSize: 10,
BusPriceId: 0,
total: 0,
currentPage: 1,
}, },
//表单json
addMsg: { addMsg: {
ID: 0, Id: 0, //主键编号
UseNum: "", StartDateStr: "", //开始月份
BusType: "", EndDateStr: "", //结束月份
ReceivePrice: "", MonthStr: "", //月份
SendPrice: "", BusPriceId: 0, //车辆报价主表编号
AllDayPrice: "", S_ReceivePrice: 0, //接机价格
HalfDayPrice: "", S_SendPrice: 0, //送机价格
HourPrice: "", S_AllDayPrice: 0, //全天价格
Remark: "", S_HalfDayPrice: 0, //半天价格
AreaType: 0, S_HourPrice: 0, //小时价格
CurrencyId: 0, S_AllDayHighSpeedFee: 0, //全天高速费
CurrentRate: 0, S_PickUpHighSpeedFee: 0, //接送高速费
AllDayHighSpeedFee: 0, //全天高速费 S_AllDayChaDaiFee: 0, //全天茶代费
PickUpHighSpeedFee: 0, //接送高速费 S_PickUpChaDaiFee: 0, //接送茶代费
AllDayChaDaiFee: 0, //全天茶代费
PickUpChaDaiFee: 0, //接送茶代费
BusImage: '', //车辆图片
ShowBusImage: "",
DetailsList:[],//报价详情列表
},
//表单验证
rules: {
AreaType: [{
validator: DealAreaValidate,
trigger: "change",
required: true
}],
CurrencyId: [{
validator: validateCurrency,
trigger: "change",
required: true
}],
BusType: [{
required: true,
message: "请选择车辆类型",
trigger: "change"
}],
UseNum: [{
required: true,
message: "请输入人数",
trigger: "change"
}],
ReceivePrice: [{
required: true,
message: "请输入接机价格",
trigger: "change"
}],
SendPrice: [{
required: true,
message: "请输入送机价格",
trigger: "change"
}],
AllDayPrice: [{
required: true,
message: "请输入全天价格",
trigger: "change"
}],
HalfDayPrice: [{
required: true,
message: "请输入全天价格",
trigger: "change"
}],
HourPrice: [{
required: true,
message: "请输入小时价格",
trigger: "change"
}],
AllDayHighSpeedFee: [{
required: true,
message: "请输入全天高速价格",
trigger: "change"
}],
PickUpHighSpeedFee: [{
required: true,
message: "请输入接送高速价格",
trigger: "change"
}],
AllDayChaDaiFee: [{
required: true,
message: "请输入全天茶代价格",
trigger: "change"
}],
PickUpChaDaiFee: [{
required: true,
message: "请输入接送茶代价格",
trigger: "change"
}]
} }
}; };
}, },
methods: { methods: {
//上传图片
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var obj = this.$DMCUtils.DMCImageObj();
var str = x.name;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.BusImage = x.data.FilePath;
this.addMsg.ShowBusImage = imgUrl;
});
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.initData(); this.initData();
}, },
resetPageIndex() { resetPageIndex() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.currentPage = 1; this.msg.currentPage = 1;
}, },
initData() { initData() {
this.loading = true; this.loading = true;
this.apipost( this.apipost(
"busprice_get_GetBusPricePageList", "buspricedetails_get_GetPageList",
this.msg, this.msg,
res => { res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.total = res.data.data.count; this.msg.total = res.data.data.count;
} }
}, },
null null
...@@ -532,7 +368,7 @@ ...@@ -532,7 +368,7 @@
}, },
saveInfo() { saveInfo() {
this.apipost( this.apipost(
"busprice_post_SetBusPrice", "buspricedetails_post_SetPriceDetails",
this.addMsg, this.addMsg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -547,47 +383,15 @@ ...@@ -547,47 +383,15 @@
null null
); );
}, },
//获取地区下拉
getAreaList() {
this.apipost(
"busprice_get_GetBusAreaType", {},
res => {
if (res.data.resultCode == 1) {
this.AreaList = res.data.data;
}
},
null
);
},
//根据ID获取地区
getArea(AreaType) {
var AreaName = '';
this.AreaList.forEach(item => {
if (item.Id == AreaType) {
AreaName = item.Name
}
})
return AreaName;
},
getCurrencyType() { // 币种类型
this.apipost('financeinfo_post_GetList', {
Name: ''
}, res => {
if (res.data.resultCode == 1) {
this.currencyTypeList = res.data.data;
}
}, err => {})
},
//修改管理报价 //修改管理报价
managePrice(ID) { managePrice(ID) {
this.addMsg.ID = ID; this.addMsg.Id = ID;
this.isShow = true; this.isShow = true;
let msg = { let msg = {
ID: ID ID: ID
}; };
this.apipost( this.apipost(
"busprice_get_GetBusPrice", "buspricedetails_get_GetPriceDetails",
msg, msg,
res => { res => {
this.addMsg = res.data.data; this.addMsg = res.data.data;
...@@ -595,27 +399,6 @@ ...@@ -595,27 +399,6 @@
null null
); );
}, },
/*获取车辆类型列表*/
getBusTypeList() {
this.apipost(
"bus_get_GetBusTypeList",
null,
res => {
if (res.data.resultCode == 1) {
this.BusTypeList = res.data.data;
}
},
null
);
},
//币种下拉获取汇率
getRate(ID) {
this.currencyTypeList.forEach(x => {
if (x.ID == ID) {
this.addMsg.CurrentRate = x.Rate;
}
});
},
//取消 //取消
cancelPanel() { cancelPanel() {
this.isShow = false; this.isShow = false;
...@@ -624,29 +407,24 @@ ...@@ -624,29 +407,24 @@
//添加 //添加
addPanel() { addPanel() {
this.isShow = true; this.isShow = true;
this.addMsg.ID = 0; this.addMsg.Id = 0;
this.clearInfo(); this.clearInfo();
}, },
clearInfo() { clearInfo() {
this.addMsg = { this.addMsg.Id = 0;
ID: 0, this.addMsg.StartDateStr = "";
UseNum: "", this.addMsg.EndDateStr = "";
BusType: "", this.addMsg.MonthStr = "";
ReceivePrice: "", this.addMsg.BusPriceId = 0;
SendPrice: "", this.addMsg.S_ReceivePrice = 0;
AllDayPrice: "", this.addMsg.S_SendPrice = 0;
HalfDayPrice: "", this.addMsg.S_AllDayPrice = 0;
HourPrice: "", this.addMsg.S_HalfDayPrice = 0;
Remark: "", this.addMsg.S_HourPrice = 0;
AreaType: 0, this.addMsg.S_AllDayHighSpeedFee = 0;
CurrencyId: 0, this.addMsg.S_PickUpHighSpeedFee = 0;
CurrentRate: 0, this.addMsg.S_AllDayChaDaiFee = 0;
AllDayHighSpeedFee: 0, this.addMsg.S_PickUpChaDaiFee = 0;
PickUpHighSpeedFee: 0,
AllDayChaDaiFee: 0,
PickUpChaDaiFee: 0,
BusImage: ''
};
}, },
submitForm(addMsg) { submitForm(addMsg) {
//提交创建、修改表单 //提交创建、修改表单
...@@ -670,7 +448,7 @@ ...@@ -670,7 +448,7 @@
ID: ID ID: ID
}; };
that.apipost( that.apipost(
"busprice_post_RemoveBusPrice", "buspricedetails_post_RemovePriceDetails",
msg, msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -683,10 +461,9 @@ ...@@ -683,10 +461,9 @@
} }
}, },
mounted() { mounted() {
this.msg.BusPriceId = this.$route.query.id;
this.addMsg.BusPriceId = this.$route.query.id;
this.initData(); this.initData();
this.getAreaList();
this.getCurrencyType();
this.getBusTypeList();
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment