Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 6 months ago
parent
commit
8214e145cf
  1. 74
      src/api/wms/relegateRecordDetail/index.ts
  2. 61
      src/api/wms/relegateRecordMain/index.ts
  3. 30
      src/api/wms/relegateRequestMain/index.ts
  4. 6
      src/api/wms/supplierdeliverInspectionDetail/index.ts
  5. 6
      src/components/Annex/src/Annex.vue
  6. 2
      src/config/axios/service.ts
  7. 3
      src/permission.ts
  8. 10
      src/router/modules/remaining.ts
  9. 11
      src/utils/disposition/defaultButtons.ts
  10. 244
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue
  11. 204
      src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts
  12. 248
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  13. 215
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  14. 2
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  15. 23
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  16. 21
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  17. 56
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue
  18. 32
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  19. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

74
src/api/wms/relegateRecordDetail/index.ts

@ -0,0 +1,74 @@
import request from '@/config/axios'
export interface RelegateRecordDetailVO {
id: number
masterId: number
itemCode: string
downItemCode: string
businessType: string
uom: string
qty: number
inventoryStatus: string
fromBatch: string
fromPackingNumber: string
fromLocationCode: string
fromAreaTypes: string
fromAreaCodes: string
toPackingNumber: string
toBatch: string
toLocationCode: string
toWarehouseCode: string
toAreaTypes: string
toAreaCodes: string
number: string
available: string
remark: string
departmentCode: string
siteId: number
extraProperties: string
status: string
concurrencyStamp: number
serialNumber: string
ruleUserId: number
}
// 查询物料降级记录子列表
export const getRelegateRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/relegate-record-detail/senior', data })
} else {
return await request.get({ url: `/wms/relegate-record-detail/page`, params })
}
}
// 查询物料降级记录子详情
export const getRelegateRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/relegate-record-detail/get?id=` + id })
}
// 新增物料降级记录子
export const createRelegateRecordDetail = async (data: RelegateRecordDetailVO) => {
return await request.post({ url: `/wms/relegate-record-detail/create`, data })
}
// 修改物料降级记录子
export const updateRelegateRecordDetail = async (data: RelegateRecordDetailVO) => {
return await request.put({ url: `/wms/relegate-record-detail/update`, data })
}
// 删除物料降级记录子
export const deleteRelegateRecordDetail = async (id: number) => {
return await request.delete({ url: `/wms/relegate-record-detail/delete?id=` + id })
}
// 导出物料降级记录子 Excel
export const exportRelegateRecordDetail = async (params) => {
return await request.download({ url: `/wms/relegate-record-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/relegate-record-detail/get-import-template' })
}

61
src/api/wms/relegateRecordMain/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface RelegateRecordMainVO {
id: number
requestNumber: string
executeTime: Date
activeDate: Date
available: string
requestTime: Date
dueTime: Date
departmentCode: string
userGroupCode: string
interfaceType: string
code: string
number: string
businessType: string
remark: string
extraProperties: string
siteId: string
}
// 查询物料降级记录主列表
export const getRelegateRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/relegate-record-main/senior', data })
} else {
return await request.get({ url: `/wms/relegate-record-main/page`, params })
}
}
// 查询物料降级记录主详情
export const getRelegateRecordMain = async (id: number) => {
return await request.get({ url: `/wms/relegate-record-main/get?id=` + id })
}
// 新增物料降级记录主
export const createRelegateRecordMain = async (data: RelegateRecordMainVO) => {
return await request.post({ url: `/wms/relegate-record-main/create`, data })
}
// 修改物料降级记录主
export const updateRelegateRecordMain = async (data: RelegateRecordMainVO) => {
return await request.put({ url: `/wms/relegate-record-main/update`, data })
}
// 删除物料降级记录主
export const deleteRelegateRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/relegate-record-main/delete?id=` + id })
}
// 导出物料降级记录主 Excel
export const exportRelegateRecordMain = async (params) => {
return await request.download({ url: `/wms/relegate-record-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/relegate-record-main/get-import-template' })
}

