|
|
@ -77,6 +77,7 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
import { SupplierdeliverRequestMain,SupplierdeliverRequestMainRules,SupplierdeliverRequestDetail,SupplierdeliverRequestDetailRules } from './supplierdeliverRequestMain.data' |
|
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
@ -104,14 +105,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
if (type == 'tableForm') { |
|
|
|
// 明细查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
row['itemCode'] = val[0]['code'] |
|
|
|
row['poNumber'] = val[0]['number'] |
|
|
|
row['poLine'] = val[0]['lineNumber'] |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['supplierCode'] = val[0]['code'] |
|
|
|
setV['ppNumber'] = val[0]['number'] |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
@ -121,9 +117,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['itemCode'] = val[0]['code'] |
|
|
|
setV['poNumber'] = val[0]['number'] |
|
|
|
setV['poLine'] = val[0]['lineNumber'] |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
@ -192,6 +185,7 @@ const butttondata = (row) => { |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierdeliver-request-main:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierdeliver-request-main:delete'}), // 删除 |
|
|
|
defaultButtons.mainListPointBtn(null), // 打印 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -213,6 +207,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} else if (val == 'point') { // 打印 |
|
|
|
handlePoint(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -258,6 +254,14 @@ const handleExport = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) |
|
|
|
console.log(src) |
|
|
|
// 打印 |
|
|
|
const handlePoint = async (id) => { |
|
|
|
window.open(src.value+'&id='+id) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* tableForm方法 |
|
|
|
*/ |
|
|
|