|
@ -1,58 +1,96 @@ |
|
|
<template> |
|
|
<template> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<!-- 搜索工作栏 --> |
|
|
<!-- 搜索工作栏 --> |
|
|
<Search :schema="SupplierdeliverRequestMain.allSchemas.searchSchema" @search="setSearchParams" |
|
|
<Search |
|
|
@reset="setSearchParams" /> |
|
|
:schema="SupplierdeliverRequestMain.allSchemas.searchSchema" |
|
|
|
|
|
@search="setSearchParams" |
|
|
|
|
|
@reset="setSearchParams" |
|
|
|
|
|
/> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" |
|
|
<TableHead |
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" |
|
|
:HeadButttondata="HeadButttondata" |
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" /> |
|
|
@button-base-click="buttonBaseClick" |
|
|
|
|
|
:routeName="routeName" |
|
|
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ |
|
|
<Table |
|
|
|
|
|
:columns="tableColumns" |
|
|
|
|
|
:data="tableObject.tableList" |
|
|
|
|
|
:loading="tableObject.loading" |
|
|
|
|
|
:pagination="{ |
|
|
total: tableObject.total |
|
|
total: tableObject.total |
|
|
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
}" |
|
|
v-model:sort="tableObject.sort"> |
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
|
|
> |
|
|
<template #number="{ row }"> |
|
|
<template #number="{ row }"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<span>{{ row.number }}</span> |
|
|
<span>{{ row.number }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row }"> |
|
|
<template #action="{ row }"> |
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event, row)" /> |
|
|
<ButtonBase |
|
|
|
|
|
:Butttondata="butttondata(row)" |
|
|
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
|
|
/> |
|
|
</template> |
|
|
</template> |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm ref="formRef" @success="getList" :rules="SupplierdeliverRequestMainRules" |
|
|
<BasicForm |
|
|
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" :tableAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
ref="formRef" |
|
|
:tableFormRules="SupplierdeliverRequestDetailRules" :tableData="tableData" |
|
|
@success="getList" |
|
|
|
|
|
:rules="SupplierdeliverRequestMainRules" |
|
|
|
|
|
:formAllSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
|
|
|
:tableAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
|
|
|
:tableFormRules="SupplierdeliverRequestDetailRules" |
|
|
|
|
|
:tableData="tableData" |
|
|
:apiUpdate="SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain" |
|
|
:apiUpdate="SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain" |
|
|
:apiCreate="SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain" :isBusiness="true" |
|
|
:apiCreate="SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain" |
|
|
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" |
|
|
:isBusiness="true" |
|
|
@submitForm="submitForm" /> |
|
|
@handleAddTable="handleAddTable" |
|
|
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
|
|
@submitForm="submitForm" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
<Detail |
|
|
|
|
|
ref="detailRef" |
|
|
|
|
|
:isBasic="false" |
|
|
|
|
|
:allSchemas="SupplierdeliverRequestMain.allSchemas" |
|
|
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" |
|
|
:detailAllSchemasRules="SupplierdeliverRequestDetailRules" |
|
|
:detailAllSchemasRules="SupplierdeliverRequestDetailRules" |
|
|
:apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail" |
|
|
:apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail" |
|
|
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail" |
|
|
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail" |
|
|
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage" |
|
|
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage" |
|
|
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail" :Echo="Echo" |
|
|
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" /> |
|
|
:Echo="Echo" |
|
|
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" |
|
|
<ImportForm |
|
|
:importTemplateData="importTemplateData" @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" |
|
|
ref="importFormRef" |
|
|
:mode="2" /> |
|
|
url="/wms/supplierdeliver-request-main/import" |
|
|
|
|
|
:importTemplateData="importTemplateData" |
|
|
|
|
|
@success="importSuccess" |
|
|
|
|
|
:updateIsDisable="true" |
|
|
|
|
|
:coverIsDisable="true" |
|
|
|
|
|
:mode="2" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 打印 --> |
|
|
<!-- 打印 --> |
|
|
<point ref='pointRef' :detailListTableColumns='detailListTableColumns' /> |
|
|
<point ref="pointRef" :detailListTableColumns="detailListTableColumns" /> |
|
|
<!-- <el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%"> |
|
|
<!-- <el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%"> |
|
|
<Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" :pagination="{ |
|
|
<Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" :pagination="{ |
|
|
total: detatableData.total |
|
|
total: detatableData.total |
|
@ -70,35 +108,40 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { SupplierdeliverRequestMain, SupplierdeliverRequestMainRules, SupplierdeliverRequestDetail, SupplierdeliverRequestDetailRules } from './supplierdeliverRequestMain.data' |
|
|
import { |
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
SupplierdeliverRequestMain, |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
SupplierdeliverRequestMainRules, |
|
|
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' |
|
|
SupplierdeliverRequestDetail, |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
SupplierdeliverRequestDetailRules |
|
|
import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue' |
|
|
} from './supplierdeliverRequestMain.data' |
|
|
// import * as PackageApi from '@/api/wms/package' |
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
// import * as BarbasicApi from '@/api/wms/barbasic' |
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
|
|
|
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' |
|
|
// 供应商发货申请 |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
defineOptions({ name: 'SupplierdeliverRequestMain' }) |
|
|
import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue' |
|
|
|
|
|
// import * as PackageApi from '@/api/wms/package' |
|
|
const message = useMessage() // 消息弹窗 |
|
|
// import * as BarbasicApi from '@/api/wms/barbasic' |
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
|
// 供应商发货申请 |
|
|
const route = useRoute() // 路由信息 |
|
|
defineOptions({ name: 'SupplierdeliverRequestMain' }) |
|
|
const routeName = ref() |
|
|
|
|
|
routeName.value = route.name |
|
|
const message = useMessage() // 消息弹窗 |
|
|
const tableColumns = ref(SupplierdeliverRequestMain.allSchemas.tableColumns) |
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
const route = useRoute() // 路由信息 |
|
|
const updataTableColumns = (val) => { |
|
|
const routeName = ref() |
|
|
|
|
|
routeName.value = route.name |
|
|
|
|
|
const tableColumns = ref(SupplierdeliverRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
@ -115,35 +158,35 @@ |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// 查询页面返回——详情 |
|
|
// 查询页面返回——详情 |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
setV[formField] = val[0][searchField] |
|
|
setV[formField] = val[0][searchField] |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 子表新增的时候选择表格之后需要会显得字段 |
|
|
// 子表新增的时候选择表格之后需要会显得字段 |
|
|
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] |
|
|
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] |
|
|
const Echo = [] |
|
|
const Echo = [] |
|
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage // 分页接口 |
|
|
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage // 分页接口 |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
// 获得表格的各种操作 |
|
|
const { getList, setSearchParams } = tableMethods |
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), // 新增——需要手动修改下权限 |
|
|
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), // 新增——需要手动修改下权限 |
|
|
defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 导入 |
|
|
defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 导入 |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), // 导出 |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-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', |
|
@ -152,40 +195,48 @@ |
|
|
// icon: 'Select', |
|
|
// icon: 'Select', |
|
|
// color: '' |
|
|
// color: '' |
|
|
// }, |
|
|
// }, |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
// 头部按钮事件 |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'add') { // 新增 |
|
|
if (val == 'add') { |
|
|
|
|
|
// 新增 |
|
|
openForm('create') |
|
|
openForm('create') |
|
|
} else if (val == 'import') { // 导入 |
|
|
} else if (val == 'import') { |
|
|
|
|
|
// 导入 |
|
|
handleImport() |
|
|
handleImport() |
|
|
} else if (val == 'export') { // 导出 |
|
|
} else if (val == 'export') { |
|
|
|
|
|
// 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
} else if (val == 'refresh') { |
|
|
|
|
|
// 刷新 |
|
|
getList() |
|
|
getList() |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { |
|
|
} |
|
|
// 筛选 |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
// 根据状态返回该按钮是否显示 |
|
|
const isShowMainButton = (row, val) => { |
|
|
const isShowMainButton = (row, val) => { |
|
|
if (val.indexOf(row.status) > -1) { |
|
|
if (val.indexOf(row.status) > -1) { |
|
|
return false |
|
|
return false |
|
|
} else { |
|
|
} else { |
|
|
return true |
|
|
return true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), // 打开 |
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), // 关闭 |
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), // 关闭 |
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // 提交审批 |
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // 审批通过 |
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 |
|
|
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // 驳回按钮 |
|
|
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']),hasPermi: 'wms:supplierdeliver-request-main:update' }), // 编辑 |
|
|
defaultButtons.mainListEditBtn({ |
|
|
|
|
|
hide: isShowMainButton(row, ['1']), |
|
|
|
|
|
hasPermi: 'wms:supplierdeliver-request-main:update' |
|
|
|
|
|
}), // 编辑 |
|
|
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), // 删除 |
|
|
{ |
|
|
{ |
|
|
label: '生成标签', |
|
|
label: '生成标签', |
|
@ -195,7 +246,7 @@ |
|
|
icon: '', |
|
|
icon: '', |
|
|
color: '', |
|
|
color: '', |
|
|
hasPermi: '', |
|
|
hasPermi: '', |
|
|
link: true, // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}, |
|
|
}, |
|
|
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3']) }), // 标签打印 |
|
|
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3']) }), // 标签打印 |
|
|
defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3']) }), // 单据打印 |
|
|
defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3']) }), // 单据打印 |
|
@ -208,52 +259,63 @@ |
|
|
icon: '', |
|
|
icon: '', |
|
|
color: '', |
|
|
color: '', |
|
|
hasPermi: '', |
|
|
hasPermi: '', |
|
|
link: true, // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainPurPlanOpe') { // 打开 |
|
|
if (val == 'mainPurPlanOpe') { |
|
|
|
|
|
// 打开 |
|
|
handleOpe(row.id) |
|
|
handleOpe(row.id) |
|
|
} else if (val == 'mainPurPlanClo') {// 关闭 |
|
|
} else if (val == 'mainPurPlanClo') { |
|
|
|
|
|
// 关闭 |
|
|
handleClo(row.id) |
|
|
handleClo(row.id) |
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
} else if (val == 'mainPlanSub') { |
|
|
|
|
|
// 提交审批 |
|
|
handleSub(row.id) |
|
|
handleSub(row.id) |
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
} else if (val == 'mainPlanApp') { |
|
|
|
|
|
// 审批通过 |
|
|
handleApp(row.id) |
|
|
handleApp(row.id) |
|
|
} else if (val == 'mainPlanTur') { // 驳回按钮 |
|
|
} else if (val == 'mainPlanTur') { |
|
|
|
|
|
// 驳回按钮 |
|
|
handleTur(row.id) |
|
|
handleTur(row.id) |
|
|
} else if (val == 'genRecords') { // 处理 |
|
|
} else if (val == 'genRecords') { |
|
|
|
|
|
// 处理 |
|
|
genRecords(row.id) |
|
|
genRecords(row.id) |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
} else if (val == 'edit') { |
|
|
|
|
|
// 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { |
|
|
|
|
|
// 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|
} else if (val == 'ssbq') { // 生成标签 |
|
|
} else if (val == 'ssbq') { |
|
|
|
|
|
// 生成标签 |
|
|
handlePoint(row) |
|
|
handlePoint(row) |
|
|
} else if (val == 'point') { // 标签打印 |
|
|
} else if (val == 'point') { |
|
|
|
|
|
// 标签打印 |
|
|
labelPrint(row) |
|
|
labelPrint(row) |
|
|
} else if (val == 'documentPrint') { // 单据打印 |
|
|
} else if (val == 'documentPrint') { |
|
|
|
|
|
// 单据打印 |
|
|
handleDocumentPrint(row.id) |
|
|
handleDocumentPrint(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
|
const openDetail = (row : any, titleName : any, titleValue : any) => { |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
} |
|
|
} |
|
|
//添加/修改操作 |
|
|
//添加/修改操作 |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm = async (type : string, row ?: number) => { |
|
|
const openForm = async (type: string, row?: number) => { |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
/** 删除按钮操作 */ |
|
|
const handleDelete = async (id : number) => { |
|
|
const handleDelete = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 删除的二次确认 |
|
|
// 删除的二次确认 |
|
|
await message.delConfirm() |
|
|
await message.delConfirm() |
|
@ -262,11 +324,11 @@ |
|
|
message.success(t('common.delSuccess')) |
|
|
message.success(t('common.delSuccess')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
/** 关闭按钮操作 */ |
|
|
const handleClo = async (id : number) => { |
|
|
const handleClo = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 关闭的二次确认 |
|
|
// 关闭的二次确认 |
|
|
await message.confirm('是否关闭所选中数据?') |
|
|
await message.confirm('是否关闭所选中数据?') |
|
@ -275,11 +337,11 @@ |
|
|
message.success(t('关闭成功!')) |
|
|
message.success(t('关闭成功!')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 打开按钮操作 */ |
|
|
/** 打开按钮操作 */ |
|
|
const handleOpe = async (id : number) => { |
|
|
const handleOpe = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 打开的二次确认 |
|
|
// 打开的二次确认 |
|
|
await message.confirm('是否打开所选中数据?') |
|
|
await message.confirm('是否打开所选中数据?') |
|
@ -288,11 +350,11 @@ |
|
|
message.success(t('打开成功!')) |
|
|
message.success(t('打开成功!')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 提交审批按钮操作 */ |
|
|
/** 提交审批按钮操作 */ |
|
|
const handleSub = async (id : number) => { |
|
|
const handleSub = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 提交审批的二次确认 |
|
|
// 提交审批的二次确认 |
|
|
await message.confirm('是否提交审批所选中数据?') |
|
|
await message.confirm('是否提交审批所选中数据?') |
|
@ -301,11 +363,11 @@ |
|
|
message.success(t('提交审批成功!')) |
|
|
message.success(t('提交审批成功!')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
/** 审批通过按钮操作 */ |
|
|
const handleApp = async (id : number) => { |
|
|
const handleApp = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 审批通过的二次确认 |
|
|
// 审批通过的二次确认 |
|
|
await message.confirm('是否审批通过所选中数据?') |
|
|
await message.confirm('是否审批通过所选中数据?') |
|
@ -314,11 +376,11 @@ |
|
|
message.success(t('审批通过成功!')) |
|
|
message.success(t('审批通过成功!')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 驳回按钮操作 */ |
|
|
/** 驳回按钮操作 */ |
|
|
const handleTur = async (id : number) => { |
|
|
const handleTur = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 驳回的二次确认 |
|
|
// 驳回的二次确认 |
|
|
await message.confirm('是否驳回所选中数据?') |
|
|
await message.confirm('是否驳回所选中数据?') |
|
@ -327,11 +389,11 @@ |
|
|
message.success(t('驳回成功!')) |
|
|
message.success(t('驳回成功!')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
/** 处理按钮操作 */ |
|
|
const genRecords = async (id : number) => { |
|
|
const genRecords = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 处理的二次确认 |
|
|
// 处理的二次确认 |
|
|
await message.confirm('是否处理所选中数据?') |
|
|
await message.confirm('是否处理所选中数据?') |
|
@ -340,37 +402,46 @@ |
|
|
message.success(t('处理成功!')) |
|
|
message.success(t('处理成功!')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
/** 导出按钮操作 */ |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const handleExport = async () => { |
|
|
const handleExport = async () => { |
|
|
try { |
|
|
try { |
|
|
// 导出的二次确认 |
|
|
// 导出的二次确认 |
|
|
await message.exportConfirm() |
|
|
await message.exportConfirm() |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
exportLoading.value = true |
|
|
exportLoading.value = true |
|
|
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(setSearchParams) |
|
|
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain( |
|
|
|
|
|
setSearchParams |
|
|
|
|
|
) |
|
|
download.excel(data, '供应商发货申请主.xlsx') |
|
|
download.excel(data, '供应商发货申请主.xlsx') |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns) |
|
|
const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns) |
|
|
const detailListTableColumns = detailTableColumns.value.filter(item => item.label != '操作' && item.label != '创建者' && item.label != '创建时间' && item.label != '最后更新者' && item.label != '最后更新时间') |
|
|
const detailListTableColumns = detailTableColumns.value.filter( |
|
|
const dialogVisible = ref(false) |
|
|
(item) => |
|
|
const isShow = ref(false) |
|
|
item.label != '操作' && |
|
|
const dialogTitle = ref('') |
|
|
item.label != '创建者' && |
|
|
const closeDialog = () => { |
|
|
item.label != '创建时间' && |
|
|
|
|
|
item.label != '最后更新者' && |
|
|
|
|
|
item.label != '最后更新时间' |
|
|
|
|
|
) |
|
|
|
|
|
const dialogVisible = ref(false) |
|
|
|
|
|
const isShow = ref(false) |
|
|
|
|
|
const dialogTitle = ref('') |
|
|
|
|
|
const closeDialog = () => { |
|
|
dialogVisible.value = false |
|
|
dialogVisible.value = false |
|
|
isShow.value = false |
|
|
isShow.value = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 生成标签按钮操作 */ |
|
|
/** 生成标签按钮操作 */ |
|
|
const genLabel = async () => { |
|
|
const genLabel = async () => { |
|
|
try { |
|
|
try { |
|
|
// 生成标签的二次确认 |
|
|
// 生成标签的二次确认 |
|
|
await message.confirm('是否为此数据生成标签?') |
|
|
await message.confirm('是否为此数据生成标签?') |
|
@ -381,25 +452,24 @@ |
|
|
message.success(t('生成标签成功!')) |
|
|
message.success(t('生成标签成功!')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|
} catch { } |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const src = ref(BASE_URL + '/jmreport/view/897700407827668992?token=' + getAccessToken()) |
|
|
const src = ref(BASE_URL + '/jmreport/view/897700407827668992?token=' + getAccessToken()) |
|
|
|
|
|
|
|
|
const genLabelId = ref(); |
|
|
|
|
|
// 生成标签 |
|
|
|
|
|
const pointRef = ref() |
|
|
|
|
|
const handlePoint = async (row) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const genLabelId = ref() |
|
|
|
|
|
// 生成标签 |
|
|
|
|
|
const pointRef = ref() |
|
|
|
|
|
const handlePoint = async (row) => { |
|
|
pointRef.value.openPoint(row.id) |
|
|
pointRef.value.openPoint(row.id) |
|
|
} |
|
|
} |
|
|
// 标签打印 |
|
|
// 标签打印 |
|
|
const labelPrint = async (row) => { |
|
|
const labelPrint = async (row) => { |
|
|
window.open(src.value + '&asn_number=' + row.asnNumber) |
|
|
window.open(src.value + '&asn_number=' + row.asnNumber) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const print = async () => { |
|
|
const print = async () => { |
|
|
//向包装表里插入数据 |
|
|
//向包装表里插入数据 |
|
|
// const packageArray:any= ref([]) |
|
|
// const packageArray:any= ref([]) |
|
|
// let packageObject = { |
|
|
// let packageObject = { |
|
@ -477,36 +547,41 @@ |
|
|
// }) |
|
|
// }) |
|
|
// await BarbasicApi.createBarbasic(JSON.parse(JSON.stringify(barBasicArray.value))) |
|
|
// await BarbasicApi.createBarbasic(JSON.parse(JSON.stringify(barBasicArray.value))) |
|
|
window.open(src.value + '&number=' + detatableData.tableList[0].number) |
|
|
window.open(src.value + '&number=' + detatableData.tableList[0].number) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 单据打印 |
|
|
// 单据打印 |
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) |
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) |
|
|
const handleDocumentPrint = async (id) => { |
|
|
const handleDocumentPrint = async (id) => { |
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
window.open(documentSrc.value + '&id=' + id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* tableForm方法 |
|
|
* tableForm方法 |
|
|
*/ |
|
|
*/ |
|
|
const tableFormKeys = {} |
|
|
const tableFormKeys = {} |
|
|
SupplierdeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
SupplierdeliverRequestDetail.allSchemas.tableFormColumns.forEach((item) => { |
|
|
|
|
|
|
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
}) |
|
|
}) |
|
|
const tableData = ref([]) |
|
|
const tableData = ref([]) |
|
|
|
|
|
|
|
|
// 添加明细 |
|
|
// 添加明细 |
|
|
const handleAddTable = () => { |
|
|
const handleAddTable = () => { |
|
|
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) |
|
|
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) |
|
|
} |
|
|
} |
|
|
// 删除明细 |
|
|
// 删除明细 |
|
|
const handleDeleteTable = (item, index) => { |
|
|
const handleDeleteTable = (item, index) => { |
|
|
tableData.value.splice(index, 1) |
|
|
tableData.value.splice(index, 1) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 主子数据 提交 |
|
|
// 主子数据 提交 |
|
|
const submitForm = async (formType, data) => { |
|
|
const submitForm = async (formType, data) => { |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
|
|
let isHave = data.subList.some((item) => item.produceDate > item.expireDate) |
|
|
|
|
|
if (isHave) { |
|
|
|
|
|
message.error('生产日期不可以大于过期日期') |
|
|
|
|
|
formRef.value.formLoading = false |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data) |
|
|
await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data) |
|
@ -521,37 +596,37 @@ |
|
|
} finally { |
|
|
} finally { |
|
|
formRef.value.formLoading = false |
|
|
formRef.value.formLoading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
/** 导入 */ |
|
|
const importFormRef = ref() |
|
|
const importFormRef = ref() |
|
|
const handleImport = () => { |
|
|
const handleImport = () => { |
|
|
importFormRef.value.open() |
|
|
importFormRef.value.open() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 导入附件弹窗所需的参数 |
|
|
// 导入附件弹窗所需的参数 |
|
|
const importTemplateData = reactive({ |
|
|
const importTemplateData = reactive({ |
|
|
templateUrl: '', |
|
|
templateUrl: '', |
|
|
templateTitle: '供应商发货申请主导入模版.xlsx' |
|
|
templateTitle: '供应商发货申请主导入模版.xlsx' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
// 导入成功之后 |
|
|
const importSuccess = () => { |
|
|
const importSuccess = () => { |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 筛选提交 |
|
|
// 筛选提交 |
|
|
const searchFormClick = (searchData) => { |
|
|
const searchFormClick = (searchData) => { |
|
|
tableObject.params = { |
|
|
tableObject.params = { |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
filters: searchData.filters |
|
|
filters: searchData.filters |
|
|
} |
|
|
} |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|
importTemplateData.templateUrl = await SupplierdeliverRequestMainApi.importTemplate() |
|
|
importTemplateData.templateUrl = await SupplierdeliverRequestMainApi.importTemplate() |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|