فهرست منبع

优化单位采集提交成功逻辑

fanghuisheng 2 سال پیش
والد
کامیت
6046467688

+ 11 - 10
src/pages/business/mhxf/unitInfoCollection/index.vue

@@ -203,8 +203,8 @@
                   <u-checkbox :customStyle="{ marginBottom: '8px' }" label="气体灭火系统" :name="4"> </u-checkbox>
                   <u-checkbox :customStyle="{ marginBottom: '8px' }" label="干粉灭火系统" :name="5"> </u-checkbox>
                   <u-checkbox :customStyle="{ marginBottom: '8px' }" label="其他" :name="6"> </u-checkbox>
+                  <u-input v-if="li.baseBuild.otherSystem.includes(6)" v-model="li.baseBuild.otherFacilities" placeholder="请输入消防设施名称" border="none" />
                 </u-checkbox-group>
-                <u-input v-model="li.baseBuild.otherFacilities" placeholder="请输入消防设施名称" border="none" />
               </u-form-item>
 
               <view>
@@ -550,7 +550,7 @@ const dataList = reactive({
     companyName: [
       {
         required: true,
-        message: "请输入单位名称",
+        message: "请输入营业执照单位名称",
         trigger: ["blur", "change"],
       },
     ],
@@ -837,6 +837,7 @@ const uForm = ref(null);
 const uForm1 = ref(null);
 const newCompanyName = ref("");
 const successBool = ref(false);
+const scanBool = ref(false);
 
 /**
  * @单位名称
@@ -895,8 +896,6 @@ function handleSubmit(value) {
  * @api提交
  */
 function handleSubmitApi(value) {
-  console.log(form.value);
-
   let param = {};
 
   uForm1.value
@@ -991,19 +990,17 @@ function handleSubmitApi(value) {
         }
       });
 
-      console.log(param);
-
       addBaseCompany(param).then((res) => {
         if (res.status == "SUCCESS") {
-          if (getToken()) {
+          if (scanBool) {
+            successBool.value = true;
+          } else {
             uni.showToast({
               title: "提交成功",
             });
             setTimeout(() => {
               proxy.$tab.reLaunch("/pages/index");
             }, 2000);
-          } else {
-            successBool.value = true;
           }
         }
       });
@@ -1481,7 +1478,11 @@ onLoad((options) => {
 
   addSubmit("建筑");
 
-  if (!getToken()) {
+  if (options.scanBool) {
+    scanBool.value = options.scanBool;
+  }
+
+  if (scanBool) {
     document.getElementsByClassName("uni-page-head-hd")[0].style.cssText = "display: none;";
   }
 });

+ 1 - 1
src/uni_modules/uview-plus/components/u-picker/u-picker.vue

@@ -214,7 +214,7 @@ export default {
 		},
 		// 设置整体各列的columns的值
 		setColumns(columns) {
-			console.log(columns)
+			// console.log(columns)
 			this.innerColumns = uni.$u.deepClone(columns)
 			// 如果在设置各列数据时,没有被设置默认的各列索引defaultIndex,那么用0去填充它,数组长度为列的数量
 			if (this.innerIndex.length === 0) {