Explorar el Código

fix:服务区间修改

ly hace 10 meses
padre
commit
73bddabb7f
Se han modificado 1 ficheros con 8 adiciones y 3 borrados
  1. 8 3
      src/views/business/crm/order/form.vue

+ 8 - 3
src/views/business/crm/order/form.vue

@@ -262,8 +262,7 @@
                         <el-col :span="4" style="padding-top: 18px">
                           <el-form-item label="服务区间"
                                         v-if="item.timeVo != null && item.timeVo != undefined &&  type !== 'alterOrder'">
-                            <div>{{ item.timeVo.startTime.substr(0,item.timeVo.startTime.length - 3) }} ~ {{
-                                item.timeVo.endTime.substr(0,item.timeVo.endTime.length - 3) }}</div>
+                            <div>{{timeVoFormat(item.timeVo)}}</div>
                           </el-form-item>
                         </el-col>
                         <el-col :span="4" style="padding-top: 18px" v-if="item.taskTypeId ==4">
@@ -1722,7 +1721,13 @@ function showHistoryList() {
 function historyChoiceHandle(row) {
   open(row.id);
 }
-
+const timeVoFormat = (timeVo)=>{
+  if(null !== timeVo.startTime) {
+    return proxy.moment(timeVo.startTime).format("yyyy-MM") + "~" + proxy.moment(timeVo.endTime).format("yyyy-MM")
+  }else{
+    return ""
+  }
+}
 /** 暴露给父组件的方法 */
 defineExpose({
   open,