作者 小范

新增折扣配置和订单列表界面

  1 +import http from "../http";
  2 +import axios from "axios";
  3 +
  4 +
  5 +let baseUrl = 'wlpt-custom-service-charge/billConfigDiscount'
  6 +
  7 +
  8 +//折扣配置
  9 +export const list = params => { return axios.get(`${baseUrl}/list`, params); };
  10 +export const save = params => { return axios.post(`${baseUrl}/save`, params); };
  11 +export const edit = params => { return axios.put(`${baseUrl}/edit`, params); };
  12 +export const remove = params => { return axios.delete(`${baseUrl}/remove`, {params:params}); };
  1 +import http from "../http";
  2 +import axios from "axios";
  3 +
  4 +
  5 +let baseUrl = 'wlpt-custom-service-charge/billOrder'
  6 +
  7 +
  8 +//订单列表
  9 +export const list = params => { return axios.get(`${baseUrl}/list`, params); };
  10 +export const save = params => { return axios.post(`${baseUrl}/save`, params); };
  11 +export const edit = params => { return axios.put(`${baseUrl}/edit`, params); };
  12 +export const remove = params => { return axios.delete(`${baseUrl}/remove`, {params:params}); };
@@ -117,7 +117,10 @@ import houseRecord from './views/deploy/houseRecord.vue' @@ -117,7 +117,10 @@ import houseRecord from './views/deploy/houseRecord.vue'
117 import locations from './views/deploy/locations.vue' 117 import locations from './views/deploy/locations.vue'
118 import inventroy from './views/deploy/inventroy.vue' 118 import inventroy from './views/deploy/inventroy.vue'
119 import area from './views/deploy/area.vue' 119 import area from './views/deploy/area.vue'
120 - 120 +//账单管理
  121 +import discount from './views/charging/discount.vue'
  122 +import goods from './views/charging/goods.vue'
  123 +import check from './views/charging/check.vue'
