|
@ -1,7 +1,14 @@ |
|
|
<template> |
|
|
<template> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<!-- 搜索工作栏 --> |
|
|
<!-- 搜索工作栏 --> |
|
|
<Search :schema="[...SupplierdeliverRecordMain.allSchemas.searchSchema,...SupplierdeliverRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
<Search |
|
|
|
|
|
:schema="[ |
|
|
|
|
|
...SupplierdeliverRecordMain.allSchemas.searchSchema, |
|
|
|
|
|
...SupplierdeliverRecordDetail.allSchemas.searchSchema |
|
|
|
|
|
]" |
|
|
|
|
|
@search="setSearchParams" |
|
|
|
|
|
@reset="setSearchParams" |
|
|
|
|
|
/> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
@ -17,7 +24,8 @@ |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<Table v-clientTable |
|
|
<Table |
|
|
|
|
|
v-clientTable |
|
|
:columns="tableColumns" |
|
|
:columns="tableColumns" |
|
|
:data="tableObject.tableList" |
|
|
:data="tableObject.tableList" |
|
|
:loading="tableObject.loading" |
|
|
:loading="tableObject.loading" |
|
@ -34,7 +42,10 @@ |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row, $index }"> |
|
|
<template #action="{ row, $index }"> |
|
|
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
<ButtonBase |
|
|
|
|
|
:Butttondata="butttondata(row, $index)" |
|
|
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
@ -53,7 +64,8 @@ |
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail |
|
|
<Detail |
|
|
ref="detailRef" |
|
|
ref="detailRef" |
|
|
:annexTable="[{ |
|
|
:annexTable="[ |
|
|
|
|
|
{ |
|
|
label: '质检明细', |
|
|
label: '质检明细', |
|
|
prop: 'uploadFile', |
|
|
prop: 'uploadFile', |
|
|
hasPermi: 'wms:supplierdeliver-request-main:uploadCheck', |
|
|
hasPermi: 'wms:supplierdeliver-request-main:uploadCheck', |
|
@ -64,24 +76,29 @@ |
|
|
hiddenDelete: true, |
|
|
hiddenDelete: true, |
|
|
hiddenUpload: true, |
|
|
hiddenUpload: true, |
|
|
align: 'left', |
|
|
align: 'left', |
|
|
queryParams:[{ |
|
|
queryParams: [ |
|
|
|
|
|
{ |
|
|
queryField: 'tableId', |
|
|
queryField: 'tableId', |
|
|
rowField:'annexMasterId', |
|
|
rowField: 'annexMasterId' |
|
|
}], |
|
|
} |
|
|
|
|
|
], |
|
|
//明细表数据 |
|
|
//明细表数据 |
|
|
subDetailTableData: { |
|
|
subDetailTableData: { |
|
|
queryParams:[{ |
|
|
queryParams: [ |
|
|
|
|
|
{ |
|
|
queryField: 'masterId', |
|
|
queryField: 'masterId', |
|
|
rowField:'annexMasterId', |
|
|
rowField: 'annexMasterId' |
|
|
}], // 查询参数 |
|
|
} |
|
|
|
|
|
], // 查询参数 |
|
|
getSubList: SupplierdeliverInspectionDetailApi.getSupplierdeliverInspectionDetailPage, //请求接口 |
|
|
getSubList: SupplierdeliverInspectionDetailApi.getSupplierdeliverInspectionDetailPage, //请求接口 |
|
|
tableColumns: SupplierdeliverInspectionDetail.allSchemas.tableColumns, |
|
|
tableColumns: SupplierdeliverInspectionDetail.allSchemas.tableColumns, |
|
|
tableList: [], //表格数据 |
|
|
tableList: [], //表格数据 |
|
|
total: 1, |
|
|
total: 1, |
|
|
pageSize: 10, |
|
|
pageSize: 10, |
|
|
currentPage:1, |
|
|
currentPage: 1 |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}]" |
|
|
]" |
|
|
:isBasic="false" |
|
|
:isBasic="false" |
|
|
:allSchemas="SupplierdeliverRecordMain.allSchemas" |
|
|
:allSchemas="SupplierdeliverRecordMain.allSchemas" |
|
|
:detailAllSchemas="SupplierdeliverRecordDetail.allSchemas" |
|
|
:detailAllSchemas="SupplierdeliverRecordDetail.allSchemas" |
|
@ -103,15 +120,22 @@ |
|
|
:isShowReduceButton="false" |
|
|
:isShowReduceButton="false" |
|
|
:isShowFooterButtton="false" |
|
|
:isShowFooterButtton="false" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import * as SupplierdeliverInspectionDetailApi from '@/api/wms/supplierdeliverInspectionDetail' |
|
|
import * as SupplierdeliverInspectionDetailApi from '@/api/wms/supplierdeliverInspectionDetail' |
|
|
import { SupplierdeliverInspectionDetail,SupplierdeliverInspectionDetailRules} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' |
|
|
import { |
|
|
import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules, |
|
|
SupplierdeliverInspectionDetail, |
|
|
SupplierdeliverRecordDetail,SupplierdeliverRecordDetailRules,SupplierdeliverRecordDetailPickingNumer } from './supplierdeliverRecordMain.data' |
|
|
SupplierdeliverInspectionDetailRules |
|
|
|
|
|
} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' |
|
|
|
|
|
import { |
|
|
|
|
|
SupplierdeliverRecordMain, |
|
|
|
|
|
SupplierdeliverRecordMainRules, |
|
|
|
|
|
SupplierdeliverRecordDetail, |
|
|
|
|
|
SupplierdeliverRecordDetailRules, |
|
|
|
|
|
SupplierdeliverRecordDetailPickingNumer |
|
|
|
|
|
} from './supplierdeliverRecordMain.data' |
|
|
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' |
|
|
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' |
|
|
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' |
|
|
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
@ -121,6 +145,8 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
|
|
|
import { SupplierdeliverRequestMainRules } from '../supplierdeliverRequestMain/supplierdeliverRequestMain.data' |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
// 供应商发货记录主 |
|
|
// 供应商发货记录主 |
|
|
defineOptions({ name: 'SupplierdeliverRecordMain' }) |
|
|
defineOptions({ name: 'SupplierdeliverRecordMain' }) |
|
@ -131,7 +157,10 @@ const { t } = useI18n() // 国际化 |
|
|
const route = useRoute() // 路由信息 |
|
|
const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref([...SupplierdeliverRecordMain.allSchemas.tableColumns,...SupplierdeliverRecordDetail.allSchemas.tableMainColumns]) |
|
|
const tableColumns = ref([ |
|
|
|
|
|
...SupplierdeliverRecordMain.allSchemas.tableColumns, |
|
|
|
|
|
...SupplierdeliverRecordDetail.allSchemas.tableMainColumns |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
@ -150,7 +179,7 @@ const HeadButttondata = [ |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-record-main:export' }), // 导出 |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-record-main:export' }), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
// { |
|
|
// { |
|
|
// label: '自定义扩展按钮', |
|
|
// label: '自定义扩展按钮', |
|
|
// name: 'zdy', |
|
|
// name: 'zdy', |
|
@ -163,9 +192,11 @@ const HeadButttondata = [ |
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
// 头部按钮事件 |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'export') { // 导出 |
|
|
if (val == 'export') { |
|
|
|
|
|
// 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
} else if (val == 'refresh') { |
|
|
|
|
|
// 刷新 |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0) { |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0) { |
|
|
searchFormClick({ |
|
|
searchFormClick({ |
|
|
filters: tableObject.params.filters |
|
|
filters: tableObject.params.filters |
|
@ -173,20 +204,27 @@ const buttonBaseClick = (val, item) => { |
|
|
} else { |
|
|
} else { |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { |
|
|
} else { // 其他按钮 |
|
|
// 筛选 |
|
|
|
|
|
} else { |
|
|
|
|
|
// 其他按钮 |
|
|
console.log('其他按钮', item) |
|
|
console.log('其他按钮', item) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row, $index) => { |
|
|
const butttondata = (row, $index) => { |
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
const findIndex = row['masterId'] |
|
|
|
|
|
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId']) |
|
|
|
|
|
: -1 |
|
|
if (findIndex > -1 && findIndex < $index) { |
|
|
if (findIndex > -1 && findIndex < $index) { |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), // 生成采购申请 |
|
|
defaultButtons.mainListGenerateApplicationBtn({ |
|
|
|
|
|
hasPermi: 'wms:supplierdeliver-record-main:createPurchasereceiptRequest', |
|
|
|
|
|
hide: !row.purchasereceiptRequestFlag |
|
|
|
|
|
}), // 生成采购申请 |
|
|
defaultButtons.mainListDocumentPrintBtn({}) // 单据打印 |
|
|
defaultButtons.mainListDocumentPrintBtn({}) // 单据打印 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
@ -209,19 +247,29 @@ const handlerCreatePurchasereceiptRequest = async (number:string) => { |
|
|
await SupplierdeliverRecordMainApi.createPurchasereceiptRequest(number) |
|
|
await SupplierdeliverRecordMainApi.createPurchasereceiptRequest(number) |
|
|
message.success(t('ts.采购申请生成成功')) |
|
|
message.success(t('ts.采购申请生成成功')) |
|
|
await getList() |
|
|
await getList() |
|
|
}catch{}finally{ |
|
|
} catch { |
|
|
|
|
|
} finally { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 单据打印 |
|
|
// 单据打印 |
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
//const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) |
|
|
// 物料状态是“补给品”和其余状态 的发货单模版 |
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) |
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken()) |
|
|
|
|
|
// 物料状态是号试显示生准订单的发货单模版 |
|
|
|
|
|
const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) |
|
|
|
|
|
|
|
|
const handleDocumentPrint = async (id) => { |
|
|
const handleDocumentPrint = async (id) => { |
|
|
|
|
|
await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
//号试(生准订单)模板 |
|
|
|
|
|
window.open(documentSrc2.value + '&id=' + id) |
|
|
|
|
|
} else { |
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 子包装数据 |
|
|
// 子包装数据 |
|
|
const detailParenPackingRef = ref() |
|
|
const detailParenPackingRef = ref() |
|
@ -234,7 +282,9 @@ const { wsCache } = useCache() |
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
|
const openDetail = async (row: any, titleName: any, titleValue: any) => { |
|
|
const openDetail = async (row: any, titleName: any, titleValue: any) => { |
|
|
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
const departmentCode = wsCache |
|
|
|
|
|
.get(CACHE_KEY.DEPT) |
|
|
|
|
|
.find((account) => account.id == row.departmentCode)?.name |
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
//获取申请中的masterId |
|
|
//获取申请中的masterId |
|
|
const { tableObject: requestTableObject, tableMethods: requestTableMethods } = useTable({ |
|
|
const { tableObject: requestTableObject, tableMethods: requestTableMethods } = useTable({ |
|
@ -247,11 +297,11 @@ const openDetail = async (row: any, titleName: any, titleValue: any) => { |
|
|
row.annexMasterId = requestTableObject.tableList[0].masterId |
|
|
row.annexMasterId = requestTableObject.tableList[0].masterId |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'recordSupplierdeliverMain') |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'recordSupplierdeliverMain') |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 详情 table 操作扩展 按钮 |
|
|
// 详情 table 操作扩展 按钮 |
|
|
const buttondataTable = ref([{ |
|
|
const buttondataTable = ref([ |
|
|
|
|
|
{ |
|
|
label: t('ts.查看其他包装规格'), |
|
|
label: t('ts.查看其他包装规格'), |
|
|
name: 'viewParentPickingNumber', |
|
|
name: 'viewParentPickingNumber', |
|
|
hide: false, |
|
|
hide: false, |
|
@ -259,13 +309,14 @@ const buttondataTable = ref([{ |
|
|
icon: '', |
|
|
icon: '', |
|
|
color: '', |
|
|
color: '', |
|
|
hasPermi: '', |
|
|
hasPermi: '', |
|
|
link: true, // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}]) |
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
// 查看其他包装规格 |
|
|
// 查看其他包装规格 |
|
|
const tableFormButton = async (val, row) => { |
|
|
const tableFormButton = async (val, row) => { |
|
|
if (val == 'viewParentPickingNumber') { //查看其他包装规格 |
|
|
if (val == 'viewParentPickingNumber') { |
|
|
|
|
|
//查看其他包装规格 |
|
|
detatableData.params = { |
|
|
detatableData.params = { |
|
|
masterId: row.masterId, |
|
|
masterId: row.masterId, |
|
|
parentPackingNumber: row.packingNumber |
|
|
parentPackingNumber: row.packingNumber |
|
@ -283,7 +334,9 @@ const handleExport = async () => { |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
loadStart() |
|
|
loadStart() |
|
|
const excelTitle = ref(route.meta.title) |
|
|
const excelTitle = ref(route.meta.title) |
|
|
const data = await SupplierdeliverRecordMainApi.exportSupplierdeliverRecordMain(tableObject.params) |
|
|
const data = await SupplierdeliverRecordMainApi.exportSupplierdeliverRecordMain( |
|
|
|
|
|
tableObject.params |
|
|
|
|
|
) |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
@ -300,8 +353,6 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|