Просмотр исходного кода

处理非公出协单人校验bug

dev01 1 неделя назад
Родитель
Сommit
e34f77b93f

+ 2 - 1
src/pages/applyDepart/publicContent.jsx

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

+ 2 - 2
src/pages/egressDetails/publicContent.jsx

@@ -1283,7 +1283,7 @@ class PublicContent extends Component {
                     return;
                   }
 
-                  if ([5, 6].indexOf(this.props.dtails.type) > -1 && (!this.state.cList.length || this.state.coorderList.length)) {
+                  if ([5, 6].indexOf(this.props.dtails.type) > -1 && !this.state.cList.length) {
                     Taro.showToast({ title: "请选择协单人", icon: "none" });
                     return;
                   }
@@ -1310,7 +1310,7 @@ class PublicContent extends Component {
                     Taro.showToast({ title: "请输入预计效果", icon: "none" });
                     return;
                   }
-                  if (this.state.totalDuration === 0) {
+                  if ([5, 6].indexOf(this.props.dtails.type) === -1 && this.state.totalDuration === 0) {
                     Taro.showToast({
                       title: "请选择公出时间,目前设置公出时间不足0.5小时",
                       icon: "none",