|
@@ -0,0 +1,332 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+ <head>
|
|
|
+ <title>物流表-列表</title>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
+ <!-- 所有的 css & js 资源 -->
|
|
|
+ <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
|
|
|
+ <link rel="stylesheet" href="../../static/sa.css">
|
|
|
+ <script src="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
|
|
|
+ <script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
|
|
|
+ <script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
|
|
|
+ <script src="https://unpkg.com/jquery@3.4.1/dist/jquery.min.js"></script>
|
|
|
+ <script src="https://www.layuicdn.com/layer-v3.1.1/layer.js"></script>
|
|
|
+ <script src="../../static/sa.js"></script>
|
|
|
+ <script src="../../static/kj/upload-util.js"></script>
|
|
|
+
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <div class="vue-box" style="display: none;" :style="'display: block;'">
|
|
|
+ <div class="c-panel">
|
|
|
+ <!-- ------------- 检索参数 ------------- -->
|
|
|
+ <div class="c-title">检索参数</div>
|
|
|
+ <el-form ref="form" :model='p' @submit.native.prevent>
|
|
|
+ <sa-item type="num" name="物流表主键" v-model="p.id"></sa-item>
|
|
|
+ <sa-item type="text" name="订单表ID" v-model="p.ordersId"></sa-item>
|
|
|
+ <sa-item type="text" name="申报订单号" v-model="p.declarationNumber"></sa-item>
|
|
|
+ <sa-item type="enum" name="订单待确认" v-model="p.prepare"
|
|
|
+ :jv="{0: '待确认', 1: '订单已确认', 2: '订单确认失败'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <sa-item type="text" name="订单确认时间" v-model="p.prepareTime"></sa-item>
|
|
|
+ <sa-item type="enum" name="待装货" v-model="p.loading"
|
|
|
+ :jv="{0: '待装货', 1: '已装货'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <sa-item type="text" name="已装货时间" v-model="p.loadingTime"></sa-item>
|
|
|
+ <sa-item type="enum" name="发货" v-model="p.delivery"
|
|
|
+ :jv="{0: '未发', 1: '已发'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <sa-item type="text" name="发货时间" v-model="p.deliveryTime"></sa-item>
|
|
|
+ <sa-item type="enum" name="已出海关" v-model="p.clearedCustom"
|
|
|
+ :jv="{0: '禁用', 1: '启用'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <sa-item type="text" name="出海关时间" v-model="p.clearedCustomTime"></sa-item>
|
|
|
+ <sa-item type="enum" name="接货人确定接货" v-model="p.makeCargo"
|
|
|
+ :jv="{0: '禁用', 1: '启用'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <sa-item type="text" name="接货完成时间" v-model="p.makeCargoTime"></sa-item>
|
|
|
+ <sa-item type="enum" name="收购商确认" v-model="p.confirmReceipt"
|
|
|
+ :jv="{0: '禁用', 1: '启用'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <sa-item type="text" name="收货方确认时间" v-model="p.confirmReceiptTime"></sa-item>
|
|
|
+ <sa-item type="enum" name="订单状态已完成" v-model="p.orderFinish"
|
|
|
+ :jv="{0: '进行中', 1: '已完成'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <sa-item type="text" name="创建时间" v-model="p.createTime"></sa-item>
|
|
|
+ <sa-item type="text" name="创建人编号" v-model="p.createBy"></sa-item>
|
|
|
+ <sa-item type="text" name="创建人名称" v-model="p.createName"></sa-item>
|
|
|
+ <sa-item type="text" name="更新时间" v-model="p.updateTime"></sa-item>
|
|
|
+ <sa-item type="text" name="更新人编号" v-model="p.updateBy"></sa-item>
|
|
|
+ <sa-item type="text" name="更新人名称" v-model="p.updateName"></sa-item>
|
|
|
+ <sa-item type="enum" name="删除状态" v-model="p.deleteStatus"
|
|
|
+ :jv="{0: '禁用', 1: '启用'}" jtype="2" def="不限"></sa-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
|
|
|
+ </el-form>
|
|
|
+ <div class="fast-btn">
|
|
|
+ <el-button v-if="sa.isAuth('tb-logistics-add')" size="mini" type="primary" @click="add()">新增</el-button>
|
|
|
+ <el-button size="mini" type="success" @click="getBySelect()">查看</el-button>
|
|
|
+ <el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
|
|
|
+ </div>
|
|
|
+ <!-- ------------- 数据列表 ------------- -->
|
|
|
+ <el-table class="data-table" ref="data-table" :data="dataList" >
|
|
|
+ <sa-td type="selection"></sa-td>
|
|
|
+ <sa-td name="物流表主键" prop="id" type="num"></sa-td>
|
|
|
+ <sa-td name="订单表ID" prop="ordersId" ></sa-td>
|
|
|
+ <sa-td name="申报订单号" prop="declarationNumber" ></sa-td>
|
|
|
+ <sa-td name="订单待确认" prop="prepare" type="switch" :jv="{0: '待确认', 1: '订单已确认', 2: '订单确认失败'}" @change="s => updatePrepare(s.row)"></sa-td>
|
|
|
+ <sa-td name="订单确认时间" prop="prepareTime" ></sa-td>
|
|
|
+ <sa-td name="待装货" prop="loading" type="switch" :jv="{0: '待装货', 1: '已装货'}" @change="s => updateLoading(s.row)"></sa-td>
|
|
|
+ <sa-td name="已装货时间" prop="loadingTime" ></sa-td>
|
|
|
+ <sa-td name="发货" prop="delivery" type="switch" :jv="{0: '未发', 1: '已发'}" @change="s => updateDelivery(s.row)"></sa-td>
|
|
|
+ <sa-td name="发货时间" prop="deliveryTime" ></sa-td>
|
|
|
+ <sa-td name="已出海关" prop="clearedCustom" type="switch" :jv="{0: '禁用', 1: '启用'}" @change="s => updateClearedCustom(s.row)"></sa-td>
|
|
|
+ <sa-td name="出海关时间" prop="clearedCustomTime" ></sa-td>
|
|
|
+ <sa-td name="接货人确定接货" prop="makeCargo" type="switch" :jv="{0: '禁用', 1: '启用'}" @change="s => updateMakeCargo(s.row)"></sa-td>
|
|
|
+ <sa-td name="接货完成时间" prop="makeCargoTime" ></sa-td>
|
|
|
+ <sa-td name="收购商确认" prop="confirmReceipt" type="switch" :jv="{0: '禁用', 1: '启用'}" @change="s => updateConfirmReceipt(s.row)"></sa-td>
|
|
|
+ <sa-td name="收货方确认时间" prop="confirmReceiptTime" ></sa-td>
|
|
|
+ <sa-td name="订单状态已完成" prop="orderFinish" type="switch" :jv="{0: '进行中', 1: '已完成'}" @change="s => updateOrderFinish(s.row)"></sa-td>
|
|
|
+ <sa-td name="创建时间" prop="createTime" ></sa-td>
|
|
|
+ <sa-td name="创建人编号" prop="createBy" ></sa-td>
|
|
|
+ <sa-td name="创建人名称" prop="createName" ></sa-td>
|
|
|
+ <sa-td name="更新时间" prop="updateTime" ></sa-td>
|
|
|
+ <sa-td name="更新人编号" prop="updateBy" ></sa-td>
|
|
|
+ <sa-td name="更新人名称" prop="updateName" ></sa-td>
|
|
|
+ <sa-td name="删除状态" prop="deleteStatus" type="switch" :jv="{0: '禁用', 1: '启用'}" @change="s => updateDeleteStatus(s.row)"></sa-td>
|
|
|
+ <el-table-column label="操作" fixed="right" width="240px">
|
|
|
+ <template slot-scope="s">
|
|
|
+ <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
|
|
|
+ <el-button v-if="sa.isAuth('tb-logistics-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>
|
|
|
+ <el-button v-if="sa.isAuth('tb-logistics-del')" class="c-btn" type="danger" icon="el-icon-delete" @click="del(s.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- ------------- 分页 ------------- -->
|
|
|
+ <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <script>
|
|
|
+ var app = new Vue({
|
|
|
+ components: {
|
|
|
+ "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
|
|
|
+ "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
|
|
|
+ },
|
|
|
+ el: '.vue-box',
|
|
|
+ data: {
|
|
|
+ p: { // 查询参数
|
|
|
+ id: '', // 物流表主键
|
|
|
+ ordersId: '', // 订单表ID
|
|
|
+ declarationNumber: '', // (预留字段) 申报订单号
|
|
|
+ prepare: '', // 订单待确认(0=待确认,1=订单已确认,2=订单确认失败)
|
|
|
+ prepareTime: '', // 订单确认时间
|
|
|
+ loading: '', // 待装货(0=待装货,1=已装货)
|
|
|
+ loadingTime: '', // 已装货时间
|
|
|
+ delivery: '', // 发货(0=未发,1=已发)
|
|
|
+ deliveryTime: '', // 发货时间
|
|
|
+ clearedCustom: '', // 已出海关(0=禁用,1=启用)
|
|
|
+ clearedCustomTime: '', // 出海关时间
|
|
|
+ makeCargo: '', // 接货人确定接货(0=禁用,1=启用)
|
|
|
+ makeCargoTime: '', // 接货完成时间
|
|
|
+ confirmReceipt: '', // 收购商确认(0=禁用,1=启用)
|
|
|
+ confirmReceiptTime: '', // 收货方确认时间(相当于订单完成时间)
|
|
|
+ orderFinish: '', // 订单状态已完成(0=进行中,1=已完成)
|
|
|
+ createTime: '', // 创建时间
|
|
|
+ createBy: '', // 创建人编号
|
|
|
+ createName: '', // 创建人名称
|
|
|
+ updateTime: '', // 更新时间
|
|
|
+ updateBy: '', // 更新人编号
|
|
|
+ updateName: '', // 更新人名称
|
|
|
+ deleteStatus: '', // 删除状态(0=禁用,1=启用)
|
|
|
+ pageNo: 1, // 当前页
|
|
|
+ pageSize: 10, // 页大小
|
|
|
+ sortType: 0 // 排序方式
|
|
|
+ },
|
|
|
+ dataCount: 0,
|
|
|
+ dataList: [], // 数据集合
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 刷新
|
|
|
+ f5: function() {
|
|
|
+ sa.ajax('/level-one-server/TbLogistics/getList', sa.removeNull(this.p), function(res) {
|
|
|
+ this.dataList = res.data; // 数据
|
|
|
+ this.dataCount = res.dataCount; // 数据总数
|
|
|
+ sa.f5TableHeight(); // 刷新表格高度
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ // 查看
|
|
|
+ get: function(data) {
|
|
|
+ sa.showIframe('数据详情', 'tb-logistics-info.html?id=' + data.id, '1050px', '90%');
|
|
|
+ },
|
|
|
+ // 查看 - 根据选中的
|
|
|
+ getBySelect: function(data) {
|
|
|
+ var selection = this.$refs['data-table'].selection;
|
|
|
+ if(selection.length == 0) {
|
|
|
+ return sa.msg('请选择一条数据')
|
|
|
+ }
|
|
|
+ this.get(selection[0]);
|
|
|
+ },
|
|
|
+ // 修改
|
|
|
+ update: function(data) {
|
|
|
+ sa.showIframe('修改数据', 'tb-logistics-add.html?id=' + data.id, '1000px', '90%');
|
|
|
+ },
|
|
|
+ // 新增
|
|
|
+ add: function(data) {
|
|
|
+ sa.showIframe('新增数据', 'tb-logistics-add.html?id=-1', '1000px', '90%');
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ del: function(data) {
|
|
|
+ sa.confirm('是否删除,此操作不可撤销', function() {
|
|
|
+ sa.ajax('/level-one-server/TbLogistics/delete?id=' + data.id, function(res) {
|
|
|
+ sa.arrayDelete(this.dataList, data);
|
|
|
+ sa.ok('删除成功');
|
|
|
+ sa.f5TableHeight(); // 刷新表格高度
|
|
|
+ }.bind(this))
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ // 批量删除
|
|
|
+ deleteByIds: function() {
|
|
|
+ // 获取选中元素的id列表
|
|
|
+ let selection = this.$refs['data-table'].selection;
|
|
|
+ let ids = sa.getArrayField(selection, 'id');
|
|
|
+ if(selection.length == 0) {
|
|
|
+ return sa.msg('请至少选择一条数据')
|
|
|
+ }
|
|
|
+ // 提交删除
|
|
|
+ sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
|
|
|
+ sa.ajax('/level-one-server/TbLogistics/deleteByIds', {ids: ids.join(',')}, function(res) {
|
|
|
+ sa.arrayDelete(this.dataList, selection);
|
|
|
+ sa.ok('删除成功');
|
|
|
+ sa.f5TableHeight(); // 刷新表格高度
|
|
|
+ }.bind(this))
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ // 改 - 订单待确认(0=待确认,1=订单已确认,2=订单确认失败)
|
|
|
+ updatePrepare: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.prepare;
|
|
|
+ var ajax = sa.ajax('/level-one-server/TbLogistics/updatePrepare', {id: data.id, value: data.prepare}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 改 - 待装货(0=待装货,1=已装货)
|
|
|
+ updateLoading: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.loading;
|
|
|
+ var ajax = sa.ajax('/TbLogistics/updateLoading', {id: data.id, value: data.loading}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 改 - 发货(0=未发,1=已发)
|
|
|
+ updateDelivery: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.delivery;
|
|
|
+ var ajax = sa.ajax('/TbLogistics/updateDelivery', {id: data.id, value: data.delivery}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 改 - 已出海关(0=禁用,1=启用)
|
|
|
+ updateClearedCustom: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.clearedCustom;
|
|
|
+ var ajax = sa.ajax('/TbLogistics/updateClearedCustom', {id: data.id, value: data.clearedCustom}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 改 - 接货人确定接货(0=禁用,1=启用)
|
|
|
+ updateMakeCargo: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.makeCargo;
|
|
|
+ var ajax = sa.ajax('/TbLogistics/updateMakeCargo', {id: data.id, value: data.makeCargo}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 改 - 收购商确认(0=禁用,1=启用)
|
|
|
+ updateConfirmReceipt: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.confirmReceipt;
|
|
|
+ var ajax = sa.ajax('/TbLogistics/updateConfirmReceipt', {id: data.id, value: data.confirmReceipt}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 改 - 订单状态已完成(0=进行中,1=已完成)
|
|
|
+ updateOrderFinish: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.orderFinish;
|
|
|
+ var ajax = sa.ajax('/TbLogistics/updateOrderFinish', {id: data.id, value: data.orderFinish}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 改 - 删除状态(0=禁用,1=启用)
|
|
|
+ updateDeleteStatus: function(data) {
|
|
|
+ // 声明变量记录是否成功
|
|
|
+ var isOk = false;
|
|
|
+ var oldValue = data.deleteStatus;
|
|
|
+ var ajax = sa.ajax('/TbLogistics/updateDeleteStatus', {id: data.id, value: data.deleteStatus}, function(res) {
|
|
|
+ isOk = true;
|
|
|
+ sa.msg('修改成功');
|
|
|
+ }.bind(this));
|
|
|
+ // 如果未能修改成功, 则回滚
|
|
|
+ $.when(ajax).done(function() {
|
|
|
+ if(isOk == false) {
|
|
|
+ data.status = oldValue;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created: function() {
|
|
|
+ this.f5();
|
|
|
+ sa.onInputEnter();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+ </body>
|
|
|
+</html>
|