...
|
...
|
@@ -3,7 +3,7 @@ |
|
|
<el-card style="background-color: #F5F7FA">
|
|
|
<!-- 搜索区域-->
|
|
|
<el-row class="toolbar">
|
|
|
<el-form :model="queryInfo" :rules="rules" ref="ruleForm">
|
|
|
<el-form :model="queryInfo">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="" prop="lisenceNo">
|
|
|
<el-input v-model="queryInfo.lisenceNo" size="small" style="width: 170px"
|
...
|
...
|
@@ -22,7 +22,6 @@ |
|
|
</el-row>
|
|
|
<!-- 列表区域-->
|
|
|
<el-row>
|
|
|
<template>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
border
|
...
|
...
|
@@ -43,20 +42,17 @@ |
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="starttime"
|
|
|
label="开始时间"
|
|
|
label="开始时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
|
width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="danger" size="mini" @click="applyEnd(scope.row)">结束出勤</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column-->
|
|
|
<!-- fixed="right"-->
|
|
|
<!-- label="操作"-->
|
|
|
<!-- width="160">-->
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
<!-- <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>-->
|
|
|
<!-- <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button>-->
|
|
|
<!-- </template>-->
|
|
|
<!-- </el-table-column>-->
|
|
|
</el-table>
|
|
|
</template>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 10px" class="toolbar">
|
|
|
<el-pagination
|
...
|
...
|
@@ -69,99 +65,18 @@ |
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="70%" >
|
|
|
<el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
|
|
|
<el-row>
|
|
|
<el-col :span="11">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorName">
|
|
|
<el-input v-model="addForm.orderAuthorName" autocomplete="off" size="small" style="width: 350px">
|
|
|
<template slot="prepend">结算人名称</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorid">
|
|
|
<el-input v-model="addForm.orderAuthorid" autocomplete="off" size="small" style="width: 350px">
|
|
|
<template slot="prepend">结算人ID</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="11">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="orderOperatorId">
|
|
|
<el-input v-model="addForm.orderOperatorId" autocomplete="off" size="small" style="width: 350px">
|
|
|
<template slot="prepend">经办人</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="orderTotalAmount">
|
|
|
<el-input v-model="addForm.orderTotalAmount" autocomplete="off" size="small" style="width: 350px">
|
|
|
<template slot="prepend">订单总额度</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="11">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="orderType">
|
|
|
<div class="my-text-area">
|
|
|
<div class="el-input-group__prepend prepand">支付方式</div>
|
|
|
<el-select v-model="addForm.orderType" placeholder="请选择生效状态" size="small" style="width: 260px">
|
|
|
<el-option label="现金" value="现金"></el-option>
|
|
|
<el-option label="微信" value="微信"></el-option>
|
|
|
<el-option label="支付宝" value="支付宝"></el-option>
|
|
|
<el-option label="银行转账" value="银行转账"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="orderState">
|
|
|
<div class="my-text-area">
|
|
|
<div class="el-input-group__prepend prepand">支付状态</div>
|
|
|
<el-select v-model="addForm.orderState" placeholder="请选择生效状态" size="small" style="width: 260px">
|
|
|
<el-option label="未支付" value="000"></el-option>
|
|
|
<el-option label="已支付" value="001"></el-option>
|
|
|
<el-option label="作废" value="111"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="11">
|
|
|
<el-form-item label=" " :label-width="formLabelWidth" prop="orderRemark">
|
|
|
<el-input v-model="addForm.orderRemark" autocomplete="off" size="small" style="width: 350px">
|
|
|
<template slot="prepend">备注</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="apply_dialog = false" size="small">取 消</el-button>
|
|
|
<el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {selectList} from '../../api/consigner/vehicle';
|
|
|
import {selectList,DoneTask} from '../../api/consigner/vehicle';
|
|
|
|
|
|
export default {
|
|
|
name: "conveyance",
|
|
|
data() {
|
|
|
return {
|
|
|
queryInfo: {
|
|
|
lisenceNo:'',
|
|
|
// busnessType:'',
|
|
|
// state:'',
|
|
|
// 当前页数
|
|
|
pageNum: 1,
|
|
|
// 每页几条数据
|
...
|
...
|
@@ -169,30 +84,6 @@ |
|
|
},
|
|
|
total: 0,
|
|
|
tableData:[],
|
|
|
dialogMap: {
|
|
|
update: '编辑',
|
|
|
create: '新增'
|
|
|
},
|
|
|
dis: undefined,
|
|
|
dialogApply: 'create',
|
|
|
apply_dialog: false,
|
|
|
addForm: {
|
|
|
orderAuthorName: '',
|
|
|
orderAuthorid: '',
|
|
|
orderCreatTime: '',
|
|
|
orderOperatorId: '',
|
|
|
orderRemark: '',
|
|
|
orderState: '',
|
|
|
orderTotalAmount:'',
|
|
|
orderUpdateTime:'',
|
|
|
orderType:''
|
|
|
},
|
|
|
formLabelWidth: '120px',
|
|
|
rules: {
|
|
|
companyId: [
|
|
|
// { required: true, message: '必填', trigger: 'change' }
|
|
|
],
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
...
|
...
|
@@ -213,7 +104,7 @@ |
|
|
return _this.$message.error('获取消息收发记录,失败!')
|
|
|
}
|
|
|
// 获取列表数据
|
|
|
_this.tableData = res.data
|
|
|
_this.tableData = res.data.list;
|
|
|
// 获取列表的总记录数
|
|
|
_this.total = res.data.total
|
|
|
_this.$message.success('获取消息收发记录,成功!')
|
...
|
...
|
@@ -222,86 +113,16 @@ |
|
|
_this.$message.error(error.toString())
|
|
|
})
|
|
|
},
|
|
|
// 添加对话框,打开事件
|
|
|
applyAdd() {
|
|
|
this.addForm = {
|
|
|
orderAuthorName: '',
|
|
|
orderAuthorid: '',
|
|
|
orderCreatTime: '',
|
|
|
orderOperatorId: '',
|
|
|
orderRemark: '',
|
|
|
orderState: '',
|
|
|
orderTotalAmount:'',
|
|
|
orderUpdateTime:'',
|
|
|
orderType:''
|
|
|
};
|
|
|
this.dialogApply= 'create';
|
|
|
this.dis= 'create';
|
|
|
this.apply_dialog = true;
|
|
|
},
|
|
|
// 添加功能
|
|
|
add() {
|
|
|
this.$refs.addForm.validate(valid => {
|
|
|
// 未通过,表单预校验
|
|
|
if (!valid) return;
|
|
|
save(this.addForm).then((response) => {
|
|
|
let res = response.data;
|
|
|
// 添加失败
|
|
|
if (res.code !== '200') {
|
|
|
return this.$message.error(res.msg);
|
|
|
}
|
|
|
// 添加,成功
|
|
|
this.$message.success(res.msg);
|
|
|
// 隐藏对话框
|
|
|
this.apply_dialog = false;
|
|
|
// 刷新列表
|
|
|
this.getList();
|
|
|
}).catch(error => {
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
// 打开编辑
|
|
|
applyEdit(row) {
|
|
|
this.apply_dialog = true;
|
|
|
this.dialogApply = 'update';
|
|
|
this.dis= 'update';
|
|
|
this.addForm=row;
|
|
|
},
|
|
|
// 编辑功能
|
|
|
edit() {
|
|
|
// 进行表单的预验证
|
|
|
this.$refs.addForm.validate(valid => {
|
|
|
// 未通过,表单预校验
|
|
|
if (!valid) return
|
|
|
edit(this.addForm).then((response) => {
|
|
|
// console.log(row)
|
|
|
const res = response.data
|
|
|
if (res.code != '200') {
|
|
|
return this.$message.error(res.msg)
|
|
|
}
|
|
|
this.$message.success(res.msg)
|
|
|
// 隐藏对话框
|
|
|
this.apply_dialog = false
|
|
|
// 刷新列表
|
|
|
this.getList()
|
|
|
}).catch(error => {
|
|
|
this.$message.error(error.toString())
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
// 删除
|
|
|
applyDel(row) {
|
|
|
// 弹框询问是否删除?
|
|
|
this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
|
|
|
confirmButtonText: '确定删除',
|
|
|
// 结束出勤
|
|
|
applyEnd(row) {
|
|
|
// 弹框询问是否结束?
|
|
|
this.$confirm('是否继续?', '警告', {
|
|
|
confirmButtonText: '确定结束',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
).then(() => {
|
|
|
// console.log(row);
|
|
|
remove(row).then((response) => {
|
|
|
// console.log(row)
|
|
|
DoneTask(row).then((response) => {
|
|
|
const res = response.data
|
|
|
this.$message.success(res.msg)
|
|
|
this.getList()
|
...
|
...
|
@@ -314,36 +135,8 @@ |
|
|
},
|
|
|
mounted() {
|
|
|
this.getList();
|
|
|
// this.getYardList();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
.toolbar{
|
|
|
height: 60px;
|
|
|
background-color: white;
|
|
|
/*line-height: 60px;*/
|
|
|
vertical-align: middle;
|
|
|
border-radius: 5px 5px 5px 5px;
|
|
|
padding: 15px 0 0 20px;
|
|
|
box-shadow: 0px 5px 5px #e5e8eb;
|
|
|
}
|
|
|
.my-text-area .prepand{
|
|
|
float: left;
|
|
|
width:89px;
|
|
|
height: 28px;
|
|
|
font-size: 12px;
|
|
|
line-height: 28px;
|
|
|
}
|
|
|
</style>
|
|
|
<style>
|
|
|
.my-text-area .el-textarea__inner{
|
|
|
min-height: 28px;
|
|
|
height: 28px;
|
|
|
border-bottom-left-radius: 0;
|
|
|
border-top-left-radius: 0;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|