Browse Source

前端合同管理页面添加左侧侧边栏

18513069273 4 years ago
parent
commit
f62ef45c71

+ 9 - 2
src/lang/en.js

@@ -458,7 +458,10 @@
     // 船员管理-劳保用品
     // 船员管理-劳保用品
     protectionEntry: 'Protection Entry',
     protectionEntry: 'Protection Entry',
     protectionInventory: 'Protection Inventory',
     protectionInventory: 'Protection Inventory',
-
+    // 合同管理
+    contractManagement: 'contract management',
+    purchaseContract: 'purchase contract',
+    salesContract: 'sales contract',
     // 采购模块
     // 采购模块
     procurement: 'Purchase',
     procurement: 'Purchase',
     sparepart: 'Spare Parts',
     sparepart: 'Spare Parts',
@@ -4662,7 +4665,11 @@
     sailing: 'Sailing',
     sailing: 'Sailing',
     speed: 'Speed',
     speed: 'Speed',
     meteorologicalInformation: 'Meteorological information',
     meteorologicalInformation: 'Meteorological information',
-    currentVoyage: 'Current voyage'
+    currentVoyage: 'Current voyage',
+    // 合同管理
+    contractManagement: 'contract management',
+    purchaseContract: 'purchase contract',
+    salesContract: 'sales contract',
   },
   },
   dynamicRport: {
   dynamicRport: {
     dailyReport: 'Daily Report',
     dailyReport: 'Daily Report',

+ 15 - 1
src/lang/zh.js

@@ -477,7 +477,12 @@
     // 船员管理-劳保用品
     // 船员管理-劳保用品
     protectionEntry: '劳保入库',
     protectionEntry: '劳保入库',
     protectionInventory: '劳保库存',
     protectionInventory: '劳保库存',
-
+    // 合同管理
+    contractManagement: '合同管理',
+    purchaseContract: '采购合同',
+    salesContract: '销售合同'
+    ,
+    salesContractExamine: '销售合同查看',
     // 采购模块
     // 采购模块
     procurement: '采购管理',
     procurement: '采购管理',
     sparepart: '备件采购',
     sparepart: '备件采购',
@@ -4525,6 +4530,7 @@
     shipCertificate: '船舶证书',
     shipCertificate: '船舶证书',
     sparePartsMaterial: '备件物料管理',
     sparePartsMaterial: '备件物料管理',
     procurement: '采购管理',
     procurement: '采购管理',
+    contractManagement: '合同管理',
     sendPersonnel: '发送人',
     sendPersonnel: '发送人',
     prearrivalTime: '预到时间',
     prearrivalTime: '预到时间',
     destination: '目的地',
     destination: '目的地',
@@ -4641,6 +4647,14 @@
     monthlyReport: '月报',
     monthlyReport: '月报',
     customTime: '自定义时间'
     customTime: '自定义时间'
   },
   },
