作者 朱兆平

add:

1. 跨境电商-收款单申报管理界面
2. 跨境电商-回执明细界面
  1 +import http from '../http.js';
  2 +let baseServiceURL = '/wlpt-cbed-system/export-receipt';
  3 +
  4 +// POST请求添加出库单
  5 +export const addExportReceipt = (data) => {
  6 + return http.post(`${baseServiceURL}/addExportReceipt`, data);
  7 +};
  8 +
  9 +// POST请求更新出库单信息
  10 +export const updateExportReceipt = (data) => {
  11 + return http.post(`${baseServiceURL}/updateExportReceipt`, data);
  12 +};
  13 +
  14 +// DELETE请求删除出库单(使用POST以适应某些防火墙限制)
  15 +export const deleteExportReceipt = (receiptGuid) => {
  16 + return http.post(`${baseServiceURL}/deleteExportReceipt`,{},{ receiptGuid: receiptGuid });
  17 +};
  18 +
  19 +// GET请求获取单一出库单信息
  20 +export const getExportReceipt = (receiptGuid) => {
  21 + return http.get(`${baseServiceURL}/getExportReceipt`, { "receiptGuid": receiptGuid } );
  22 +};
  23 +
  24 +// GET请求分页查询所有出库单信息
  25 +export const selectAllByPage = (record, pageNum, pageSize) => {
  26 + return http.get(`${baseServiceURL}/selectAllByPage`, { params: { ...record, pageNum, pageSize } });
  27 +};
  28 +
  29 +//POST请求上传导入的excel
  30 +export const uploadExportReceipt = (params) => {
  31 + return http.post(`${baseServiceURL}/importFromExcel`, params);
  32 +};
  33 +
  34 +// 批量申报
  35 +export const batchDeclare = (data) => {
  36 + return http.post(`${baseServiceURL}/batchDeclare`, data);
  37 +};
  1 +import http from '../http.js';
  2 +let baseServiceURL = '/wlpt-cbed-system/LogInfo';
  3 +
  4 +// 新增日志信息 - POST请求
  5 +export const addLogInfo = (logInfo) => {
  6 + return http.post(`${baseServiceURL}/addLogInfo`, logInfo);
  7 +};
  8 +
  9 +// 更新日志信息 - POST请求
  10 +export const editLogInfo = (logInfo) => {
  11 + return http.post(`${baseServiceURL}/editLogInfo`, logInfo);
  12 +};
  13 +
  14 +// 删除日志信息 - GET请求,uuid作为参数传递
  15 +export const deleteLogInfo = (uuid) => {
  16 + return http.get(`${baseServiceURL}/deleteLogInfo`, { uuid: uuid });
  17 +};
  18 +
  19 +// 查询日志信息列表 - GET请求,支持分页和查询条件
  20 +export const selectAllByPage = (data,params) => {
  21 +
  22 + return http.post(`${baseServiceURL}/selectAllByPage`,data, params);
  23 +};
