diff --git a/src/views/EquipmentEntryApply/equipmentInput/index.vue b/src/views/EquipmentEntryApply/equipmentInput/index.vue
index 909fcd38..b55a4a44 100644
--- a/src/views/EquipmentEntryApply/equipmentInput/index.vue
+++ b/src/views/EquipmentEntryApply/equipmentInput/index.vue
@@ -127,7 +127,13 @@
新增装备
批量导入
-
+
批量导入图片
@@ -370,13 +376,23 @@
>
上传
- 查看
+ 查看
上传
- 查看
+ 查看
上传
- 查看
+ 查看
上传
- 查看
+ 查看
+ {{ getFeatureValue(row, item.prop) }}
{{ getFeatureValue(row, item.prop) }}
@@ -787,16 +823,19 @@ export default {
'导入结果',
{ dangerouslyUseHTMLString: true },
)
- this.$router.replace({
- query: {
- orderId: response.data,
- isAddVisible: this.isAddVisible,
- isApprovalVisible: this.isApprovalVisible,
- },
- })
- setTimeout(() => {
- this.getList()
- }, 200)
+ this.orderId = response.data
+ this.$router
+ .replace({
+ query: {
+ orderId: response.data,
+ isAddVisible: this.isAddVisible,
+ isApprovalVisible: this.isApprovalVisible,
+ },
+ })
+ .then(() => {
+ console.log('🚀 ~ 导入成功跳转完成')
+ this.getList()
+ })
},
handleFileSuccess2(response, file, fileList) {
this.upload.open2 = false
@@ -927,8 +966,41 @@ export default {
* 处理表单提交
*/
handleSubmit() {
- if (this.isSubmit) return
+ console.log('提交表单')
+ // 判断图片是否上传
+ let hasMissing = false
+ for (const item of this.tableData) {
+ if (!item.appearanceImages?.length) {
+ this.$message({
+ type: 'warning',
+ message: '请上传装备外观附件',
+ })
+ hasMissing = true
+ break
+ }
+
+ if (!item.certificates?.length) {
+ this.$message({
+ type: 'warning',
+ message: '请上传装备合格证附件',
+ })
+ hasMissing = true
+ break
+ }
+
+ if (!item.inspectionReports?.length) {
+ this.$message({
+ type: 'warning',
+ message: '请上传装备检验报告附件',
+ })
+ hasMissing = true
+ break
+ }
+ }
+ if (hasMissing) return
+
this.isSubmit = true
+ if (this.isSubmit) return
const loading = this.$loading()
equipmentSubmitApiNew({ id: this.orderId, status: 0 })
.then((res) => {
@@ -1130,7 +1202,7 @@ export default {
this.download(
`/material-mall/order/zip?orderId=${this.orderId}`,
{},
- `装备信息图片导入模板_${new Date().getTime()}.zip`,
+ `批量导入图片模板_${new Date().getTime()}.zip`,
)
},
async addList() {