121 124
122 import departure from './views/airtransport/departure.vue' 125 import departure from './views/airtransport/departure.vue'
123 import declare from './views/airtransport/declare.vue' 126 import declare from './views/airtransport/declare.vue'
@@ -539,6 +542,17 @@ let routes = [ @@ -539,6 +542,17 @@ let routes = [
539 ] 542 ]
540 }, 543 },
541 { 544 {
  545 + path: '/',
  546 + component: HomeNew,
  547 + name: '计费管理',
  548 + iconCls: 'el-icon-delete-location',
  549 + children: [
  550 + {path:'/discount',component:discount,name:'折扣配置'},
  551 + {path:'/goods',component:goods,name:'订单列表'},
  552 + {path:'/check',component:check,name:'账单接口'},
  553 + ]
  554 + },
  555 + {
542 path: '/at', 556 path: '/at',
543 component: HomeNew, 557 component: HomeNew,
544 name: '在港动态', 558 name: '在港动态',
  1 +<template>
  2 + <el-row>
  3 + <el-card style="background-color: #F5F7FA">
  4 + <!-- 搜索区域-->
  5 + <el-row class="toolbar">
  6 + <el-col :span="5">
  7 + <el-input v-model="queryInfo.companyId" prefix-icon="el-icon-search" size="small" style="width: 240px"
  8 + placeholder="公司ID" clearable>
  9 + <template slot="prepend">公司ID</template>
  10 + </el-input>
  11 + </el-col>
  12 + <el-col :span="5">
  13 + <el-input v-model="queryInfo.busnessType" prefix-icon="el-icon-search" size="small" style="width: 240px"
  14 + placeholder="业务类型" clearable>
  15 + <template slot="prepend">业务类型</template>
  16 + </el-input>
  17 + </el-col>
  18 + <el-col :span="5">
  19 + <div class="my-text-area">
  20 + <div class="el-input-group__prepend prepand">生效状态</div>
  21 + <el-select v-model="queryInfo.state" placeholder="生效状态" size="small" style="width: 140px">
  22 + <el-option label="生效" value="Y"></el-option>
  23 + <el-option label="失效" value="N"></el-option>
  24 + </el-select>
  25 + </div>
  26 + </el-col>
  27 + <el-col :span="5">
  28 + <el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
  29 + 查询
  30 + </el-button>
  31 + <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>
  32 + </el-col>
  33 + </el-row>
  34 + <!-- 列表区域-->
  35 + <el-row>
  36 + <template>
  37 + <el-table
  38 + :data="tableData"
  39 + border
  40 + :cell-style="{textAlign:'center'}"
  41 + style="border-radius: 10px 10px 0px 0px;line-height: 25px"
  42 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
  43 + >
  44 + <el-table-column
  45 + prop="creatUserid"
  46 + label="创建人"
  47 + width="140">
  48 + </el-table-column>
  49 + <el-table-column
  50 + prop="busnessType"
  51 + label="业务类型"
  52 + width="140">
  53 + </el-table-column>
  54 + <el-table-column
  55 + prop="feeType"
  56 + label="费用类别"
  57 + width="140">
  58 + </el-table-column>
  59 + <el-table-column
  60 + prop="rate"
  61 + label="优惠折扣"
  62 + width="120">
  63 + </el-table-column>
  64 + <el-table-column
  65 + prop="state"
  66 + label="生效状态"
  67 + width="120">
  68 + <template slot-scope="scope">
  69 + <span v-if="scope.row.busnessType ==='Y'">生效</span>
  70 + <span v-if="scope.row.busnessType ==='N'">失效</span>
  71 + </template>
  72 + </el-table-column>
  73 +<!-- <el-table-column-->
  74 +<!-- fixed-->
  75 +<!-- prop="companyId"-->
  76 +<!-- label="公司ID"-->
  77 +<!-- width="160">-->
  78 +<!-- </el-table-column>-->
  79 +<!-- <el-table-column-->
  80 +<!-- prop="companyCode"-->
  81 +<!-- label="公司代码"-->
  82 +<!-- width="130">-->
  83 +<!-- </el-table-column>-->
  84 + <el-table-column
  85 + prop="creatTime"
  86 + label="开始时间"
  87 + width="180">
  88 + </el-table-column>
  89 + <el-table-column
  90 + prop="updateTime"
  91 + label="结束时间"
  92 + width="180">
  93 + </el-table-column>
  94 + <el-table-column
  95 + fixed="right"
  96 + label="操作"
  97 + width="160">
  98 + <template slot-scope="scope">
  99 + <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
  100 + <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button>
  101 + </template>
  102 + </el-table-column>
  103 + </el-table>
  104 + </template>
  105 + </el-row>
  106 + <el-row style="margin-top: 10px" class="toolbar">
  107 + <el-pagination
  108 + @size-change="handleSizeChange"
  109 + @current-change="handleCurrentChange"
  110 + :current-page="queryInfo.limitSize"
  111 + :page-size="queryInfo.pageSize"
  112 + :page-sizes="[10, 50, 100, 500]"
  113 + layout="total, sizes, prev, pager, next, jumper"
  114 + :total="total">
  115 + </el-pagination>
  116 + </el-row>
  117 + <el-row>
  118 + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="70%" >
  119 + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
  120 + <el-row>
  121 + <el-col :span="11">
  122 + <el-form-item label=" " :label-width="formLabelWidth" prop="creatUserid">
  123 + <el-input v-model="addForm.creatUserid" autocomplete="off" size="small" style="width: 260px">
  124 + <template slot="prepend">创建人</template>
  125 + </el-input>
  126 + </el-form-item>
  127 + </el-col>
  128 + </el-row>
  129 + <el-row>
  130 + <el-col :span="11">
  131 + <el-form-item label=" " :label-width="formLabelWidth" prop="feeType">
  132 + <el-input v-model="addForm.feeType" autocomplete="off" size="small" style="width: 260px">
  133 + <template slot="prepend">费用类型</template>
  134 + </el-input>
  135 + </el-form-item>
  136 + </el-col>
  137 + <el-col :span="12">
  138 + <el-form-item label=" " :label-width="formLabelWidth" prop="busnessType">
  139 + <el-input v-model="addForm.busnessType" autocomplete="off" size="small" style="width: 260px">
  140 + <template slot="prepend">业务类型</template>
  141 + </el-input>
  142 + </el-form-item>
  143 + </el-col>
  144 + </el-row>
  145 + <el-row>
  146 + <el-col :span="11">
  147 + <el-form-item label=" " :label-width="formLabelWidth" prop="rate">
  148 + <el-input v-model="addForm.rate" autocomplete="off" size="small" style="width: 260px">
  149 + <template slot="prepend">优惠折扣</template>
  150 + </el-input>
  151 + </el-form-item>
  152 + </el-col>
  153 + <el-col :span="12">
  154 + <el-form-item label=" " :label-width="formLabelWidth" prop="state">
  155 + <div class="my-text-area">
  156 + <div class="el-input-group__prepend prepand">生效状态</div>
  157 + <el-select v-model="addForm.state" placeholder="请选择生效状态" size="small" style="width: 170px">
  158 + <el-option label="生效" value="Y"></el-option>
  159 + <el-option label="失效" value="N"></el-option>
  160 + </el-select>
  161 + </div>
  162 + </el-form-item>
  163 + </el-col>
  164 + </el-row>
  165 +<!-- <el-row>-->
  166 +<!-- <el-col :span="11">-->
  167 +<!-- <el-form-item label=" " :label-width="formLabelWidth" prop="creatTime">-->
  168 +<!-- <div class="my-text-area">-->
  169 +<!-- <div class="el-input-group__prepend prepand">开始时间</div>-->
  170 +<!-- <el-date-picker-->
  171 +<!-- v-model="addForm.creatTime"-->
  172 +<!-- type="datetime" size="mini"-->
  173 +<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
  174 +<!-- format="yyyy-MM-dd HH:mm:ss"-->
  175 +<!-- style="width:170px"-->
  176 +<!-- placeholder="选择开始时间">-->
  177 +<!-- </el-date-picker>-->
  178 +<!-- </div>-->
  179 +<!-- </el-form-item>-->
  180 +<!-- </el-col>-->
  181 +<!-- <el-col :span="12">-->
  182 +<!-- <el-form-item label=" " :label-width="formLabelWidth" prop="updateTime">-->
  183 +<!-- <div class="my-text-area">-->
  184 +<!-- <div class="el-input-group__prepend prepand">结束时间</div>-->
  185 +<!-- <el-date-picker-->
  186 +<!-- v-model="addForm.updateTime"-->
  187 +<!-- type="datetime" size="mini"-->
  188 +<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
  189 +<!-- format="yyyy-MM-dd HH:mm:ss"-->
  190 +<!-- style="width:170px"-->
  191 +<!-- placeholder="选择结束时间">-->
  192 +<!-- </el-date-picker>-->
  193 +<!-- </div>-->
  194 +<!-- </el-form-item>-->
  195 +<!-- </el-col>-->
  196 +<!-- </el-row>-->
  197 + </el-form>
  198 + <div slot="footer" class="dialog-footer">
  199 + <el-button @click="apply_dialog = false" size="small">取 消</el-button>
  200 + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
  201 + </div>
  202 + </el-dialog>
  203 + </el-row>
  204 + </el-card>
  205 + </el-row>
  206 +</template>
  207 +
  208 +<script>
  209 + import {list,save,edit,remove} from '../../api/consigner/cost';
  210 +
  211 + export default {
  212 + name: "discount",
  213 + data() {
  214 + return {
  215 + queryInfo: {
  216 + companyId:'',
  217 + busnessType:'',
  218 + state:'',
  219 + // 当前页数
  220 + limitSize: 1,
  221 + // 每页大小
  222 + pageSize: 10,
  223 + },
  224 + total: 0,
  225 + tableData:[],
  226 + dialogMap: {
  227 + update: '编辑',
  228 + create: '新增'
  229 + },
  230 + dis: undefined,
  231 + dialogApply: 'create',
  232 + apply_dialog: false,
  233 + addForm: {
  234 + busnessType: '',
  235 + companyCode: '',
  236 + companyId: '',
  237 + creatTime: '',
  238 + creatUserid: '',
  239 + feeType: '',
  240 + id:'',
  241 + rate:'',
  242 + state:'',
  243 + updateTime:''
  244 + },
  245 + formLabelWidth: '220px',
  246 + rules: {
  247 + companyId: [
  248 + { required: true, message: '必填', trigger: 'change' }
  249 + ],
  250 + // needCount: [
  251 + // { required: true, message: '请输入需要车辆数量', trigger: 'blur' },
  252 + // ],
  253 + // orginStation: [
  254 + // { required: true, message: '请输入起始场站', trigger: 'blur' },
  255 + // ],
  256 + // endStation: [
  257 + // { required: true, message: '请输入目的场站', trigger: 'blur' },
  258 + // ],
  259 + },
  260 + }
  261 + },
  262 + methods: {
  263 + handleSizeChange(val) {
  264 + this.queryInfo.pageSize = val
  265 + this.getList()
  266 + },
  267 + handleCurrentChange(val) {
  268 + this.queryInfo.limitSize = val
  269 + this.getList()
  270 + },
  271 + getList() {
  272 + const _this = this
  273 + list(this.queryInfo).then((response) => {
  274 + const res = response.data
  275 + console.log(response.data)
  276 + if (res.code !== '200') {
  277 + return _this.$message.error('获取消息收发记录,失败!')
  278 + }
  279 + // 获取列表数据
  280 + _this.tableData = res.data.list
  281 + // 获取列表的总记录数
  282 + _this.total = res.data.total
  283 + _this.$message.success('获取消息收发记录,成功!')
  284 + }).catch(error => {
  285 + // 关闭加载
  286 + _this.$message.error(error.toString())
  287 + })
  288 + },
  289 + // 添加对话框,打开事件
  290 + applyAdd() {
  291 + this.addForm = {
  292 + busnessType: '',
  293 + companyCode: '',
  294 + companyId: '',
  295 + creatTime: '',
  296 + creatUserid: '',
  297 + feeType: '',
  298 + id:'',
  299 + rate:'',
  300 + state:'',
  301 + updateTime:''
  302 + };
  303 + this.dialogApply= 'create';
  304 + this.dis= 'create';
  305 + this.apply_dialog = true;
  306 + },
  307 + // 添加功能
  308 + add() {
  309 + this.$refs.addForm.validate(valid => {
  310 + // 未通过,表单预校验
  311 + if (!valid) return;
  312 + save(this.addForm).then((response) => {
  313 + let res = response.data;
  314 + // 添加失败
  315 + if (res.code !== '200') {
  316 + return this.$message.error(res.msg);
  317 + }
  318 + // 添加,成功
  319 + this.$message.success(res.msg);
  320 + // 隐藏对话框
  321 + this.apply_dialog = false;
  322 + // 刷新列表
  323 + this.getList();
  324 + }).catch(error => {
  325 + this.$message.error(error.toString());
  326 + });
  327 + })
  328 + },
  329 +// 打开编辑
  330 + applyEdit(row) {
  331 + this.apply_dialog = true;
  332 + this.dialogApply = 'update';
  333 + this.dis= 'update';
  334 + this.addForm=row;
  335 + },
  336 + // 编辑功能
  337 + edit() {
  338 + // 进行表单的预验证
  339 + this.$refs.addForm.validate(valid => {
  340 + // 未通过,表单预校验
  341 + if (!valid) return
  342 + edit(this.addForm).then((response) => {
  343 + // console.log(row)
  344 + const res = response.data
  345 + if (res.code != '200') {
  346 + return this.$message.error(res.msg)
  347 + }
  348 + this.$message.success(res.msg)
  349 + // 隐藏对话框
  350 + this.apply_dialog = false
  351 + // 刷新列表
  352 + this.getList()
  353 + }).catch(error => {
  354 + this.$message.error(error.toString())
  355 + })
  356 + })
  357 + },
  358 + // 删除
  359 + applyDel(row) {
  360 + // 弹框询问是否删除?
  361 + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
  362 + confirmButtonText: '确定删除',
  363 + cancelButtonText: '取消',
  364 + type: 'warning'
  365 + }
  366 + ).then(() => {
  367 + remove(row).then((response) => {
  368 + // console.log(row)
  369 + const res = response.data
  370 + this.$message.success(res.msg)
  371 + this.getList()
  372 + }).catch(error => {
  373 + this.$message.error(error)
  374 + })
  375 + }).catch(() => {
  376 + })
  377 + },
  378 + },
  379 + mounted() {
  380 + this.getList();
  381 + // this.getYardList();
  382 +
  383 + }
  384 +
  385 + }
  386 +</script>
  387 +
  388 +<style scoped>
  389 + .toolbar{
  390 + height: 60px;
  391 + background-color: white;
  392 + /*line-height: 60px;*/
  393 + vertical-align: middle;
  394 + border-radius: 5px 5px 5px 5px;
  395 + padding: 15px 0 0 20px;
  396 + box-shadow: 0px 5px 5px #e5e8eb;
  397 + }
  398 + .my-text-area .prepand{
  399 + float: left;
  400 + width:89px;
  401 + height: 28px;
  402 + font-size: 12px;
  403 + line-height: 28px;
  404 + }
  405 +</style>
  406 +<style>
  407 + .my-text-area .el-textarea__inner{
  408 + min-height: 28px;
  409 + height: 28px;
  410 + border-bottom-left-radius: 0;
  411 + border-top-left-radius: 0;
  412 + }
  413 +</style>
  414 +
  1 +<template>
  2 + <el-row>
  3 + <el-card style="background-color: #F5F7FA">
  4 + <!-- 搜索区域-->
  5 + <el-row class="toolbar">
  6 +<!-- <el-col :span="5">-->
  7 +<!-- <el-input v-model="queryInfo.companyId" prefix-icon="el-icon-search" size="small" style="width: 240px"-->
  8 +<!-- placeholder="公司ID" clearable>-->
  9 +<!-- <template slot="prepend">公司ID</template>-->
  10 +<!-- </el-input>-->
  11 +<!-- </el-col>-->
  12 +<!-- <el-col :span="5">-->
  13 +<!-- <el-input v-model="queryInfo.busnessType" prefix-icon="el-icon-search" size="small" style="width: 240px"-->
  14 +<!-- placeholder="业务类型" clearable>-->
  15 +<!-- <template slot="prepend">业务类型</template>-->
  16 +<!-- </el-input>-->
  17 +<!-- </el-col>-->
  18 +<!-- <el-col :span="5">-->
  19 +<!-- <div class="my-text-area">-->
  20 +<!-- <div class="el-input-group__prepend prepand">生效状态</div>-->
  21 +<!-- <el-select v-model="queryInfo.state" placeholder="生效状态" size="small" style="width: 140px">-->
  22 +<!-- <el-option label="生效" value="Y"></el-option>-->
  23 +<!-- <el-option label="失效" value="N"></el-option>-->
  24 +<!-- </el-select>-->
  25 +<!-- </div>-->
  26 +<!-- </el-col>-->
  27 + <el-col :span="5">
  28 + <el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
  29 + 查询
  30 + </el-button>
  31 + <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>
  32 + </el-col>
  33 + </el-row>
  34 + <!-- 列表区域-->
  35 + <el-row>
  36 + <template>
  37 + <el-table
  38 + :data="tableData"
  39 + border
  40 + :cell-style="{textAlign:'center'}"
  41 + style="border-radius: 10px 10px 0px 0px;line-height: 25px"
  42 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
  43 + >
  44 + <el-table-column
  45 + fixed
  46 + prop="orderAuthorName"
  47 + label="结算人名称"
  48 + width="100">
  49 + </el-table-column>
  50 + <el-table-column
  51 + prop="orderAuthorid"
  52 + label="结算人ID"
  53 + width="120">
  54 + </el-table-column>
  55 + <el-table-column
  56 + prop="orderRemark"
  57 + label="支付方式"
  58 + width="120">
  59 + </el-table-column>
  60 + <el-table-column
  61 + prop="orderState"
  62 + label="支付状态"
  63 + width="120">
  64 + <template slot-scope="scope">
  65 + <span v-if="scope.row.orderState ==='000'">未支付</span>
  66 + <span v-if="scope.row.orderState ==='001'">已支付</span>
  67 + <span v-if="scope.row.orderState ==='111'">作废</span>
  68 + </template>
  69 + </el-table-column>
  70 + <el-table-column
  71 + prop="orderOperatorId"
  72 + label="经办人"
  73 + width="120">
  74 + </el-table-column>
  75 + <el-table-column
  76 + prop="orderTotalAmount"
  77 + label="订单总额度"
  78 + width="120">
  79 + </el-table-column>
  80 + <el-table-column
  81 + prop="orderCreatTime"
  82 + label="订单创建时间"
  83 + width="150">
  84 + </el-table-column>
  85 + <el-table-column
  86 + prop="orderUpdateTime"
  87 + label="订单修改时间"
  88 + width="150">
  89 + </el-table-column>
  90 + <el-table-column
  91 + prop="orderRemark"
  92 + label="备注">
  93 + </el-table-column>
  94 + <el-table-column
  95 + fixed="right"
  96 + label="操作"
  97 + width="160">
  98 + <template slot-scope="scope">
  99 + <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
  100 + <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button>
  101 + </template>
  102 + </el-table-column>
  103 + </el-table>
  104 + </template>
  105 + </el-row>
  106 + <el-row style="margin-top: 10px" class="toolbar">
  107 + <el-pagination
  108 + @size-change="handleSizeChange"
  109 + @current-change="handleCurrentChange"
  110 + :current-page="queryInfo.limitSize"
  111 + :page-size="queryInfo.pageSize"
  112 + :page-sizes="[10, 50, 100, 500]"
  113 + layout="total, sizes, prev, pager, next, jumper"
  114 + :total="total">
  115 + </el-pagination>
  116 + </el-row>
  117 + <el-row>
  118 + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="70%" >
  119 + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
  120 + <el-row>
  121 + <el-col :span="11">
  122 + <el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorName">
  123 + <el-input v-model="addForm.orderAuthorName" autocomplete="off" size="small" style="width: 350px">
  124 + <template slot="prepend">结算人名称</template>
  125 + </el-input>
  126 + </el-form-item>
  127 + </el-col>
  128 + <el-col :span="12">
  129 + <el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorid">
  130 + <el-input v-model="addForm.orderAuthorid" autocomplete="off" size="small" style="width: 350px">
  131 + <template slot="prepend">结算人ID</template>
  132 + </el-input>
  133 + </el-form-item>
  134 + </el-col>
  135 + </el-row>
  136 + <el-row>
  137 + <el-col :span="11">
  138 + <el-form-item label=" " :label-width="formLabelWidth" prop="orderOperatorId">
  139 + <el-input v-model="addForm.orderOperatorId" autocomplete="off" size="small" style="width: 350px">
  140 + <template slot="prepend">经办人</template>
  141 + </el-input>
  142 + </el-form-item>
  143 + </el-col>
  144 + <el-col :span="12">
  145 + <el-form-item label=" " :label-width="formLabelWidth" prop="orderTotalAmount">
  146 + <el-input v-model="addForm.orderTotalAmount" autocomplete="off" size="small" style="width: 350px">
  147 + <template slot="prepend">订单总额度</template>
  148 + </el-input>
  149 + </el-form-item>
  150 + </el-col>
  151 + </el-row>
  152 + <el-row>
  153 + <el-col :span="11">
  154 + <el-form-item label=" " :label-width="formLabelWidth" prop="orderType">
  155 + <div class="my-text-area">
  156 + <div class="el-input-group__prepend prepand">支付方式</div>
  157 + <el-select v-model="addForm.orderType" placeholder="请选择生效状态" size="small" style="width: 260px">
  158 + <el-option label="现金" value="现金"></el-option>
  159 + <el-option label="支付宝" value="支付宝"></el-option>
  160 + <el-option label="现金" value="微信"></el-option>
  161 + <el-option label="支付宝" value="银行转账"></el-option>
  162 + </el-select>
  163 + </div>
  164 + </el-form-item>
  165 + </el-col>
  166 + <el-col :span="12">
  167 + <el-form-item label=" " :label-width="formLabelWidth" prop="orderState">
  168 + <div class="my-text-area">
  169 + <div class="el-input-group__prepend prepand">支付状态</div>
  170 + <el-select v-model="addForm.orderState" placeholder="请选择生效状态" size="small" style="width: 260px">
  171 + <el-option label="未支付" value="000"></el-option>
  172 + <el-option label="已支付" value="001"></el-option>
  173 + <el-option label="作废" value="111"></el-option>
  174 + </el-select>
  175 + </div>
  176 + </el-form-item>
  177 + </el-col>
  178 + </el-row>
  179 + <el-row>
  180 + <el-col :span="11">
  181 + <el-form-item label=" " :label-width="formLabelWidth" prop="orderRemark">
  182 + <el-input v-model="addForm.orderRemark" autocomplete="off" size="small" style="width: 350px">
  183 + <template slot="prepend">备注</template>
  184 + </el-input>
  185 + </el-form-item>
  186 + </el-col>
  187 + </el-row>
  188 + </el-form>
  189 + <div slot="footer" class="dialog-footer">
  190 + <el-button @click="apply_dialog = false" size="small">取 消</el-button>
  191 + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
  192 + </div>
  193 + </el-dialog>
  194 + </el-row>
  195 + </el-card>
  196 + </el-row>
  197 +</template>
  198 +
  199 +<script>
  200 + import {list,save,edit,remove} from '../../api/consigner/goods';
  201 +
  202 + export default {
  203 + name: "goods",
  204 + data() {
  205 + return {
  206 + queryInfo: {
  207 + // companyId:'',
  208 + // busnessType:'',
  209 + // state:'',
  210 + // 当前页数
  211 + limitSize: 1,
  212 + // 每页大小
  213 + pageSize: 10,
  214 + },
  215 + total: 0,
  216 + tableData:[],
  217 + dialogMap: {
  218 + update: '编辑',
  219 + create: '新增'
  220 + },
  221 + dis: undefined,
  222 + dialogApply: 'create',
  223 + apply_dialog: false,
  224 + addForm: {
  225 + orderAuthorName: '',
  226 + orderAuthorid: '',
  227 + orderCreatTime: '',
  228 + orderOperatorId: '',
  229 + orderRemark: '',
  230 + orderState: '',
  231 + orderTotalAmount:'',
  232 + orderUpdateTime:'',
  233 + orderType:''
  234 + },
  235 + formLabelWidth: '120px',
  236 + rules: {
  237 + companyId: [
  238 + { required: true, message: '必填', trigger: 'change' }
  239 + ],
  240 + // needCount: [
  241 + // { required: true, message: '请输入需要车辆数量', trigger: 'blur' },
  242 + // ],
  243 + // orginStation: [
  244 + // { required: true, message: '请输入起始场站', trigger: 'blur' },
  245 + // ],
  246 + // endStation: [
  247 + // { required: true, message: '请输入目的场站', trigger: 'blur' },
  248 + // ],
  249 + },
  250 + }
  251 + },
  252 + methods: {
  253 + handleSizeChange(val) {
  254 + this.queryInfo.pageSize = val
  255 + this.getList()
  256 + },
  257 + handleCurrentChange(val) {
  258 + this.queryInfo.limitSize = val
  259 + this.getList()
  260 + },
  261 + getList() {
  262 + const _this = this
  263 + list(this.queryInfo).then((response) => {
  264 + const res = response.data
  265 + console.log(response.data)
  266 + if (res.code !== '200') {
  267 + return _this.$message.error('获取消息收发记录,失败!')
  268 + }
  269 + // 获取列表数据
  270 + _this.tableData = res.data.list
  271 + // 获取列表的总记录数
  272 + _this.total = res.data.total
  273 + _this.$message.success('获取消息收发记录,成功!')
  274 + }).catch(error => {
  275 + // 关闭加载
  276 + _this.$message.error(error.toString())
  277 + })
  278 + },
  279 + // 添加对话框,打开事件
  280 + applyAdd() {
  281 + this.addForm = {
  282 + orderAuthorName: '',
  283 + orderAuthorid: '',
  284 + orderCreatTime: '',
  285 + orderOperatorId: '',
  286 + orderRemark: '',
  287 + orderState: '',
  288 + orderTotalAmount:'',
  289 + orderUpdateTime:'',
  290 + orderType:''
  291 + };
  292 + this.dialogApply= 'create';
  293 + this.dis= 'create';
  294 + this.apply_dialog = true;
  295 + },
  296 + // 添加功能
  297 + add() {
  298 + this.$refs.addForm.validate(valid => {
  299 + // 未通过,表单预校验
  300 + if (!valid) return;
  301 + save(this.addForm).then((response) => {
  302 + let res = response.data;
  303 + // 添加失败
  304 + if (res.code !== '200') {
  305 + return this.$message.error(res.msg);
  306 + }
  307 + // 添加,成功
  308 + this.$message.success(res.msg);
  309 + // 隐藏对话框
  310 + this.apply_dialog = false;
  311 + // 刷新列表
  312 + this.getList();
  313 + }).catch(error => {
  314 + this.$message.error(error.toString());
  315 + });
  316 + })
  317 + },
  318 +// 打开编辑
  319 + applyEdit(row) {
  320 + this.apply_dialog = true;
  321 + this.dialogApply = 'update';
  322 + this.dis= 'update';
  323 + this.addForm=row;
  324 + },
  325 + // 编辑功能
  326 + edit() {
  327 + // 进行表单的预验证
  328 + this.$refs.addForm.validate(valid => {
  329 + // 未通过,表单预校验
  330 + if (!valid) return
  331 + edit(this.addForm).then((response) => {
  332 + // console.log(row)
  333 + const res = response.data
  334 + if (res.code != '200') {
  335 + return this.$message.error(res.msg)
  336 + }
  337 + this.$message.success(res.msg)
  338 + // 隐藏对话框
  339 + this.apply_dialog = false
  340 + // 刷新列表
  341 + this.getList()
  342 + }).catch(error => {
  343 + this.$message.error(error.toString())
  344 + })
  345 + })
  346 + },
  347 + // 删除
  348 + applyDel(row) {
  349 + // 弹框询问是否删除?
  350 + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
  351 + confirmButtonText: '确定删除',
  352 + cancelButtonText: '取消',
  353 + type: 'warning'
  354 + }
  355 + ).then(() => {
  356 + // console.log(row);
  357 + remove(row).then((response) => {
  358 + // console.log(row)
  359 + const res = response.data
  360 + this.$message.success(res.msg)
  361 + this.getList()
  362 + }).catch(error => {
  363 + this.$message.error(error)
  364 + })
  365 + }).catch(() => {
  366 + })
  367 + },
  368 + },
  369 + mounted() {
  370 + this.getList();
  371 + // this.getYardList();
  372 +
  373 + }
  374 +
  375 + }
  376 +</script>
  377 +
  378 +<style scoped>
  379 + .toolbar{
  380 + height: 60px;
  381 + background-color: white;
  382 + /*line-height: 60px;*/
  383 + vertical-align: middle;
  384 + border-radius: 5px 5px 5px 5px;
  385 + padding: 15px 0 0 20px;
  386 + box-shadow: 0px 5px 5px #e5e8eb;
  387 + }
  388 + .my-text-area .prepand{
  389 + float: left;
  390 + width:89px;
  391 + height: 28px;
  392 + font-size: 12px;
  393 + line-height: 28px;
  394 + }
  395 +</style>
  396 +<style>
  397 + .my-text-area .el-textarea__inner{
  398 + min-height: 28px;
  399 + height: 28px;
  400 + border-bottom-left-radius: 0;
  401 + border-top-left-radius: 0;
  402 + }
  403 +</style>