Kaynağa Gözat

非公出协单增加协单人非空校验

dev01 1 hafta önce
ebeveyn
işleme
7eb4da0ced

+ 5 - 0
src/pages/applyDepart/publicContent.jsx

@@ -984,6 +984,11 @@ class PublicContent extends Component {
                 return;
               }
 
+              if (type == 5 && (!this.state.cList.length || this.state.coorderList.length)) {
+                Taro.showToast({ title: "请选择协单人", icon: "none" });
+                return;
+              }
+
               if (type == 5 && !this.state.assistType) {
                 Taro.showToast({ title: "请选择协单类型", icon: "none" });
                 return

+ 5 - 0
src/pages/egressDetails/publicContent.jsx

@@ -1283,6 +1283,11 @@ class PublicContent extends Component {
                     return;
                   }
 
+                  if ([5, 6].indexOf(this.props.dtails.type) > -1 && (!this.state.cList.length || this.state.coorderList.length)) {
+                    Taro.showToast({ title: "请选择协单人", icon: "none" });
+                    return;
+                  }
+
                   if ([5, 6].indexOf(this.props.dtails.type) > -1 && !this.state.assistType) {
                     Taro.showToast({ title: "请选择协单类型", icon: "none" });
                     return;