Browse Source

Q2通知单需求修改 HL-5385

hella_online_20240823
parent
commit
ec86d40b90
  1. 41
      src/views/qms/inspectionQ2/index.vue
  2. 21
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  3. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue
  4. 18
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

41
src/views/qms/inspectionQ2/index.vue

@ -49,6 +49,14 @@
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:sumFormDataByForm="
(formRef, formModel) => {
const { claimAddress } = formModel
formRef.value.setValues({
installPackageUrl: claimAddress
})
}
"
:rules="Q2Rules"
:formAllSchemas="Q2.allSchemas"
:apiUpdate="Q2Api.updateQ2"
@ -446,7 +454,19 @@ const handleFinish = async (id: number) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
if (row && row.claimAddress?.trim()) {
row.filePathList = row.claimAddress.split(',')
}
if (row && row.filePathList && row.filePathList.length > 0) {
row.filePathListView = row.filePathList.map((item) => {
return {
name: item,
url: item
}
})
}
if(!row || !row.claimAmount){
nextTick(() => {
basicFormRef.value.formRef.setValues({
@ -463,7 +483,26 @@ const openForm = (type: string, row?: any) => {
disbursementAmount: 0
})
})
const currentTime = new Date().getTime()
const fileId = Q2.allSchemas.formSchema.find((item) => item.field == 'fileId')
const uploadFile = Q2.allSchemas.formSchema.find(
(item) => item.field == 'claimAddress'
)
if (fileId) {
fileId['value'] = currentTime
}
if (uploadFile) {
uploadFile['componentProps']['upData']['tableId'] = currentTime
uploadFile['componentProps']['modelValue'] = []
}
}
else if (type == 'update') {
const uploadFile = Q2.allSchemas.formSchema.find(
(item) => item.field == 'claimAddress'
)
uploadFile['componentProps']['modelValue'] = row.filePathListView
}
basicFormRef.value.open(type, row)
}
// form

21
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -596,7 +596,26 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '索赔单附件',
field: 'claimAddress',
sort: 'custom',
isTable: true,
table: {
width: 150
},
form: {
component: 'UploadFile',
componentProps: {
upData: {
tableName: 'basicInspectionQ2',
tableId: ''
},
fileType: ['doc', 'xls', 'ppt', 'txt'],
modelValue: []
}
}
},
{
label: '状态',
field: 'status',

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

@ -143,15 +143,15 @@ const butttondata = (row,$index) => {
const buttonTableClick = async (val, row) => {
if (val == 'documentPrint') {
//
handleDocumentPrint(row.id)
handleDocumentPrint(row.requestNumber,row.itemCode)
}
}
//
const BASE_URL = getJmreportBaseUrl()
const documentSrc = ref(BASE_URL + '/jmreport/view/920874172025987072?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
const handleDocumentPrint = async (requestNumber,itemCode) => {
window.open(documentSrc.value + '&requestNumber=' + requestNumber +'&itemCode=' + itemCode)
}
//
const { wsCache } = useCache()

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

@ -562,7 +562,10 @@ const butttondata = (row, $index) => {
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:purchasereturn-request-main:update'
}) //
}), //
defaultButtons.mainListDocumentPrintBtn({
hide: isShowMainButton(row, ['8'])
})//
// {
// label: '',
// name: 'ssbq',
@ -608,12 +611,23 @@ const buttonTableClick = async (val, row) => {
genLabelId.value = row.masterId
await getDetailList()
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
} else if (val == 'point') {
}
else if (val == 'documentPrint') {
//
handleDocumentPrint(row.number,row.itemCode)
}else if (val == 'point') {
//
labelPrint(row)
}
}
//
const BASE_URL2 = getJmreportBaseUrl()
const documentSrc = ref(BASE_URL2 + '/jmreport/view/920874172025987072?token=' + getAccessToken())
const handleDocumentPrint = async (number,itemCode) => {
window.open(documentSrc.value + '&requestNumber=' + number +'&itemCode=' + itemCode)
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {

Loading…
Cancel
Save