|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="SaleShipmentMainRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
<Search :schema="[...SaleShipmentMainRecord.allSchemas.searchSchema,...SaleShipmentDetailRecord.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
@ -12,11 +12,12 @@ |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="SaleShipmentMainRecord.allSchemas" |
|
|
|
:detailAllSchemas="SaleShipmentDetailRecord.allSchemas" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<Table |
|
|
|
<Table v-clientTable |
|
|
|
:columns="tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
@ -27,9 +28,9 @@ |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
> |
|
|
|
<template #code="{row}"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|
|
|
<span>{{ row.code }}</span> |
|
|
|
<template #number="{row}"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
|
<span>{{ row.number }}</span> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
@ -51,18 +52,25 @@ |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="SaleShipmentMainRecord.allSchemas" /> |
|
|
|
<Detail |
|
|
|
ref="detailRef" |
|
|
|
:isBasic="true" |
|
|
|
:allSchemas="SaleShipmentMainRecord.allSchemas" |
|
|
|
:detailAllSchemas="SaleShipmentDetailRecord.allSchemas" |
|
|
|
:detailAllSchemasRules="SaleShipmentDetailRecordRules" |
|
|
|
:apiPage="SaleShipmentDetailRecordApi.getSaleShipmentDetailRecordPage" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { SaleShipmentMainRecord,SaleShipmentMainRecordRules } from './saleShipmentMainRecord.data' |
|
|
|
import { SaleShipmentMainRecord,SaleShipmentMainRecordRules,SaleShipmentDetailRecord,SaleShipmentDetailRecordRules } from './saleShipmentMainRecord.data' |
|
|
|
import * as SaleShipmentMainRecordApi from '@/api/wms/saleShipmentMainRecord' |
|
|
|
import * as SaleShipmentDetailRecordApi from '@/api/wms/saleShipmentDetailRecord' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
|
|
defineOptions({ name: 'SaleShipmentMainRecord' }) |
|
|
@ -73,8 +81,8 @@ const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(SaleShipmentMainRecord.allSchemas.tableColumns) |
|
|
|
|
|
|
|
const tableColumns = ref([SaleShipmentMainRecord.allSchemas.tableColumns,...SaleShipmentDetailRecord.allSchemas.tableMainColumns]) |
|
|
|
// const tableColumns = ref(SaleShipmentMainRecord.allSchemas.tableColumns) |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
nextTick(() => { |
|
|
@ -98,8 +106,8 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:saleShipmentMainRecord:create'}), // 新增 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:saleShipmentMainRecord:export'}), // 导出 |
|
|
|
// defaultButtons.defaultAddBtn({hasPermi:'wms:sale-shipment-main-record:create'}), // 新增 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:sale-shipment-main-record:export'}), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
@ -129,8 +137,8 @@ const buttonBaseClick = (val, item) => { |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:saleShipmentMainRecord:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:saleShipmentMainRecord:delete'}), // 删除 |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), // 删除 |
|
|
|
] |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
@ -189,7 +197,7 @@ const handleExport = async () => { |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await SaleShipmentMainRecordApi.exportSaleShipmentMainRecord(tableObject.params) |
|
|
|
download.excel(data, '销售发运记录主.xlsx') |
|
|
|
download.excel(data, '销售发运记录.xlsx') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|