zhouzh 3 سال پیش
والد
کامیت
ea9a02fb65

+ 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','WMS']
+ // let devModules = ['index','sale']
 // let devModules = ['index','statisticalReport','appoint','sale','RMS','TMS'];
 // let devModules = ['index','appoint','WMS'];
 // let devModules = ['index','inward','SporadicManage']

+ 1 - 0
package.json

@@ -54,6 +54,7 @@
     "vue-baidu-map": "^0.21.19",
     "vue-clipboard2": "^0.2.1",
     "vue-element-bigdata-table": "^1.3.1",
+    "vue-print-nb": "^1.7.5",
     "vue-property-decorator": "^8.2.1",
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",

+ 3 - 0
src/views/sale/app.js

@@ -15,6 +15,9 @@ import VueApollo from 'vue-apollo'
 
 import apollo from '@/config/apolloConfig.js'
 
+import Print from 'vue-print-nb';
+Vue.use(Print);
+
 
 import 'xe-utils' 
 import VXETable from 'vxe-table'

+ 3 - 2
src/views/sale/components/saleSelfMachine/printScan.vue

@@ -50,12 +50,13 @@ export default {
         //}
          if(this.orderNumber!=null&&this.orderNumber.length==21){
             if(this.orderNumber.startsWith('WYSDD')==true||this.orderNumber.startsWith('wysdd')==true){
+          
             this.$router.push({
                 path:"/saleSelfMachine?orderNumber="+this.orderNumber,
             })
-        
+            }
             }   
-        }
+        
     },3000)
     this.$once('hook:beforeDestroy', ()=>{
         clearInterval(timer)

+ 96 - 105
src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue

@@ -1,129 +1,120 @@
 <template>
-  <!-- 抵达实绩信息页面 -->
-  <div class="arrivalResult">
-    <div class="top">
-      <el-form :inline="true" style="margin-top: 0.5rem;">
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">时间段</label>
-         <el-date-picker
-      v-model="dateValue"
-      type="daterange"
-      range-separator="至"
-      start-placeholder="开始日期"
-      end-placeholder="结束日期">
-    </el-date-picker>
-        </el-form-item>
-
-        <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">产品分类</label>
-      <el-autocomplete
-        popper-class="my-autocomplete"
-        v-model="inputValue"
-        :fetch-suggestions="querySearch"
-        placeholder="请输入内容" 
+  <!-- 抵达页面 -->
+   <div class="purchasFuelNewMonitor">
+    <div class="frameCalculation">
+      <span>抵达时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
       >
-        <i class="el-icon-edit el-input__icon" slot="suffix"> </i>
-      </el-autocomplete>
-        </el-form-item>
-        <el-form-item>
-      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">车牌号</label>
-      </el-form-item>
-      <el-form-item>
-          <el-input class="el-form-item__content" v-model="capacityNumber1" placeholder="请输入内容"></el-input>
-      </el-form-item>
-      <el-form-item>
-          <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">收货单位</label>
-      </el-form-item>
-      <el-form-item>
-          <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
-      </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="onSearch"><i class="el-icon-search"></i>查询</el-button>
-        </el-form-item>
-      </el-form>
-
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+        <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        clearable>
+      </el-input>
+      <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>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+             <el-button
+              type="text"
+              size="mini"
+              @click="photo(scope)"
+            >
+              满货箱照片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
     </div>
-
-    <dilTable ref="tab" v-bind.sync="option">
-      <el-table-column fixed="right" label="操作" width="110">
-        <template slot-scope="scope">
-          <el-button @click="toPhotoClick(scope.row.resultFullContainerPhoto)" type="text" size="small" style="font-size: 17px"
-            >浏览图片</el-button
-          >
-        </template>
-      </el-table-column>
-    </dilTable>
   </div>
 </template>
 
-
 <script>
-
+import { sjTime } from '@/utils/sharedJsFile';
 export default {
-  name: "arrivalResult",
+  name: "homeworkPath",
   data() {
     return {
-      dateValue:[new Date(), new Date()],
-      inputValue:"",
-      capacityNumber1:"",
-      consigneeCompanyName1:"",
-      status: "",
-      state: "",
-      option: {       
+      restaurants: [],
+      input: "",
+      startTime: null,
+      endTime: null,
+      option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getArrivalResultInfo?apiId=136",
+        requestUrl: "/api/v1/tms/getReceiptResult?apiId=470",
       },
     };
   },
-  mounted() {
-    this.restaurants = this.loadAll();
+  created(){
+   
   },
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
+    photo(scope){
+      console.log(scope.row.orderNumber)
+     this.axios
+       .post("/api/v1/tms/getReceiptPhoto?orderNumber="+scope.row.orderNumber)
+       .then((res)=>{
+         console.log("res.data.data",res.data.data)
+       });
     },
-    loadAll() {
-      return [
-        { value: "带钢"},
-        { value: "微粉"},
-        { value: "螺纹钢"},
-        { value: "钢坯"},
-        { value: "其他"},
-      ];
-    },
-
-    onSearch(){
-      //改变查询条件
-      this.$refs.tab.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
-                      "endTime": sjTime(this.dateValue[1]),
-                      "productClassification": this.inputValue,
-                      "capacityNumber1": this.capacityNumber1,
-                      "consigneeCompanyName1": this.consigneeCompanyName1});                         
-    },
-
-    toPhotoClick(resultFullContainerPhoto){
-      this.$router.push("/arrivalPhoto?resultFullContainerPhoto="+resultFullContainerPhoto);
-      
-    }
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if(this.startTime){
+        startTime = sjTime(this.startTime);
+      }
+      if(this.endTime){
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime){
+        if(startTime < endTime){
+          this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        console.log(startTime && endTime)
+         this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+      }
     },
+   }
 };
 </script>
 <style lang='scss' scoped>
-.homeworkPath {
-  .top {
-    padding: 20px 30px;
+.purchasFuelNewMonitor {
+  .frameCalculation {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-date-editor{
+      margin: 20px;
+    }
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
   }
 }
 </style>