zhouzh 3 tahun lalu
induk
melakukan
d419d17bc1
2 mengubah file dengan 42 tambahan dan 17 penghapusan
  1. 2 1
      build/utils.js
  2. 40 16
      src/views/WMS/components/steel/steel_close.vue

+ 2 - 1
build/utils.js

@@ -15,7 +15,8 @@ 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','WMS']
+// let devModules = ['all'];
 // let devModules = ['index','appoint','sale','statisticalReport','RMS'];
 // let devModules = ['index','inward','TMS'];
 if (pathSrc.indexOf('node_modules') > -1) {

+ 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>