zhaoxiaohai 3 年之前
父节点
当前提交
7a6cec81a6
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      pages/submission/details.js

+ 7 - 2
pages/submission/details.js

@@ -38,6 +38,7 @@ Page({
                 "sat_submiteditmodelid": options.id
             }
         }).then(res => {
+            console.log(res)
             /* 处理附件 */
             let fileList = res.data.attinfos.filter(v => v.usetype != 'cover');
             res.data.attinfos = MFT.fileList(fileList);
@@ -150,10 +151,14 @@ Page({
 
     /* 提交明细 */
     submit() {
-        if (!this.data.content) return wx.showToast({
+        if (!this.data.content && this.data.detailsData.istextrequired == 1) return wx.showToast({
             title: '您还未输入提报内容',
             icon: "none"
-        })
+        });
+        if (this.data.submiteditData.attinfos.length == 0 && this.data.detailsData.isattrequired == 1) return wx.showToast({
+            title: '您还未上传附件',
+            icon: "none"
+        });
         if (this.data.loading) return wx.showToast({
             title: '正在提交中,请勿重新提交',
             icon: "none"