74432331d7130a2d2798d0217ee9b688de55d811..c9420f1af08fbbc15af22df32b33d3f121f4c507
2025-09-01 sen
修改日志
c9420f 对比 | 目录
2025-09-01 sen
Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master
4f7d89 对比 | 目录
2025-08-19 sen
修改table宽度样式
343afe 对比 | 目录
1个文件已删除
5个文件已修改
2个文件已添加
854 ■■■■■ 已修改文件
ui/admin-ui3/src/views/cwgl/dispatchOrder/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue 360 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/requestLog/index.vue 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/requestStatusLog/index.vue 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/returnLog/index.vue 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/dispatchOrder/index.vue
@@ -131,16 +131,16 @@
      label: '服务产品名称', width: 120, showOverflowTooltip: true
    },
    customerName: {
      label: '客户名称', search: true, width: 200, showOverflowTooltip: true
      label: '客户名称', search: true,  minWidth: 220, showOverflowTooltip: true
    },
    carrierName: {
      label: '承运商', search: true, width: 200, showOverflowTooltip: true
      label: '承运商', search: true,  minWidth: 220, showOverflowTooltip: true
    },
    departureLocationName: {
      label: '出发地名称', width: 210, showOverflowTooltip: true
      label: '出发地名称', minWidth: 220, showOverflowTooltip: true
    },
    arrivalLocationName: {
      label: '目的地名称', width: 200, showOverflowTooltip: true
      label: '目的地名称',   minWidth: 220, showOverflowTooltip: true
    },
    licensePlateNumber: {
      label: '车牌', search: true, width: 120,
@@ -413,4 +413,13 @@
    z-index: 9999 !important;
  }
}
:deep(.avue-crud__table) {
  overflow-y: auto;
}
:deep(.el-scrollbar__bar.is-horizontal) {
  pointer-events: auto;
}
</style>
ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue
@@ -231,7 +231,7 @@
      label: '客户名称',
      search: true,
      minWidth: 220,
      showOverflowTooltip: true,
      type: 'select',           // 设置为下拉框类型
      dicData: [], // 使用 selectCustomName 作为数据源
      disabled: false  // 根据需要设置是否禁用
