Your Name 3 yıl önce
ebeveyn
işleme
f3ca64b720

+ 2 - 2
build/utils.js

@@ -16,8 +16,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 // let devModules = ['index','WMS']
-let devModules = ['all']
-// let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
+// let devModules = ['all']
+let devModules = ['index','ADMINISTRATORS'];
 // let devModules = ['index','WMS','sale','appoint'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 2 - 2
config/index.js

@@ -64,8 +64,8 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
-    // target: "http://localhost:8019",
+    // target: "http://172.16.33.166:8080",
+    target: "http://192.168.1.108:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 21 - 0
src/views/ADMINISTRATORS/app.html

@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta content="智慧物流平台" name="keywords">
+    <meta content="智慧物流平台" name="description">
+    <title>合同管理 - 智慧物流平台</title>
+    <link href="../static/css/common.css" rel="stylesheet"/>
+    <link href="../static/img/favicon.ico" rel="shortcut icon"/>
+    <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>
+    <script src="../static/lib/jquery/jquery.PrintArea.js" type="text/javascript"></script>
+    <script src="../static/lib/qrcode.min.js" type="text/javascript"></script>
+    <script src='../static/lib/XLSX/xlsx.core.min.js' type='text/javascript'></script>
+    <script src="../static/js/common.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="app"></div>
+  </body>
+</html>

+ 106 - 0
src/views/ADMINISTRATORS/app.js

@@ -0,0 +1,106 @@
+// The Vue build version to load with the `import` command
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
+import Vue from 'vue';
+import App from '@/components/App.vue';
+// include
+import '@/config/include.js';
+
+// 通用store
+import store from '@/store/index.js';
+
+// router
+import router from './router/index.js';
+
+import VueApollo from 'vue-apollo'
+
+import apollo from '@/config/apolloConfig.js'
+
+// 关闭生产模式下给出的提示
+Vue.config.productionTip = false;
+
+Vue.use(VueApollo)
+
+// 注册表格的全局组件
+import DilCommonUI from "@/components/DilCommonUI";
+Vue.use(DilCommonUI);
+
+import vuescroll from "vuescroll";//引入vuescroll
+import "vuescroll/dist/vuescroll.css";//引入vuescroll样式
+Vue.use(vuescroll);//使用
+
+// 导出Excel全局组件
+import tableToExcel from '@/components/exportExcel/exportExcel'
+Vue.use(tableToExcel)
+
+const apolloProvider = new VueApollo({
+    defaultClient: apollo
+})
+
+ //把时间戳改为正常可读的时间
+ export function renderTime(date) {
+  if(date !== null){
+      let dateee = new Date(date).toJSON();
+      return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, " ").replace(/\.[\d]{3}Z/, "");
+  }
+  return null;
+}
+//把毫秒数转换分
+export function getDuration(my_time) { 
+  if(my_time !== null){
+      return Math.floor(my_time / 1000 / 60);
+  }
+  return null;
+}
+export function sjTime(orderPlanInTime) {
+  var stringTime = renderTime(orderPlanInTime);
+  var timestamp1 = stringTime.replace(/-/g, "/");
+  return new Date(timestamp1).getTime();
+}
+//验证电话号码
+export function VerifyPhoneNumber(Phone) {
+  var myreg=/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
+  if (!myreg.test(Phone)) {
+      return false;
+  } else {
+      return true;
+  }
+}
+export function isNumber(value) {
+  //验证是否为数字
+  var patrn = /^(-)?\d+(\.\d+)?$/;
+  if (patrn.exec(value) == null || value == "") {
+    return false;
+  } else {
+    return true;
+  }
+}
+export function isIntegerNumber(value) {
+  //验证是否为整数
+  var patrn = /^\+?[1-9][0-9]*$/g;
+  if (patrn.exec(value) == null || value == "") {
+    return false;
+  } else {
+    return true;
+  }
+}
+
+//写一个方法封装date对象转换为时间字符串
+export function toDateString(value){
+    var Year = value.getFullYear();
+    var Month = ("0" + (value.getMonth() + 1)).slice(-2)
+    var Day = ("0" + (value.getDate())).slice(-2)
+    var Hours = ("0" + (value.getHours())).slice(-2)
+    var Minutes = ("0" + (value.getMinutes())).slice(-2)
+    var Seconds = ("0" + (value.getSeconds())).slice(-2)
+    var DATE = Year + "-" + Month + "-" + Day + " " + Hours + ":" + Minutes + ":" + Seconds
+    return DATE
+}
+/* eslint-disable no-new */
+new Vue({
+  el: '#app',
+  router,
+  store,
+  components: { App },
+  provide: apolloProvider.provide(),
+  template: '<App/>'
+});