30
src/api/wms/relegateRequestMain/index.ts

@ -65,4 +65,34 @@ export const exportRelegateRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/relegate-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/relegate-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/relegate-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/relegate-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/relegate-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/relegate-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/relegate-request-main/handle?id=' + id })
}

6
src/api/wms/supplierdeliverInspectionDetail/index.ts

@ -56,4 +56,8 @@ export const exportSupplierdeliverInspectionDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-inspection-detail/get-import-template' })
}
}
// 查看质检报告
export const queryQualityInspection = (asnNumber:string) => {
return request.get({ url: `/wms/supplierdeliver-request-main/queryQualityInspection?asnNumber=` + asnNumber })
}

6
src/components/Annex/src/Annex.vue

@ -4,7 +4,7 @@
<div class="title flex items-center">
<!-- <div class="title-txt">附件</div> -->
<UploadFile :isShowFile="false" :isShowTip="false" :fileType="fileType" :title="t('ts.添加附件')" :upData="upData" :limit="10"
@update:modelValue="handleAnnexSuccess" v-if="annexData.annexList.length<5"/>
@update:modelValue="handleAnnexSuccess" v-if="showAddBtn&&annexData.annexList.length<5"/>
</div>
<div class="list">
<div class="item flex items-start" v-for="(item, index) in annexData.annexList" :key="index">
@ -67,6 +67,10 @@ const props = defineProps({
type: Boolean,
required: false
},
showAddBtn: {
type: Boolean,
required: true
},
})
// emit
const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess','previewAnnexHandle'])

2
src/config/axios/service.ts

