Browse Source

修改客户资料列表及编辑添加页面绑定

wangh 2 years ago
parent
commit
751577b808
3 changed files with 817 additions and 452 deletions
  1. 1 1
      src/components/Crm/DeleClient.vue
  2. 799 449
      src/components/OP/visaEdit.vue
  3. 17 2
      src/main.js

+ 1 - 1
src/components/Crm/DeleClient.vue

@@ -7,7 +7,7 @@
                     <el-input @input="Inquireclick()" placeholder="城市/名称/联系人" v-model="input" clearable
                         style="width: 350px;">
                     </el-input>
-                    <router-link to="/home/DeleClientOperation">
+                    <router-link to="/home/visaEdit">
                         <el-button type="primary" style="margin-left: 10px;">新增</el-button>
                     </router-link>
 

File diff suppressed because it is too large
+ 799 - 449
src/components/OP/visaEdit.vue


+ 17 - 2
src/main.js

@@ -9,14 +9,28 @@ import './assets/icon/iconfont.css'
 import store from './store/index.js';
 
 import axios from 'axios';
-axios.defaults.baseURL = 'http://132.232.92.186:8888';
-// axios.defaults.baseURL = 'http://localhost:5256/';
+//axios.defaults.baseURL = 'http://132.232.92.186:8888';
+axios.defaults.baseURL = 'http://localhost:5256/';
 import { Message } from "element-ui";
 Vue.prototype.$message = Message
 Vue.prototype.$axios = axios;
 
 Vue.config.productionTip = false
 Vue.use(ElementUI);
+Vue.prototype.dateFormat = function (time) {
+  var date = new Date(time);
+  var year = date.getFullYear();
+  /* 在日期格式中,月份是从0开始的,因此要加0
+   * 使用三元表达式在小于10的前面加0,以达到格式统一  如 09:11:05
+   * */
+  var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
+  var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+  var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
+  var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
+  var seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
+  // 拼接
+  return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
+};
 /* eslint-disable no-new */
 new Vue({
   el: '#app',
@@ -25,3 +39,4 @@ new Vue({
   components: { App },
   template: '<App/>'
 })
+