+ 265 - 0
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -0,0 +1,265 @@
+// 采购内转需求
+<template>
+  <div class="admin">
+    <template>
+      <div class="admin1">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="补录计量实绩" name="first">
+              <div class="admin2">
+                <div class="carrier from">
+                    <el-form
+                    :inline="true"
+                    class="demo-form-inline"
+                    label-width="80px"
+                    >
+                    <el-form-item label="车牌号:">
+                    <el-autocomplete
+                    class="inline-input"
+                    v-model="capacityName"
+                    :fetch-suggestions="querySearchCapacity"
+                    placeholder="车牌号"
+                    :trigger-on-focus="false"
+                    @select="handleSelectCapacity"
+                    >
+                    <template slot-scope="{ item }">
+                    <div class="name">{{ item.capacityNumber }}</div>
+                    </template>
+                    </el-autocomplete>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <div class="material from">
+                <span class="text">物资:</span>
+                <el-select v-model="materialId" placeholder="请选择">
+                <el-option
+                    v-for="item in materialList"
+                    :key="item.materialId"
+                    :label="item.materialName" 
+                    :value="item.materialId"
+                >
+                </el-option>
+                </el-select>
+            </div>
+            <div class="firstWeight from">
+                <span class="demonstration">磅单号:</span>
+                <el-input v-model="poundNo"></el-input>
+            </div>
+            <div class="block">
+                <span class="demonstration">首次称重时间:</span>
+                <el-date-picker
+                v-model="value1"
+                type="datetime"
+                placeholder="选择日期时间">
+                </el-date-picker>
+            </div>
+            <div class="firstWeight from">
+                <span class="demonstration">首次称重重量(吨):</span>
+                <el-input v-model="firstWeight"></el-input>
+            </div>
+            <div class="material from">
+                <span class="text">首次汽车衡:</span>
+                <el-select v-model="truckCalFirst" placeholder="请选择">
+                <el-option
+                    v-for="item in truckCalFirstList"
+                    :key="item.value"
+                    :label="item.label" 
+                    :value="item.value"
+                >
+                </el-option>
+                </el-select>
+            </div>
+            <div class="block">
+                <span class="demonstration">二次称重时间:</span>
+                <el-date-picker
+                v-model="value2"
+                type="datetime"
+                placeholder="选择日期时间">
+                </el-date-picker>
+            </div>
+            <div class="firstWeight from">
+                <span class="demonstration">二次称重重量(吨):</span>
+                <el-input v-model="secondWeight"></el-input>
+            </div>
+            <div class="material from">
+                <span class="text">二次汽车衡:</span>
+                <el-select v-model="truckCalSecond" placeholder="请选择">
+                <el-option
+                    v-for="item in truckCalSecondList"
+                    :key="item.value"
+                    :label="item.label" 
+                    :value="item.value"
+                >
+                </el-option>
+                </el-select>
+            </div>
+            <div class="firstWeight from">
+                <span class="demonstration">净重(吨):</span>
+                <el-input v-model="netWeight"></el-input>
+            </div>
+          </div>
+          <div class="button_box">
+            <el-button @click="onClickCancel">返回</el-button>
+            <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+          </div>
+          </el-tab-pane>
+          <el-tab-pane label="修改路段顺序" name="second">
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+    </template>
+  </div>
+</template>
+<script>
+import { toDateString } from "../app.js"
+export default {
+  data() {
+    return {
+        activeName:"first",
+        capacityName:null,
+        stateCapacity:null,
+        materialList:[],
+        capacityId:null,
+        materialId:null,
+        value1:null,
+        value2:null,
+        disabled:false,
+        orderId:null,
+        firstWeight:null,
+        secondWeight:null,
+        netWeight:null,
+        poundNo:null,
+        truckCalFirstList:[],
+        truckCalSecondList:[],
+        truckCalFirst:null,
+        truckCalSecond:null
+    };
+  },
+  created(){ 
+  },
+  mounted(){
+      this.information()
+  },
+  methods: {              
+       //运力弹出层
+    handleSelectCapacity(item){    
+      this.capacityId = item.capacityId
+      this.capacityName = item.capacityNumber
+      this.axios.get("/api/v1/uc/getOrderNumber?capacityId=" + this.capacityId).then((res) =>{
+          if(res.data.code == "200"){
+              console.log(res.data.data)
+              this.orderId = res.data.data.orderId
+              this.orderNumber = res.data.data.orderNumber
+              this.axios.get("/api/v1/uc/getMaterialIdByOrderId?orderId=" + this.orderId).then((res) =>{
+                  if(res.data.code == "200"){
+                      this.materialList = res.data.data
+                  }
+              })
+          }
+      })
+    },
+    //以下是运力边输边查搜索
+    querySearchCapacity(queryString, cb) {
+        if(queryString.length < 3){
+            return
+        }
+        this.axios.get('/api/v1/uc/getCapacityNumber?index='+queryString).then((res)=>{
+        if(res.data.code == "200"){
+          var restaurantsCarrier = res.data.data
+          console.log(restaurantsCarrier,"restaurantsCarrier");
+          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
+           // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+        })     
+      },
+    createFilterCarrier(queryString) {
+        return (restaurantsCarrier)  =>  {
+          return (restaurantsCarrier.capacityNumber.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //以上是承运商边输边查搜索
+    information(){
+        this.axios.get("/api/v1/uc/getAllCalculateMes").then((res) =>{
+            
+            this.truckCalFirstList = res.data
+            this.truckCalSecondList = res.data
+        })
+    },
+    onClickConfirm(){
+        console.log(toDateString(this.value1))
+        console.log(toDateString(this.value2))
+        console.log(this.firstWeight)
+        console.log(this.secondWeight)
+        console.log(this.netWeight)
+        console.log(this.orderId)
+        console.log(this.materialId)
+        console.log(this.poundNo)
+        let map = {
+            orderNumber:this.orderNumber,
+            
+        }
+        var array = []
+        array.push(map)
+        console.log(array)
+    },
+    onClickCancel(){
+    },
+    
+  },
+};
+</script>
+<style lang="scss">
+.admin{
+  .admin1 {
+      margin-top: 40px;
+      margin-left: 40px;
+      .button_box {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            width: 100%;
+            height: 100px;
+        }
+      .admin2 { 
+         
+        margin-top: 40px; 
+        .from {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-top: 5px;
+        margin-bottom: 20px;
+        }
+        .material {
+        display: flex;
+        justify-content: center;
+        margin-top: 20px;
+        margin-right: 120px;
+        .text {
+            display: inline-block;
+            width: 170px;
+            text-align: right;
+        }
+        }
+        .block {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+        }
+        
+        .firstWeight {
+            .el-input {
+                width: 250px;
+                margin-right: 20px;
+            }
+        }
+        .carrier{
+        display: flex;
+        .el-autocomplete{
+            width: 250px;
+        }
+        }
+      }      
+  }
+  }
+</style>

+ 32 - 0
src/views/ADMINISTRATORS/router/index.js

@@ -0,0 +1,32 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+import routerBefore from '@/config/routerBefore.js'
+// 主要
+import main from '@/components/main.vue'
+// 系统配置管理
+import ADMINISTRATORS1 from '../components/ADMINISTRATORS1.vue'
+
+Vue.use(Router)
+
+const constantRouterMap = [
+  {
+    path: '/',
+    name: 'main',
+    meta: {title: '首页', code: 'xtpzgl'},
+    component: main,
+    redirect: {name: 'cargoResult'},
+    children: [
+      {path: 'ADMINISTRATORS1', name: 'ADMINISTRATORS1', meta: {code: 'xtpzgl-jggl'}, component: ADMINISTRATORS1}
+    ]
+  }
+];
+
+const router = new Router({
+  routes: constantRouterMap
+})
+//  before
+routerBefore(router, constantRouterMap);
+
+export default router;
+//  constantRouterMap
+export const routes = constantRouterMap;

+ 0 - 2
src/views/appoint/router/index.js

@@ -1,8 +1,6 @@
 import Vue from 'vue'
 import Router from 'vue-router'
-
 import routerBefore from '@/config/routerBefore.js'
-
 // 主要
 import main from '@/components/main.vue'
 // 系统配置管理