|
@ -28,7 +28,7 @@ |
|
|
v-model:sort="tableObject.sort" |
|
|
v-model:sort="tableObject.sort" |
|
|
> |
|
|
> |
|
|
<template #code="{row}"> |
|
|
<template #code="{row}"> |
|
|
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<span>{{ row.code }}</span> |
|
|
<span>{{ row.code }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
@ -44,14 +44,37 @@ |
|
|
@success="formsSuccess" |
|
|
@success="formsSuccess" |
|
|
:rules="StockupMainRequestRules" |
|
|
:rules="StockupMainRequestRules" |
|
|
:formAllSchemas="StockupMainRequest.allSchemas" |
|
|
:formAllSchemas="StockupMainRequest.allSchemas" |
|
|
|
|
|
:tableAllSchemas="StockupDetailRequest.allSchemas" |
|
|
|
|
|
:tableFormRules="StockupDetailRequestRules" |
|
|
|
|
|
:tableData="tableData" |
|
|
:apiUpdate="StockupMainRequestApi.updateStockupMainRequest" |
|
|
:apiUpdate="StockupMainRequestApi.updateStockupMainRequest" |
|
|
:apiCreate="StockupMainRequestApi.createStockupMainRequest" |
|
|
:apiCreate="StockupMainRequestApi.createStockupMainRequest" |
|
|
|
|
|
:isBusiness="true" |
|
|
|
|
|
fromeWhere="StockupMainRequest" |
|
|
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
:isBusiness="false" |
|
|
@submitForm="formsSuccess" |
|
|
|
|
|
:isShowButton = isShowButton |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="StockupMainRequest.allSchemas" /> |
|
|
<Detail |
|
|
|
|
|
ref="detailRef" |
|
|
|
|
|
:isBasic="false" |
|
|
|
|
|
:allSchemas="StockupDetailRequest.allSchemas" |
|
|
|
|
|
:detailAllSchemas="StockupDetailRequest.allSchemas" |
|
|
|
|
|
:detailAllSchemasRules="StockupDetailRequestRules" |
|
|
|
|
|
:apiCreate="StockupDetailRequestApi.createStockupDetailRequest" |
|
|
|
|
|
:apiUpdate="StockupDetailRequestApi.updateStockupDetailRequest" |
|
|
|
|
|
:apiPage="StockupDetailRequestApi.getStockupDetailRequestPage" |
|
|
|
|
|
:apiDelete="StockupDetailRequestApi.deleteStockupDetailRequest" |
|
|
|
|
|
fromeWhere="StockupDetailRequest" |
|
|
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
|
|
:detailButtonIsShowAdd="true" |
|
|
|
|
|
:detailButtonIsShowDelete="true" |
|
|
|
|
|
@detailOpenForm="detailOpenForm" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/request/stockup-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
<ImportForm ref="importFormRef" url="/request/stockup-main-request/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
@ -59,8 +82,9 @@ |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { StockupMainRequest,StockupMainRequestRules } from './stockupMainRequest.data' |
|
|
import { StockupMainRequest,StockupMainRequestRules,StockupDetailRequest,StockupDetailRequestRules } from './stockupMainRequest.data' |
|
|
import * as StockupMainRequestApi from '@/api/wms/stockupMainRequest/' |
|
|
import * as StockupMainRequestApi from '@/api/wms/stockupMainRequest/' |
|
|
|
|
|
import * as StockupDetailRequestApi from '@/api/wms/stockupDetailRequest/' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
@ -76,6 +100,8 @@ const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(StockupMainRequest.allSchemas.tableColumns) |
|
|
const tableColumns = ref(StockupMainRequest.allSchemas.tableColumns) |
|
|
|
|
|
|
|
|
|
|
|
const isShowButton = ref(true) |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -85,6 +111,15 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 查询页面返回——详情 |
|
|
|
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
const setV = {} |
|
|
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
|
|
formRef.setValues(setV) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
@ -182,6 +217,14 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicStockupMainRequest') |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicStockupMainRequest') |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 详情 编辑页面打开 |
|
|
|
|
|
* @param row |
|
|
|
|
|
*/ |
|
|
|
|
|
const detailOpenForm = (type) => { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
/** 删除按钮操作 */ |
|
|
const handleDelete = async (id: number) => { |
|
|
const handleDelete = async (id: number) => { |
|
|
try { |
|
|
try { |
|
@ -210,6 +253,16 @@ const handleExport = async () => { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
const tableData = ref([]) |
|
|
|
|
|
|
|
|
|
|
|
// 添加明细 |
|
|
|
|
|
const handleAddTable = () => { |
|
|
|
|
|
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) |
|
|
|
|
|
} |
|
|
|
|
|
// 删除明细 |
|
|
|
|
|
const handleDeleteTable = (item, index) => { |
|
|
|
|
|
tableData.value.splice(index, 1) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
/** 导入 */ |
|
|
const importFormRef = ref() |
|
|
const importFormRef = ref() |
|
|