diff --git a/server.xml b/server.xml new file mode 100644 index 0000000..2be2bbc --- /dev/null +++ b/server.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server.xml b/server.xml new file mode 100644 index 0000000..2be2bbc --- /dev/null +++ b/server.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index 88ff0a5..68d4e20 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -15,7 +15,7 @@ } // 取消审批 -export function cancelApproval(data: { processId?: string; comments: string }) { +export function cancelApproval(data: { processInstanceId?: string; comments: string }) { return request({ url: '/approval/operate/revoke', method: 'post', diff --git a/server.xml b/server.xml new file mode 100644 index 0000000..2be2bbc --- /dev/null +++ b/server.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index 88ff0a5..68d4e20 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -15,7 +15,7 @@ } // 取消审批 -export function cancelApproval(data: { processId?: string; comments: string }) { +export function cancelApproval(data: { processInstanceId?: string; comments: string }) { return request({ url: '/approval/operate/revoke', method: 'post', diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue index f74783d..2b57a17 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue @@ -1,13 +1,532 @@ diff --git a/server.xml b/server.xml new file mode 100644 index 0000000..2be2bbc --- /dev/null +++ b/server.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index 88ff0a5..68d4e20 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -15,7 +15,7 @@ } // 取消审批 -export function cancelApproval(data: { processId?: string; comments: string }) { +export function cancelApproval(data: { processInstanceId?: string; comments: string }) { return request({ url: '/approval/operate/revoke', method: 'post', diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue index f74783d..2b57a17 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue @@ -1,13 +1,532 @@ diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts index e397b7e..d9ed9d3 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -22,3 +22,37 @@ deliverTime: string // 交接时间 remark: string // 备注 } + +// 详情表单 +export interface IReceiptDetail { + orderCode: string // 委托书编号 + certificationCompany: string // 证书单位名称 + certificationCompanyFex: string // 传真 + certificationCompanyEmail: string // 邮编 + reciever: string // 接收人 + recieverPhone: string // 接收人电话 + certificationCompanyAddress: string // 证书单位地址 + customerNo: string // 委托方代码 + customerId: string // 委托方id + customerName: string // 委托方名称 + fax: string // 委托方邮编 + postalCode: string // 委托邮编 + customerAddress: string // 委托方地址 + deliverer: string // 送检人 + delivererTel: string // 送样人联系方式 + orderTime: string // 委托日期 + requireOverTime: string // 完成时间 + deliverTime: string // 交接时间 + measureCategory: string // 检校类别 + secrecy: string // 保密要求 + appearance: string // 样品外观 + relyFile: string // 依据文件 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/server.xml b/server.xml new file mode 100644 index 0000000..2be2bbc --- /dev/null +++ b/server.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index 88ff0a5..68d4e20 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -15,7 +15,7 @@ } // 取消审批 -export function cancelApproval(data: { processId?: string; comments: string }) { +export function cancelApproval(data: { processInstanceId?: string; comments: string }) { return request({ url: '/approval/operate/revoke', method: 'post', diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue index f74783d..2b57a17 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue @@ -1,13 +1,532 @@ diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts index e397b7e..d9ed9d3 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -22,3 +22,37 @@ deliverTime: string // 交接时间 remark: string // 备注 } + +// 详情表单 +export interface IReceiptDetail { + orderCode: string // 委托书编号 + certificationCompany: string // 证书单位名称 + certificationCompanyFex: string // 传真 + certificationCompanyEmail: string // 邮编 + reciever: string // 接收人 + recieverPhone: string // 接收人电话 + certificationCompanyAddress: string // 证书单位地址 + customerNo: string // 委托方代码 + customerId: string // 委托方id + customerName: string // 委托方名称 + fax: string // 委托方邮编 + postalCode: string // 委托邮编 + customerAddress: string // 委托方地址 + deliverer: string // 送检人 + delivererTel: string // 送样人联系方式 + orderTime: string // 委托日期 + requireOverTime: string // 完成时间 + deliverTime: string // 交接时间 + measureCategory: string // 检校类别 + secrecy: string // 保密要求 + appearance: string // 样品外观 + relyFile: string // 依据文件 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 0c41a5a..feb3507 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -71,8 +71,14 @@ // 点击编辑/详情 const handleEdit = (row: IReceiptList, pageType: 'edit' | 'detail') => { - $router.push(`/sample/${pageType}/${row.id}`) + $router.push(`/schedule/receipt/${pageType}/${row.id}`) } + +// 点击新建 +const add = () => { + $router.push('/schedule/receipt/add') +} + // 点击取消 const handleCancle = (id: string) => { @@ -233,7 +239,6 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index 88ff0a5..68d4e20 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -15,7 +15,7 @@ } // 取消审批 -export function cancelApproval(data: { processId?: string; comments: string }) { +export function cancelApproval(data: { processInstanceId?: string; comments: string }) { return request({ url: '/approval/operate/revoke', method: 'post', diff --git a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue index f74783d..2b57a17 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptEdit.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptEdit.vue @@ -1,13 +1,532 @@ diff --git a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts index e397b7e..d9ed9d3 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts +++ b/src/views/business/schedule/interchangeReceipt/receiptList-interface.ts @@ -22,3 +22,37 @@ deliverTime: string // 交接时间 remark: string // 备注 } + +// 详情表单 +export interface IReceiptDetail { + orderCode: string // 委托书编号 + certificationCompany: string // 证书单位名称 + certificationCompanyFex: string // 传真 + certificationCompanyEmail: string // 邮编 + reciever: string // 接收人 + recieverPhone: string // 接收人电话 + certificationCompanyAddress: string // 证书单位地址 + customerNo: string // 委托方代码 + customerId: string // 委托方id + customerName: string // 委托方名称 + fax: string // 委托方邮编 + postalCode: string // 委托邮编 + customerAddress: string // 委托方地址 + deliverer: string // 送检人 + delivererTel: string // 送样人联系方式 + orderTime: string // 委托日期 + requireOverTime: string // 完成时间 + deliverTime: string // 交接时间 + measureCategory: string // 检校类别 + secrecy: string // 保密要求 + appearance: string // 样品外观 + relyFile: string // 依据文件 +} + +// 字典 +export interface dictType { + id: string + name: string + value: string | number + label?: string // 基本信息添加的信息名称 +} diff --git a/src/views/business/schedule/interchangeReceipt/receiptList.vue b/src/views/business/schedule/interchangeReceipt/receiptList.vue index 0c41a5a..feb3507 100644 --- a/src/views/business/schedule/interchangeReceipt/receiptList.vue +++ b/src/views/business/schedule/interchangeReceipt/receiptList.vue @@ -71,8 +71,14 @@ // 点击编辑/详情 const handleEdit = (row: IReceiptList, pageType: 'edit' | 'detail') => { - $router.push(`/sample/${pageType}/${row.id}`) + $router.push(`/schedule/receipt/${pageType}/${row.id}`) } + +// 点击新建 +const add = () => { + $router.push('/schedule/receipt/add') +} + // 点击取消 const handleCancle = (id: string) => { @@ -233,7 +239,6 @@ - = ref({ @@ -32,7 +31,7 @@ customerId: '', // 委托方id customerName: '', // 委托方名称 phone: '', // 委托方电话 - companyAddress: '', // 委托方地址 + customerAddress: '', // 委托方地址 remark: '', // 备注 minioFileName: '', // 附件 isUrgent: 0, // 是否加急 0否 1是 @@ -56,8 +55,19 @@ { text: '电源电压', value: 'powerVoltage', align: 'center', required: true }, { text: '检定项目', value: 'mesureContent', align: 'center', required: true }, { text: '备注', value: 'remark', align: 'center' }, - { text: '附件说明', value: 'appendixState', align: 'center' }, + { text: '附件说明', value: 'appendixDescn', align: 'center' }, ]) + +// 自定义校验规则--要求检完时间不能比预计送达时间大 +const requireOverTimeValid = (rule: any, value: any, callback: any) => { + if (!value) { + return callback(new Error('要求检完时间不能为空')) + } + if (new Date(dataForm.value.planDeliverTime).getTime() >= new Date(dataForm.value.requireOverTime).getTime()) { + return callback(new Error('要求检完时间应大于预计送达时间')) + } + callback() +} // 校验规则 const rules = reactive({ deliverer: [{ required: true, message: '要求送样人不能为空', trigger: 'blur' }], @@ -65,10 +75,10 @@ customerNo: [{ required: true, message: '要求委托方代码不能为空', trigger: 'change' }], customerName: [{ required: true, message: '要求委托方名称不能为空', trigger: 'change' }], phone: [{ required: true, message: '要求委托方电话不能为空', trigger: 'change' }], - companyAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], + customerAddress: [{ required: true, message: '要求委托方地址不能为空', trigger: 'change' }], orderTime: [{ type: 'date', required: true, message: '要求委托日期不能为空', trigger: 'change' }], planDeliverTime: [{ type: 'date', required: true, message: '要求预计送达时间不能为空', trigger: 'change' }], - requireOverTime: [{ type: 'date', required: true, message: '要求检完时间不能为空', trigger: 'change' }], + requireOverTime: [{ type: 'date', validator: requireOverTimeValid, trigger: 'change' }], certifications: [{ required: true, message: '要求证书类别不能为空', trigger: 'change' }], isUrgent: [{ required: true, message: '要求是否加急不能为空', trigger: 'change' }], }) // 表单验证规则 @@ -146,12 +156,13 @@ // 选好委托方 const confirmCheckout = (val: Array) => { if (val && val.length) { + list.value = [] // 切换委托方时把样品清单置空 const getValue = val[0] dataForm.value.customerNo = getValue.customerNo // 委托方代码 dataForm.value.customerId = getValue.id // 委托方id dataForm.value.customerName = getValue.customerName // 委托方名称 dataForm.value.phone = getValue.phone // 委托方电话 - dataForm.value.companyAddress = getValue.briefName // 委托方地址 + dataForm.value.customerAddress = getValue.fullAddress // 委托方地址 } } @@ -197,7 +208,7 @@ sampleModel: '', // 样品型号 manufacturingNo: '', // 出厂编号 powerVoltage: '', // 电源电压 - appendixState: '', // 附件说明 + appendixDescn: '', // 附件说明 mesureContent: '', // 检定项目 remark: '', // 备注 isEdit: true, // 是否可编辑 @@ -287,13 +298,13 @@ customerSampleInfoList: list.value, } if (pageType.value === 'edit') { // 编辑 - updateOrder(params).then((res) => { + updateOrder(params).then(() => { ElMessage.success('已保存') $router.go(-1) }) } if (pageType.value === 'add') { // 新建 - addOrder(params).then((res) => { + addOrder(params).then(() => { ElMessage.success('已保存') $router.go(-1) }) @@ -309,21 +320,6 @@ popTitle: '委托书详情', // 打印配置页上方的标题 extraHead: '

', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割 preview: false, // 是否启动预览模式,默认是false - previewBeforeOpenCallback() { - console.log('正在加载预览窗口!') - showPrintButton.value = false - }, // 预览窗口打开之前的callback - previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback - beforeOpenCallback() { - showPrintButton.value = false - console.log('开始打印之前!') - }, // 开始打印之前的callback - openCallback() { console.log('执行打印了!') }, // 调用打印时的callback - closeCallback() { - console.log('关闭了打印工具!') - showPrintButton.value = true - }, // 关闭打印的callback(无法区分确认or取消) - clickMounted() { console.log('点击v-print绑定的按钮了!') }, standard: '', extarCss: '', }) @@ -332,6 +328,7 @@ const getInfo = () => { getOrderDetail({ id: infoId.value }).then((res) => { dataForm.value = res.data + dataForm.value.phone = res.data.customerPhone list.value = res.data.customerSampleInfoList }) } @@ -345,14 +342,14 @@