陈薪名
2 months ago
84 changed files with 11912 additions and 633 deletions
File diff suppressed because it is too large
@ -0,0 +1,203 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="[...PurchasereturnRecordMOrderTypeMain.allSchemas.searchSchema,...PurchasereturnRecordMOrderTypeDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PurchasereturnRecordMOrderTypeMain.allSchemas" |
|||
:detailAllSchemas="PurchasereturnRecordMOrderTypeDetail.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table v-clientTable |
|||
: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> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="formRef" |
|||
@success="getList" |
|||
:rules="PurchasereturnRecordMOrderTypeMainRules" |
|||
:formAllSchemas="PurchasereturnRecordMOrderTypeMain.allSchemas" |
|||
:tableAllSchemas="PurchasereturnRecordMOrderTypeDetail.allSchemas" |
|||
:tableFormRules="PurchasereturnRecordMOrderTypeDetailRules" |
|||
:isBusiness="true" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:isBasic="false" |
|||
:allSchemas="PurchasereturnRecordMOrderTypeMain.allSchemas" |
|||
:detailAllSchemas="PurchasereturnRecordMOrderTypeDetail.allSchemas" |
|||
:detailAllSchemasRules="PurchasereturnRecordMOrderTypeDetailRules" |
|||
:apiPage="routeName.includes('SCP')?PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageSCP:PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageMorderType" |
|||
/> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { PurchasereturnRecordMOrderTypeMain,PurchasereturnRecordMOrderTypeMainRules,PurchasereturnRecordMOrderTypeDetail,PurchasereturnRecordMOrderTypeDetailRules } from './purchasereturnRecordMOrderTypeMain.data' |
|||
import * as PurchasereturnRecordMainApi from '@/api/wms/purchasereturnRecordMain' |
|||
import * as PurchasereturnRecordDetailApi from '@/api/wms/purchasereturnRecordDetail' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import { getAccessToken } from '@/utils/auth' |
|||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|||
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|||
const { loadStart, loadDone } = usePageLoading() |
|||
// 采购退货记录主 |
|||
defineOptions({ name: 'PurchasereturnRecordMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref([...PurchasereturnRecordMOrderTypeMain.allSchemas.tableColumns,...PurchasereturnRecordMOrderTypeDetail.allSchemas.tableMainColumns]) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: routeName.value.includes('SCP')?PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageSCP:PurchasereturnRecordDetailApi.getPurchasereturnRecordDetailPageMorderType // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereturn-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 == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|||
searchFormClick({ |
|||
filters: tableObject.params.filters |
|||
}) |
|||
} else { |
|||
getList() |
|||
} |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row,$index) => { |
|||
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|||
if(findIndex>-1&&findIndex<$index){ |
|||
return [] |
|||
} |
|||
return [defaultButtons.mainListDocumentPrintBtn(null)] |
|||
} |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'documentPrint') { |
|||
// 单据打印 |
|||
handleDocumentPrint(row.requestNumber,row.itemCode) |
|||
} |
|||
} |
|||
|
|||
// 单据打印 |
|||
const BASE_URL = getJmreportBaseUrl() |
|||
const documentSrc = ref(BASE_URL + '/jmreport/view/920874172025987072?token=' + getAccessToken()) |
|||
const handleDocumentPrint = async (requestNumber,itemCode) => { |
|||
window.open(documentSrc.value + '&requestNumber=' + requestNumber +'&itemCode=' + itemCode) |
|||
} |
|||
// 获取部门 用于详情 部门回显 |
|||
const { wsCache } = useCache() |
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|||
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|||
detailRef.value.openDetail(row, titleName, titleValue,'recordPurchasereturnMain') |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
loadStart() |
|||
const excelTitle = ref(route.meta.title) |
|||
if(routeName.value.includes('SCP')){ |
|||
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params) |
|||
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|||
}else{ |
|||
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainMorderType(tableObject.params) |
|||
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|||
} |
|||
} catch { |
|||
} finally { |
|||
loadDone() |
|||
} |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
onActivated(() => { |
|||
getList() |
|||
}) |
|||
</script> |
@ -0,0 +1,994 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' |
|||
|
|||
import * as InspectionQ2Api from '@/api/qms/inspectionQ2' |
|||
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' |
|||
|
|||
/** |
|||
* @returns {Array} 采购退货记录主表 |
|||
*/ |
|||
export const PurchasereturnRecordMOrderTypeMain = useCrudSchemas( |
|||
reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180, |
|||
fixed: 'left' |
|||
}, |
|||
sortTableDefault: 1012, |
|||
sortSearchDefault: 1, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '申请单号', |
|||
field: 'requestNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
sortTableDefault: 1 |
|||
}, |
|||
{ |
|||
label: '任务单号', |
|||
field: 'jobNumber', |
|||
sort: 'custom', |
|||
isTable:false, |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
|
|||
sortTableDefault: 1 |
|||
}, |
|||
{ |
|||
label: '采购收货记录单号', |
|||
field: 'purchaseReceiptRecordNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isSearch: false, |
|||
isTable:false, |
|||
sortTableDefault: 3, |
|||
sortSearchDefault: 5 |
|||
}, |
|||
{ |
|||
label: 'qad采购退货记录单号', |
|||
field: 'qadPurchaseReturnRecordCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
sortSearchDefault: 3, |
|||
sortTableDefault: 4, |
|||
isTable: true |
|||
}, |
|||
{ |
|||
label: '发货单号', |
|||
field: 'asnNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
sortSearchDefault: 3, |
|||
isSearch: false, |
|||
isTable:false, |
|||
sortTableDefault: 2 |
|||
}, |
|||
{ |
|||
label: '要货计划单号', |
|||
field: 'ppNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: 'Q2通知单号', |
|||
field: 'q2Number', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isDetail: false, |
|||
isTable:false, |
|||
sortTableDefault: 4, |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
// labelMessage: '信息提示说明!!!',
|
|||
componentProps: { |
|||
enterSearch: true, |
|||
// multiple: true,
|
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
|
|||
searchField: 'number', // 查询弹窗赋值字段
|
|||
searchTitle: 'Q2通知单号', // 查询弹窗标题
|
|||
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
|
|||
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
|
|||
searchCondition: [ |
|||
{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}, |
|||
{ |
|||
key: 'status', |
|||
value: '0', |
|||
isMainValue: false |
|||
} |
|||
], |
|||
verificationParams: [ |
|||
{ |
|||
key: 'number', |
|||
action: '==', |
|||
value: '', |
|||
isMainValue: false, |
|||
isSearch: true, |
|||
isFormModel: true |
|||
} |
|||
] // 失去焦点校验参数
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '供应商代码', |
|||
field: 'supplierCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1, |
|||
sortSearchDefault: 2, |
|||
isSearch: true |
|||
}, |
|||
{ |
|||
label: '从月台代码', |
|||
field: 'fromDockCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '承运商', |
|||
field: 'carrierCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '运输方式', |
|||
field: 'transferMode', |
|||
dictType: DICT_TYPE.TRANSFER_MODE, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '车牌号', |
|||
field: 'vehiclePlateNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '从仓库代码', |
|||
field: 'fromWarehouseCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '到仓库代码', |
|||
field: 'toWarehouseCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '出库事务类型', |
|||
field: 'outTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '入库事务类型', |
|||
field: 'inTransactionType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '从库区类型范围', |
|||
field: 'fromAreaTypes', |
|||
dictType: DICT_TYPE.AREA_TYPE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
} |
|||
}, |
|||
{ |
|||
label: '到库区类型范围', |
|||
field: 'toAreaTypes', |
|||
dictType: DICT_TYPE.AREA_TYPE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
} |
|||
}, |
|||
{ |
|||
label: '从库区代码范围', |
|||
field: 'fromAreaCodes', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '到库区代码范围', |
|||
field: 'toAreaCodes', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '执行时间', |
|||
field: 'executeTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable: false, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '生效日期', |
|||
field: 'activeDate', |
|||
formatter: dateFormatter2, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable: false, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: { width: '100%' }, |
|||
type: 'date', |
|||
dateFormat: 'YYYY-MM-DD', |
|||
valueFormat: 'x' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '申请时间', |
|||
field: 'requestTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable: false, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '截止时间', |
|||
field: 'dueTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable: false, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x' |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '部门', |
|||
field: 'departmentCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
// {
|
|||
// label: '代码',
|
|||
// field: 'code',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// },
|
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
dictType: DICT_TYPE.INTERFACE_TYPE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
} |
|||
}, |
|||
{ |
|||
label: '业务类型', |
|||
field: 'businessType', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '是否可用', |
|||
field: 'available', |
|||
dictType: DICT_TYPE.TRUE_FALSE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
} |
|||
}, |
|||
// {
|
|||
// label: '原因',
|
|||
// field: 'available',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// isTable: true,
|
|||
// },
|
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable: false, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x' |
|||
} |
|||
}, |
|||
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')] |
|||
}, |
|||
} |
|||
}, |
|||
{ |
|||
label: '创建者', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isDetail: false, |
|||
isForm: false, |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
}, |
|||
isTable:false, |
|||
} |
|||
]) |
|||
) |
|||
|
|||
//表单校验
|
|||
export const PurchasereturnRecordMOrderTypeMainRules = reactive({ |
|||
requestNumber: [ |
|||
{ required: true, message: '请选择申请单号', trigger: 'change' } |
|||
], |
|||
supplierCode: [ |
|||
{ required: true, message: '请选择供应商代码', trigger: 'change' } |
|||
], |
|||
fromWarehouseCode: [ |
|||
{ required: true, message: '请选择从仓库代码', trigger: 'change' } |
|||
], |
|||
fromAreaTypes: [ |
|||
{ required: true, message: '请选择从库区类型范围', trigger: 'change' } |
|||
], |
|||
outTransaction: [ |
|||
{ required: true, message: '请输入出库事务类型', trigger: 'blur' } |
|||
], |
|||
inTransaction: [ |
|||
{ required: true, message: '请输入入库事务类型', trigger: 'blur' } |
|||
], |
|||
executeTime: [ |
|||
{ required: true, message: '请输入执行时间', trigger: 'change' } |
|||
], |
|||
activeDate: [ |
|||
{ required: true, message: '请输入生效日期', trigger: 'change' } |
|||
], |
|||
available: [ |
|||
{ required: true, message: '请输入是否可用', trigger: 'blur' } |
|||
], |
|||
departmentCode: [ |
|||
{ required: true, message: '请输入部门', trigger: 'blur' } |
|||
], |
|||
interfaceType: [ |
|||
{ required: true, message: '请选择接口类型', trigger: 'change' } |
|||
], |
|||
number: [ |
|||
{ required: true, message: '请输入单据号', trigger: 'blur' } |
|||
], |
|||
businessType: [ |
|||
{ required: true, message: '请输入业务类型', trigger: 'blur' } |
|||
], |
|||
createTime: [ |
|||
{ required: true, message: '请选择创建时间', trigger: 'change' } |
|||
], |
|||
creator: [ |
|||
{ required: true, message: '请输入创建者', trigger: 'blur' } |
|||
], |
|||
}) |
|||
|
|||
/** |
|||
* @returns {Array} 采购退货记录子表 |
|||
*/ |
|||
export const PurchasereturnRecordMOrderTypeDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
|
|||
{ |
|||
label: '从包装号', |
|||
field: 'fromPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: false, |
|||
isTable:false, |
|||
sortTableDefault: 1001, |
|||
sortSearchDefault: 1001, |
|||
}, |
|||
{ |
|||
label: '到包装号', |
|||
field: 'toPackingNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: false, |
|||
isTable:false, |
|||
hiddenInMain: true, |
|||
sortSearchDefault: 1002, |
|||
sortTableDefault: 1001, |
|||
}, |
|||
{ |
|||
label: '包装规格', |
|||
field: 'packUnit', |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1004, |
|||
}, |
|||
{ |
|||
label: '包装数量', |
|||
field: 'packQty', |
|||
sort: 'custom', |
|||
isTable:false, |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1004, |
|||
form: { |
|||
component: 'InputNumber', |
|||
} |
|||
}, |
|||
{ |
|||
label: '退货数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'InputNumber', |
|||
componentProps: { |
|||
min: 0, |
|||
precision: 6, |
|||
disabled:false |
|||
} |
|||
}, |
|||
sortTableDefault: 1004, |
|||
hiddenInMain:false, |
|||
isForm:false, |
|||
tableForm:{ |
|||
type:'InputNumber', |
|||
min:0, |
|||
precision: 6, |
|||
disabled:false |
|||
} |
|||
}, |
|||
// {
|
|||
// label: '从器具号',
|
|||
// field: 'fromContainerNumber',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// isTable:false,
|
|||
// hiddenInMain: true
|
|||
// },
|
|||
// {
|
|||
// label: '到器具号',
|
|||
// field: 'toContainerNumber',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// isTable:false,
|
|||
// hiddenInMain: true
|
|||
// },
|
|||
{ |
|||
label: '从批次', |
|||
field: 'fromBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: true, |
|||
sortTableDefault: 1000, |
|||
}, |
|||
{ |
|||
label: '到批次', |
|||
field: 'toBatch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: false, |
|||
sortTableDefault: 1000, |
|||
hiddenInMain: true |
|||
}, |
|||
// {
|
|||
// label: '替代批次',
|
|||
// field: 'altBatch',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// isTable:false,
|
|||
// hiddenInMain: true
|
|||
// },
|
|||
{ |
|||
label: '从库位代码', |
|||
field: 'fromLocationCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1009, |
|||
hiddenInMain: true |
|||
}, |
|||
// {
|
|||
// label: '到库位代码',
|
|||
// field: 'toLocationCode',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// sortTableDefault: 1009,
|
|||
// hiddenInMain: true
|
|||
// },
|
|||
{ |
|||
label: '从库位组代码', |
|||
field: 'fromLocationGroupCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1010, |
|||
hiddenInMain: true |
|||
}, |
|||
// {
|
|||
// label: '到库位组代码',
|
|||
// field: 'toLocationGroupCode',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// sortTableDefault: 1010,
|
|||
// hiddenInMain: true
|
|||
// },
|
|||
{ |
|||
label: '从库区代码', |
|||
field: 'fromAreaCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1010, |
|||
hiddenInMain: true |
|||
}, |
|||
// {
|
|||
// label: '到库区代码',
|
|||
// field: 'toAreaCode',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// sortTableDefault: 1010,
|
|||
// hiddenInMain: true
|
|||
// },
|
|||
{ |
|||
label: '从货主代码', |
|||
field: 'fromOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1010, |
|||
hiddenInMain: true |
|||
}, |
|||
{ |
|||
label: '到货主代码', |
|||
field: 'toOwnerCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1010, |
|||
hiddenInMain: true |
|||
}, |
|||
{ |
|||
label: '库存状态', |
|||
field: 'inventoryStatus', |
|||
dictType: DICT_TYPE.INVENTORY_STATUS, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1008, |
|||
hiddenInMain: true |
|||
}, |
|||
{ |
|||
label: '订单号', |
|||
field: 'poNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 4, |
|||
}, |
|||
{ |
|||
label: '订单行', |
|||
field: 'poLine', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 5, |
|||
}, |
|||
{ |
|||
label: '单据号', |
|||
field: 'number', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180, |
|||
}, |
|||
sortTableDefault: 1013, |
|||
hiddenInMain: true, |
|||
isSearch: false |
|||
}, |
|||
|
|||
{ |
|||
label: '物料代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isSearch: true, |
|||
sortSearchDefault: 6, |
|||
}, |
|||
{ |
|||
label: '物料名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
isTable:false, |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortSearchDefault: 6, |
|||
}, |
|||
{ |
|||
label: '物料描述1', |
|||
field: 'itemDesc1', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortSearchDefault: 7, |
|||
hiddenInMain: true |
|||
}, |
|||
{ |
|||
label: '物料描述2', |
|||
field: 'itemDesc2', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortSearchDefault: 7, |
|||
hiddenInMain: true |
|||
}, |
|||
// {
|
|||
// label: '数量',
|
|||
// field: 'qty',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// isTable:true,
|
|||
// sortTableDefault: 1005,
|
|||
// form: {
|
|||
// component: 'InputNumber',
|
|||
// }
|
|||
// },
|
|||
{ |
|||
label: '计量单位', |
|||
field: 'uom', |
|||
dictType: DICT_TYPE.UOM, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
sortTableDefault: 1006, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '单价', |
|||
field: 'singlePrice', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
hiddenInMain:true, |
|||
sortTableDefault: 1006, |
|||
form: { |
|||
component: 'InputNumber', |
|||
} |
|||
}, |
|||
{ |
|||
label: '金额', |
|||
field: 'amount', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
hiddenInMain:true, |
|||
sortTableDefault: 1006, |
|||
form: { |
|||
component: 'InputNumber', |
|||
} |
|||
}, |
|||
{ |
|||
label: '项目代码', |
|||
field: 'projectCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1011, |
|||
hiddenInMain: true |
|||
}, |
|||
// {
|
|||
// label: '代码',
|
|||
// field: 'code',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// },
|
|||
{ |
|||
label: '接口类型', |
|||
field: 'interfaceType', |
|||
dictType: DICT_TYPE.INTERFACE_TYPE, |
|||
dictClass: 'string', |
|||
isTable: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
hiddenInMain: true |
|||
}, |
|||
// {
|
|||
// label: '任务明细ID',
|
|||
// field: 'jobDetailId',
|
|||
// sort: 'custom',
|
|||
// table: {
|
|||
// width: 150
|
|||
// },
|
|||
// },
|
|||
{ |
|||
label: '退货原因', |
|||
field: 'reasonType', |
|||
dictType: DICT_TYPE.RETURN_REASON_TYPE, |
|||
dictClass: 'string', |
|||
// isSearch: true,
|
|||
isTable: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
type: 'Select', |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '退货原因描述', |
|||
field: 'reason', |
|||
sort: 'custom', |
|||
isTable:false, |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
}, |
|||
{ |
|||
label: '备注', |
|||
field: 'remark', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1007, |
|||
hiddenInMain: true |
|||
}, |
|||
{ |
|||
label: '创建时间', |
|||
field: 'createTime', |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
hiddenInMain: false, |
|||
sortTableDefault: 1014, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '创建者', |
|||
field: 'creator', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1014, |
|||
hiddenInMain: false, |
|||
}, |
|||
|
|||
])) |
|||
|
|||
//表单校验
|
|||
export const PurchasereturnRecordMOrderTypeDetailRules = reactive({ |
|||
fromPackingNumber: [ |
|||
{ required: true, message: '请选择从包装号', trigger: 'change' } |
|||
], |
|||
toPackingNumber: [ |
|||
{ required: true, message: '请选择到包装号', trigger: 'change' } |
|||
], |
|||
fromBatch: [ |
|||
{ required: true, message: '请输入从批次', trigger: 'blur' } |
|||
], |
|||
toBatch: [ |
|||
{ required: true, message: '请输入到批次', trigger: 'blur' } |
|||
], |
|||
reason: [ |
|||
{ required: true, message: '请选择原因', trigger: 'change' } |
|||
], |
|||
fromLocationCode: [ |
|||
{ required: true, message: '请选择从库位代码', trigger: 'change' } |
|||
], |
|||
fromLocationGroupCode: [ |
|||
{ required: true, message: '请选择从库位组代码', trigger: 'change' } |
|||
], |
|||
fromAreaCode: [ |
|||
{ required: true, message: '请选择从库区代码', trigger: 'change' } |
|||
], |
|||
inventoryStatus: [ |
|||
{ required: true, message: '请选择库存状态', trigger: 'change' } |
|||
], |
|||
poNumber: [ |
|||
{ required: true, message: '请选择订单号', trigger: 'change' } |
|||
], |
|||
poline: [ |
|||
{ required: true, message: '请选择订单行', trigger: 'change' } |
|||
], |
|||
}) |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,597 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' |
|||
const { t } = useI18n() // 国际化
|
|||
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' |
|||
import { |
|||
PurchasereceiptRecordDetail, |
|||
PurchasereceiptRecordMain |
|||
} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data' |
|||
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' |
|||
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|||
import * as SupplierApi from '@/api/wms/supplier' |
|||
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' |
|||
import * as ItemPackageApi from '@/api/wms/itempackage/index' |
|||
import * as LocationApi from '@/api/wms/location' |
|||
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
|||
import * as BalanceApi from '@/api/wms/balance' |
|||
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' |
|||
|
|||
import * as InspectionQ2Api from '@/api/qms/inspectionQ2' |
|||
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' |
|||
|
|||
import * as ItembasicApi from '@/api/wms/itembasic' |
|||
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|||
|
|||
let locationList = await LocationApi.selectBusinessTypeOutLocationAll({ |
|||
businessType:'PurchaseReturn', |
|||
isIn:'out' |
|||
}) |
|||
locationList = locationList.list.map(item=>({ |
|||
label :item.code, |
|||
value :item.code |
|||
})) |
|||
|
|||
console.log('locationList',locationList) |
|||
|
|||
|
|||
// 获取当前操作人的部门
|
|||
import { useUserStore } from '@/store/modules/user' |
|||
import { TableColumn } from '@/types/table' |
|||
const userStore = useUserStore() |
|||
const userDept = userStore.userSelfInfo.dept |
|||
// id 转str 否则form回显匹配不到
|
|||
userDept.id = userDept.id.toString() |
|||
const userDeptArray: any = [userDept] |
|||
|
|||
/** |
|||
* @returns {Array} 采购退货申请主表 |
|||
*/ |
|||
export const PurchasereturnRequestMainNew = useCrudSchemas( |
|||
reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '物料代码', |
|||
field: 'itemCode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
table:{ |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
// labelMessage: '信息提示说明!!!',
|
|||
componentProps: { |
|||
enterSearch:true, |
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|||
searchField: 'code', // 查询弹窗赋值字段
|
|||
searchTitle: '物料基础信息', // 查询弹窗标题
|
|||
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|||
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|||
searchCondition: [{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
action: '==', |
|||
isSearch: true, |
|||
isMainValue: false |
|||
}], |
|||
verificationParams: [{ |
|||
key: 'code', |
|||
action: '==', |
|||
value: '', |
|||
isMainValue: false, |
|||
isSearch: 'true', |
|||
isFormModel: true |
|||
}], // 失去焦点校验参数
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '物料名称', |
|||
field: 'itemName', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '供应商', |
|||
field: 'supplierCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Select', |
|||
componentProps: { |
|||
options: [], |
|||
optionsAlias: { |
|||
labelField: 'supplierCode', |
|||
valueField: 'supplierCode' |
|||
}, |
|||
filterable: true, |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '供应商名称', |
|||
field: 'supplierName', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180, |
|||
}, |
|||
isForm: true, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: ' ', |
|||
field: 'hahaha', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable:false, |
|||
isDetail:false, |
|||
form: { |
|||
componentProps: { |
|||
type: 'slot', |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: ' ', |
|||
field: 'hehehe', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
isTable:false, |
|||
isDetail:false, |
|||
form: { |
|||
componentProps: { |
|||
type: 'slot', |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
label: '采购订单号', |
|||
field: 'poNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '采购订单行', |
|||
field: 'poLine', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '收货单号', |
|||
field: 'receiptNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '发货单号', |
|||
field: 'asnNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'status', |
|||
dictType: DICT_TYPE.INVENTORY_STATUS, |
|||
dictClass: 'string', |
|||
isSearch: true, |
|||
isTable: true, |
|||
isForm: false, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
sortTableDefault: 1, |
|||
form: { |
|||
value: '1', |
|||
componentProps: { |
|||
disabled: true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '退货库位', |
|||
field: 'locationCode', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'Select', |
|||
value:locationList[0]['value'], |
|||
componentProps: { |
|||
options: locationList |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: 'Q2通知单号', |
|||
field: 'q2Number', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
isDetail: true, |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
// labelMessage: '信息提示说明!!!',
|
|||
componentProps: { |
|||
enterSearch: true, |
|||
// multiple: true,
|
|||
isSearchList: true, // 开启查询弹窗
|
|||
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
|
|||
searchField: 'number', // 查询弹窗赋值字段
|
|||
searchTitle: 'Q2通知单号', // 查询弹窗标题
|
|||
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
|
|||
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
|
|||
searchCondition: [ |
|||
{ |
|||
key: 'available', |
|||
value: 'TRUE', |
|||
isMainValue: false |
|||
}, |
|||
{ |
|||
key: 'status', |
|||
value: '0', |
|||
isMainValue: false |
|||
}, |
|||
{ |
|||
key: 'supplierCode', |
|||
value: 'supplierCode', |
|||
isMainValue: true |
|||
} |
|||
], |
|||
verificationParams: [ |
|||
{ |
|||
key: 'number', |
|||
action: '==', |
|||
value: '', |
|||
isMainValue: false, |
|||
isSearch: true, |
|||
isFormModel: true |
|||
} |
|||
] // 失去焦点校验参数
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
field: 'action', |
|||
isDetail: false, |
|||
isForm: false, |
|||
table: { |
|||
width: 300, |
|||
fixed: 'right' |
|||
} |
|||
} |
|||
]) |
|||
) |
|||
//表单校验
|
|||
export const PurchasereturnRequestMainRulesNew = reactive({ |
|||
itemCode: [ |
|||
{ required: true, message: '请输入供应商代码', trigger: 'blur' } |
|||
], |
|||
supplierCode: [ |
|||
{ required: true, message: '请输入供应商代码', trigger: 'blur' } |
|||
], |
|||
poNumber: [ |
|||
{ required: true, message: '请选择采购订单号', trigger: 'blur' } |
|||
], |
|||
poLine: [ |
|||
{ required: true, message: '请选择订单行', trigger: 'blur' } |
|||
], |
|||
locationCode: [ |
|||
{ required: true, message: '请选择收货单明细', trigger: 'blur' } |
|||
] |
|||
}) |
|||
|
|||
export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas( |
|||
reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '收货日期', |
|||
field: 'currentDeliveryDate', |
|||
isTable: true, |
|||
formatter: dateFormatter, |
|||
detail: { |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|||
}, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 180 |
|||
}, |
|||
form: { |
|||
component: 'DatePicker', |
|||
componentProps: { |
|||
style: {width:'100%'}, |
|||
type: 'datetime', |
|||
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|||
valueFormat: 'x', |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '收货单号', |
|||
field: 'receiptNumber', |
|||
sort: 'custom', |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '发货单号', |
|||
field: 'asnNumber', |
|||
sort: 'custom', |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '订单号', |
|||
field: 'poNumber', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '订单行', |
|||
field: 'poLine', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '批次', |
|||
field: 'batch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
} |
|||
]) |
|||
) |
|||
|
|||
|
|||
|
|||
/** |
|||
* @returns {Array} 采购退货申请子表 |
|||
*/ |
|||
export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '批次', |
|||
field: 'batch', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '状态', |
|||
field: 'inventoryStatus', |
|||
dictType: DICT_TYPE.INVENTORY_STATUS, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
type: 'Select', |
|||
disabled:true |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '隔离库存数量', |
|||
field: 'inventoryBalance', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'InputNumber', |
|||
componentProps: { |
|||
disabled: true, |
|||
min: 0, |
|||
precision: 6 |
|||
} |
|||
}, |
|||
tableForm:{ |
|||
disabled:true, |
|||
hidden:false,//控制列是否展示
|
|||
type:'InputNumber', |
|||
min:0, |
|||
precision: 6 |
|||
}, |
|||
hiddenInMain: true, |
|||
isTable: false, |
|||
isDetail: false, |
|||
}, |
|||
{ |
|||
label: '退货数量', |
|||
field: 'qty', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
form: { |
|||
component: 'InputNumber', |
|||
componentProps: { |
|||
min: 0, |
|||
precision: 6, |
|||
disabled:false |
|||
} |
|||
}, |
|||
isTable:false, |
|||
isTableForm:true, |
|||
tableForm:{ |
|||
type:'InputNumber', |
|||
min:0, |
|||
precision: 6 |
|||
} |
|||
}, |
|||
{ |
|||
label: '退货原因', |
|||
field: 'reasonType', |
|||
dictType: DICT_TYPE.RETURN_REASON_TYPE, |
|||
dictClass: 'string', |
|||
// isSearch: true,
|
|||
isTable: true, |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
tableForm:{ |
|||
type: 'Select', |
|||
}, |
|||
form: { |
|||
componentProps:{ |
|||
disabled:true |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
label: '退货原因描述', |
|||
field: 'reason', |
|||
sort: 'custom', |
|||
table: { |
|||
width: 150 |
|||
}, |
|||
isTable: false, |
|||
}, |
|||
{ |
|||
label: '操作', |
|||
hiddenInMain:true, |
|||
field: 'action', |
|||
isDetail: false, |
|||
isForm: false , |
|||
table: { |
|||
width: 150, |
|||
fixed: 'right' |
|||
}, |
|||
isTableForm:false, |
|||
} |
|||
])) |
|||
|
|||
//表单校验
|
|||
export const PurchasereturnRequestDetailRulesNew = reactive({ |
|||
}) |
|||
|
|||
|
@ -0,0 +1,42 @@ |
|||
<template> |
|||
<div style="height:100%;overflow-y: auto;"> |
|||
<ContentWrap > |
|||
<Annex |
|||
:annexData="reportAnnex" |
|||
:showDownload = "true" |
|||
:showPreview="true" |
|||
:hiddenDelete = "true" |
|||
:upData="{ |
|||
tableId:30, |
|||
tableName:'SupplierdeliverInspectionDetail' |
|||
}" |
|||
:key="99" |
|||
:showAddBtn="false" |
|||
/> |
|||
</ContentWrap> |
|||
|
|||
</div> |
|||
|
|||
</template> |
|||
<script lang="ts" setup> |
|||
|
|||
// 查看履历表 supplierResume |
|||
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|||
|
|||
import Annex from '@/components/Annex/src/Annex.vue' |
|||
defineOptions({ name: 'supplierResume' }) |
|||
const route = useRoute() // 路由 |
|||
const reportAnnex = reactive({ |
|||
annexList: [] |
|||
}) |
|||
|
|||
onMounted(() => { |
|||
getAnnexList() |
|||
}) |
|||
const getAnnexList = async () => { |
|||
let res = await SupplierdeliverRequestMainApi.querySupplierResume(route.query.asnNumber as string) |
|||
reportAnnex.annexList = res.fileList |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped></style> |
|||
|
@ -0,0 +1,464 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="SupplierinvoiceRecordMain.allSchemas.searchSchema" @search="searchList" @reset="searchList" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="SupplierinvoiceRecordMain.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table ref="tableRef" |
|||
:selection="true" |
|||
v-clientTable |
|||
: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" |
|||
@getSelectionRows="getSelectionRows" |
|||
> |
|||
<template #number="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, t('ts.单据号'), row.number)"> |
|||
<span>{{ row.number }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #differencePrice="{row}"> |
|||
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span> |
|||
</template> |
|||
<template #action="{ row,$index }"> |
|||
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:发票回转 --> |
|||
<!-- |
|||
:apiUpdate="BasicEamProductionlineApi.updateBasicEamProductionline" |
|||
:apiCreate="BasicEamProductionlineApi.createBasicEamProductionline" |
|||
@searchTableSuccess="searchTableSuccess" --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="submitForm" |
|||
:rules="SupplierinvoiceRecordMainTransferRules" |
|||
:formAllSchemas="SupplierinvoiceRecordMainTransfer.allSchemas" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
|
|||
<!-- 详情 --> |
|||
<Detail |
|||
ref="detailRef" |
|||
:annexTable="[{ |
|||
label: t('ts.合同附件'), |
|||
prop: 'Annex', |
|||
tableName:'contract', |
|||
showDownload:true, |
|||
showPreview: true, |
|||
hiddenDelete:true, |
|||
hiddenUpload:true, |
|||
queryParams:[{ |
|||
queryField:'tableId', |
|||
rowField:'annexMasterId', |
|||
}], |
|||
},{ |
|||
label: t('ts.发票附件'), |
|||
prop: 'Annex', |
|||
tableName:'invoice', |
|||
showDownload:true, |
|||
showPreview: true, |
|||
hiddenDelete:true, |
|||
hiddenUpload:true, |
|||
queryParams:[{ |
|||
queryField:'tableId', |
|||
rowField:'annexMasterId', |
|||
}], |
|||
},{ |
|||
label: t('ts.货运单附件'), |
|||
prop: 'Annex', |
|||
tableName:'waybill', |
|||
showDownload:true, |
|||
hiddenDelete:true, |
|||
queryParams:[{ |
|||
queryField:'tableId', |
|||
rowField:'annexMasterId', |
|||
}], |
|||
},{ |
|||
label: t('ts.其他附件'), |
|||
prop: 'Annex', |
|||
tableName:'invoiceOther', |
|||
showDownload:true, |
|||
hiddenDelete:true, |
|||
queryParams:[{ |
|||
queryField:'tableId', |
|||
rowField:'annexMasterId', |
|||
}], |
|||
}]" |
|||
:annexAlias="{ |
|||
hidden:true, |
|||
label:t('ts.其他附件'), |
|||
showDownload:true, |
|||
hiddenDelete:true |
|||
}" |
|||
:otherHeadButttonData="[{ |
|||
label: t('ts.打印明细'), |
|||
name: 'printing', |
|||
hide: false, |
|||
type: 'primary', |
|||
// icon: 'ep:operation', |
|||
color: '', |
|||
float:'left', |
|||
hasPermi: '' |
|||
},{ |
|||
label: t('ts.导出明细'), |
|||
name: 'export-detail', |
|||
hide: false, |
|||
type: 'primary', |
|||
// icon: 'ep:operation', |
|||
color: '', |
|||
float:'left', |
|||
hasPermi: '' |
|||
}]" |
|||
:isBasic="false" |
|||
direction="horizontal" |
|||
:column="3" |
|||
:allSchemas="SupplierinvoiceRecordDetailMain.allSchemas" |
|||
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas" |
|||
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules" |
|||
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage" |
|||
@buttonBaseClick="detailButtonBaseClick" |
|||
> |
|||
<!-- 价税合计尾差 --> |
|||
<template #Descriptions_totalTaxDiffAmount="{ row }"> |
|||
<span>{{row['totalTaxDiffAmount']}}<span class="red-text"> (含返利合计:{{ row['rebateTotal'] }})</span></span> |
|||
</template> |
|||
<!-- 未税尾差 --> |
|||
<template #Descriptions_beforeTaxDiffAmount="{ row }"> |
|||
<span>{{row['beforeTaxDiffAmount']}}<span class="red-text"> (含返利未税:{{ row['discountAmount1'] }})</span></span> |
|||
</template> |
|||
<!-- 税额尾差 --> |
|||
<template #Descriptions_taxAmountDiff="{ row }"> |
|||
<span>{{row['taxAmountDiff']}}<span class="red-text"> (含返利税额:{{ row['rebateTax'] }})</span></span> |
|||
</template> |
|||
<template #differencePrice="{row}"> |
|||
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span> |
|||
</template> |
|||
</Detail> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { SupplierinvoiceRecordMain,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules,SupplierinvoiceRecordDetailMain,SupplierinvoiceRecordMainTransfer,SupplierinvoiceRecordMainTransferRules } from './purchaseDiscreteOrderMain.data' |
|||
import * as SupplierinvoiceRecordMainApi from '@/api/wms/supplierinvoiceRecordMain' |
|||
import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|||
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' |
|||
import * as PackageApi from "@/api/wms/package"; |
|||
import {getAccessToken} from "@/utils/auth"; |
|||
import {getJmreportBaseUrl} from "@/utils/systemParam"; |
|||
import { formatDate } from '@/utils/formatTime' |
|||
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|||
import dayjs from 'dayjs' |
|||
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' |
|||
|
|||
const { loadStart, loadDone } = usePageLoading() |
|||
// 采购离散订单查看 |
|||
defineOptions({ name: 'purchaseDiscreteOrderMain' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(SupplierinvoiceRecordMain.allSchemas.tableColumns) |
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: SupplierinvoiceRecordMainApi.getSupplierinvoiceRecordMainPage // 分页接口 |
|||
}) |
|||
tableObject.params.isLS = 1 |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-record-main:export'}), // 导出 |
|||
defaultButtons.mainLisSelectiontPointBtn(null), // 批量打印 |
|||
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 == 'export') { // 导出 |
|||
handleExport() |
|||
}else if (val=='selection_point'){// 批量打印 |
|||
handleSelectionPoint() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|||
searchFormClick({ |
|||
filters: tableObject.params.filters |
|||
}) |
|||
} else { |
|||
tableObject.params.isLS = 1 |
|||
getList() |
|||
} |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
}else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
const BASE_URL = getJmreportBaseUrl() |
|||
const srcPoint = ref(BASE_URL + '/jmreport/view/970966724605804544?token=' + getAccessToken()) |
|||
const handleSelectionPoint = async ()=>{ |
|||
let rows:any = [] |
|||
selectionRows.value.forEach(item=>{ |
|||
rows = [...rows,...item.selectionRows.map(item1=>item1.id)] |
|||
}) |
|||
if(rows.length==0){ |
|||
message.warning('至少选择一条数据!') |
|||
return |
|||
} |
|||
console.log('批量打印',rows.join(',')) |
|||
window.open(srcPoint.value+'&ids='+rows.join(',')) |
|||
} |
|||
|
|||
|
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = (row,$index) => { |
|||
return [ |
|||
{ |
|||
label: t('ts.未读'), |
|||
name: 'unread', |
|||
type: 'primary', |
|||
icon: '', |
|||
color: '', |
|||
hasPermi: '', |
|||
hide: row.isRead==1, |
|||
link: true, // 文本展现按钮 |
|||
}, |
|||
{ |
|||
label: t('ts.已读'), |
|||
name: 'read', |
|||
type: 'info', |
|||
icon: '', |
|||
color: '', |
|||
hasPermi: '', |
|||
hide: row.isRead!=1, |
|||
link: true, // 文本展现按钮 |
|||
}, |
|||
{ |
|||
label: t('ts.查看明细'), |
|||
name: 'open_detail', |
|||
type: 'primary', |
|||
icon: '', |
|||
color: '', |
|||
hasPermi: '', |
|||
link: true, // 文本展现按钮 |
|||
} |
|||
] |
|||
} |
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'open_detail') { // 查看明细 |
|||
openDetail(row, '单据号', row.number) |
|||
}else if(val == 'unread'){ |
|||
//未读走接口 |
|||
await SupplierinvoiceRequestMainApi.getDiscreteIsRead({id:row.id}) |
|||
getList() |
|||
}else if(val == 'read'){ |
|||
//已读 |
|||
|
|||
} |
|||
} |
|||
|
|||
//发票回转 |
|||
const submitForm = async (formType, data) => { |
|||
data.reverseInvoiceJournal = 'APINVCOR' |
|||
data.adjustmentJournal = 'APADJ' |
|||
console.log('发票回转',formType, data) |
|||
loadStart() |
|||
try{ |
|||
await SupplierinvoiceRecordMainApi.reverseSupplierinvoiceRecordMain(data) |
|||
message.success(t('ts.发票回转成功')) |
|||
basicFormRef.value.dialogVisible = false |
|||
buttonBaseClick('refresh', null) |
|||
} finally { |
|||
loadDone() |
|||
} |
|||
} |
|||
|
|||
// 获取部门 用于详情 部门回显 |
|||
const { wsCache } = useCache() |
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const clicKRowId = ref(); |
|||
const openDetail = async (row: any, titleName: any, titleValue: any) => { |
|||
console.log('openDetail',row) |
|||
clicKRowId.value = row.id |
|||
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|||
//获取申请中的masterId |
|||
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({ |
|||
getListApi: SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage // 分页接口 |
|||
}) |
|||
const { getList:requestGetList } = requestTableMethods |
|||
requestTableObject.params.number = row.requestNumber |
|||
await requestGetList() |
|||
if(requestTableObject.tableList.length>0){ |
|||
row.annexMasterId = requestTableObject.tableList[0].masterId |
|||
} |
|||
|
|||
|
|||
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|||
detailRef.value.openDetail(row, titleName, titleValue,"recordSupplierinvoiceMain") |
|||
} |
|||
const searchList = (model)=>{ |
|||
if(model.postingDate&&model.postingDate.length>1){ |
|||
model.postingDate[1] = model.postingDate[1].replace('00:00:00','23:59:59') |
|||
} |
|||
selectionRows.value = [] |
|||
let model1 = { |
|||
...model, |
|||
statuss: model.status.join(',')?model.status.join(','):'' |
|||
} |
|||
model1.isLS = 1 |
|||
delete model1.status |
|||
setSearchParams(model1) |
|||
} |
|||
const selectionRows = ref<any>([]) |
|||
const tableRef = ref() |
|||
const getSelectionRows = (currentPage,currentPageSelectionRows) => { |
|||
console.log("getSelectionRows",currentPage,currentPageSelectionRows) |
|||
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage) |
|||
if(currentRows){ |
|||
currentRows.selectionRows = currentPageSelectionRows |
|||
}else{ |
|||
selectionRows.value.push({ |
|||
currentPage, |
|||
selectionRows:currentPageSelectionRows |
|||
}) |
|||
} |
|||
} |
|||
/** 导出按钮操作 */ |
|||
const handleExport = async () => { |
|||
let rows:any = [] |
|||
selectionRows.value.forEach(item=>{ |
|||
rows = [...rows,...item.selectionRows.map(item1=>item1.number)] |
|||
}) |
|||
if (!tableObject.params.createTime || tableObject.params.createTime && tableObject.params. createTime.length == 0) { |
|||
delete tableObject.params.createTime |
|||
} |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
loadStart() |
|||
const excelTitle = ref(route.meta.title) |
|||
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordMain({...tableObject.params,checkNums:rows}) |
|||
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|||
} catch { |
|||
} finally { |
|||
loadDone() |
|||
} |
|||
} |
|||
|
|||
|
|||
const detailButtonBaseClick = (val, item) => { |
|||
console.log("点击的按钮",val) |
|||
if(val == 'printing'){ |
|||
// 单据打印 |
|||
handleDocumentPrint(clicKRowId.value) |
|||
}else if(val === 'export-detail'){ |
|||
console.log("导出明细:",clicKRowId.value) |
|||
handleDetailExport(clicKRowId.value) |
|||
} |
|||
} |
|||
|
|||
// 单据打印 |
|||
const documentSrc = ref(BASE_URL + '/jmreport/view/972639553789239296?token=' + getAccessToken()) |
|||
const handleDocumentPrint = async (id) => { |
|||
window.open(documentSrc.value + '&id=' + id) |
|||
} |
|||
|
|||
/** 导出明细按钮操作 */ |
|||
const exportLoadingDetail = ref(false) // 导出的加载中 |
|||
const handleDetailExport = async (masterId) => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出导出明细 |
|||
exportLoadingDetail.value = true |
|||
let params = { |
|||
masterId: masterId |
|||
} |
|||
const excelTitle = ref(route.meta.title) |
|||
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordDetail(params) |
|||
download.excel(data, `【${excelTitle.value}明细】【${formatDate(new Date())}】.xlsx`) |
|||
} catch { |
|||
} finally { |
|||
exportLoadingDetail.value = false |
|||
} |
|||
} |
|||
|
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: [...searchData.filters,{ |
|||
action : "==", |
|||
column: "isLS", |
|||
value: 1, |
|||
}] |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.is-red{ |
|||
border-radius:var(--el-border-radius-base); |
|||
border:1px solid var(--el-color-danger); |
|||
box-shadow: 0 0 0 1px var(--el-color-danger) inset; |
|||
} |
|||
.red-text{ |
|||
color:var(--el-color-danger); |
|||
font-weight:700; |
|||
} |
|||
</style> |
|||
|
File diff suppressed because it is too large
Loading…
Reference in new issue