@@ -6,8 +6,8 @@ export default { @@ -6,8 +6,8 @@ export default {
6 return axios({ 6 return axios({
7 method: 'POST', // 请求协议 7 method: 'POST', // 请求协议
8 url: url, // 请求的地址 8 url: url, // 请求的地址
9 - data: data, // post 请求的数据  
10 - params: params, 9 + data: data, // post 请求的实体类数据
  10 + params: params, //urlencoded 参数
11 timeout: 30000, // 超时时间, 单位毫秒 11 timeout: 30000, // 超时时间, 单位毫秒
12 headers: { 12 headers: {
13 'Content-Type': 'application/json;charset=UTF-8', 13 'Content-Type': 'application/json;charset=UTF-8',
@@ -128,6 +128,9 @@ import classification from './views/deploy/classification.vue' @@ -128,6 +128,9 @@ import classification from './views/deploy/classification.vue'
128 import subscribe from './views/deploy/subscribe.vue' 128 import subscribe from './views/deploy/subscribe.vue'
129 import UNcode from './views/wms/UNcode.vue' 129 import UNcode from './views/wms/UNcode.vue'
130 130
  131 +//跨境电商
  132 +import exportRecipt from "@/views/cbecd/export_recipt.vue";
  133 +
131 134
132 135
133 //账单管理 136 //账单管理
@@ -653,6 +656,15 @@ let routes = [ @@ -653,6 +656,15 @@ let routes = [
653 {path:'/express',component:Express,name:'快邮舱单申报'}, 656 {path:'/express',component:Express,name:'快邮舱单申报'},
654 ] 657 ]
655 }, 658 },
  659 + {
  660 + path: '/cbecd',
  661 + component: HomeNew,
  662 + name: '跨境电商申报',
  663 + iconCls:'el-icon-wind-power',
  664 + children:[
  665 + {path:'/cbecd-export-receipt',component:exportRecipt,name:'收款单申报'},
  666 + ]
  667 + },
656 668
657 { 669 {
658 path: '/', 670 path: '/',
  1 +<template>
  2 + <div id="exportReceipt">
  3 + <!-- 搜索区域 -->
  4 + <el-row :gutter="10" class="toolbar">
  5 + <el-col :span="7">
  6 + <el-input v-model="queryInfo.receiptGuid" prefix-icon="el-icon-search" size="small"
  7 + placeholder="系统唯一编号" clearable>
  8 + <template slot="prepend">系统唯一编号</template>
  9 + </el-input>
  10 + </el-col>
  11 + <!-- 其他搜索字段类似添加 -->
  12 + <el-col :span="6">
  13 + <el-button type="primary" icon="el-icon-search" size="small" @click="searchExportReceipts">
  14 + 查询
  15 + </el-button>
  16 + <el-button type="success" icon="el-icon-plus" size="small" @click="openDialog('add')">新增</el-button>
  17 + <el-button type="warning" icon="el-icon-message" size="small" @click="declare()">申报</el-button>
  18 + </el-col>
  19 + <el-col :span="6">
  20 + <el-upload
  21 + style="display: inline; margin-left: 10px;margin-right: 10px;"
  22 + action=""
  23 + :http-request="uploadFile"
  24 + :limit=1
  25 + :on-exceed="fileExceed"
  26 + :file-list="fileList"
  27 + accept="application/vnd.ms-excel,application/vnd.ms-excels,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  28 + ref="fileupload">
  29 + <el-button slot="trigger" style="width:150px" icon="el-icon-folder-add" type="primary">导入excel</el-button>
  30 + </el-upload>
  31 + </el-col>
  32 + </el-row>
  33 +
  34 + <!-- 表格区域 -->
  35 + <el-table :data="exportReceiptsData" border
  36 + style="border-radius: 10px 10px 0px 0px;line-height: 25px;width: 100%"
  37 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}"
  38 + @selection-change="selsChange"
  39 + >
  40 + <el-table-column type="selection" width="55" :selectable="isSelectable"></el-table-column>
  41 + <el-table-column prop="receiptGuid" label="系统唯一编号"></el-table-column>
  42 + <el-table-column prop="appType" label="报送类型" :formatter="formatAppType"></el-table-column>
  43 + <el-table-column prop="appTime" label="报送时间" :formatter="formatDate"></el-table-column>
  44 + <el-table-column prop="appStatus" label="申报状态" :formatter="formatAppStatus"></el-table-column>
  45 + <el-table-column prop="ebpName" label="电商平台登记名称"></el-table-column>
  46 + <el-table-column prop="ebpCode" label="电商平台代码"></el-table-column>
  47 + <el-table-column prop="ebcCode" label="电商企业代码"></el-table-column>
  48 + <el-table-column prop="ebcName" label="电商企业名称"></el-table-column>
  49 + <el-table-column prop="orderNo" label="电商订单编号"></el-table-column>
  50 + <el-table-column prop="payCode" label="支付企业代码"></el-table-column>
  51 + <el-table-column prop="payName" label="支付企业名称"></el-table-column>
  52 + <el-table-column prop="payNo" label="支付交易编号"></el-table-column>
  53 + <el-table-column prop="charge" label="订单交易金额"></el-table-column>
  54 + <el-table-column prop="currency" label="币制"></el-table-column>
  55 + <el-table-column prop="accountingDate" label="到账时间" :formatter="formatDate"></el-table-column>
  56 +
  57 + <!-- 操作列 -->
  58 + <el-table-column fixed="right" label="操作" width="250">
  59 + <template slot-scope="scope">
  60 + <el-row type="flex" justify="left">
  61 +<!-- <el-col :span="6"><el-button type="info" @click="openDialog('view', scope.row)">查看</el-button></el-col>-->
  62 + <el-col :span="6"><el-button type="primary" icon="el-icon-edit" @click="openDialog('edit', scope.row)"></el-button></el-col>
  63 + <el-col :span="6">
  64 + <el-popconfirm title="确定删除吗?" @confirm="deleteExportReceipt(scope.row.receiptGuid)">
  65 + <el-button slot="reference" type="danger" icon="el-icon-delete"></el-button>
  66 + </el-popconfirm>
  67 + </el-col>
  68 + </el-row>
  69 + <el-row type="flex" justify="left">
  70 + <el-col :span="6"><el-button type="info" icon="el-icon-search" @click="openSendLogView(scope.row)">回执</el-button></el-col>
  71 + </el-row>
  72 + </template>
  73 + </el-table-column>
  74 + </el-table>
  75 +
  76 + <!-- 分页 -->
  77 + <el-pagination layout="prev, pager, next" :total="totalRecords" @current-change="handleCurrentChange"
  78 + background style="margin-top: 10px">
  79 + </el-pagination>
  80 +
  81 + <!-- 对话框 -->
  82 + <el-dialog :title="dialogStateMap[dialogType]" :visible.sync="showDialog" width="80%">
  83 + <el-form ref="exportReceiptForm" :model="exportReceiptForm" :rules="formRules"
  84 + label-width="120px">
  85 + <!-- 表单字段 -->
  86 + <el-form-item label="系统唯一编号" prop="receiptGuid">
  87 + <el-input v-model="exportReceiptForm.receiptGuid"></el-input>
  88 + </el-form-item>
  89 + <!-- 其他表单字段类似添加 -->
  90 +
  91 + </el-form>
  92 + <div slot="footer" class="dialog-footer">
  93 + <el-button @click="showDialog = false">取 消</el-button>
  94 + <el-button type="primary" @click="submitForm(dialogType)">确 定</el-button>
  95 + </div>
  96 + </el-dialog>
  97 +
  98 + <el-dialog title="回执明细" :visible.sync="sendLogDialogShow" width="80%">
  99 + <send-log :bill-guid="billGuid"> </send-log>
  100 + </el-dialog>
  101 + </div>
  102 +</template>
  103 +
  104 +<script>
  105 +import { addExportReceipt, updateExportReceipt, deleteExportReceipt, getExportReceipt,
  106 + selectAllByPage,uploadExportReceipt, batchDeclare} from '@/api/cbecd';
  107 +import sendLog from "./send_log.vue"
  108 +export default {
  109 + computed: {
  110 + },
  111 + components: { sendLog },
  112 + data() {
  113 + return {
  114 + fileList: [],
  115 + sendList:[],
  116 + queryInfo: {},
  117 + exportReceiptsData: [],
  118 + totalRecords: 0,
  119 + pageNum: 1,
  120 + pageSize: 10,
  121 + showDialog: false,
  122 + sendLogDialogShow: false,
  123 + dialogType: '',
  124 + billGuid:'',
  125 + dialogStateMap: {
  126 + view: '查看',
  127 + edit: '编辑',
  128 + add: '新增'
  129 + },
  130 + exportReceiptForm: {},
  131 + formRules: {
  132 + receiptGuid: [{ required: true, message: '请输入系统唯一编号', trigger: 'blur' }],
  133 + // 其他字段规则类似添加
  134 + }
  135 + };
  136 + },
  137 + methods: {
  138 + formatAppType: function (row, column,cellValue, index) {
  139 + const map={
  140 + "1": "新增",
  141 + "2": "变更",
  142 + "3": "删除"
  143 + }
  144 + return map[cellValue];
  145 + },
  146 + formatAppStatus: function (row, column,cellValue, index) {
  147 + const map = {
  148 + "1": { text: "暂存", type: "" },
  149 + "2": { text: "申报", type: "info" },
  150 + "3": { text: "已回执", type: "success" }, // 默认样式
  151 + };
  152 +
  153 + const tagInfo = map[cellValue] || { text: "未知状态", type: "" };
  154 +
  155 + // 使用 createElement 创建 VNode
  156 + return this.$createElement('el-tag', { props: { type: tagInfo.type } }, tagInfo.text);
  157 +
  158 + // 使用 createElement 创建 VNode
  159 + return this.$createElement('el-tag', { props: { type: tagInfo.type } }, tagInfo.text);
  160 + },
  161 + formatDate: function (row, column,cellValue, index) {
  162 + // 获取单元格数据
  163 + if(cellValue) {
  164 + let dt = new Date(cellValue)
  165 + return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate()+ ' ' + dt.getHours() + ':' + dt.getMinutes() + ':' + dt.getSeconds();
  166 + }else {
  167 + return '';
  168 + }
  169 +
  170 + },
  171 + searchExportReceipts() {
  172 + selectAllByPage(this.queryInfo, this.pageNum, this.pageSize).then(response => {
  173 + const data = response.data;
  174 + if (data.code === '200') {
  175 + this.exportReceiptsData = data.data.list; // 假设返回数据包含list字段
  176 + this.totalRecords = data.data.total; // 假设返回数据包含total字段
  177 + }
  178 + });
  179 + },
  180 + openDialog(type, row) {
  181 + if (type === 'view' || type === 'edit') {
  182 + getExportReceipt(row.receiptGuid).then(response => {
  183 + const data = response.data;
  184 + if (data.code === '200') {
  185 + this.exportReceiptForm = data.data; // 假设返回数据包含data字段
  186 + }
  187 + });
  188 + } else {
  189 + this.exportReceiptForm = {}; // 清空表单,用于新增操作
  190 + }
  191 + this.dialogType = type;
  192 + this.showDialog = true;
  193 + },
  194 + openSendLogView(row) {
  195 + this.sendLogDialogShow = true;
  196 + this.billGuid = row.receiptGuid;
  197 + },
  198 + submitForm(type) {
  199 + if (type === 'add') {
  200 + addExportReceipt(this.exportReceiptForm).then(response => {
  201 + const data = response.data;
  202 + if (data.code === '200') {
  203 + this.$message.success('新增成功');
  204 + this.showDialog = false;
  205 + this.searchExportReceipts(); // 刷新列表
  206 + }
  207 + });
  208 + } else if (type === 'edit') {
  209 + updateExportReceipt(this.exportReceiptForm).then(response => {
  210 + const data = response.data;
  211 + if (data.code === '200') {
  212 + this.$message.success('编辑成功');
  213 + this.showDialog = false;
  214 + this.searchExportReceipts(); // 刷新列表
  215 + }
  216 + });
  217 + } else if (type === 'view') {
  218 + this.showDialog = false; // 查看模式下,直接关闭对话框
  219 + }
  220 + },
  221 + deleteExportReceipt(guid) {
  222 + deleteExportReceipt(guid).then(response => {
  223 + const data = response.data;
  224 + if (data.code === '200') {
  225 + this.$message.success('删除成功');
  226 + this.searchExportReceipts(); // 刷新列表
  227 + }
  228 + });
  229 + },// 自定义上传
  230 + uploadFile (item) {
  231 + const form = new FormData()
  232 + form.append('file', item.file)
  233 + uploadExportReceipt(form).then(res =>{
  234 + if(res.data.code =='200'){
  235 + this.$message.success(res.data.msg);
  236 + this.searchExportReceipts();
  237 + this.fileList = [];
  238 + }else {
  239 + this.$message.error(res.data.msg)
  240 + }
  241 + }).catch(e =>{
  242 + this.$message.error(e.toString())
  243 + })
  244 + },
  245 + handleCurrentChange(val) {
  246 + this.pageNum = val;
  247 + this.searchExportReceipts();
  248 + },
  249 + // 导入excel
  250 + fileExceed(){
  251 + this.$message.error('别贪心!一次只能上传一个哦~');
  252 + },
  253 + handleRemove(file, fileList) {
  254 + console.log(file, fileList);
  255 + },
  256 + handlePreview(file) {
  257 + console.log(file);
  258 + },
  259 + handleExceed(files, fileList) {
  260 + this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
  261 + },
  262 + beforeRemove(file, fileList) {
  263 + return this.$confirm(`确定移除 ${ file.name }?`);
  264 + },
  265 + selsChange(selection){
  266 + this.sendList = selection;
  267 + // 如果用户尝试选择了不允许的选择项,则移除这些选择
  268 + this.sendList = selection.filter(row => this.isSelectable(row));
  269 + },
  270 + isSelectable(row) {
  271 + // 只有当appStatus是"1"或"2"的时候才可选
  272 + return ['1'].includes(row.appStatus);
  273 + },
  274 + declare(){
  275 + batchDeclare(this.sendList).then(response => {
  276 + const data = response.data;
  277 + if (data.code === '200') {
  278 + this.$message.success('申报成功');
  279 + this.searchExportReceipts(); // 刷新列表
  280 + }
  281 + }).catch(e =>{
  282 + this.$message.error(e.toString());
  283 + });
  284 + }
  285 + }
  286 +};
  287 +</script>
  1 +<template>
  2 + <div>
  3 + <!-- 搜索区域 -->
  4 + <el-row :gutter="10" class="toolbar">
  5 + <el-col :span="7">
  6 + <el-input v-model="queryInfo.cebType" placeholder="申报业务类型" clearable></el-input>
  7 + </el-col>
  8 + <el-col :span="7">
  9 + <el-select v-model="queryInfo.decStatus" placeholder="申报状态">
  10 + <el-option label="暂存" value="1"></el-option>
  11 + <el-option label="申报" value="2"></el-option>
  12 + <el-option label="已回执" value="3"></el-option>
  13 + </el-select>
  14 + </el-col>
  15 + <el-col :span="6">
  16 + <el-button type="primary" icon="el-icon-search" @click="searchLogInfo">查询</el-button>
  17 + <el-button type="success" icon="el-icon-plus" @click="applyAdd">新增</el-button>
  18 + </el-col>
  19 + </el-row>
  20 +
  21 + <!-- 表格展示 -->
  22 + <el-table :data="tableData" border style="width: 100%">
  23 + <el-table-column prop="uuid" label="主键"></el-table-column>
  24 + <el-table-column prop="cebType" label="申报业务类型"></el-table-column>
  25 + <el-table-column prop="decType" label="申报类型" :formatter="formatDecType"></el-table-column>
  26 + <el-table-column prop="decDate" label="申报时间" :formatter="formatDate"></el-table-column>
  27 + <el-table-column prop="decStatus" label="申报状态" :formatter="formatAppStatus"></el-table-column>
  28 + <el-table-column prop="billGuid" label="单证GUID/编号"></el-table-column>
  29 + <el-table-column prop="decUser" label="申报人"></el-table-column>
  30 +<!-- <el-table-column prop="decPiece" label="申报件数"></el-table-column>-->
  31 +<!-- <el-table-column prop="decWeight" label="申报重量"></el-table-column>-->
  32 + <el-table-column prop="headGuid" label="报头ID/批次ID"></el-table-column>
  33 + <el-table-column prop="decNum" label="申报序号"></el-table-column>
  34 + <el-table-column prop="recDate" label="回执时间" :formatter="formatDate"></el-table-column>
  35 + <el-table-column prop="recStatus" label="回执状态"></el-table-column>
  36 + <el-table-column prop="recDescription" label="回执说明"></el-table-column>
  37 +<!-- <el-table-column fixed="right" label="操作">-->
  38 +<!-- <template slot-scope="scope">-->
  39 +<!-- <el-button type="text" @click="applyView(scope.row)">查看</el-button>-->
  40 +<!-- <el-button type="text" @click="applyEdit(scope.row)">编辑</el-button>-->
  41 +<!-- <el-button type="text" @click="applyDel(scope.$index, scope.row)">删除</el-button>-->
  42 +<!-- </template>-->
  43 +<!-- </el-table-column>-->
  44 + </el-table>
  45 +
  46 + <!-- 分页 -->
  47 + <el-pagination
  48 + background
  49 + layout="total, prev, pager, next"
  50 + :page-size="queryInfo.pageSize"
  51 + :current-page="queryInfo.pageNum"
  52 + :total="total"
  53 + @current-change="handleCurrentChange">
  54 + </el-pagination>
  55 +
  56 + <!-- 对话框 -->
  57 + <el-dialog :title="dialogStateMap[dialogType]" :visible.sync="showDialog" width="80%">
  58 + <el-form ref="logFormRef" :model="logInfo" :rules="rules" label-width="120px">
  59 + <!-- 录入表单字段 -->
  60 + <el-form-item label="主键" prop="uuid">
  61 + <el-input v-model="logInfo.uuid"></el-input>
  62 + </el-form-item>
  63 + <!-- ... 其他字段 -->
  64 + </el-form>
  65 + <span slot="footer" class="dialog-footer">
  66 + <el-button @click="showDialog = false">取 消</el-button>
  67 + <el-button type="primary" @click="submitForm(dialogType)">确 定</el-button>
  68 + </span>
  69 + </el-dialog>
  70 + </div>
  71 +</template>
  72 +
  73 +<script>
  74 +import { addLogInfo, editLogInfo, deleteLogInfo, selectAllByPage } from '@/api/cbecd/send_log';
  75 +
  76 +export default {
  77 + name: 'Send-Log',
  78 + props: {
  79 + billGuid: {
  80 + type: String,
  81 + default: ''
  82 + }
  83 + },
  84 + watch: {
  85 + billGuid: {
  86 + handler(newBillGuid) {
  87 + if (newBillGuid) {
  88 + this.queryInfo.sendLog.billGuid = newBillGuid;
  89 + this.searchLogInfo();
  90 + }
  91 + },
  92 + immediate: true // 立即执行一次监听器
  93 + }
  94 + },
  95 + data() {
  96 + return {
  97 + queryInfo: {
  98 + pageNum: 1,
  99 + pageSize: 10,
  100 + sendLog:{
  101 + billGuid:'uuid'
  102 + }
  103 + },
  104 +
  105 + tableData: [],
  106 + total: 0,
  107 + logInfo: {},
  108 + dialogType: '',
  109 + showDialog: false,
  110 + dialogStateMap: {
  111 + view: '查看',
  112 + edit: '编辑',
  113 + add: '新增'
  114 + },
  115 + rules: {
  116 + // 录入表单字段校验规则
  117 + uuid: [{ required: true, message: '请输入主键', trigger: 'blur' }],
  118 + // ... 其他字段的校验规则
  119 + }
  120 + };
  121 + },
  122 + methods: {
  123 + formatAppStatus: function (row, column,cellValue, index) {
  124 + const map = {
  125 + "1": { text: "暂存", type: "" },
  126 + "2": { text: "申报", type: "info" },
  127 + "3": { text: "申报中", type: "warning" }, // 默认样式
  128 + "4": { text: "已回执", type: "success" } // 默认样式
  129 + };
  130 +
  131 + const tagInfo = map[cellValue] || { text: "未知状态", type: "" };
  132 +
  133 + // 使用 createElement 创建 VNode
  134 + return this.$createElement('el-tag', { props: { type: tagInfo.type } }, tagInfo.text);
  135 +
  136 + // 使用 createElement 创建 VNode
  137 + return this.$createElement('el-tag', { props: { type: tagInfo.type } }, tagInfo.text);
  138 + },
  139 + formatDecType: function (row, column,cellValue, index) {
  140 + cellValue = ''+ cellValue;
  141 + console.log(row, column,cellValue, index);
  142 + const map={
  143 + "1": "新增",
  144 + "2": "变更",
  145 + "3": "删除"
  146 + }
  147 + return map[cellValue];
  148 + },
  149 + formatDate(date) {
  150 + if (!date) return '';
  151 + const d = new Date(date);
  152 + const year = d.getFullYear();
  153 + const month = (d.getMonth() + 1).toString().padStart(2, '0');
  154 + const day = d.getDate().toString().padStart(2, '0');
  155 + const hours = d.getHours().toString().padStart(2, '0');
  156 + const minutes = d.getMinutes().toString().padStart(2, '0');
  157 + const seconds = d.getSeconds().toString().padStart(2, '0');
  158 +
  159 + // 格式化为 YYYY-MM-DD HH:mm:ss
  160 + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  161 + },
  162 + searchLogInfo() {
  163 + selectAllByPage(this.queryInfo.sendLog,this.queryInfo).then(response => {
  164 + this.tableData = response.data.data.list;
  165 + this.total = response.pages;
  166 + });
  167 + },
  168 + applyAdd() {
  169 + this.dialogType = 'add';
  170 + this.showDialog = true;
  171 + // 清空表单
  172 + this.logInfo = {};
  173 + },
  174 + applyEdit(row) {
  175 + this.dialogType = 'edit';
  176 + this.showDialog = true;
  177 + this.logInfo = Object.assign({}, row);
  178 + },
  179 + applyView(row) {
  180 + this.dialogType = 'view';
  181 + this.showDialog = true;
  182 + // 设置为只读模式
  183 + this.$refs.logFormRef.setDisabled(true);
  184 + this.logInfo = Object.assign({}, row);
  185 + },
  186 + applyDel(index, row) {
  187 + deleteLogInfo(row.uuid).then(() => {
  188 + this.tableData.splice(index, 1);
  189 + });
  190 + },
  191 + submitForm(type) {
  192 + if (type === 'add') addLogInfo(this.logInfo);
  193 + else if (type === 'edit') editLogInfo(this.logInfo);
  194 + // 关闭对话框
  195 + this.showDialog = false;
  196 + // 刷新数据列表
  197 + this.searchLogInfo();
  198 + },
  199 + handleCurrentChange(val) {
  200 + this.queryInfo.pageNum = val;
  201 + this.searchLogInfo();
  202 + }
  203 + }
  204 +}
  205 +</script>
  206 +
  207 +<style>
  208 +</style>