+  // 合同管理
+  sales: {
+    salesContract: '销售合同',
+    salesContractExamine: '销售合同查看'
+  },
+  purchase: {
+    purchaseContract: '采购合同',
+  },
   // 年度培训
   // 年度培训
   annualTraining: {
   annualTraining: {
     trainingResults: '培训结果',
     trainingResults: '培训结果',

+ 29 - 22
src/layout/index/sidebar/index.vue

@@ -1,22 +1,27 @@
 <template>
 <template>
-  <div class="winseaview-sidebar"
-       :style="{ 'padding-top': !showLogo ? '0px' : '40px' }">
+  <div
+    class="winseaview-sidebar"
+    :style="{ 'padding-top': !showLogo ? '0px' : '40px' }"
+  >
     <logo v-if="showLogo"></logo>
     <logo v-if="showLogo"></logo>
-    <el-scrollbar style="height:100%">
-      <div v-if="validatenull(menu)"
-           class="winseaview-sidebar--tip">
+    <el-scrollbar style="height: 100%">
+      <div v-if="validatenull(menu)" class="winseaview-sidebar--tip">
         {{ $t('menuTip') }}
         {{ $t('menuTip') }}
       </div>
       </div>
-      <el-menu unique-opened
-               :default-active="nowTagValue"
-               mode="vertical"
-               :show-timeout="200"
-               :collapse="keyCollapse">
-        <sidebar-item :menu="menu"
-                      :screen="screen"
-                      first
-                      :props="website.menu.props"
-                      :collapse="keyCollapse"></sidebar-item>
+      <el-menu
+        unique-opened
+        :default-active="nowTagValue"
+        mode="vertical"
+        :show-timeout="200"
+        :collapse="keyCollapse"
+      >
+        <sidebar-item
+          :menu="menu"
+          :screen="screen"
+          first
+          :props="website.menu.props"
+          :collapse="keyCollapse"
+        ></sidebar-item>
       </el-menu>
       </el-menu>
     </el-scrollbar>
     </el-scrollbar>
   </div>
   </div>
@@ -30,22 +35,24 @@ import { getValue } from '@/utils/util'
 export default {
 export default {
   name: 'sidebar',
   name: 'sidebar',
   components: { sidebarItem, logo },
   components: { sidebarItem, logo },
-  data () {
+  data() {
     return {}
     return {}
   },
   },
-  created () { },
+  created() {
+    console.log(this.menu)
+  },
   computed: {
   computed: {
     ...mapGetters(['website', 'menu', 'tag', 'keyCollapse', 'screen']),
     ...mapGetters(['website', 'menu', 'tag', 'keyCollapse', 'screen']),
     ...mapState({
     ...mapState({
-      showLogo: state => state.commonStore.showLogo
+      showLogo: (state) => state.commonStore.showLogo,
     }),
     }),
-    nowTagValue () {
+    nowTagValue() {
       const routerName = getValue(this.$route)
       const routerName = getValue(this.$route)
       return routerName.split('/').slice(0, 3).join('/')
       return routerName.split('/').slice(0, 3).join('/')
-    }
+    },
   },
   },
-  mounted () { },
-  methods: {}
+  mounted() {},
+  methods: {},
 }
 }
 </script>
 </script>
 <style lang="scss" scoped></style>
 <style lang="scss" scoped></style>

+ 82 - 74
src/layout/index/sidebar/sidebarItem.vue

@@ -1,133 +1,141 @@
 <template>
 <template>
   <div class="menu-wrapper">
   <div class="menu-wrapper">
     <template v-for="item in menu">
     <template v-for="item in menu">
-      <el-menu-item v-if="validatenull(item[childrenKey]) && vaildRoles(item)"
-                    :index="item[pathKey]"
-                    @click="open(item)"
-                    :key="item[labelKey]"
-                    :class="{'is-active':vaildAvtive(item)}">
+      <el-menu-item
+        v-if="validatenull(item[childrenKey]) && vaildRoles(item)"
+        :index="item[pathKey]"
+        @click="open(item)"
+        :key="item[labelKey]"
+        :class="{ 'is-active': vaildAvtive(item) }"
+      >
         <i :class="item[iconKey]"></i>
         <i :class="item[iconKey]"></i>
-        <span slot="title"
-              :alt="item[pathKey]">{{generateTitleLab(item)}}</span>
+        <span slot="title" :alt="item[pathKey]">{{
+          generateTitleLab(item)
+        }}</span>
       </el-menu-item>
       </el-menu-item>
-      <el-submenu v-else-if="!validatenull(item[childrenKey])&&vaildRoles(item)"
-                  :index="item[pathKey]"
-                  :key="item[labelKey]">
+      <el-submenu
+        v-else-if="!validatenull(item[childrenKey]) && vaildRoles(item)"
+        :index="item[pathKey]"
+        :key="item[labelKey]"
+      >
         <template slot="title">
         <template slot="title">
           <i :class="item[iconKey]"></i>
           <i :class="item[iconKey]"></i>
-          <span slot="title"
-                :class="{'el-menu--display':collapse && first}">{{generateTitleLab(item)}}</span>
+          <span
+            slot="title"
+            :class="{ 'el-menu--display': collapse && first }"
+            >{{ generateTitleLab(item) }}</span
+          >
         </template>
         </template>
-        <template v-for="(child,cindex) in item[childrenKey]">
-          <el-menu-item :index="child[pathKey]"
-                        @click="open(child)"
-                        :class="{'is-active':vaildAvtive(child)}"
-                        v-if="validatenull(child[childrenKey])"
-                        :key="child[labelKey]">
+        <template v-for="(child, cindex) in item[childrenKey]">
+          <el-menu-item
+            :index="child[pathKey]"
+            @click="open(child)"
+            :class="{ 'is-active': vaildAvtive(child) }"
+            v-if="validatenull(child[childrenKey])"
+            :key="child[labelKey]"
+          >
             <i :class="child[iconKey]"></i>
             <i :class="child[iconKey]"></i>
-            <span slot="title">{{generateTitleLab(child)}}</span>
+            <span slot="title">{{ generateTitleLab(child) }}</span>
           </el-menu-item>
           </el-menu-item>
-          <sidebar-item v-else
-                        :menu="[child]"
-                        :key="cindex"
-                        :props="props"
-                        :screen="screen"
-                        :collapse="collapse"></sidebar-item>
+          <sidebar-item
+            v-else
+            :menu="[child]"
+            :key="cindex"
+            :props="props"
+            :screen="screen"
+            :collapse="collapse"
+          ></sidebar-item>
         </template>
         </template>
       </el-submenu>
       </el-submenu>
     </template>
     </template>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { mapGetters } from 'vuex';
-import { validatenull } from '@/utils/validate';
-import config from './config.js';
+import { mapGetters } from 'vuex'
+import { validatenull } from '@/utils/validate'
+import config from './config.js'
 import { getValue, generateTitle, getPath } from '@/utils/util'
 import { getValue, generateTitle, getPath } from '@/utils/util'
 export default {
 export default {
   name: 'sidebarItem',
   name: 'sidebarItem',
-  data () {
+  data() {
     return {
     return {
-      config: config
-    };
+      config: config,
+    }
   },
   },
   props: {
   props: {
     menu: {
     menu: {
-      type: Array
+      type: Array,
     },
     },
     screen: {
     screen: {
-      type: Number
+      type: Number,
     },
     },
     first: {
     first: {
       type: Boolean,
       type: Boolean,
-      default: false
+      default: false,
     },
     },
     props: {
     props: {
       type: Object,
       type: Object,
       default: () => {
       default: () => {
-        return {};
-      }
+        return {}
+      },
     },
     },
     collapse: {
     collapse: {
-      type: Boolean
-    }
+      type: Boolean,
+    },
   },
   },
-  created () { },
-  mounted () { },
+  created() {},
+  mounted() {},
   computed: {
   computed: {
     ...mapGetters(['roles']),
     ...mapGetters(['roles']),
-    labelKey () {
-      return this.props.label || this.config.propsDefault.label;
+    labelKey() {
+      return this.props.label || this.config.propsDefault.label
     },
     },
-    pathKey () {
-      return this.props.path || this.config.propsDefault.path;
+    pathKey() {
+      return this.props.path || this.config.propsDefault.path
     },
     },
-    iconKey () {
-      return this.props.icon || this.config.propsDefault.icon;
+    iconKey() {
+      return this.props.icon || this.config.propsDefault.icon
     },
     },
-    childrenKey () {
-      return this.props.children || this.config.propsDefault.children;
+    childrenKey() {
+      return this.props.children || this.config.propsDefault.children
+    },
+    nowTagValue() {
+      return getValue(this.$route)
     },
     },
-    nowTagValue () {
-      return getValue(this.$route);
-    }
   },
   },
   methods: {
   methods: {
-    generateTitleLab (item) {
-      return generateTitle(
-        item[this.labelKey],
-        (item.meta || {}).title,
-        this
-      );
+    generateTitleLab(item) {
+      return generateTitle(item[this.labelKey], (item.meta || {}).title, this)
     },
     },
-    vaildAvtive (item) {
-      const groupFlag = (item['group'] || []).some(ele =>
+    vaildAvtive(item) {
+      const groupFlag = (item['group'] || []).some((ele) =>
         this.$route.path.includes(ele)
         this.$route.path.includes(ele)
-      );
+      )
       if (groupFlag)
       if (groupFlag)
         // console.info(groupFlag, 'groupFlag', item['group'], this.$route.path, this.nowTagValue, item[this.pathKey])
         // console.info(groupFlag, 'groupFlag', item['group'], this.$route.path, this.nowTagValue, item[this.pathKey])
-      return this.nowTagValue === item[this.pathKey] || groupFlag;
+        return this.nowTagValue === item[this.pathKey] || groupFlag
     },
     },
-    vaildRoles (item) {
-      item.meta = item.meta || {};
-      return item.meta.roles ? item.meta.roles.includes(this.roles) : true;
+    vaildRoles(item) {
+      item.meta = item.meta || {}
+      return item.meta.roles ? item.meta.roles.includes(this.roles) : true
     },
     },
-    validatenull (val) {
-      return validatenull(val);
+    validatenull(val) {
+      return validatenull(val)
     },
     },
-    open (item) {
-      if (this.screen <= 1) this.$store.commit('SET_COLLAPSE');
+    open(item) {
+      if (this.screen <= 1) this.$store.commit('SET_COLLAPSE')
       // this.$router.$winseaviewRouter.group = item.group;
       // this.$router.$winseaviewRouter.group = item.group;
       // this.$router.$winseaviewRouter.meta = item.meta;
       // this.$router.$winseaviewRouter.meta = item.meta;
       this.$router.push({
       this.$router.push({
         path: getPath({
         path: getPath({
           name: item[this.labelKey],
           name: item[this.labelKey],
           src: item[this.pathKey],
           src: item[this.pathKey],
-          i18n: (item.meta || {}).i18n
+          i18n: (item.meta || {}).i18n,
         }),
         }),
-        query: item.query
-      });
-    }
-  }
-};
+        query: item.query,
+      })
+    },
+  },
+}
 </script>
 </script>
 
 

+ 3 - 3
src/permission.js

@@ -11,7 +11,7 @@ NProgress.configure({
   showSpinner: false
   showSpinner: false
 });
 });
 
 
