胡半仙 пре 3 година
родитељ
комит
a5f82d7f6c
3 измењених фајлова са 45 додато и 21 уклоњено
  1. 3 3
      build/utils.js
  2. 2 2
      config/index.js
  3. 40 16
      src/views/WMS/components/steel/steel_close.vue

+ 3 - 3
build/utils.js

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

+ 2 - 2
config/index.js

@@ -65,8 +65,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://localhost:8019",
     // target: "http://localhost:8080",
     // target: "http://192.168.1.114:8019",
 

+ 40 - 16
src/views/WMS/components/steel/steel_close.vue

@@ -1,49 +1,73 @@
 //结转
 <template>
   <div class="steel_inbound">
-    <div class="sache">
-      <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
-      </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+    <div class="sache">     
+    <span class="demonstration">月</span>
+    <el-date-picker
+      v-model="value"
+      type="month"
+      placeholder="选择月">
+    </el-date-picker>
+    <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+    <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>        
+      <span style="margin-left: 1rem;">合计本月总库存:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func">
       </dilTable>
     </div>
   </div>
 </template>
 
 <script>
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data(){
     return{
-      inputText:"",
-      options:{
+      value : null,
+      totalNumber: 0,
+      option:{
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getInventoryClose?apiId=95",
+        requestUrl: "/api/v1/wms/getInventoryClose?apiId=95&warehouseId=3&value="+ (sjTime(new Date() + "")),
       },
     }
   },
   methods:{
+       func(res){
+      console.log(res)
+      var total = 0
+      res.list.forEach(e => {
+        total = total+e.close_thismonth_inventory
+      });
+      this.totalNumber = total
+    
+    },
     onclick(){
-      console.log("点击事件");
+      console.log("value",this.value)
+      var value = null;
+      if(this.value){
+        value = sjTime(this.value)
+      }
+      this.option.requestUrl = "/api/v1/wms/getInventoryClose?apiId=95&warehouseId=3&value="+value;
     }
   }
 }
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    height: 5rem;
+.steel_inbound {
+  .sache {
+    width: 100%;
+    height: 100px;
     display: flex;
     align-items: center;
-    padding-left: 1.875rem;
+    padding-left: 50px;
+    .el-date-editor{
+      margin: 20px;
+    }
   }
 }
 </style>