Browse Source

修改所有模块的选择时间的组件,修改场所消防模块提交无法显示场所的bug

guoqing 1 year ago
parent
commit
7d7e67214d

+ 57 - 111
src/views/placeManage/placeFirefighting/placeFirefightingInfo.vue

@@ -115,81 +115,41 @@
           </van-popup>
         </van-cell-group>
         <van-cell-group>
-          <van-field
-            v-model="inputForm.effectiveDateStart"
-            center
-            required
-            clearable
-            readonly
-            :rules="[{ required: true }]"
-            label-width="8em"
-            label="有效起始时间:"
-            input-align="right"
-            right-icon="arrow-down"
-            placeholder="请选择有效起始时间"
-            @click="hs_Start = true"
-          />
-          <van-popup v-model:show="hs_Start" round position="bottom">
-            <van-date-picker
-              v-model="currentDate"
-              title="选择日期"
-              :min-date="minDate"
-              :max-date="maxDate"
-              @cancel="hs_Start = false"
-              @confirm="getStart"
-            />
-          </van-popup>
-        </van-cell-group>
-        <van-cell-group>
-          <van-field
-            v-model="inputForm.effectiveDateEnd"
-            center
-            required
-            clearable
-            readonly
-            :rules="[{ required: true }]"
-            label-width="8em"
-            label="有效结束时间:"
-            input-align="right"
-            right-icon="arrow-down"
-            placeholder="请选择有效结束时间"
-            @click="hs_End = true"
-          />
-          <van-popup v-model:show="hs_End" round position="bottom">
-            <van-date-picker
-              v-model="currentDate"
-              title="选择日期"
-              :min-date="minDate"
-              :max-date="maxDate"
-              @cancel="hs_End = false"
-              @confirm="getEnd"
-            />
-          </van-popup>
-        </van-cell-group>
-        <van-cell-group>
-          <van-field
-            v-model="inputForm.nextMaintenanceDate"
-            center
-            clearable
-            readonly
-            label-width="8em"
-            label="下次保养时期:"
-            input-align="right"
-            right-icon="arrow-down"
-            placeholder="请选择下次保养时期"
-            @click="hs_upkeep = true"
-          />
-          <van-popup v-model:show="hs_upkeep" round position="bottom">
-            <van-date-picker
-              v-model="currentDate"
-              title="选择日期"
-              :min-date="minDate"
-              :max-date="maxDate"
-              @cancel="hs_upkeep = false"
-              @confirm="getupkeep"
-            />
-          </van-popup>
-        </van-cell-group>
+        <van-field v-model="inputForm.effectiveDateStart" center readonly required label-width="8em"
+          :rules="[{ required: true }]" label="有效起始时间:" placeholder="请选择时间"
+          input-align="right" right-icon="arrow-down" @click="hs_Start = true" />
+        <van-popup v-model:show="hs_Start" round position="bottom">
+          <van-picker-group title="有效起始时间" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTime"
+            @cancel="hs_Start = false">
+            <van-date-picker v-model="currentDate" />
+            <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+          </van-picker-group>
+        </van-popup>
+      </van-cell-group>
+      <van-cell-group>
+        <van-field v-model="inputForm.effectiveDateEnd" center readonly required label-width="8em"
+          :rules="[{ required: true }]" label="有效结束时间:" placeholder="请选择时间"
+          input-align="right" right-icon="arrow-down" @click="hs_End = true" />
+        <van-popup v-model:show="hs_End" round position="bottom">
+          <van-picker-group title="有效结束时间" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTimeend"
+            @cancel="hs_End = false">
+            <van-date-picker v-model="currentDate" />
+            <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+          </van-picker-group>
+        </van-popup>
+      </van-cell-group>
+      <van-cell-group>
+        <van-field v-model="inputForm.nextMaintenanceDate" center readonly label-width="8em"
+           label="下次保养时期:" placeholder="请选择时间"
+          input-align="right" right-icon="arrow-down" @click="hs_upkeep = true" />
+        <van-popup v-model:show="hs_upkeep" round position="bottom">
+          <van-picker-group title="下次保养时期" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTimeupkeep"
+            @cancel="hs_upkeep = false">
+            <van-date-picker v-model="currentDate" />
+            <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+          </van-picker-group>
+        </van-popup>
+      </van-cell-group>
         <van-cell-group>
           <van-field
             v-model="inputForm.position"
