Browse Source

修改应付对账

shenjunjie 6 years ago
parent
commit
617a604406
4 changed files with 99 additions and 15 deletions
  1. 1 0
      app.html
  2. 10 10
      nuxt.config.js
  3. 2 1
      package.json
  4. 86 4
      pages/mobile/center/vendor/btobapCheck.vue

+ 1 - 0
app.html

@@ -8,6 +8,7 @@
   <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>-->
   <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_6koxroe1k5l.css">
   <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" />
+  <link rel="stylesheet" href="https://unpkg.com/mint-ui@1/lib/style.css">
   <!--<script src="https://wechatfe.github.io/vconsole/lib/vconsole.min.js?v=3.2.0"></script>-->
   {{ HEAD }}
   <script>

+ 10 - 10
nuxt.config.js

@@ -1,7 +1,7 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 // b2c后台
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftchina.com/' : 'http://10.1.51.101:8091/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftchina.com/' : 'http://rb2c.usoftchina.com/')
 // 公共询价
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftchina.com/' : 'http://188.131.128.107:24000/')
 // 公共物料
@@ -11,7 +11,7 @@ const cmsUrl = process.env.CMS_URL || (isProdMode ? 'http://cms.usoftchina.com'
 // 消息
 const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.usoftchina.com/' : 'http://188.131.128.107:24001/')
 // B2B
-const uasUrl = process.env.uasUrl || (isProdMode ? 'http://b2b.usoftchina.com/' : 'http://tb2b.usoftchina.com/')
+const uasUrl = process.env.uasUrl || (isProdMode ? 'http://b2b.usoftchina.com/' : 'https://rb2b.usoftchina.com/')
 // 帐户中心
 const ssoUrl = process.env.ssoUrl || (isProdMode ? 'https://sso.usoftchina.com/' : 'http://188.131.128.107:24004/')
 // pcb展示ID
@@ -78,8 +78,8 @@ module.exports = {
     },
     vendor: [
       'axios',
-      'swiper'
-      // 'element-ui'
+      'swiper',
+      'element-ui'
     ],
     babel: {
       presets: ['es2015', 'stage-2'],
@@ -128,14 +128,14 @@ module.exports = {
       src: '~plugins/vue-empty.js',
       ssr: false
     }, {
-      src: '~plugins/element-ui.js',
-      ssr: true
-    }, {
+      src: '~plugins/element-ui'
+    },
+    {
+      src: '~plugins/mint-ui'
+    },
+    {
       src: '~plugins/filters.js',
       ssr: false
-    }, {
-      src: '~plugins/jsonp.js',
-      ssr: false
     }],
   // proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**', '/produce/**', '/file**', '/rate/**', '/log/**', '/help-service/**', '/keyword/**', '/tip/**', '/UASBatchPutOnProperty**', '/UASBatchPutOnProperty/**']
   /**

+ 2 - 1
package.json

@@ -27,7 +27,7 @@
     "vue2-filters": "^0.1.9"
   },
   "scripts": {
-    "dev": "nodemon --exec node -max_old_space_size=4096 server.js",
+      "dev": "nodemon --exec node -max_old_space_size=4096 server.js",
     "analyze": "nuxt build --analyze",
     "dev-build": "nuxt build",
     "dev-start": "node server.js",
@@ -54,6 +54,7 @@
     "eslint-plugin-html": "^2.0.0",
     "eslint-plugin-promise": "^3.4.1",
     "eslint-plugin-standard": "^2.0.1",
+    "mint-ui": "^2.2.13",
     "node-sass": "^4.5.3",
     "sass-loader": "^6.0.6",
     "vue-loader": "^13.3.0"

+ 86 - 4
pages/mobile/center/vendor/btobapCheck.vue

@@ -80,7 +80,7 @@
           <div v-if="resourceList.content && resourceList.content.length > 0">
             <div class="invoice-btob-list" v-for="item in resourceList.content" :key="item.id">
               <div class="invoice-btob-wrapper-middle" style="border-top: 0">
-                <div class="invoice-btob-wrapper-middle-title">{{item.myEnterprise.enName}}</div>
+                <div class="invoice-btob-wrapper-middle-title">{{item.myEnterprise && item.myEnterprise.enName}}</div>
               </div>
               <div class="invoice-btob-wrapper-middle">
                 <div v-if="item.lastCheckDate"><span>上次对账日期:{{item.lastCheckDate | time}}</span></div>
@@ -110,7 +110,8 @@
         <span class="inline-block overflowhidden">
           当前客户:深圳优软商城科技有限公司大公司哦12314
         </span>
-        <input type="month" v-model="isShowApcheckList.thisMonth" @change="showApcheckList()"/>
+        <div @click="isShowMonthChoose=true">{{isShowApcheckList.thisMonth}}</div>
+        <!--<input type="month" v-model="isShowApcheckList.thisMonth" @change="showApcheckList()"/>-->
       </div>
       <div class="btobapCheck-modal">
         <div class="choosescreen-result">
@@ -231,17 +232,53 @@
         </div>
       </div>
     </modal-wrapper>
+
+    <div class="fixedPicker" v-show="isShowMonthChoose">
+      <picker :slots="slots" @change="onValuesChange" :showToolbar="true">
+        <div class="titls">选择当前时间</div>
+        <div class="leftBtn" @click="isShowMonthChoose=false">取消</div>
+        <div class="rightBtn" @click="resultMonth">确定</div>
+      </picker>
+    </div>
   </div>
 </template>
 
 <script>
+  import { Picker } from 'mint-ui'
   import { ModalWrapper, BaseFilter } from '~components/mobile/base'
   import { PullUp, EmptyStatus } from '~components/mobile/common'
+  function years() {
+      let arr = []
+      let num = 1989
+      for (let i = 0; i < 99; i++) {
+        num++
+        arr.push(num)
+      }
+      return arr
+  }
   export default {
     layout: 'mobileNoHeader',
     middleware: 'authenticated',
     data() {
       return {
+        isShowMonthChoose: false,
+        slots: [
+          {
+            flex: 1,
+            values: years(),
+            className: 'slot1',
+            textAlign: 'right'
+          }, {
+            divider: true,
+            content: '-',
+            className: 'slot2'
+          }, {
+            flex: 1,
+            values: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],
+            className: 'slot3',
+            textAlign: 'left'
+          }
+        ],
         activeType: 'all',
         filterParams: {
           keyword: '',
@@ -299,6 +336,14 @@
       this.isShowApcheckList.thisMonth = sdateTo.getFullYear() + '-' + (sdateTo.getMonth())
     },
     methods: {
+      onValuesChange(picker, value) {
+        this.$value = value[0] + '-' + value[1]
+      },
+      resultMonth() {
+        this.isShowMonthChoose = false
+        this.isShowApcheckList.thisMonth = this.$value
+          this.showApcheckList()
+      },
       addApCheck() {
         this.showModal = true
       },
@@ -491,7 +536,8 @@
       ModalWrapper,
       BaseFilter,
       PullUp,
-      EmptyStatus
+      EmptyStatus,
+      Picker
     },
     filters: {
       time: function (time) {
@@ -520,6 +566,41 @@
     text-overflow: ellipsis;
     white-space: nowrap;
   }
+  .fixedPicker {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 9999;
+    background: rgba(0,0,0,0.5);
+    .picker {
+      width: 100%;
+      left: 0;
+      bottom: 0;
+      position: absolute;
+      background: #fff;
+    }
+    .titls {
+      text-align: center;
+      font-size: 0.24rem;
+      line-height: 0.5rem
+    }
+    .leftBtn {
+      color: #666;
+      font-size: 0.24rem;
+      position: absolute;
+      left: 0.2rem;
+      top: 0.1rem
+    }
+    .rightBtn {
+      top: 0.1rem;
+      color: #3e82f5;
+      font-size: 0.24rem;
+      position: absolute;
+      right: 0.2rem;
+    }
+  }
   .mobile-header{
     position: fixed;
     top: 0;
@@ -815,13 +896,14 @@
       color: #333333;
       margin: 0 0.1rem;
     }
-    input {
+    div {
       background: #FFFFFF;
       border: 1px solid #BFBFBF;
       border-radius: 4px;
       font-size: 0.28rem;
       color: #3E81F6;
       width: 2rem;
+      display: inline-block;
     }
   }
   .footerBtn {