@@ -240,7 +240,8 @@
      label: '项目名称',
      search: true,
      disabled: true,
      minWidth: 150,
      minWidth: 220,
      showOverflowTooltip: true,
    },
    orderDate: {
      label: '下单日期',
@@ -307,6 +308,7 @@
    remark: {
      label: '备注',
      minWidth: 120,
      showOverflowTooltip: true,
      type: 'textarea', minRows: 3, maxRows: 5,
    },
@@ -628,3 +630,12 @@
}
getSelectCustomName()
</script>
<style>
:deep(.avue-crud__table) {
  overflow-y: auto;
}
:deep(.el-scrollbar__bar.is-horizontal) {
  pointer-events: auto;
}
</style>
ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue
@@ -218,6 +218,7 @@
    // },
    billSystemNo: {
      label: '账单系统编号',
       showOverflowTooltip: true,
      search: true,
      rules: [
        {
@@ -228,6 +229,8 @@
    },
    billName: {
      label: '账单名称',
       minWidth: 200,
      showOverflowTooltip: true,
      rules: [
        {
          required: true,
@@ -241,6 +244,7 @@
      search: true,
      minWidth: 220,
      search: true,
      showOverflowTooltip: true,
      type: 'select',           // 设置为下拉框类型
      dicData: [], // 使用 selectCustomName 作为数据源
      disabled: false  // 根据需要设置是否禁用
@@ -592,4 +596,11 @@
  padding: 8px 11px;
  width: 200px;
}
</style>
:deep(.avue-crud__table) {
  overflow-y: auto;
}
:deep(.el-scrollbar__bar.is-horizontal) {
  pointer-events: auto;
}
</style>
ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue
@@ -1,48 +1,19 @@
<template>
  <basicContainer >
    <avue-crud
        :option="option"
        :table-loading="pageF.loading"
        :data="tableData"
        :page="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crudRef"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @refresh-change="refreshChange"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @on-load="onLoad"
    >
  <basicContainer>
    <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
      :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
      @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
      @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
      @size-change="sizeChange" @on-load="onLoad">
      <template #menu-left>
        <el-button
            type="success"
            icon="Edit"
            :disabled="pageF.single"
            v-hasPermi="['cwgl:keyCollectionInfo:edit']"
            @click="handleUpdate">修改
        <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:keyCollectionInfo:edit']"
          @click="handleUpdate">修改
        </el-button>
        <el-button
            type="danger"
            icon="Delete"
            :disabled="pageF.multiple"
            @click="handleDelete"
            v-hasPermi="['cwgl:keyCollectionInfo:remove']"
        >删除
        <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
          v-hasPermi="['cwgl:keyCollectionInfo:remove']">删除
        </el-button>
        <el-button
            type="warning"
            plain
            icon="Download"
            @click="handleExport"
            v-hasPermi="['cwgl:keyCollectionInfo:export']"
        >导出
        <el-button type="warning" plain icon="Download" @click="handleExport"
          v-hasPermi="['cwgl:keyCollectionInfo:export']">导出
        </el-button>
      </template>
    </avue-crud>
@@ -50,132 +21,207 @@
</template>
<script setup name="keyCollectionInfo" lang="ts">
  import {KeyCollectionInfoI,addKeyCollectionInfo, delKeyCollectionInfo, exportKeyCollectionInfo, getKeyCollectionInfo, listKeyCollectionInfo, updateKeyCollectionInfo} from "@/api/cwgl/keyCollectionInfo";
  import useCurrentInstance from "@/utils/useCurrentInstance";
  import {computed,reactive, ref, toRefs} from "vue";
  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
  import {usePagePlus} from "@/hooks/usePagePlus";
  import {hasPermission} from "@/utils/permissionUtils";
import { KeyCollectionInfoI, addKeyCollectionInfo, delKeyCollectionInfo, exportKeyCollectionInfo, getKeyCollectionInfo, listKeyCollectionInfo, updateKeyCollectionInfo } from "@/api/cwgl/keyCollectionInfo";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, reactive, ref, toRefs } from "vue";
import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
import { usePagePlus } from "@/hooks/usePagePlus";
import { hasPermission } from "@/utils/permissionUtils";
  const { proxy } = useCurrentInstance();
  const crudRef = ref();
const { proxy } = useCurrentInstance();
const crudRef = ref();
  const permissionList = computed(()=>{
    return {
      addBtn: hasPermission(["cwgl:keyCollectionInfo:add"]),
      delBtn: hasPermission(["cwgl:keyCollectionInfo:remove"]),
      editBtn: hasPermission(["cwgl:keyCollectionInfo:edit"]),
      viewBtn: hasPermission(["cwgl:keyCollectionInfo:query"]),
    }
  })
const permissionList = computed(() => {
  return {
    addBtn: hasPermission(["cwgl:keyCollectionInfo:add"]),
    delBtn: hasPermission(["cwgl:keyCollectionInfo:remove"]),
    editBtn: hasPermission(["cwgl:keyCollectionInfo:edit"]),
    viewBtn: hasPermission(["cwgl:keyCollectionInfo:query"]),
  }
})
  const data = reactive({
    form:<KeyCollectionInfoI>{},
    queryParams:<KeyCollectionInfoI&PageQueryInterface>{},
    page: <PagesInterface>{
      pageSize: 10,
      total: 0,
      currentPage: 1,
const data = reactive({
  form: <KeyCollectionInfoI>{},
  queryParams: <KeyCollectionInfoI & PageQueryInterface>{},
  page: <PagesInterface>{
    pageSize: 10,
    total: 0,
    currentPage: 1,
  },
  selectionList: [],
})
const { queryParams, form, page, selectionList } = toRefs(data);
const option = ref({
  pageKey: 'KeyCollectionInfo',
  rowKey: 'id',
  menu: false,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn: false,
  selection: false,
  searchSpan: 5,
  searchLabelWidth: 120,
  labelWidth: 130,
  column: {
    // id: {
    //   label: 'ID',
    // },
    customerName: {
      label: '客户名称',
      minWidth: 200,
        search: true,
    },
    selectionList:[],
  })
  const {queryParams,form,page,selectionList} = toRefs(data);
  const option = ref({
    pageKey: 'KeyCollectionInfo',
    rowKey: 'id',
    column: {
                                id: {
          label: 'ID',
                            },
                                customerName: {
          label: '客户名称',
                            },
                                carrier: {
          label: '承运商',
                            },
                                dispatchNo: {
          label: '调度单号',
                            },
                                driverName: {
          label: '司机名称',
                            },
                                driverMobile: {
          label: '司机手机号',
                            },
                                licensePlateNumber: {
          label: '车牌号',
                            },
                                orderTime: {
          label: '订单下单时间',
                            },
                                orderCreatedTime: {
          label: '订单创建时间',
                            },
                                dispatchCreatedTime: {
          label: '调度单创建时间',
                            },
                                keyCollectionTime: {
          label: '钥匙领取时间',
                            },
                                estimatedDepartureTime: {
          label: '预计出发时间',
                            },
                                requiredArrivalTime: {
          label: '要求到达时间',
                            },
                                consignorAddress: {
          label: '出发地地址',
                      type: 'textarea', minRows: 3, maxRows: 5,
                            },
                                consigneeAddress: {
          label: '目的地地址',
                      type: 'textarea', minRows: 3, maxRows: 5,
                            },
                                mainDriver: {
          label: '主驾驶员',
                            },
                                pointNum: {
          label: '提送货点数',
                            },
                                transportMode: {
          label: '运输方式',
                            },
                                assistantDriver: {
          label: '副驾驶员',
                            },
                                quantity: {
          label: '件数',
                            },
                                dispatchQuantity: {
          label: '实发件数',
                            },
                                remark: {
          label: '备注',
                      type: 'textarea', minRows: 3, maxRows: 5,
                            },
          }
  })
    carrier: {
      label: '承运商',
      minWidth: 200,
      showOverflowTooltip: true,
    },
    dispatchNo: {
      label: '调度单号',
      minWidth: 200,
        search: true,
    },
    driverName: {
      label: '司机名称',
    },
    driverMobile: {
      label: '司机手机号',
      minWidth: 200,
    },
    licensePlateNumber: {
      label: '车牌号',
      minWidth: 150,
    },
    orderTime: {
      label: '订单下单时间',
      minWidth: 180,
        search: true,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      minWidth: 200,
    },
    orderCreatedTime: {
      label: '订单创建时间',
      minWidth: 180,
        search: true,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      minWidth: 200,
    },
    dispatchCreatedTime: {
      label: '调度单创建时间',
      minWidth: 180,
        search: true,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      minWidth: 200,
    },
    keyCollectionTime: {
      label: '钥匙领取时间',
      minWidth: 180,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      minWidth: 200,
    },
    estimatedDepartureTime: {
      minWidth: 180,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      minWidth: 200,
      label: '预计出发时间',
    },
    requiredArrivalTime: {
      label: '要求到达时间',
      minWidth: 180,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      minWidth: 200,
    },
    consignorAddress: {
      label: '出发地地址',
      showOverflowTooltip: true,
      minWidth: 200,
      type: 'textarea', minRows: 3, maxRows: 5,
    },
    consigneeAddress: {
      label: '目的地地址',
      showOverflowTooltip: true,
      minWidth: 200,
      type: 'textarea', minRows: 3, maxRows: 5,
    },
    mainDriver: {
      label: '主驾驶员',
      minWidth: 150,
    },
    pointNum: {
      label: '提送货点数',
      minWidth: 150,
    },
    transportMode: {
      label: '运输方式',
      minWidth: 150,
    },
    assistantDriver: {
      label: '副驾驶员',
      minWidth: 150,
    },
    quantity: {
      label: '件数',
    },
    dispatchQuantity: {
      label: '实发件数',
    },
    remark: {
      minWidth: 150,
      showOverflowTooltip: true,
      label: '备注',
      type: 'textarea', minRows: 3, maxRows: 5,
    },
  }
})
  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
    form:form,
    option:option,
    queryParams:queryParams,
    idKey:'id',
    page:page.value,
    getListApi:listKeyCollectionInfo,
    getDetailApi:getKeyCollectionInfo,
    exportApi:exportKeyCollectionInfo,
    deleteApi:delKeyCollectionInfo,
    addApi:addKeyCollectionInfo,
    updateApi:updateKeyCollectionInfo,
    handleUpdateFunc:()=>{
const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
  searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
    form: form,
    option: option,
    queryParams: queryParams,
    idKey: 'id',
    page: page.value,
    getListApi: listKeyCollectionInfo,
    getDetailApi: getKeyCollectionInfo,
    exportApi: exportKeyCollectionInfo,
    deleteApi: delKeyCollectionInfo,
    addApi: addKeyCollectionInfo,
    updateApi: updateKeyCollectionInfo,
    handleUpdateFunc: () => {
      crudRef.value.rowEdit(selectionList.value[0]);
    },
    handleSelectionChangeFunc:(selection:any)=>{
    handleSelectionChangeFunc: (selection: any) => {
      selectionList.value = selection;
    }
  })
</script>
<style scoped>
::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
  border: var(--el-descriptions-table-border);
  padding: 8px 11px;
  width: 200px;
}
:deep(.avue-crud__table) {
  overflow-y: auto;
}
:deep(.el-scrollbar__bar.is-horizontal) {
  pointer-events: auto;
}
</style>
ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue
@@ -191,7 +191,7 @@
      label: '客户名称',
      search: true,
      minWidth: 220,
      showOverflowTooltip: true,
      type: 'select',           // 设置为下拉框类型
      dicData: [], // 使用 selectCustomName 作为数据源
      disabled: false  // 根据需要设置是否禁用
@@ -246,15 +246,18 @@
    carrierName: {
      label: '承运商',
      minWidth: 210,
      minWidth: 220,
      showOverflowTooltip: true,
    },
    departureLocation: {
      label: '出发地',
      minWidth: 200,
      minWidth: 220,
      showOverflowTooltip: true,
    },
    arrivalLocation: {
      label: '目的地',
      minWidth: 200,
      minWidth:  220,
      showOverflowTooltip: true,
    },
@@ -608,3 +611,13 @@
  return sums;
}
</script>
<style>
:deep(.avue-crud__table) {
  overflow-y: auto;
}
:deep(.el-scrollbar__bar.is-horizontal) {
  pointer-events: auto;
}
</style>
ui/admin-ui3/src/views/cwgl/requestLog/index.vue
File was deleted
ui/admin-ui3/src/views/cwgl/requestStatusLog/index.vue
New file
@@ -0,0 +1,144 @@
<template>
  <basicContainer>
    <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
      :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
      @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
      @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
      @size-change="sizeChange" @on-load="onLoad">
      <!-- <template #menu-left>
        <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:requestLog:edit']"
          @click="handleUpdate">修改
        </el-button>
        <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
          v-hasPermi="['cwgl:requestLog:remove']">删除
        </el-button>
        <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cwgl:requestLog:export']">导出
        </el-button>
      </template> -->
    </avue-crud>
  </basicContainer>
</template>
<script setup name="requestLog" lang="ts">
import { RequestLogI, addRequestLog, delRequestLog, exportRequestLog, getRequestLog, listRequestLog, updateRequestLog } from "@/api/cwgl/requestLog";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, reactive, ref, toRefs } from "vue";
import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
import { usePagePlus } from "@/hooks/usePagePlus";
import { hasPermission } from "@/utils/permissionUtils";
const { proxy } = useCurrentInstance();
const crudRef = ref();
const permissionList = computed(() => {
  return {
    addBtn: hasPermission(["cwgl:requestLog:add"]),
    delBtn: hasPermission(["cwgl:requestLog:remove"]),
    editBtn: hasPermission(["cwgl:requestLog:edit"]),
    viewBtn: hasPermission(["cwgl:requestLog:query"]),
  }
})
const data = reactive({
  form: <RequestLogI>{},
  queryParams: <RequestLogI & PageQueryInterface>{},
  page: <PagesInterface>{
    pageSize: 10,
    total: 0,
    currentPage: 1,
  },
  selectionList: [],
})
const { queryParams, form, page, selectionList } = toRefs(data);
const option = ref({
  pageKey: 'RequestLog',
  rowKey: 'id',
  menu: false,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn: false,
  selection: false,
  searchSpan: 5,
  searchLabelWidth: 100,
  column: {
    // id: {
    //   label: '主键',
    // },
    driverCode: {
      label: '司机唯一编号',
    },
    driverName: {
      search: true,
      label: '司机姓名',
    },
    // boxNum: {
    //   label: '柜门编号',
    // },
    // createBy: {
    //   earch: true,
    //   label: '创建者',
    // },
    // createTime: {
    //   label: '创建时间',
    //   minWidth: 150,
    //   search: true,
    //   type: 'datetime',  // 改为 datetime 类型
    //   format: 'YYYY-MM-DD HH:mm:ss',
    //   valueFormat: 'YYYY-MM-DD HH:mm:ss',
    //   minWidth: 200,
    // },
    reqTime: {
      label: '请求开门时间',
      minWidth: 150,
      search: true,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
    },
    // reqTime: {
    //   label: '请求时间',
    //   minWidth: 150,
    // },
    type: {
      label: '状态',
      dataType: 'string',
      // search: true,
      type: 'select',
      dicUrl: '/system/dict/data/type/sys_return_status',
    },
    // operation: {
    //   label: '操作说明',
    //   minWidth: 200,
    // },
  }
})
const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
  searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
    form: form,
    option: option,
    queryParams: queryParams,
    idKey: 'id',
    page: page.value,
    getListApi: listRequestLog,
    getDetailApi: getRequestLog,
    exportApi: exportRequestLog,
    deleteApi: delRequestLog,
    addApi: addRequestLog,
    updateApi: updateRequestLog,
    handleUpdateFunc: () => {
      crudRef.value.rowEdit(selectionList.value[0]);
    },
    handleSelectionChangeFunc: (selection: any) => {
      selectionList.value = selection;
    },
    getBeginListFunc: (params = {}) => {
      params.type = 0;
      return params
    }
  })