-const whiteList = ['/login', '/ship_login', '/userAgreement', '/privacyAgreement', '/about', 'lab'];
+const whiteList = ['/login', '/ship_login', '/userAgreement', '/privacyAgreement', '/about', 'lab', '/contractManagement'];
 
 
 router.beforeEach(async (to, _, next) => {
 router.beforeEach(async (to, _, next) => {
   NProgress.start();
   NProgress.start();
@@ -89,13 +89,13 @@ router.afterEach(() => {
   NProgress.done();
   NProgress.done();
 });
 });
 
 
-function checkLoginUser () {
+function checkLoginUser() {
   if (location.port) {
   if (location.port) {
     return;
     return;
   }
   }
 }
 }
 
 
-function getLoginOutUrl () {
+function getLoginOutUrl() {
   if (process.env.VUE_APP_PACKAGE_ENV === 'ship') {
   if (process.env.VUE_APP_PACKAGE_ENV === 'ship') {
     return '/ship_login';
     return '/ship_login';
   }
   }

+ 2 - 5
src/router/index.js

@@ -85,13 +85,10 @@ export const constantRoutes = [
 
 
 let cofigRouter = []
 let cofigRouter = []
 const modulesFiles = require.context('../views', true, /.js$/)
 const modulesFiles = require.context('../views', true, /.js$/)
-console.log(modulesFiles.keys())
-modulesFiles.keys().forEach((model_item,key) => {
-  console.log(modulesFiles(model_item).default)
+modulesFiles.keys().forEach((model_item, key) => {
   if (model_item === 'index.js' || modulesFiles(model_item).default === undefined || modulesFiles(model_item).default.path === undefined) return
   if (model_item === 'index.js' || modulesFiles(model_item).default === undefined || modulesFiles(model_item).default.path === undefined) return
   cofigRouter = cofigRouter.concat(modulesFiles(model_item).default)
   cofigRouter = cofigRouter.concat(modulesFiles(model_item).default)
 })
 })
-console.log(cofigRouter)
 // 需要根据用户角色动态加载的路由
 // 需要根据用户角色动态加载的路由
 export const asyncRoutes = cofigRouter
 export const asyncRoutes = cofigRouter
 const createRouter = () =>
 const createRouter = () =>
@@ -106,7 +103,7 @@ const createRouter = () =>
 
 
 const router = createRouter()
 const router = createRouter()
 
 
-export function resetRouter () {
+export function resetRouter() {
   const newRouter = createRouter()
   const newRouter = createRouter()
   router.matcher = newRouter.matcher // reset router
   router.matcher = newRouter.matcher // reset router
 }
 }

+ 12 - 9
src/store/modules/permission.js

@@ -11,7 +11,7 @@ import {
  * @param routes asyncRoutes
  * @param routes asyncRoutes
  * @param roles 传递参数-用户权限内容
  * @param roles 传递参数-用户权限内容
  */
  */
-function filterAsyncRoutes (routes, roles) {
+function filterAsyncRoutes(routes, roles) {
   const res = [];
   const res = [];
   routes.forEach(route => {
   routes.forEach(route => {
     const currentRoute = {
     const currentRoute = {
@@ -19,16 +19,17 @@ function filterAsyncRoutes (routes, roles) {
     };
     };
     if (currentRoute.meta && currentRoute.meta.module) {
     if (currentRoute.meta && currentRoute.meta.module) {
       const routeModule = currentRoute.meta.module;
       const routeModule = currentRoute.meta.module;
-      if (roles.some(role => role.indexOf(routeModule) === 0)) {
-        if (Array.isArray(currentRoute.children) && currentRoute.children.length > 0) {
-          currentRoute.children = filterAsyncRoutes(currentRoute.children, roles);
-        }
-        res.push(currentRoute);
+      // if (roles.some(role => role.indexOf(routeModule) === 0)) {
+      if (Array.isArray(currentRoute.children) && currentRoute.children.length > 0) {
+        currentRoute.children = filterAsyncRoutes(currentRoute.children, roles);
       }
       }
+      res.push(currentRoute);
+      // }
     } else {
     } else {
       res.push(currentRoute);
       res.push(currentRoute);
     }
     }
   })
   })
+  // console.log(routes)
   return res
   return res
 }
 }
 
 
@@ -38,7 +39,7 @@ function filterAsyncRoutes (routes, roles) {
  * @param {*} res
  * @param {*} res
  * @param {*} parentModule
  * @param {*} parentModule
  */
  */
-function handleRoles (roles, res, parentModule) {
+function handleRoles(roles, res, parentModule) {
   roles.forEach((role) => {
   roles.forEach((role) => {
     if (Array.isArray(role.children) && role.children.length > 0) {
     if (Array.isArray(role.children) && role.children.length > 0) {
       handleRoles(role.children, res, parentModule + role.name + '.')
       handleRoles(role.children, res, parentModule + role.name + '.')
@@ -56,9 +57,10 @@ const state = {
 const mutations = {
 const mutations = {
   SET_ROUTES: (state, routes) => {
   SET_ROUTES: (state, routes) => {
     const routerList = constantRoutes.concat(routes)
     const routerList = constantRoutes.concat(routes)
-	console.log(routerList)
+    // console.log(routerList)
     state.menu = leftMenu(routerList, {})
     state.menu = leftMenu(routerList, {})
     state.routes = routerList
     state.routes = routerList
+    console.log(routerList)
   },
   },
   SET_MENU: (state, menu) => {
   SET_MENU: (state, menu) => {
     state.menu = menu
     state.menu = menu
@@ -110,13 +112,14 @@ const leftMenu = (menuList, { path = '' }) => {
 }
 }
 
 
 const actions = {
 const actions = {
-  generateRoutes ({
+  generateRoutes({
     commit
     commit
   }) {
   }) {
     return new Promise(async resolve => {
     return new Promise(async resolve => {
       const data = await getRoule().toPromise()
       const data = await getRoule().toPromise()
       const roles = [];
       const roles = [];
       handleRoles(data, roles, '');
       handleRoles(data, roles, '');
+      // console.log(roles)
       const accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
       const accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
       commit('user/SET_ROLES', roles, { root: true });
       commit('user/SET_ROLES', roles, { root: true });
       commit('SET_ROUTES', accessedRoutes)
       commit('SET_ROUTES', accessedRoutes)

+ 4 - 2
src/utils/util.js

@@ -169,7 +169,7 @@ export const fullscreenToggel = () => {
  * esc监听全屏
  * esc监听全屏
  */
  */
 export const listenfullscreen = (callback) => {
 export const listenfullscreen = (callback) => {
-  function listen () {
+  function listen() {
     callback()
     callback()
   }
   }
   document.addEventListener('fullscreenchange', function () {
   document.addEventListener('fullscreenchange', function () {
@@ -362,9 +362,11 @@ export const closeTag = value => {
 export const generateTitle = (title, key, _this) => {
 export const generateTitle = (title, key, _this) => {
   const hasKey = _this.$te('route.' + (key || title));
   const hasKey = _this.$te('route.' + (key || title));
   if (hasKey) {
   if (hasKey) {
-    const translatedTitle = _this.$t('route.' + (key || title));
+    const translatedTitle = _this.$t('route.' + (key || title))
     return translatedTitle;
     return translatedTitle;
+
   }
   }
+  console.log(title)
   return title;
   return title;
 }
 }
 //处理路由
 //处理路由

+ 33 - 33
src/utils/validate.js

@@ -2,87 +2,87 @@
  * Created by jiachenpan on 16/11/18.
  * Created by jiachenpan on 16/11/18.
  */
  */
 
 
-export function isExternal (path) {
+export function isExternal(path) {
   return /^(https?:|mailto:|tel:)/.test(path)
   return /^(https?:|mailto:|tel:)/.test(path)
 }
 }
 
 
-export function validPassword (str) {
+export function validPassword(str) {
   const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/
   const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
-export function validUserVeriCode (str) {
+export function validUserVeriCode(str) {
   const reg = /^\d{6}$/
   const reg = /^\d{6}$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
-export function validUserCellPhone (str) {
+export function validUserCellPhone(str) {
   const reg = /^1[34578]\d{9}$/
   const reg = /^1[34578]\d{9}$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
-export function validURL (url) {
+export function validURL(url) {
   const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
   const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
   return reg.test(url)
   return reg.test(url)
 }
 }
 
 
-export function validLowerCase (str) {
+export function validLowerCase(str) {
   const reg = /^[a-z]+$/
   const reg = /^[a-z]+$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
-export function validUpperCase (str) {
+export function validUpperCase(str) {
   const reg = /^[A-Z]+$/
   const reg = /^[A-Z]+$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
-export function validAlphabets (str) {
+export function validAlphabets(str) {
   const reg = /^[A-Za-z]+$/
   const reg = /^[A-Za-z]+$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
-export function validEmail (email) {
+export function validEmail(email) {
   const reg = /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
   const reg = /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
   return reg.test(email)
   return reg.test(email)
 }
 }
 
 
-export function isString (str) {
+export function isString(str) {
   if (typeof str === 'string' || str instanceof String) {
   if (typeof str === 'string' || str instanceof String) {
     return true
     return true
   }
   }
   return false
   return false
 }
 }
 
 
-export function isArray (arg) {
+export function isArray(arg) {
   if (typeof Array.isArray === 'undefined') {
   if (typeof Array.isArray === 'undefined') {
     return Object.prototype.toString.call(arg) === '[object Array]'
     return Object.prototype.toString.call(arg) === '[object Array]'
   }
   }
   return Array.isArray(arg)
   return Array.isArray(arg)
 }
 }
-export function isNumber (str) {
+export function isNumber(str) {
   const reg = /^[0-9]+$/
   const reg = /^[0-9]+$/
   return reg.test(str)
   return reg.test(str)
 }
 }
-export function cardId (str) {
+export function cardId(str) {
   const reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
   const reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 // 正整数
 // 正整数
-export function isNumberInteger (str) {
+export function isNumberInteger(str) {
   const reg = /^[1-9]\d*$/
   const reg = /^[1-9]\d*$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 // 其他电话
 // 其他电话
-export function otherPhone (str) {
+export function otherPhone(str) {
   const reg = /^[0-9-\-;]*$/
   const reg = /^[0-9-\-;]*$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 // 纯11位手机号码
 // 纯11位手机号码
-export function mobilePhone (str) {
+export function mobilePhone(str) {
   const reg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/
   const reg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/
   return reg.test(str)
   return reg.test(str)
 }
 }
-export function convertTwoDigitNumber (value) {
+export function convertTwoDigitNumber(value) {
   return value.replace(/[^\d.]/g, '')
   return value.replace(/[^\d.]/g, '')
     .replace(/\.{2,}/g, '.')
     .replace(/\.{2,}/g, '.')
     .replace('.', '$#$')
     .replace('.', '$#$')
@@ -94,13 +94,13 @@ export function convertTwoDigitNumber (value) {
 
 
 
 
 
 
-export function isvalidUsername (str) {
+export function isvalidUsername(str) {
   const valid_map = ['admin', 'editor']
   const valid_map = ['admin', 'editor']
   return valid_map.indexOf(str.trim()) >= 0
   return valid_map.indexOf(str.trim()) >= 0
 }
 }
 
 
 /* 合法uri*/
 /* 合法uri*/
-export function validateURL (textval) {
+export function validateURL(textval) {
   const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
   const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
   return urlregex.test(textval)
   return urlregex.test(textval)
 }
 }
@@ -108,7 +108,7 @@ export function validateURL (textval) {
  * 邮箱
  * 邮箱
  * @param {*} s
  * @param {*} s
  */
  */
-export function isEmail (s) {
+export function isEmail(s) {
   return /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s)
   return /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s)
 }
 }
 
 
@@ -116,7 +116,7 @@ export function isEmail (s) {
  * 手机号码
  * 手机号码
  * @param {*} s
  * @param {*} s
  */
  */
-export function isMobile (s) {
+export function isMobile(s) {
   return /^1[0-9]{10}$/.test(s)
   return /^1[0-9]{10}$/.test(s)
 }
 }
 
 
@@ -124,7 +124,7 @@ export function isMobile (s) {
  * 电话号码
  * 电话号码
  * @param {*} s
  * @param {*} s
  */
  */
-export function isPhone (s) {
+export function isPhone(s) {
   return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s)
   return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s)
 }
 }
 
 
@@ -132,24 +132,24 @@ export function isPhone (s) {
  * URL地址
  * URL地址
  * @param {*} s
  * @param {*} s
  */
  */
-export function isURL (s) {
+export function isURL(s) {
   return /^http[s]?:\/\/.*/.test(s)
   return /^http[s]?:\/\/.*/.test(s)
 }
 }
 
 
 /* 小写字母*/
 /* 小写字母*/
-export function validateLowerCase (str) {
+export function validateLowerCase(str) {
   const reg = /^[a-z]+$/
   const reg = /^[a-z]+$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
 /* 大写字母*/
 /* 大写字母*/
-export function validateUpperCase (str) {
+export function validateUpperCase(str) {
   const reg = /^[A-Z]+$/
   const reg = /^[A-Z]+$/
   return reg.test(str)
   return reg.test(str)
 }
 }
 
 
 /* 大小写字母*/
 /* 大小写字母*/
-export function validatAlphabets (str) {
+export function validatAlphabets(str) {
   const reg = /^[A-Za-z]+$/
   const reg = /^[A-Za-z]+$/
   return reg.test(str)
   return reg.test(str)
 }
 }
@@ -174,7 +174,7 @@ export const vaildatePc = function () {
  * @param email
  * @param email
  * @returns {boolean}
  * @returns {boolean}
  */
  */
-export function validateEmail (email) {
+export function validateEmail(email) {
   const re = /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
   const re = /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
   return re.test(email)
   return re.test(email)
 }
 }
@@ -182,7 +182,7 @@ export function validateEmail (email) {
 /**
 /**
  * 判断身份证号码
  * 判断身份证号码
  */
  */
-export function cardid (code) {
+export function cardid(code) {
   let list = [];
   let list = [];
   let result = true;
   let result = true;
   let msg = '';
   let msg = '';
@@ -266,7 +266,7 @@ export function cardid (code) {
 /**
 /**
  * 判断手机号码是否正确
  * 判断手机号码是否正确
  */
  */
-export function isvalidatemobile (phone) {
+export function isvalidatemobile(phone) {
   let list = [];
   let list = [];
   let result = true;
   let result = true;
   let msg = '';
   let msg = '';
@@ -292,7 +292,7 @@ export function isvalidatemobile (phone) {
 /**
 /**
  * 判断姓名是否正确
  * 判断姓名是否正确
  */
  */
-export function validatename (name) {
+export function validatename(name) {
   var regName = /^[\u4e00-\u9fa5]{2,4}$/;
   var regName = /^[\u4e00-\u9fa5]{2,4}$/;
   if (!regName.test(name)) return false;
   if (!regName.test(name)) return false;
   return true;
   return true;
@@ -300,7 +300,7 @@ export function validatename (name) {
 /**
 /**
  * 判断是否为整数
  * 判断是否为整数
  */
  */
-export function validatenum (num, type) {
+export function validatenum(num, type) {
   let regName = /[^\d.]/g;
   let regName = /[^\d.]/g;
   if (type == 1) {
   if (type == 1) {
     if (!regName.test(num)) return false;
     if (!regName.test(num)) return false;
@@ -313,7 +313,7 @@ export function validatenum (num, type) {
 /**
 /**
  * 判断是否为小数
  * 判断是否为小数
  */
  */
-export function validatenumord (num, type) {
+export function validatenumord(num, type) {
   let regName = /[^\d.]/g;
   let regName = /[^\d.]/g;
   if (type == 1) {
   if (type == 1) {
     if (!regName.test(num)) return false;
     if (!regName.test(num)) return false;
@@ -326,7 +326,7 @@ export function validatenumord (num, type) {
 /**
 /**
  * 判断是否为空
  * 判断是否为空
  */
  */
-export function validatenull (val) {
+export function validatenull(val) {
   if (typeof val == 'boolean') {
   if (typeof val == 'boolean') {
     return false;
     return false;
   }
   }

+ 62 - 0
src/views/contractManagement/component/routers/route.js

@@ -0,0 +1,62 @@
+import Layout from '@/layout/index';
+
+const contractManagementRouter = {
+  path: '/contractManagement',
+  component: Layout,
+  redirect: '/contractManagement',
+  name: 'contractManagement',
+  alwaysShow: true, // will always show the root menu
+  meta: {
+    title: 'contractManagement',
+    module: 'contractManagement',
+    icon: 'cg'
+  },
+  children: [
+    {
+      path: 'salesContract',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/salesContract'),
+      name: 'salesContract',
+      meta: {
+        title: 'salesContract',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.salesContract',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      }
+    },
+    // 采购合同
+    {
+      path: 'purchaseContract',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/purchaseContract'),
+      name: 'purchaseContract',
+      meta: {
+        title: 'purchaseContract',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.purchaseContract',
+        permissicon: [],
+        keepAlive: true
+      }
+    },
+    {
+      path: 'salesContractExamine',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/salesContractExamine'),
+      name: 'salesContractExamine',
+      meta: {
+        title: 'salesContractExamine',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.salesContract.salesContractExamine',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    }
+  ],
+
+};
+
+export default contractManagementRouter;

+ 296 - 0
src/views/contractManagement/purchaseContract.vue

@@ -0,0 +1,296 @@
+<!--采购合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <!-- 弹出页面-审核通过 -->
+    <BaseContentModalScrap
+      v-model="dialogApproveFormVisible"
+      :title="$t('common.opinion')"
+      :isRules="false"
+      @confirm="approve"
+    />
+  </div>
+</template>
+<script>
+import { getVesselOne } from '@/model/procurement/basic'
+import { dayjs } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      // 提交类型
+      submitType: true,
+      tableData: [],
+    }
+  },
+  created() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.showType = this.isShow
+  },
+  methods: {
+    // 获得船舶对象
+    getVesselData() {
+      getVesselOne({
+        vesselId: this.vesselId,
+      })
+        .toPromise()
+        .then((succ) => {
+          this.monetaryKey = succ.manageTypeKey
+          if (!this.monetaryKey) {
+            // this.monetaryKey = "1";
+            this.showType = false
+          }
+        })
+        .catch((error) => {
+          console.log(error)
+        })
+    },
+    // 行文字颜色控制
+    tableRowClassName(row) {
+      if (this.monetaryKey == 4) {
+        if (row.row.remainingAmountAterPurchase < 0) {
+          this.submitType = false
+          return 'error-row'
+        }
+      } else {
+        if (row.row.localCurrency > row.row.remainBudgetMoney) {
+          this.submitType = false
+          return 'error-row'
+        }
+      }
+    },
+    // 显示弹出框前准备
+    showDialog() {
+      this.$emit('viewSpareMoneyGetDate')
+    },
+    // 数据处理
+    viewSpareMoneyGetDate: async function (subData, showType) {
+      if (this.monetaryKey == 4) {
+        //备用金
+
+        let originalCoin = 0
+        let localCurrency = 0
+        // 数据整合
+        for (let i = 0; i < subData.length; i++) {
+          originalCoin += subData[i].originalCoin
+          localCurrency += subData[i].localCurrency
+        }
+
+        let moneydata = await this.getdate()
+        this.tableDate = [
+          {
+            originalCoin: originalCoin,
+            localCurrency: localCurrency,
+            imprestBalance: 0,
+            warningThreshold: 0,
+          },
+        ]
+        if (moneydata) {
+          this.tableDate[0].imprestBalance = parseFloat(
+            this.tableDate[0].imprestBalance *
+              (this.tableDate[0].warningThreshold / 100)
+          ).toFixed(2)
+
+          this.tableDate[0].warningThreshold = moneydata.warningThreshold
+        }
+        this.tableDate[0].remainingAmountAterPurchase = parseFloat(
+          this.tableDate[0].imprestBalance - this.tableDate[0].localCurrency
+        ).toFixed(2)
+
+        if (this.tableDate[0].remainingAmountAterPurchase < 0) {
+          this.submitType = false
+        }
+      } else {
+        //余额
+        if (this.budgetYear) {
+          // let myDate = new Date()
+          // this.year = myDate.getFullYear()
+          this.year = dayjs().format('YYYY')
+        } else {
+          this.year = this.budgetYear.substr(0, 4)
+        }
+
+        for (let i = 0; i < subData.length; i++) {
+          let moneydata = await this.getdate(subData[i].subjectId)
+          subData[i].budgetMoney = parseFloat(moneydata.budgetMoney).toFixed(2)
+          subData[i].remainBudgetMoney = parseFloat(
+            moneydata.remainBudgetMoney
+          ).toFixed(2)
+
+          subData[i].remainingAmountAterPurchase = parseFloat(
+            subData[i].remainBudgetMoney - subData[i].localCurrency
+          ).toFixed(2)
+
+          if (
+            subData[i].budgetMoney <= 0 ||
+            subData[i].remainingAmountAterPurchase <= 0
+          ) {
+            subData[i].remainingAmount = 0
+          } else {
+            subData[i].remainingAmount =
+              subData[i].remainingAmountAterPurchase / subData[i].budgetMoney
+          }
+          if (subData[i].remainingAmount <= 0) {
+            subData[i].remainingAmount = 0
+          }
+
+          if (subData[i].localCurrency > subData[i].remainBudgetMoney) {
+            this.submitType = false
+          }
+        }
+        this.tableDate = subData
+      }
+      if (showType != false) {
+        this.dialogViewSpareMoney = true
+      }
+      return Promise.resolve(this.submitType)
+    },
+    // 数据获取
+    getdate: async function (subId) {},
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+</style>

+ 216 - 0
src/views/contractManagement/salesContract.vue

@@ -0,0 +1,216 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <el-table :data="tableData" style="width: 100%">
+      <el-table-column type="index" />
+      <el-table-column prop="date" label="合同编号" width="80">
+      </el-table-column>
+      <el-table-column prop="name" label="货名" width="80"> </el-table-column>
+      <el-table-column prop="address" label="品级"> </el-table-column>
+      <el-table-column prop="address" label="重量(吨)"> </el-table-column>
+      <el-table-column prop="address" label="合同单价(元)"> </el-table-column>
+      <el-table-column prop="address" label="包装方式"> </el-table-column>
+      <el-table-column prop="address" label="买方"> </el-table-column>
+      <el-table-column prop="address" label="卖方"> </el-table-column>
+      <el-table-column prop="address" label="已完成(吨)"> </el-table-column>
+      <el-table-column prop="address" label="状态"> </el-table-column>
+      <el-table-column prop="address" label="签订日期"> </el-table-column>
+      <el-table-column prop="address" label="未回款(元)"> </el-table-column>
+      <el-table-column prop="address" label="附件"> </el-table-column>
+      <el-table-column prop="address" label="操作" width="300">
+        <template slot-scope="scope">
+          <el-button
+            type="success"
+            size="small"
+            @click="handleExamine(scope.row)"
+            >查看</el-button
+          >
+          <el-button
+            type="primary"
+            size="small"
+            @click="handleUpdate(scope.row)"
+            >编辑</el-button
+          >
+          <el-button type="danger" size="small" @click="handleDelete(scope.row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 弹出页面-审核通过 -->
+    <BaseContentModalScrap
+      v-model="dialogApproveFormVisible"
+      :title="$t('common.opinion')"
+      :isRules="false"
+      @confirm="approve"
+    />
+  </div>
+</template>
+<script>
+import { getVesselOne } from '@/model/procurement/basic'
+import { dayjs } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+    }
+  },
+  created() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.showType = this.isShow
+  },
+  methods: {
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleExamine() {
+      this.$router.push({ path: 'salesContractExamine' })
+    },
+    approve() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+</style>

+ 170 - 0
src/views/contractManagement/salesContractExamine.vue

@@ -0,0 +1,170 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>11111</div>
+</template>
+<script>
+import { getVesselOne } from '@/model/procurement/basic'
+import { dayjs } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+    }
+  },
+  created() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.showType = this.isShow
+  },
+  methods: {
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleExamine() {},
+    approve() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+</style>

File diff suppressed because it is too large
+ 442 - 221
src/views/login/index.vue


+ 4 - 4
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const path = require('path')
 
 
-function resolve (dir) {
+function resolve(dir) {
   return path.join(__dirname, dir)
   return path.join(__dirname, dir)
 }
 }
 /**
 /**
@@ -63,7 +63,7 @@ const cdn = {
     ship: [
     ship: [
       "/cdn/element-ui/2.13.2/theme-chalk/index.css",
       "/cdn/element-ui/2.13.2/theme-chalk/index.css",
       `./static/iconfont/iconfont.css`,
       `./static/iconfont/iconfont.css`,
-	  `./static/logo/iconfont.css`
+      `./static/logo/iconfont.css`
     ],
     ],
     product: [
     product: [
       `/cdn/winseaview/index.css`,
       `/cdn/winseaview/index.css`,
@@ -142,7 +142,7 @@ module.exports = {
 
 
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
-        target: 'http://192.168.1.118:8090/',
+        target: 'http://localhost:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://product-server.winsea.com/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://192.168.24.5:8098',//目标地址
@@ -172,7 +172,7 @@ module.exports = {
       config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log', 'console.info']
       config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log', 'console.info']
     }
     }
   },
   },
-  chainWebpack (config) {
+  chainWebpack(config) {
     config.plugins.delete('preload')
     config.plugins.delete('preload')
     config.plugins.delete('prefetch')
     config.plugins.delete('prefetch')
     config.output.chunkFilename('static/js/[name].[chunkhash].js').end()
     config.output.chunkFilename('static/js/[name].[chunkhash].js').end()

Some files were not shown because too many files changed in this diff