Browse Source

提交页面

caojunjie 4 years ago
parent
commit
918d961c9b

+ 1 - 0
build/utils.js

@@ -46,6 +46,7 @@ exports.cssLoaders = function (options) {
     // (which is the case during production build)
     if (options.extract) {
       return ExtractTextPlugin.extract({
+        publicPath:'../../',
         use: loaders,
         fallback: 'vue-style-loader'
       })

+ 2 - 1
build/webpack.prod.conf.js

@@ -25,6 +25,7 @@ const webpackConfig = merge(baseWebpackConfig, {
   },
   devtool: config.build.productionSourceMap ? config.build.devtool : false,
   output: {
+    publicPath:'./',
     path: config.build.assetsRoot,
     filename: utils.assetsPath('js/[name].[chunkhash].js'),
     chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
@@ -48,7 +49,7 @@ const webpackConfig = merge(baseWebpackConfig, {
       filename: utils.assetsPath('css/[name].[contenthash].css'),
       // Setting the following option to `false` will not extract CSS from codesplit chunks.
       // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
-      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
       // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
       allChunks: true,
     }),

+ 1 - 1
config/index.js

@@ -50,7 +50,7 @@ module.exports = {
     // Paths
     assetsRoot: path.resolve(__dirname, '../dist'),
     assetsSubDirectory: 'static',
-    assetsPublicPath: '/',
+    assetsPublicPath: './',
 
     /**
      * Source Maps

+ 2 - 1
src/App.vue

@@ -24,7 +24,8 @@ export default {
     };
   },
   created(){
-    console.log(this.$route.meta.keepAlive)
+    console.log("张三在此~~~");
+    // console.log(this.$route.meta.keepAlive)
     // console.log(Cookies.get('TokenKey'));
     // if (Cookies.get('TokenKey')){
     //   this.$router.push({ path: this.redirect || '/' });

BIN
src/assets/kefu.png


BIN
src/assets/login-background.jpg


BIN
src/assets/wode.png


BIN
src/assets/wuliu.png


BIN
src/assets/xinwen.png


BIN
src/assets/xuanchuan.png


BIN
src/assets/zaixian.png


+ 5 - 4
src/request/request.js

@@ -18,15 +18,15 @@ export function request(config) {
   // uEnvDev;开发者模式,点击运行
   if (process.env.NODE_ENV === 'development') {
     //测试接口
-    // baseURL = "https://test.tms.tubaosoft.com/prod-api"
-    baseURL = 'http://192.168.1.143:9010';
+    // baseURL = "http://192.168.1.143:9010"
+    baseURL = 'https://test.ke.tubaosoft.com/prod-api';
   }
   // uEnvProd;生产模式,点击发行
   if (process.env.NODE_ENV === 'production') {
     // baseURL = "http://192.168.137.1:9010"
     //正式接口
     // baseURL = "https://test.tms.tubaosoft.com/prod-api"
-    baseURL = 'http://121.36.212.131:9010';
+    baseURL = 'https://test.ke.tubaosoft.com/prod-api';
   }
   let newVar = axios.create({
     baseURL: baseURL,
@@ -45,13 +45,14 @@ export function request(config) {
   // 响应拦截
   newVar.interceptors.response.use(function (response) {
     // console.log(response);
-    if (response.data.code == 401) {
+    if (response.data.code === 401) {
       MessageBox.confirm('未登录或登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
           confirmButtonText: '重新登录',
           cancelButtonText: '取消',
           type: 'warning'
         }
       ).then(() => {
+        Cookies.remove();
         // store.dispatch('LogOut').then(() => {
         //   location.href = '/login';
           window.location.href= '/login'

+ 7 - 6
src/router/index.js

@@ -5,11 +5,12 @@ Vue.use(Router);
 
 export default new Router({
   mode: 'history',
+  // base:'http://test.fms.tubaosoft.com/web/',
   routes: [
     {
       path: '/',
       name: 'home',
-      component: () => import(/* webpackChunkName: "about" */ '../views/home/index'),
+      component: () => import('../views/home/index'),
       meta: {
         keepAlive: true,
         footer:true
@@ -17,7 +18,7 @@ export default new Router({
     },{
       path: '/contractPlacing',
       name: 'contractPlacing',
-      component: () => import(/* webpackChunkName: "about" */ '../views/placingOrder/contractPlacing'),
+      component: () => import('../views/placingOrder/contractPlacing'),
       meta: {
         keepAlive: true,
         footer:true
@@ -25,7 +26,7 @@ export default new Router({
     },{
       path: '/inquiryAndOrder',
       name: 'inquiryAndOrder',
-      component: () => import(/* webpackChunkName: "about" */ '../views/inquiryAndOrder/index'),
+      component: () => import('../views/inquiryAndOrder/index'),
       meta: {
         keepAlive: true,
         footer:true
@@ -33,7 +34,7 @@ export default new Router({
     },{
       path: '/myorder',
       name: 'myorder',
-      component: () => import(/* webpackChunkName: "about" */ '../views/management/myorder'),
+      component: () => import('../views/management/myorder'),
       meta: {
         keepAlive: true,
         footer:true
@@ -41,7 +42,7 @@ export default new Router({
     },{
       path: '/login',
       name: 'login',
-      component: () => import(/* webpackChunkName: "about" */ '../views/login/index'),
+      component: () => import('../views/login/index'),
       meta: {
         keepAlive: false,
         footer:true
@@ -49,7 +50,7 @@ export default new Router({
     },{
       path: '/contractPlacing/index',
       name: '/contractPlacing/index',
-      component: () => import(/* webpackChunkName: "about" */ '../views/contractPlacing/index'),
+      component: () => import('../views/contractPlacing/index'),
       meta: {
         keepAlive: true,
         footer:false

+ 50 - 34
src/views/contractPlacing/index.vue

@@ -255,7 +255,6 @@
           </div>
         </div>
       </div>
-      </el-form>
       <el-form :model="list" ref="list" :rules="rulEs" label-position="top">
       <!--      货物信息-->
       <!--      基本资料-->
@@ -351,20 +350,24 @@
             </el-form-item>
           </div>
           <div class="mainModules" v-if="whether === true">
-            <span>设置温度(℃)</span>
-            <el-input style="width:80%;margin-left:20px;top: 4px" v-model="list.fTemperature"/>
+            <el-form-item label="设置温度(℃)">
+              <el-input style="width:80%;" v-model="list.fTemperature" @input="temperature" onkeyup="this.value= this.value.match(/^[1-9]\d*$/)"/>
+            </el-form-item>
           </div>
           <div class="mainModules" v-if="whether === true">
-            <span>风门开度(%)</span>
-            <el-input style="width:80%;margin-left:20px;top: 4px" v-model="list.fDraught"/>
+            <el-form-item label="风门开度(%)">
+              <el-input style="width:80%;" v-model="list.fDraught"/>
+            </el-form-item>
           </div>
           <div class="mainModules" v-if="whether === true">
-            <span>湿度设置(%)</span>
-            <el-input style="width:80%;margin-left:20px;top: 4px" v-model="list.fHumidity"/>
+            <el-form-item label="湿度设置(%)">
+              <el-input style="width:80%;" v-model="list.fHumidity"/>
+            </el-form-item>
           </div>
           <div class="mainModules" v-if="whether === true">
-            <span>预冷要求</span>
-            <el-input style="width:80%;margin-left:20px;top: 4px" v-model="list.fPrecooling"/>
+            <el-form-item label="预冷要求">
+              <el-input style="width:80%;" v-model="list.fPrecooling"/>
+            </el-form-item>
           </div>
           <div class="mainModules">
             <el-form-item label="危险化学品" prop="fIfdanger">
@@ -389,6 +392,7 @@
           </div>
         </div>
       </div>
+      </el-form>
       <!--      费用信息-->
       <div class="moduleStyle">
         <div class="titleBox">
@@ -399,7 +403,7 @@
           <div class="mainModules">
             <el-form-item label="是否办理保险" prop="fInsurance">
               <el-select style="width:80%;" placeholder="请选择"
-                         v-model="list.fInsurance">
+                         v-model="form.fInsurance">
                 <el-option
                   v-for="(dict, index) in insurance"
                   :key="dict.dictValue"
@@ -411,13 +415,12 @@
           </div>
           <div class="mainModules">
             <el-form-item label="保险货值(万元)" prop="fInsuranceamt">
-              <el-input style="width:80%;" v-model="list.fInsuranceamt" :disabled="list.fInsurance == '2'"/>
+              <el-input style="width:80%;" v-model="form.fInsuranceamt" :disabled="list.fInsurance == '2'"/>
             </el-form-item>
           </div>
         </div>
       </div>
       </el-form>
-
       <!--    箱信息-->
       <div class="moduleStyle" v-if="boxInformation">
         <div class="titleBox">
@@ -658,6 +661,8 @@ export default {
         fConsigneername: [{ required: true, message: " ", trigger: "blur" }],
         fConsigneeattn: [{ required: true, message: " ", trigger: "blur" }],
         fConsigneetel: [{ required: true, message: " ", trigger: "blur" }],
+        fInsurance: [{ required: true, message: " ", trigger: "blur" }],
+        fInsuranceamt: [{ required: true, message: " ", trigger: "blur" }],
       },
       rulEs:{
         fGoodsid: [{ required: true, message: " ", trigger: "blur" }],
@@ -668,8 +673,6 @@ export default {
         fCntrstatus: [{ required: true, message: " ", trigger: "blur" }],
         fSoc: [{ required: true, message: " ", trigger: "blur" }],
         fIfdanger: [{ required: true, message: " ", trigger: "blur" }],
-        fInsurance: [{ required: true, message: " ", trigger: "blur" }],
-        fInsuranceamt: [{ required: true, message: " ", trigger: "blur" }],
       },
       fMblnoOptions: [],
       paymentMethod: [],
@@ -684,13 +687,13 @@ export default {
       boxInformation: false,
       tableData: [],
       container: [],
-      form: {},
-      etentioncargo:[],
-      estimaTe: '',
-      list: {
+      form: {
         fInsuranceamt:0,
         fInsurance:'1'
       },
+      etentioncargo:[],
+      estimaTe: '',
+      list: {},
       typeGoods: '',
       whether: false,
       dangerous: [],
@@ -726,6 +729,15 @@ export default {
     }
   },
   methods: {
+    temperature(res){
+      console.log(res);
+      if (res < 20 || res > -30){
+        console.log("1111");
+        return
+      }else {
+        this.$message.error('冷藏箱温度为-30℃至20℃之间的整数');
+      }
+    },
     newlyAdded() {
       console.log(this.tableData);
       this.tableData.push({
@@ -791,13 +803,16 @@ export default {
         url: '/khwarehouse/warehousebills/submitMakingMessage',
         method: 'post',
         data: formData
-      })
-        .then(res => {
+      }).then(res => {
           console.log(res);
           if (res.data.code === 500){
             console.log(res.data.msg);
+          }else {
+            this.goods = res.data.data;
+            this.$router.push({
+              path: '/',
+            });
           }
-          this.goods = res.data.data;
         })
         .catch(err => {
           console.log(err);
@@ -919,7 +934,8 @@ export default {
     confirmOrder() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          this.$refs["form"].validate((valid) => {
+          console.log(valid);
+          this.$refs["list"].validate((valid) => {
             if (valid) {
               let formData = new window.FormData();
               formData.append('tWarehousebills', JSON.stringify(this.form));
@@ -932,6 +948,9 @@ export default {
                 .then(res => {
                   if (res.data.code === 200){
                     this.$message.success(res.data.msg);
+                    this.$router.push({
+                      path: '/',
+                    });
                   }
                   console.log(res);
                 })
@@ -949,13 +968,8 @@ export default {
         }
       });
     },
-    handleClose(done) {
-      this.$confirm('确认关闭?')
-        .then(_ => {
-          done();
-        })
-        .catch(_ => {
-        });
+    handleClose() {
+      this.dialogVisible = false
     },
     select(id) {
       for (let item in this.goods) {
@@ -969,11 +983,13 @@ export default {
       console.log(this.container);
       for (let item in this.container) {
         if (this.container[item].fId === id) {
-          this.whether = true;
-          return;
-        } else {
-          this.whether = false;
-          return;
+          if (this.container[item].fType === 2){
+            this.whether = true;
+            return
+          }else {
+            this.whether = false;
+            return
+          }
         }
       }
     }

+ 34 - 13
src/views/home/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div style="background-color: #f2f6f9">
     <el-carousel height="700px" indicator-position="none">
-      <el-carousel-item>
-        <img style="width: 100%;height: 700px;" src="http://www.kaihegroup.cn/repository/image/jjIOSFJySR6gOwMl_7_lAQ.jpg?k=1606198825000" alt="">
-      </el-carousel-item>
+<!--      <el-carousel-item>-->
+<!--        <img style="width: 100%;height: 700px;" src="http://www.kaihegroup.cn/repository/image/jjIOSFJySR6gOwMl_7_lAQ.jpg?k=1606198825000" alt="">-->
+<!--      </el-carousel-item>-->
       <el-carousel-item>
         <img style="width: 100%;height: 700px;" src="https://www.dmu.com.cn/images/banner/banner41.jpg?v=2" alt="">
       </el-carousel-item>
@@ -13,28 +13,49 @@
     </el-carousel>
 <!--    浮动块-->
 <!--    <div style="width: 60%;height: 300px;background-color: #e32121;margin: 100px auto"></div>-->
-    <div style="width: 100%;background-color: #fff;padding-top: 80px;padding-bottom: 60px">
+    <div style="width: 100%;background-color: #f2f6f9;padding-top: 10px;padding-bottom: 10px">
+      <div style="margin-bottom: 30px">
+        <h1 style="margin-bottom: -5px">SERVICE</h1>
+        <span style="border-bottom: 3px solid #25c4cd">快捷服务</span>
+      </div>
       <div style="width: 80%;height: 200px;display:flex;justify-content:space-around;margin: 0 auto">
-        <div style="width: 500px;height: 200px;background-color: #1f68d6"></div>
-        <div style="width: 500px;height: 200px;background-color: #0a273e"></div>
+        <div style="width: 500px;height: 170px;">
+          <img src="../../assets/zaixian.png" alt="" style="width: 100%;height: 170px;">
+        </div>
+        <div style="width: 500px;height: 170px;">
+          <img src="../../assets/wuliu.png" alt="" style="width: 100%;height: 170px;">
+        </div>
       </div>
       <div style="width: 80%;height: 200px;display:flex;justify-content:space-around;margin: 40px auto">
-        <div style="width: 500px;height: 200px;background-color: #027dff"></div>
-        <div style="width: 500px;height: 200px;background-color: #2c3e50"></div>
+        <div style="width: 500px;height: 170px;cursor:pointer" @click="myOrder">
+          <img src="../../assets/wode.png" alt="" style="width: 100%;height: 170px;">
+        </div>
+        <div style="width: 500px;height: 170px;">
+          <img src="../../assets/kefu.png" alt="" style="width: 100%;height: 170px;">
+        </div>
       </div>
     </div>
-    <div style="width: 100%;height: 600px;background-color: #909399">
-
+    <div style="width: 100%;height: 600px;background-color: #FFFFFF;padding-top: 10px">
+      <div style="margin-bottom: 30px;">
+        <h1 style="margin-bottom: -5px">SERVICE</h1>
+        <span style="border-bottom: 3px solid #25c4cd">快捷服务</span>
+      </div>
+      <img src="../../assets/xinwen.png" alt="">
     </div>
-    <div style="width: 100%;height: 600px;background-color: #1e4fba">
-
+    <div style="width: 100%;background-color: #1e4fba;margin-bottom: -10px">
+      <img src="../../assets/xuanchuan.png" alt="" style="width: 100%;">
     </div>
   </div>
 </template>
 
 <script>
 export default {
-  name: 'home'
+  name: 'home',
+  methods:{
+    myOrder(){
+      this.$router.push({path: '/myorder'});
+    }
+  }
 };
 </script>
 

+ 5 - 4
src/views/inquiryAndOrder/index.vue

@@ -191,8 +191,9 @@
       </div>
       <el-divider>查询船期</el-divider>
       <div style="margin: 0 auto;" v-if="detailedList.length === 0">
-        <i class="el-icon-s-release" style="font-size: 100px;color: #b7b7b7"></i>
-        <p>暂无数据</p>
+<!--        <i class="el-icon-s-release" style="font-size: 100px;color: #b7b7b7"></i>-->
+        <img src="../../assets/noShipping.png" alt="">
+        <p>抱歉,没有符合条件的船期!</p>
       </div>
       <div style="width: 100%;" v-for="(item,index) in detailedList" :key="index">
         <div
@@ -282,11 +283,11 @@
               :header-cell-style="{textAlign: 'center'}"
               :cell-style="{ textAlign: 'center' }">
               <el-table-column
-                prop="fEta"
+                prop="fEtd"
                 label="预计开航">
               </el-table-column>
               <el-table-column
-                prop="fEtd"
+                prop="fEta"
                 label="预计抵港">
               </el-table-column>
               <el-table-column

+ 11 - 6
src/views/login/index.vue

@@ -41,7 +41,6 @@
         <el-button
           :loading="loading"
           size="medium"
-          type="primary"
           style="width:100%;border-radius: 200px"
           @click.native.prevent="handleLogin"
         >
@@ -142,10 +141,16 @@ export default {
           }).then(res => {
             // console.log(res.data.token);
             // localStorage.setItem('companyName', this.company_name);
-            Cookies.set("username",this.loginForm.username);
-            Cookies.set('TokenKey', res.data.token)
-            console.log(Cookies.get());
-            this.$router.push({ path: this.redirect || '/' });
+            if (res.data.code === 500){
+              this.$message.error(res.data.msg);
+              this.loading = false;
+            }else {
+              Cookies.set("username",this.loginForm.username);
+              Cookies.set('TokenKey', res.data.token)
+              console.log(Cookies.get());
+              this.$router.push({ path: this.redirect || '/' });
+              this.loading = false;
+            }
           }).catch(err => {
             console.log(err);
             this.loading = false;
@@ -180,7 +185,7 @@ export default {
 .login-form {
   border-radius: 6px;
   //background: none;
-  background-color: rgba(0,0,0,0.05);
+  background-color: rgba(0,0,0,0.1);
   width: 400px;
   padding: 25px 25px 5px 25px;
   .el-input {

+ 24 - 3
src/views/management/myorder.vue

@@ -131,11 +131,11 @@
           </div>
           <div style="display: flex;flex-direction: column;align-items: flex-end;margin-right: -10px">
             <div
-              style="width:100px;background-color: red;height:30px;line-height: 30px;color: #fff;border-radius: 50px 0 0 50px;margin-top: -20px">
-              已驳回
+              style="width:100px;height:30px;background-color: #545c64;line-height: 30px;color: #fff;border-radius: 50px 0 0 50px;margin-top: -20px;font-size: 14px;">
+              {{item.fBillstatus}}
             </div>
             <div
-              style="width: 0px;height: 0px;border-color: #DA0000 white white #DA0000;border-width: 4px 4px 4px 4px;border-style: solid;margin-top:-2px"></div>
+              style="width: 0px;height: 0px;border-color: #000000 white white #000000;border-width: 4px 4px 4px 4px;border-style: solid;margin-top:-2px"></div>
           </div>
         </div>
         <div style="display:flex;">
@@ -157,6 +157,24 @@
           </div>
         </div>
       </div>
+<!--      <div style="float: right;height: 40px;padding-top: 30px;margin-right: 20px">-->
+<!--        <el-pagination-->
+<!--          @size-change="handleSizeChange"-->
+<!--          @current-change="handleCurrentChange"-->
+<!--          :current-page="currentPage4"-->
+<!--          :page-sizes="[100, 200, 300, 400]"-->
+<!--          :page-size="100"-->
+<!--          layout="total, sizes, prev, pager, next, jumper"-->
+<!--          :total="400">-->
+<!--        </el-pagination>-->
+<!--        <pagination-->
+<!--          v-show="total>0"-->
+<!--          :total="total"-->
+<!--          :page.sync="queryParams.pageNum"-->
+<!--          :limit.sync="queryParams.pageSize"-->
+<!--          @pagination="getList"-->
+<!--        />-->
+<!--      </div>-->
     </div>
   </div>
 </template>
@@ -174,6 +192,9 @@ export default {
       dataList: []
     };
   },
+  created() {
+    this.getList()
+  },
   methods: {
     getList() {
       request({

+ 0 - 0
static/.gitkeep