@ -31,7 +31,7 @@ let requestList: any[] = []
// 是否正在刷新中
let isRefreshToken = false
// 请求白名单,无须token的接口
const whiteList: string[] = ['/login', '/refresh-token']
const whiteList: string[] = ['/login', '/refresh-token','/queryQualityInspection']
// 创建axios实例
const service: AxiosInstance = axios.create({

3
src/permission.ts

@ -21,7 +21,8 @@ const whiteList = [
'/auth-redirect',
'/bind',
'/register',
'/oauthLogin/gitee'
'/oauthLogin/gitee',
'/purchasereceiptReport'
]
// 路由加载前

10
src/router/modules/remaining.ts

@ -244,6 +244,16 @@ const remainingRouter: AppRouteRecordRaw[] = [
noTagsView: true
}
},
{
path: '/purchasereceiptReport',
component: () => import('@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue'),
name: 'NoFound',
meta: {
hidden: true,
title: t('ts.查看质检报告'),
noTagsView: true
}
},
{
path: '/bpm',
component: Layout,

11
src/utils/disposition/defaultButtons.ts

@ -518,6 +518,17 @@ export function mainListPlanUploadQualityReportBtn(option:any) {
hasPermi: ''
})
}
export function mainListPlanCheckQualityReportBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.查看质检报告`).replace('ts.', ''),
name: 'mainPlanCheckQualityReport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option:any) {

244
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="RelegateRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RelegateRecordMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
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>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="RelegateRecordMainRules"
:formAllSchemas="RelegateRecordMain.allSchemas"
:apiUpdate="RelegateRecordMainApi.updateRelegateRecordMain"
:apiCreate="RelegateRecordMainApi.createRelegateRecordMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="RelegateRecordMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-record-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RelegateRecordMain,RelegateRecordMainRules } from './relegate-record-main.data'
import * as RelegateRecordMainApi from '@/api/wms/relegateRecordMain'
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: 'RelegateRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(RelegateRecordMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: RelegateRecordMainApi.getRelegateRecordMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-record-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-record-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-record-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:relegate-record-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-record-main:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =RelegateRecordMain.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await RelegateRecordMainApi.createRelegateRecordMain(data)
message.success(t('common.createSuccess'))
} else {
await RelegateRecordMainApi.updateRelegateRecordMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicRelegateRecordMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RelegateRecordMainApi.deleteRelegateRecordMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RelegateRecordMainApi.exportRelegateRecordMain(tableObject.params)
download.excel(data, '物料降级记录主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '物料降级记录主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RelegateRecordMainApi.importTemplate()
})
</script>

204
src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/relegateRecordMain.data.ts

@ -0,0 +1,204 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RelegateRecordMainRules = reactive({
departmentCode: [required],
interfaceType: [required],
number: [required],
businessType: [required],
})
export const RelegateRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
},
{
label: '执行时间',
field: 'executeTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '生效日期',
field: 'activeDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
},
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '截止时间',
field: 'dueTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isSearch: true,
},
{
label: '用户组',
field: 'userGroupCode',
sort: 'custom',
isSearch: true,
},
{
label: '接口类型',
field: 'interfaceType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isSearch: true,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

248
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -1,90 +1,74 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...RelegateRequestMain.allSchemas.searchSchema,...RelegateRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...RelegateRequestMain.allSchemas.searchSchema, ...RelegateRequestDetail.allSchemas.searchSchema]"
@search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
/>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="RelegateRequestMain.allSchemas" :detailAllSchemas="RelegateRequestDetail.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
<template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row, $index)" @button-base-click="buttonTableClick($event, row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
<BasicForm ref="basicFormRef"
:isOpenSearchTable="false"
fieldTableColumn="itemCode"
@success="getList"
:rules="RelegateRequestMainRules"
:rules="RelegateRequestMainRules"
:formAllSchemas="RelegateRequestMain.allSchemas"
:tableAllSchemas="RelegateRequestDetail.allSchemas"
:tableAllSchemas="RelegateRequestDetail.allSchemas"
:tableFormRules="RelegateRequestDetailRules"
:tableData="tableData"
:tableData="tableData"
:apiUpdate="RelegateRequestMainApi.updateRelegateRequestMain"
:apiCreate="RelegateRequestMainApi.createRelegateRequestMain"
:isBusiness="true"
fromeWhere="RelegateRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:apiCreate="RelegateRequestMainApi.createRelegateRequestMain"
:isBusiness="true" fromeWhere="RelegateRequestMain"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
:isShowButton = isShowButton
/>
:isShowButton=isShowButton />
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="RelegateRequestMain.allSchemas"
:detailAllSchemas="RelegateRequestDetail.allSchemas"
:detailAllSchemasRules="RelegateRequestDetailRules"
:apiCreate="RelegateRequestDetailApi.createRelegateRequestDetail"
:apiUpdate="RelegateRequestDetailApi.updateRelegateRequestDetail"
:apiPage="RelegateRequestDetailApi.getRelegateRequestDetailPage"
:apiDelete="RelegateRequestDetailApi.deleteRelegateRequestDetail"
:apiDelete="RelegateRequestDetailApi.deleteRelegateRequestDetail"
fromeWhere="RelegateRequestMain"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="trueFalse"
:detailButtonIsShowDelete="trueFalse"
/>
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { RelegateRequestMain,RelegateRequestMainRules,RelegateRequestDetail,RelegateRequestDetailRules } from './relegateRequestMain.data'
import { RelegateRequestMain, RelegateRequestMainRules, RelegateRequestDetail, RelegateRequestDetailRules } from './relegateRequestMain.data'
import * as RelegateRequestMainApi from '@/api/wms/relegateRequestMain'
import * as RelegateRequestDetailApi from '@/api/wms/relegateRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -99,34 +83,100 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
const businessType = 'relegate'
routeName.value = route.name
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns,...RelegateRequestDetail.allSchemas.tableMainColumns])
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
// //
const trueFalse = ref(false)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if (type == 'tableForm') {
if (formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['qty'] = val[0]['qty']
row['fromBatch'] = val[0]['batch']
row['fromPackingNumber'] = val[0]['packingNumber']
row['toBatch'] = val[0]['batch']
row['toPackingNumber'] = val[0]['packingNumber']
row['fromLocationCode'] = val[0]['locationCode']
row['fromInventoryStatus'] = val[0]['inventoryStatus']
} else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code']
} else if (formField == 'toLocationCode') {
row['toLocationCode'] = val[0]['code']
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
if (formField == 'fromWarehouseCode') {
setV['fromWarehouseCode'] = val[0]['code']
}
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'itemCode') {
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['customerUom']
}else {
setV[formField] = val[0][searchField]
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
// tableform
RelegateRequestDetail.allSchemas.tableFormColumns.map(item => {
if (item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}
]
}
if (item.field == "toLocationCode") {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType,
isMainValue: false
}]
}
})
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -141,9 +191,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:relegate-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:relegate-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:relegate-request-main:export'}), //
defaultButtons.defaultAddBtn({ hasPermi: 'wms:relegate-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:relegate-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:relegate-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -174,7 +224,7 @@ const buttonBaseClick = (val, item) => {
}
//
const isShowMainButton = (row,val) => {
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
@ -183,15 +233,21 @@ const isShowMainButton = (row,val) => {
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
const butttondata = (row, $index) => {
const findIndex = row['masterId'] ? tableObject.tableList.findIndex(item => item['masterId'] == row['masterId']) : -1
if (findIndex > 0 && findIndex < $index) {
return []
}
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request-main:delete'}), //
]
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4','6']),hasPermi:'wms:relegate-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:relegate-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:relegate-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:relegate-request-main:delete' }), //
]
}
// -
@ -211,46 +267,46 @@ const openForm = (type: string, row?: any) => {
//true0
const flag = ref(false)
// form
const submitForm = async (formType,data) => {
const submitForm = async (formType, data) => {
data.subList = tableData.value //
let isExist = false
tableData.value.forEach(item => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if (rs.length > 1) isExist = true
})
if (isExist) {
basicFormRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => {
if(obj.qty == 0){
if (obj.qty == 0) {
message.warning(`数量不能为0!`)
flag.value = true
return;
}
})
if(flag.value){
if (flag.value) {
basicFormRef.value.formLoading = false
return
}
try {
if (formType === 'create') {
if(tableData.value.length <= 0){
message.warning(`子表明细不能为空!`)
flag.value = true
basicFormRef.value.formLoading = false
return;
}
await RelegateRequestMainApi.createRelegateRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await RelegateRequestMainApi.updateRelegateRequestMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
if (tableData.value.length <= 0) {
message.warning(`子表明细不能为空!`)
flag.value = true
basicFormRef.value.formLoading = false
return;
}
await RelegateRequestMainApi.createRelegateRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await RelegateRequestMainApi.updateRelegateRequestMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
@ -270,7 +326,7 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
} catch { }
}
/**

215
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -11,6 +11,9 @@ import * as WarehouseApi from "@/api/wms/warehouse";
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as confgiApi from '@/api/infra/config'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
@ -19,6 +22,7 @@ const queryParams = {
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
const confgiData = await confgiApi.queryByKey("relegateItemType")
// 表单校验
export const RelegateRequestMainRules = reactive({
fromWarehouseCode: [required],
@ -39,7 +43,10 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false
isForm: false,
table: {
width: 180
},
},
{
label: '从仓库代码',
@ -60,14 +67,16 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: false
}]
}
}
},
table: {
width: 180
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
@ -75,7 +84,6 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
isForm: false,
isTable: false
},
@ -269,7 +277,6 @@ export const RelegateRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '原因',
field: 'reason',
sort: 'custom',
isForm: false,
},
{
label: '操作',
@ -303,16 +310,33 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
table: {
width: 150
},
},
{
label: '降级物料代码',
@ -322,7 +346,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择降级物料代码',
searchField: 'itemCode',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
@ -330,10 +354,35 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'type',
value: confgiData.itemType,
isMainValue: false
}]
}
},
isSearch: true
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择降级物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition:[
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'type',
value: confgiData.itemType,
isMainValue: false
}]
},
isSearch: true,
table: {
width: 150
},
},
{
label: '计量单位',
@ -342,7 +391,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
sort: 'custom',
table: {
width: 150
width: 80
},
tableForm: {
type: 'Select',
@ -358,6 +407,17 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '数量',
field: 'qty',
sort: 'custom',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
},
table: {
width: 80
},
},
{
label: '从批次',
@ -368,6 +428,12 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true,
}
},
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '从包装号',
@ -378,6 +444,12 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true,
}
},
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '从库位代码',
@ -388,90 +460,150 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true,
}
},
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '从库区类型',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
isForm: false,
isTableForm: false,
sort: 'custom',
isForm:false,
},
{
label: '从库区代码',
field: 'fromAreaCodes',
sort: 'custom',
isForm:false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
isForm:false,
isTableForm: false,
table: {
width: 150
},
},
{
label: '到包装号',
field: 'toPackingNumber',
sort: 'custom',
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '到批次',
field: 'toBatch',
sort: 'custom',
tableForm: {
disabled: true
},
table: {
width: 120
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectBusinessTypeToLocation,
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'code',
searchTitle: '库位信息',
searchAllSchemas: Location.allSchemas,
searchPage: LocationApi.selectBusinessTypeToLocation,
}
},
table: {
width: 120
},
},
{
label: '到库区类型',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: false,
sort: 'custom',
isForm:false,
isTableForm: false
},
{
label: '到库区代码',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
isTableForm: false,
table: {
width: 150
},
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
isTableForm: false,
table: {
width: 150
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '地点ID',
field: 'siteId',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '扩展属性',
field: 'extraProperties',
sort: 'custom',
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '创建时间',
@ -486,20 +618,19 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
isForm:false,
isTableForm: false,
isTable:false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
},
{
label: '并发乐观锁',
@ -510,30 +641,34 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber',
value: 0
},
isTableForm: false,
isTable:false,
},
{
label: '工作流流水号',
field: 'serialNumber',
isForm:false,
sort: 'custom',
isTableForm: false,
isTable:false,
},
{
label: '权限所属人员id',
field: 'ruleUserId',
sort: 'custom',
isForm:false,
form: {
component: 'InputNumber',
value: 0
},
isTableForm: false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
hiddenInMain:true,
table: {
width: 150,
fixed: 'right'
}
},
isTableForm: false
}
]))

2
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue

@ -29,7 +29,7 @@
v-model:sort="tableObject.sort"
>
<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>
</el-button>
</template>

23
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -81,6 +81,16 @@
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
destroy-on-close
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -219,7 +229,8 @@ const butttondata = (row,$index) => {
color: '',
hasPermi: 'wms:purchasereceipt-job-main:close',
link: true //
}
},
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
@ -233,8 +244,18 @@ const buttonTableClick = async (val, row) => {
handleClose(row.masterId)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
}else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
}
}
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {

21
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -89,6 +89,16 @@
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
destroy-on-close
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -162,6 +172,7 @@ const butttondata = (row,$index) => {
return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
@ -171,8 +182,18 @@ const buttonTableClick = async (val, row) => {
handleCreatePutawayRequest(row.number)
}else if(val == 'inspectRequest'){//
handleCreateInspectRequest(row.number)
}else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
}
}
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 生成采购上架申请按钮操作 */
const handleCreatePutawayRequest = async (number:string) => {

56
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue

@ -0,0 +1,56 @@
<template>
<div style="height:100%;overflow-y: auto;">
<ContentWrap >
<Annex
:annexData="reportAnnex"
:showDownload = "false"
:showPreview="true"
:hiddenDelete = "true"
:upData="{
tableId:30,
tableName:'SupplierdeliverInspectionDetail'
}"
:key="99"
:showAddBtn="false"
/>
</ContentWrap>
<ContentWrap v-if="subDetailTableData.tableList.length>0">
<Table
align="center"
:columns="subDetailTableData.tableColumns"
:data="subDetailTableData.tableList"
:loading="false"
/>
</ContentWrap>
</div>
</template>
<script lang="ts" setup>
//
import {queryQualityInspection} from '@/api/wms/supplierdeliverInspectionDetail'
import Annex from '@/components/Annex/src/Annex.vue'
defineOptions({ name: 'purchasereceiptReport' })
const route = useRoute() //
const reportAnnex = reactive({
annexList: []
})
const subDetailTableData = ref({
tableList: [],
tableColumns: [],
})
onMounted(() => {
getAnnexList()
})
const getAnnexList = async () => {
let res = await queryQualityInspection(route.query.asnNumber as string)
reportAnnex.annexList = res.fileList
subDetailTableData.value = {
tableList: res.inspectionDetailRespVOList,
tableColumns:[{"label":"物料代码","field":"itemCode","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true}},{"label":"供应商批次","field":"batch","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true}},{"label":"发货数量","field":"planQty","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true,"type":"InputNumber","min":0,"precision":6}},{"width":150,"label":"计量单位","field":"uom","dictType":"uom","dictClass":"string","isTable":true,"isForm":false,"sort":"custom","table":{"width":150},"tableForm":{"type":"Select","disabled":true},"form":{"componentProps":{"disabled":true}}},{"label":"创建时间","field":"createTime","sort":"custom","isSearch":true,"search":{"component":"DatePicker","componentProps":{"valueFormat":"YYYY-MM-DD HH:mm:ss","type":"daterange","defaultTime":["2000-12-31T16:00:00.000Z","2001-01-01T15:59:59.000Z"]}},"isTableForm":false,"isForm":false}],
}
console.log('tableColumns',JSON.stringify(subDetailTableData.value.tableColumns))
}
</script>
<style lang="scss" scoped></style>

32
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -54,6 +54,8 @@
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@formFormDateChange="formFormDateChange"
@ -126,8 +128,16 @@
/>
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
width="90%"
append-to-body
destroy-on-close
>
<iframe height="600px" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
@ -354,7 +364,8 @@ const butttondata = (row,$index) => {
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
]
defaultButtons.mainListPlanCheckQualityReportBtn({}), //
]
}
// -
@ -384,9 +395,19 @@ const buttonTableClick = async (val, row) => {
}else if (val == 'point') {
//
labelPrint(row)
}
}else if(val == 'mainPlanCheckQualityReport'){
//
checkQualityReport(row)
}
}
//
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row)=>{
showQualityReport.value = true
qualityReport.value = `${import.meta.env.VITE_REPORT_URL}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
//
const isCreateLabel = ref(false)
@ -680,6 +701,9 @@ const handleAddTable = () => {
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
const onEnter = async (field,value)=>{
console.log(field,value)
getSearchTableData(value,true)

6
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -214,7 +214,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['itemDesc2'] = val[0]['itemDesc2']
row['batch'] = val[0]['batch']
row['altBatch'] = val[0]['altBatch']
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom']
@ -244,7 +243,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if(formField == 'itemCode'){
row['batch'] = val[0]['toBatch']
row['packingNumber'] = val[0]['toPackingNumber']
row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber']
row['containerNumber'] = val[0]['containerNumber']
@ -268,7 +266,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
if (res) tableData.value = res
tableData.value.forEach((item) => {
item.batch = item.toBatch
item.packingNumber = item.toPackingNumber
item.packingNumber = null
item.containerNumber = item.toContainerNumber
item.receiptQty = item.qty
item.toLocationGroupCode = null
@ -331,7 +329,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['itemDesc2'] = val[0]['itemDesc2']
setV['batch'] = val[0]['toBatch']
setV['altBatch'] = val[0]['altBatch']
setV['packingNumber'] = val[0]['toPackingNumber']
setV['containerNumber'] = val[0]['toContainerNumber']
setV['receiptQty'] = val[0]['qty']
setV['qty'] = val[0]['qty']
@ -362,7 +359,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
if(formField == 'itemCode'){
setV['batch'] = val[0]['toBatch']
setV['packingNumber'] = val[0]['toPackingNumber']
setV['containerNumber'] = val[0]['toContainerNumber']
setV['containerNumber'] = val[0]['containerNumber']
setV['containerNumber'] = val[0]['containerNumber']

Loading…
Cancel
Save