</script>
ui/admin-ui3/src/views/cwgl/returnLog/index.vue
New file
@@ -0,0 +1,145 @@
<template>
    <basicContainer>
        <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
            :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
            @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
            @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
            @size-change="sizeChange" @on-load="onLoad">
            <!-- <template #menu-left>
        <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:requestLog:edit']"
          @click="handleUpdate">修改
        </el-button>
        <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
          v-hasPermi="['cwgl:requestLog:remove']">删除
        </el-button>
        <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cwgl:requestLog:export']">导出
        </el-button>
      </template> -->
        </avue-crud>
    </basicContainer>
</template>
<script setup name="requestLog" lang="ts">
import { RequestLogI, addRequestLog, delRequestLog, exportRequestLog, getRequestLog, listRequestLog, updateRequestLog } from "@/api/cwgl/requestLog";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, reactive, ref, toRefs } from "vue";
import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
import { usePagePlus } from "@/hooks/usePagePlus";
import { hasPermission } from "@/utils/permissionUtils";
const { proxy } = useCurrentInstance();
const crudRef = ref();
const permissionList = computed(() => {
    return {
        addBtn: hasPermission(["cwgl:requestLog:add"]),
        delBtn: hasPermission(["cwgl:requestLog:remove"]),
        editBtn: hasPermission(["cwgl:requestLog:edit"]),
        viewBtn: hasPermission(["cwgl:requestLog:query"]),
    }
})
const data = reactive({
    form: <RequestLogI>{},
    queryParams: <RequestLogI & PageQueryInterface>{},
    page: <PagesInterface>{
        pageSize: 10,
        total: 0,
        currentPage: 1,
    },
    selectionList: [],
})
const { queryParams, form, page, selectionList } = toRefs(data);
const option = ref({
    pageKey: 'RequestLog',
    rowKey: 'id',
    menu: false,
    addBtn: false,
    editBtn: false,
    delBtn: false,
    viewBtn: false,
    selection: false,
    searchSpan: 5,
    searchLabelWidth: 100,
    column: {
        // id: {
        //   label: '主键',
        // },
        driverCode: {
            label: '司机唯一编号',
        },
        driverName: {
            search: true,
            label: '司机姓名',
        },
        boxNum: {
            search: true,
            label: '柜门编号',
        },
        // createBy: {
        //   earch: true,
        //   label: '创建者',
        // },
        // createTime: {
        //   label: '创建时间',
        //   minWidth: 150,
        //   search: true,
        //   type: 'datetime',  // 改为 datetime 类型
        //   format: 'YYYY-MM-DD HH:mm:ss',
        //   valueFormat: 'YYYY-MM-DD HH:mm:ss',
        //   minWidth: 200,
        // },
        reqTime: {
            label: '存入时间',
            minWidth: 150,
            search: true,
            type: 'datetime',  // 改为 datetime 类型
            format: 'YYYY-MM-DD HH:mm:ss',
            valueFormat: 'YYYY-MM-DD HH:mm:ss',
        },
        // reqTime: {
        //   label: '请求时间',
        //   minWidth: 150,
        // },
        type: {
            label: '状态',
            dataType: 'string',
            // search: true,
            type: 'select',
            dicUrl: '/system/dict/data/type/sys_return_status',
        },
        // operation: {
        //   label: '操作说明',
        //   minWidth: 200,
        // },
    }
})
const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
    searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
        form: form,
        option: option,
        queryParams: queryParams,
        idKey: 'id',
        page: page.value,
        getListApi: listRequestLog,
        getDetailApi: getRequestLog,
        exportApi: exportRequestLog,
        deleteApi: delRequestLog,
        addApi: addRequestLog,
        updateApi: updateRequestLog,
        handleUpdateFunc: () => {
            crudRef.value.rowEdit(selectionList.value[0]);
        },
        handleSelectionChangeFunc: (selection: any) => {
            selectionList.value = selection;
        },
        getBeginListFunc: (params = {}) => {
            params.type = 1;
            return params
        }
    })
</script>