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 <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="formsSuccess" @success="formsSuccess"
:sumFormDataByForm="
(formRef, formModel) => {
const { claimAddress } = formModel
formRef.value.setValues({
installPackageUrl: claimAddress
})
}
"
:rules="Q2Rules" :rules="Q2Rules"
:formAllSchemas="Q2.allSchemas" :formAllSchemas="Q2.allSchemas"
:apiUpdate="Q2Api.updateQ2" :apiUpdate="Q2Api.updateQ2"
@ -446,7 +454,19 @@ const handleFinish = async (id: number) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { 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){ if(!row || !row.claimAmount){
nextTick(() => { nextTick(() => {
basicFormRef.value.formRef.setValues({ basicFormRef.value.formRef.setValues({
@ -463,7 +483,26 @@ const openForm = (type: string, row?: any) => {
disbursementAmount: 0 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 // 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: '状态', label: '状态',
field: 'status', field: 'status',

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

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

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

@ -562,7 +562,10 @@ const butttondata = (row, $index) => {
defaultButtons.mainListEditBtn({ defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:purchasereturn-request-main:update' hasPermi: 'wms:purchasereturn-request-main:update'
}) // }), //
defaultButtons.mainListDocumentPrintBtn({
hide: isShowMainButton(row, ['8'])
})//
// { // {
// label: '', // label: '',
// name: 'ssbq', // name: 'ssbq',
@ -608,12 +611,23 @@ const buttonTableClick = async (val, row) => {
genLabelId.value = row.masterId genLabelId.value = row.masterId
await getDetailList() await getDetailList()
formLabelRef.value.open('create', row, null, 'createLabel') // createLabel 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) 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 formRef = ref()
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {

Loading…
Cancel
Save