@@ -241,6 +201,7 @@ import PlaceRegister from "@/api/placeRegister/placeRegister";
 import placeRegister from '@/api/placeRegister/placeRegister';
 import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
+import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   setup() {
     const inputForm = ref({
@@ -348,48 +309,30 @@ export default {
     };
     //有效期起始时间
     let hs_Start = ref(false);
-    const getStart = ({ selectedOptions }) => {
+    let currentDate = ref(formatDate(new Date()));
+    let currentTime = ref(formatTime(new Date()));
+    const columnsType = ["hour", "minute", "second"];
+    const getTime = () => {
       hs_Start.value = false;
-      const json = Object.assign(inputForm.value, {
-        effectiveDateStart:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.effectiveDateStart = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     //有效期结束时间
     let hs_End = ref(false);
-    const getEnd = ({ selectedOptions }) => {
+    const getTimeend = () => {
       hs_End.value = false;
-      const json = Object.assign(inputForm.value, {
-        effectiveDateEnd:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.effectiveDateEnd = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     //下次保养日期
     let hs_upkeep = ref(false);
-    const getupkeep = ({ selectedOptions }) => {
+    const getTimeupkeep = () => {
       hs_upkeep.value = false;
-      const json = Object.assign(inputForm.value, {
-        nextMaintenanceDate:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.nextMaintenanceDate = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     //图片上传
     let fileList = ref([]);
@@ -473,14 +416,17 @@ export default {
       hs_typeOfEmployees,
       gettypeOfEmployees,
       // 有效起始时间
+      currentDate,
+      currentTime,
+      columnsType,
       hs_Start,
-      getStart,
+      getTime,
       // 有效结束时间
       hs_End,
-      getEnd,
+      getTimeend,
       // 下次保养日期
       hs_upkeep,
-      getupkeep,
+      getTimeupkeep,
       //图片上传
       fileList,
       chooseImg,

+ 47 - 101
src/views/placeManage/placeFirefighting/placeFirefightingView.vue

@@ -109,79 +109,39 @@
         </van-popup>
       </van-cell-group>
       <van-cell-group>
-        <van-field
-          v-model="inputForm.effectiveDateStart"
-          center
-          required
-          clearable
-          readonly
-          :rules="[{ required: true }]"
-          label-width="8em"
-          label="有效起始时间:"
-          input-align="right"
-          right-icon="arrow-down"
-          placeholder="请选择有效起始时间"
-          @click="hs_Start = true"
-        />
+        <van-field v-model="inputForm.effectiveDateStart" center readonly required label-width="8em"
+          :rules="[{ required: true }]" label="有效起始时间:" placeholder="请选择时间"
+          input-align="right" right-icon="arrow-down" @click="hs_Start = true" />
         <van-popup v-model:show="hs_Start" round position="bottom">
-          <van-date-picker
-            v-model="currentDate"
-            title="选择日期"
-            :min-date="minDate"
-            :max-date="maxDate"
-            @cancel="hs_Start = false"
-            @confirm="getStart"
-          />
+          <van-picker-group title="有效起始时间" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTime"
+            @cancel="hs_Start = false">
+            <van-date-picker v-model="currentDate" />
+            <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+          </van-picker-group>
         </van-popup>
       </van-cell-group>
       <van-cell-group>
-        <van-field
-          v-model="inputForm.effectiveDateEnd"
-          center
-          required
-          clearable
-          readonly
-          :rules="[{ required: true }]"
-          label-width="8em"
-          label="有效结束时间:"
-          input-align="right"
-          right-icon="arrow-down"
-          placeholder="请选择有效结束时间"
-          @click="hs_End = true"
-        />
+        <van-field v-model="inputForm.effectiveDateEnd" center readonly required label-width="8em"
+          :rules="[{ required: true }]" label="有效结束时间:" placeholder="请选择时间"
+          input-align="right" right-icon="arrow-down" @click="hs_End = true" />
         <van-popup v-model:show="hs_End" round position="bottom">
-          <van-date-picker
-            v-model="currentDate"
-            title="选择日期"
-            :min-date="minDate"
-            :max-date="maxDate"
-            @cancel="hs_End = false"
-            @confirm="getEnd"
-          />
+          <van-picker-group title="有效结束时间" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTimeend"
+            @cancel="hs_End = false">
+            <van-date-picker v-model="currentDate" />
+            <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+          </van-picker-group>
         </van-popup>
       </van-cell-group>
       <van-cell-group>
-        <van-field
-          v-model="inputForm.nextMaintenanceDate"
-          center
-          clearable
-          readonly
-          label-width="8em"
-          label="下次保养时期:"
-          input-align="right"
-          right-icon="arrow-down"
-          placeholder="请选择下次保养时期"
-          @click="hs_upkeep = true"
-        />
+        <van-field v-model="inputForm.nextMaintenanceDate" center readonly label-width="8em"
+           label="下次保养时期:" placeholder="请选择时间"
+          input-align="right" right-icon="arrow-down" @click="hs_upkeep = true" />
         <van-popup v-model:show="hs_upkeep" round position="bottom">
-          <van-date-picker
-            v-model="currentDate"
-            title="选择日期"
-            :min-date="minDate"
-            :max-date="maxDate"
-            @cancel="hs_upkeep = false"
-            @confirm="getupkeep"
-          />
+          <van-picker-group title="下次保养时期" :tabs="['选择日期', '选择时间']" next-step-text="下一步" @confirm="getTimeupkeep"
+            @cancel="hs_upkeep = false">
+            <van-date-picker v-model="currentDate" />
+            <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+          </van-picker-group>
         </van-popup>
       </van-cell-group>
       <van-cell-group>
@@ -233,6 +193,7 @@ import placeFirefighting from "@/api/placeFirefighting/placeFirefighting";
 import PlaceRegister from "@/api/placeRegister/placeRegister";
 import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
+import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   setup() {
     const inputForm = ref({
@@ -264,7 +225,7 @@ export default {
       let id = "";
       id = val.id;
       locationName.value = val.name;
-      const json = Object.assign(inputForm.value, { location: { id: id } });
+      const json = Object.assign(inputForm.value, { siteId: val.id });
       inputForm.value = json;
       checked.value = val.id;
     };
@@ -304,48 +265,30 @@ export default {
     };
     //有效期起始时间
     let hs_Start = ref(false);
-    const getStart = ({ selectedOptions }) => {
+    let currentDate = ref(formatDate(new Date()));
+    let currentTime = ref(formatTime(new Date()));
+    const columnsType = ["hour", "minute", "second"];
+    const getTime = () => {
       hs_Start.value = false;
-      const json = Object.assign(inputForm.value, {
-        effectiveDateStart:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.effectiveDateStart = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     //有效期结束时间
     let hs_End = ref(false);
-    const getEnd = ({ selectedOptions }) => {
+    const getTimeend = () => {
       hs_End.value = false;
-      const json = Object.assign(inputForm.value, {
-        effectiveDateEnd:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.effectiveDateEnd = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     //下次保养日期
     let hs_upkeep = ref(false);
-    const getupkeep = ({ selectedOptions }) => {
+    const getTimeupkeep = () => {
       hs_upkeep.value = false;
-      const json = Object.assign(inputForm.value, {
-        nextMaintenanceDate:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.nextMaintenanceDate = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     //图片上传
     let fileList = ref([]);
@@ -429,14 +372,17 @@ export default {
       hs_typeOfEmployees,
       gettypeOfEmployees,
       // 有效起始时间
+      currentDate,
+      currentTime,
+      columnsType,
       hs_Start,
-      getStart,
+      getTime,
       // 有效结束时间
       hs_End,
-      getEnd,
+      getTimeend,
       // 下次保养日期
       hs_upkeep,
-      getupkeep,
+      getTimeupkeep,
       //图片上传
       fileList,
       chooseImg,

+ 46 - 34
src/views/placeManage/placePerson/placePersonAdd.vue

@@ -27,9 +27,9 @@
               title="证件类型"
               :columns="$dictUtils.getDictList('hs_cert_type')"
               :columns-field-names="{
-                  text: 'label',
-                  value: 'value',
-                }"
+                text: 'label',
+                value: 'value',
+              }"
               @cancel="showPicker = false"
               @confirm="getPlace"
             />
@@ -97,9 +97,9 @@
               title="民族类型"
               :columns="$dictUtils.getDictList('hs_nation')"
               :columns-field-names="{
-                  text: 'label',
-                  value: 'value',
-                }"
+                text: 'label',
+                value: 'value',
+              }"
               @cancel="hs_nation = false"
               @confirm="getnation"
             />
@@ -122,9 +122,9 @@
               title="性别"
               :columns="$dictUtils.getDictList('sex')"
               :columns-field-names="{
-                  text: 'label',
-                  value: 'value',
-                }"
+                text: 'label',
+                value: 'value',
+              }"
               @cancel="hs_sex = false"
               @confirm="getsex"
             />
@@ -393,7 +393,7 @@
                       @click="gettissue(item)"
                     >
                       <template #right-icon>
-                        <van-radio :name="item.id" @click="gettissue(item)"/>
+                        <van-radio :name="item.id" @click="gettissue(item)" />
                       </template>
                     </van-cell>
                   </van-cell-group>
@@ -451,9 +451,9 @@
               title="是否死亡"
               :columns="$dictUtils.getDictList('yes_no')"
               :columns-field-names="{
-                  text: 'label',
-                  value: 'value',
-                }"
+                text: 'label',
+                value: 'value',
+              }"
               @cancel="hs_dead = false"
               @confirm="getdead"
             />
@@ -578,13 +578,19 @@
               round
               position="bottom"
             >
-              <van-date-picker
-                title="选择日期"
-                :min-date="minDate"
-                :max-date="maxDate"
-                @cancel="hs_Date[index + '_Date'] = false"
+              <van-picker-group
+                title="选择时间"
+                :tabs="['选择日期', '选择时间']"
+                next-step-text="下一步"
                 @confirm="getDate(index + '_Date', $event)"
-              />
+                @cancel="hs_Date[index + '_Date'] = false"
+              >
+                <van-date-picker v-model="currentDate" />
+                <van-time-picker
+                  v-model="currentTime"
+                  :columns-type="columnsType"
+                />
+              </van-picker-group>
             </van-popup>
           </van-cell-group>
         </van-col>
@@ -606,6 +612,7 @@ import PlaceRegister from "@/api/placeRegister/placeRegister";
 import { useRouter } from "vue-router";
 import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
+import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   setup() {
     const onClickLeft = () => {
@@ -649,7 +656,7 @@ export default {
         id: "",
       },
       bkcheck: "",
-      dead:"",
+      dead: "",
     });
     onMounted(() => {
       //籍贯接口
@@ -912,16 +919,18 @@ export default {
     const checked1 = ref("");
     const tissuelist = ref([]);
     let hs_tissue = ref(false);
-    const tiname = ref('')
+    const tiname = ref("");
     const gettissue = (val) => {
       tiname.value = val.organizationName;
       checked1.value = val.id;
     };
-    const tissue = ()=>{
-      tissueName.value = tiname.value
-      const json = Object.assign(inputForm.value, { zjzz: { id: checked1.value } });
+    const tissue = () => {
+      tissueName.value = tiname.value;
+      const json = Object.assign(inputForm.value, {
+        zjzz: { id: checked1.value },
+      });
       inputForm.value = json;
-    }
+    };
     const loading1 = ref(false);
     const finished1 = ref(false);
     const refreshing1 = ref(false);
@@ -1037,7 +1046,7 @@ export default {
       activitytext.value = selectedOptions[0].text;
     };
     // 是否死亡
-    const Dead = ref('');
+    const Dead = ref("");
     let hs_dead = ref(false);
     const getdead = ({ selectedOptions }) => {
       hs_dead.value = false;
@@ -1057,16 +1066,16 @@ export default {
     };
     // 扩展信息的时间
     let hs_Date = ref({});
+    let currentDate = ref(formatDate(new Date()));
+    let currentTime = ref(formatTime(new Date()));
+    const columnsType = ["hour", "minute", "second"];
     const getDate = (index, { selectedOptions }) => {
       hs_Date.value[index] = false;
       let inputIndex = index.split("_")[0];
-      inputForm.value.userManagenmetDetailsDTOList[inputIndex].value =
-        selectedOptions[0].text +
-        "-" +
-        selectedOptions[1].text +
-        "-" +
-        selectedOptions[2].text +
-        " 00:00:00";
+      inputForm.value.userManagenmetDetailsDTOList[
+        inputIndex
+      ].value = `${currentDate.value.join("-")} ${currentTime.value.join(":")}`;
+      hs_Date.value[index] = false;
     };
     //跳转
     let router = useRouter();
@@ -1204,6 +1213,9 @@ export default {
       hs_select,
       getselect,
       //扩展信息时间
+      currentDate,
+      currentTime,
+      columnsType,
       hs_Date,
       getDate,
       //图片上传
@@ -1249,7 +1261,7 @@ export default {
   height: 400px;
   overflow: auto;
 }
-.bgList{
+.bgList {
   background: #36a7f3;
 }
 </style>

+ 26 - 14
src/views/placeManage/placePerson/placePersoninfo.vue

@@ -413,7 +413,7 @@
                         @click="gettissue(item)"
                       >
                         <template #right-icon>
-                          <van-radio :name="item.id" @click="gettissue(item)"/>
+                          <van-radio :name="item.id" @click="gettissue(item)" />
                         </template>
                       </van-cell>
                     </van-cell-group>
@@ -599,13 +599,19 @@
               round
               position="bottom"
             >
-              <van-date-picker
-                title="选择日期"
-                :min-date="minDate"
-                :max-date="maxDate"
-                @cancel="hs_Date[index + '_Date'] = false"
+              <van-picker-group
+                title="选择时间"
+                :tabs="['选择日期', '选择时间']"
+                next-step-text="下一步"
                 @confirm="getDate(index + '_Date', $event)"
-              />
+                @cancel="hs_Date[index + '_Date'] = false"
+              >
+                <van-date-picker v-model="currentDate" />
+                <van-time-picker
+                  v-model="currentTime"
+                  :columns-type="columnsType"
+                />
+              </van-picker-group>
             </van-popup>
           </van-cell-group>
         </van-col>
@@ -625,6 +631,7 @@ import placePerson from "@/api/placePerson/placePerson";
 import PlaceRegister from "@/api/placeRegister/placeRegister";
 import UserManage from "@/api/user/UserManage";
 import tools from "@/api/sys/tools";
+import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   setup() {
     const data = ref({});
@@ -641,7 +648,8 @@ export default {
         expansion.value = res.userManagenmetDetailsDTOList;
         idTypeName.value = getidCardType(data.value.idType);
         sexName.value = getSex(data.value.sex);
-        idTypeName.value = current.appContext.config.globalProperties.$dictUtils.getDictLabel(
+        idTypeName.value =
+          current.appContext.config.globalProperties.$dictUtils.getDictLabel(
             "hs_cert_type",
             data.value.idType
           );
@@ -1119,15 +1127,16 @@ export default {
     };
     // 扩展信息的时间
     let hs_Date = ref({});
+    let currentDate = ref(formatDate(new Date()));
+    let currentTime = ref(formatTime(new Date()));
+    const columnsType = ["hour", "minute", "second"];
     const getDate = (index, { selectedOptions }) => {
       hs_Date.value[index] = false;
       let inputIndex = index.split("_")[0];
-      data.value.userManagenmetDetailsDTOList[inputIndex].value =
-        selectedOptions[0].text +
-        "-" +
-        selectedOptions[1].text +
-        "-" +
-        selectedOptions[2].text;
+      data.value.userManagenmetDetailsDTOList[
+        inputIndex
+      ].value = `${currentDate.value.join("-")} ${currentTime.value.join(":")}`;
+      hs_Date.value[index] = false;
     };
     // 是否参加非法活动
     const activitytext = ref("");
@@ -1307,6 +1316,9 @@ export default {
       hs_select,
       getselect,
       //扩展信息时间
+      currentDate,
+      currentTime,
+      columnsType,
       hs_Date,
       getDate,
       //图片上传

+ 43 - 46
src/views/placeManage/placeRegister/placeRegister.vue

@@ -342,18 +342,18 @@
               <van-field
                 v-model="inputForm.approvedEstablishmentTime"
                 center
-                required
-                clearable
-                :rules="[{ required: true }]"
                 readonly
+                required
                 label-width="8em"
+                :rules="[{ required: true }]"
                 label="批准设立时间:"
+                placeholder="请选择时间"
                 input-align="right"
                 right-icon="arrow-down"
-                placeholder="请选择批准设立时间"
                 @click="hs_SetupTime = true"
               />
             </van-cell-group>
+
             <van-cell-group>
               <van-field
                 v-model="inputForm.registrationAuthority"
@@ -370,14 +370,14 @@
               <van-field
                 v-model="inputForm.registrationDate"
                 center
-                required
                 readonly
+                required
+                label-width="8em"
                 :rules="[{ required: true }]"
-                clearable
                 label="登记日期:"
-                right-icon="arrow-down"
+                placeholder="请选择时间"
                 input-align="right"
-                placeholder="请选择登记日期"
+                right-icon="arrow-down"
                 @click="hs_SignTime = true"
               />
             </van-cell-group>
@@ -543,7 +543,7 @@
                     label-width="7em"
                     label="公众号账号:"
                     input-align="right"
-                    placeholder="请输入直播账号"
+                    placeholder="请输入公众号账号"
                   />
                 </van-cell-group>
                 <van-cell-group>
@@ -596,7 +596,7 @@
                     label-width="7em"
                     label="微信群账号:"
                     input-align="right"
-                    placeholder="请输入直播账号"
+                    placeholder="请输入微信群账号"
                   />
                 </van-cell-group>
                 <van-cell-group>
@@ -731,25 +731,29 @@
     </van-popup>
     <!-- 批准设立时间 -->
     <van-popup v-model:show="hs_SetupTime" round position="bottom">
-      <van-date-picker
-        v-model="currentDate"
-        title="选择日期"
-        :min-date="minDate"
-        :max-date="maxDate"
-        @cancel="hs_SetupTime = false"
+      <van-picker-group
+        title="批准设立时间"
+        :tabs="['选择日期', '选择时间']"
+        next-step-text="下一步"
         @confirm="getSetupTime"
-      />
+        @cancel="hs_SetupTime = false"
+      >
+        <van-date-picker v-model="currentDate" />
+        <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+      </van-picker-group>
     </van-popup>
     <!-- 登记日期 -->
     <van-popup v-model:show="hs_SignTime" round position="bottom">
-      <van-date-picker
-        v-model="currentDate"
-        title="选择日期"
-        :min-date="minDate"
-        :max-date="maxDate"
-        @cancel="hs_SignTime = false"
+      <van-picker-group
+        title="登记日期"
+        :tabs="['选择日期', '选择时间']"
+        next-step-text="下一步"
         @confirm="getSignTime"
-      />
+        @cancel="hs_SignTime = false"
+      >
+        <van-date-picker v-model="currentDate" />
+        <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+      </van-picker-group>
     </van-popup>
   </div>
 </template>
@@ -762,6 +766,7 @@ import { onMounted, ref } from "vue";
 import placeRegister from "@/api/placeRegister/placeRegister";
 import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
+import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   components: { ManageList, ManageList2 },
   setup() {
@@ -1113,34 +1118,23 @@ export default {
       securityDeptManaUserName.value = list2.value.name;
     };
     //批准设立时间
+    let currentDate = ref(formatDate(new Date()));
+    let currentTime = ref(formatTime(new Date()));
+    const columnsType = ["hour", "minute", "second"];
     let hs_SetupTime = ref(false);
     const getSetupTime = ({ selectedOptions }) => {
       hs_SetupTime.value = false;
-      const json = Object.assign(inputForm.value, {
-        approvedEstablishmentTime:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.approvedEstablishmentTime = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
-    //批准设立时间
+    //登记时间
     let hs_SignTime = ref(false);
     const getSignTime = ({ selectedOptions }) => {
       hs_SignTime.value = false;
-      const json = Object.assign(inputForm.value, {
-        registrationDate:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text +
-          " 00:00:00",
-      });
-      inputForm.value = json;
+      inputForm.value.registrationDate = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     // 互联网专区
     const internetForm = ref({
@@ -1400,9 +1394,12 @@ export default {
       religiousDeptManaUserName,
       securityDeptManaUserName,
       // 批准设立时间
+      currentDate,
+      currentTime,
+      columnsType,
       hs_SetupTime,
       getSetupTime,
-      // 批准设立时间
+      // 登记时间
       hs_SignTime,
       getSignTime,
       // 互联网专区

+ 44 - 46
src/views/placeManage/placeRegister/placeRegisterInfo.vue

@@ -346,25 +346,25 @@
               <van-field
                 v-model="dataitem.approvedEstablishmentTime"
                 center
-                required
-                clearable
                 readonly
-                :rules="[{ required: true }]"
+                required
                 label-width="8em"
+                :rules="[{ required: true }]"
                 label="批准设立时间:"
+                placeholder="请选择时间"
                 input-align="right"
                 right-icon="arrow-down"
-                placeholder="请选择批准设立时间"
                 @click="hs_SetupTime = true"
               />
             </van-cell-group>
+
             <van-cell-group>
               <van-field
                 v-model="dataitem.registrationAuthority"
                 center
+                :rules="[{ required: true }]"
                 required
                 clearable
-                :rules="[{ required: true }]"
                 label="登记机关:"
                 input-align="right"
                 placeholder="请输入登记机关"
@@ -374,14 +374,14 @@
               <van-field
                 v-model="dataitem.registrationDate"
                 center
-                required
                 readonly
-                clearable
+                required
+                label-width="8em"
                 :rules="[{ required: true }]"
                 label="登记日期:"
-                right-icon="arrow-down"
+                placeholder="请选择时间"
                 input-align="right"
-                placeholder="请选择登记日期"
+                right-icon="arrow-down"
                 @click="hs_SignTime = true"
               />
             </van-cell-group>
@@ -545,7 +545,7 @@
                     label-width="7em"
                     label="公众号账号:"
                     input-align="right"
-                    placeholder="请输入直播账号"
+                    placeholder="请输入公众号账号"
                   />
                 </van-cell-group>
                 <van-cell-group>
@@ -598,7 +598,7 @@
                     label-width="7em"
                     label="微信群账号:"
                     input-align="right"
-                    placeholder="请输入直播账号"
+                    placeholder="请输入微信群账号"
                   />
                 </van-cell-group>
                 <van-cell-group>
@@ -734,25 +734,29 @@
     </van-popup>
     <!-- 批准设立时间 -->
     <van-popup v-model:show="hs_SetupTime" round position="bottom">
-      <van-date-picker
-        v-model="currentDate"
-        title="选择日期"
-        :min-date="minDate"
-        :max-date="maxDate"
-        @cancel="hs_SetupTime = false"
+      <van-picker-group
+        title="批准设立时间"
+        :tabs="['选择日期', '选择时间']"
+        next-step-text="下一步"
         @confirm="getSetupTime"
-      />
+        @cancel="hs_SetupTime = false"
+      >
+        <van-date-picker v-model="currentDate" />
+        <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+      </van-picker-group>
     </van-popup>
     <!-- 登记日期 -->
     <van-popup v-model:show="hs_SignTime" round position="bottom">
-      <van-date-picker
-        v-model="currentDate"
-        title="选择日期"
-        :min-date="minDate"
-        :max-date="maxDate"
-        @cancel="hs_SignTime = false"
+      <van-picker-group
+        title="登记日期"
+        :tabs="['选择日期', '选择时间']"
+        next-step-text="下一步"
         @confirm="getSignTime"
-      />
+        @cancel="hs_SignTime = false"
+      >
+        <van-date-picker v-model="currentDate" />
+        <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+      </van-picker-group>
     </van-popup>
   </div>
 </template>
@@ -765,6 +769,7 @@ import { onMounted, ref } from "vue";
 import placeRegister from "@/api/placeRegister/placeRegister";
 import tools from "@/api/sys/tools";
 import $base from "@/utils/config";
+import { formatDate, formatTime } from "@/utils/datatime";
 export default {
   components: { ManageList, ManageList2 },
   setup() {
@@ -1201,33 +1206,23 @@ export default {
       securityDeptManaUserName.value = list2.value.name;
     };
     //批准设立时间
+    let currentDate = ref(formatDate(new Date()));
+    let currentTime = ref(formatTime(new Date()));
+    const columnsType = ["hour", "minute", "second"];
     let hs_SetupTime = ref(false);
     const getSetupTime = ({ selectedOptions }) => {
       hs_SetupTime.value = false;
-      const json = Object.assign(dataitem.value, {
-        approvedEstablishmentTime:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text
-          +" 00:00:00",
-      });
-      dataitem.value = json;
+      dataitem.value.approvedEstablishmentTime = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
+    //登记时间
     let hs_SignTime = ref(false);
     const getSignTime = ({ selectedOptions }) => {
       hs_SignTime.value = false;
-      const json = Object.assign(dataitem.value, {
-        registrationDate:
-          selectedOptions[0].text +
-          "-" +
-          selectedOptions[1].text +
-          "-" +
-          selectedOptions[2].text
-          +" 00:00:00",
-      });
-      dataitem.value = json;
+      dataitem.value.registrationDate = `${currentDate.value.join(
+        "-"
+      )} ${currentTime.value.join(":")}`;
     };
     // 互联网专区
     const internetForm = ref({
@@ -1489,9 +1484,12 @@ export default {
       religiousDeptManaUserName,
       securityDeptManaUserName,
       // 批准设立时间
+      currentDate,
+      currentTime,
+      columnsType,
       hs_SetupTime,
       getSetupTime,
-      // 批准设立时间
+      // 登记时间
       hs_SignTime,
       getSignTime,
       // 互联网专区