Browse Source

供应商单据打印修改

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
4009c183eb
  1. 14
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  2. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts
  3. 10
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

14
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -66,6 +66,7 @@ import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules,Supplierdelive
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getAccessToken } from '@/utils/auth'
// //
defineOptions({ name: 'SupplierdeliverRecordMain' }) defineOptions({ name: 'SupplierdeliverRecordMain' })
@ -128,13 +129,17 @@ const buttonBaseClick = (val, item) => {
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), // defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), //
] defaultButtons.mainListDocumentPrintBtn({}) //
]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if(val == 'generateApplication'){ if(val == 'generateApplication'){
handlerCreatePurchasereceiptRequest(row.number) handlerCreatePurchasereceiptRequest(row.number)
}else if (val == 'documentPrint') {
//
handleDocumentPrint(row.id)
} }
} }
@ -151,6 +156,13 @@ const handlerCreatePurchasereceiptRequest = async (number:string) => {
} }
} }
//
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts

@ -327,7 +327,7 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 160, width: 300,
fixed: 'right' fixed: 'right'
}, },
} }

10
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -261,7 +261,7 @@ const butttondata = (row) => {
link: true // link: true //
}, },
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), // defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), //
defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // //defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), //
// //
{ {
label: '发货', label: '发货',
@ -472,11 +472,9 @@ const genRecords = async (id: number) => {
tableObject.loading = true tableObject.loading = true
// //
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => {
if(!res){ message.success(t('处理成功!'))
message.success(t('处理成功!')) //
// handleDocumentPrint(res)
handleDocumentPrint(id)
}
}) })
// //
getList() getList()

Loading…
Cancel
Save