Explorar el Código

hukuidashuaige

Your Name hace 3 años
padre
commit
75199b6d0b
Se han modificado 21 ficheros con 705 adiciones y 263 borrados
  1. 6 13
      build/utils.js
  2. 2 1
      config/index.js
  3. 0 5
      src/utils/util.js
  4. 3 1
      src/views/TMS/components/purchase/addShipPrice.vue
  5. 3 1
      src/views/TMS/components/purchase/addTruckPrice.vue
  6. 212 89
      src/views/appoint/components/saleContract/addSaleOrderArrange.vue
  7. 3 1
      src/views/inward/components/inwardImport/daZhou/addTruckLoad.vue
  8. 3 1
      src/views/inward/components/inwardImport/oldAreaRailScale/addTruckLoad.vue
  9. 3 1
      src/views/inward/components/offsetSteel/truckTrain/addApproveWagonPlease.vue
  10. 2 1
      src/views/inward/components/offsetSteel/truckTrain/addWagonPlease.vue
  11. 8 2
      src/views/queue/components/qmsEnFacotory/queueFApply.vue
  12. 92 61
      src/views/sale/components/transport_appointment/openDistribution.vue
  13. 18 11
      src/views/sale/components/transport_appointment/openDistributionSection.vue
  14. 39 6
      src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue
  15. 39 6
      src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelOldMonitor.vue
  16. 39 6
      src/views/statisticalReport/components/purchaseAccessoriesMonitor.vue
  17. 39 6
      src/views/statisticalReport/components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue
  18. 39 6
      src/views/statisticalReport/components/purchaseChemicalMaterials/purchaseChemicalMaterialsOld.vue
  19. 45 14
      src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue
  20. 67 20
      src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue
  21. 43 11
      src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

+ 6 - 13
build/utils.js

@@ -11,19 +11,12 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 
 // 指定开发模式下需要加载的模块(可以做到只加载当前模块,提高开发效率)
 // index模块(登录)为必须,all 为所有
-//   index    销售    采购     规范          质量          生产      车间
-// ['index', 'sales', '  ', 'standard', 'qualityControl', 'produce', 'workshop',
-//    物流         进程     成本   报表          基础配置        系统配置
-//  'logistics', 'process', '   ', 'reportform', 'basicconfig', 'system']
-
-// let devModules = ['index','RMS','systemConfig']
- //let devModules = ['index','RMS','statisticalReport','SporadicManage','TMS','WMS'];
-//  let devModules = ['all'];
-// let devModules = ['index','RMS']
-// let devModules = ['index','RMS','systemConfig','TMS']
-// let devModules = ['all'];
-// let devModules = ['index','inward','appoint','sale']
-let devModules = ['index','SporadicManage','statisticalReport','inward','RMS']
+//    登录     合同                       首页       内转     排队   资源   销售                       零星物资
+// ['index','appoint','configManager','homepage','inward','queue','RMS','sale','serviceManager','SporadicManage'
+//       统计报表       组织机构/系统管理 采购  仓储
+//  'statisticalReport','systemConfig','TMS','WMS','workFlow']
+let devModules = ['all'];
+// let devModules = ['index','appoint','TMS','queue','statisticalReport'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 2 - 1
config/index.js

@@ -56,7 +56,8 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://192.168.1.100:8019",
+    target: "http://172.16.33.166:8080",
+    // target: "http://172.16.33.162:8019",
     // target: "http://192.168.1.109:8019",
     ws: true,
     pathRewrite: {

+ 0 - 5
src/utils/util.js

@@ -148,11 +148,6 @@ export const transDate = (str) => {
  */
 export const setCookie = (name, value, expires, path, domain, secure, domainFlag) => {
   let str = name + '=' + encodeURIComponent(value);
-  // if (expires > 0) {
-  //   let date = new Date();
-  //   date.setTime(date.getTime() + expires * 3600 * 1000);
-  //   str += ';expires=' + date.toGMTString();
-  // }
   if (path) { str += ';path=' + path; }
   if (domain) { str += ';domain=' + domain; }
   if (secure) { str += ';secure=' + secure; }

+ 3 - 1
src/views/TMS/components/purchase/addShipPrice.vue

@@ -25,7 +25,9 @@ export default {
     };
   },
   created(){
-    this.form1.priceDate = new Date();
+    this.form1 = {
+      priceDate:new Date(),
+    }
   },
   methods: {
     // 确定

+ 3 - 1
src/views/TMS/components/purchase/addTruckPrice.vue

@@ -24,7 +24,9 @@ export default {
     };
   },
   created(){
-    this.form1.priceDate = new Date();
+    this.form1 = {
+      priceDate:new Date()
+    }
   },
   methods: {
     // 确定

+ 212 - 89
src/views/appoint/components/saleContract/addSaleOrderArrange.vue

@@ -2,20 +2,30 @@
   <!-- 添加销售订单排车 -->
   <div class="addSalePlan">
     <page-title>新增销售订单排车</page-title>
-    <div class="table_form from">
+    <!-- 销售订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable v-bind.sync="option" @selection-change="selectionChange">
+      </dilTable>
+    </div>
+
+    <div class="button-box">
+      <el-button type="primary" @click="arragne">确定排车</el-button>
+    </div>
+
+    <!-- <div class="table_form from">
       <div class="materialId">
         <span class="text"> 物资: </span>
         <el-button type="primary" class="btn" @click="table = true">浏览</el-button>
       </div>
-    </div>
+    </div> -->
     <!-- 车序号表格 -->
     <div class="switch" v-if="selectionList.length > 0">
       <el-tooltip placement="top">
         <div slot="content">下面表格已有数据,不能进行更改!!!</div>
         <el-switch
           v-model="value"
-          active-text="重量"
-          inactive-text="件数"
+          active-text="件数"
+          inactive-text="重量"
           disabled
         >
         </el-switch>
@@ -24,11 +34,12 @@
     <div class="switch" v-else>
       <el-tooltip placement="top">
         <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
-        <el-switch v-model="value" active-text="重量" inactive-text="件数">
+        <el-switch v-model="value" active-text="件数" inactive-text="重量">
         </el-switch>
       </el-tooltip>
     </div>
 
+    <!-- 排车表格 -->
     <div class="selectionTable from">
       <el-table
         :data="selectionList"
@@ -36,6 +47,8 @@
         style="width: 100%"
         highlight-current-row
       >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
         <el-table-column
           v-for="(item, i) in tableTop"
           :key="i"
@@ -45,7 +58,7 @@
           align="center"
           show-overflow-tooltip
         >
-          <template slot="scope" v-if="item.label !== '件数'">
+          <template slot="scope" v-if="item.label !== '重量'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '车序号'">
@@ -54,7 +67,7 @@
           <template slot="scope" v-if="item.label !== '收货地址'">
             <span>{{ item.label }}</span>
           </template>
-          <template slot="scope" v-if="item.label !== '收货日期'">
+          <template slot="scope" v-if="item.label !== '截止日期'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '收货姓名'">
@@ -70,6 +83,7 @@
               <template v-if="item.prop == 'orderPlanWeight'">
                 <el-input
                   class="textinput"
+                  placeholder="(必填)"
                   v-model.number="scope.row.orderPlanWeight"
                 ></el-input>
               </template>
@@ -77,20 +91,28 @@
               <template v-if="item.prop == 'cxh'">
                 <el-input
                   class="textinput1"
+                  placeholder="(必填)"
                   v-model.number="scope.row.cxh"
                 ></el-input>
               </template>
               <!-- 收货地址id -->
-              <template style="width: 400px" v-if="item.prop == 'saleShipperAddressName'">
-                <el-input style="width: 200px" v-model="scope.row.saleShipperAddressName" disabled>
+              <template v-if="item.prop == 'saleShipperAddressName'" >
+                <el-input
+                  style="width: 200px"
+                  v-model="scope.row.saleShipperAddressName"
+                  disabled
+                >
                 </el-input>
-                <el-button type="primary" @click="ondrawer(scope.row,scope.$index)"
+                <el-button
+                  type="primary"
+                  placeholder="(非必填)"
+                  @click="select(scope.$index,3)"
                   >浏览</el-button
                 >
               </template>
-              <!-- 收货日期 -->
+              <!-- 截止日期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
-                <el-date-picker
+                 <el-date-picker
                   class="textinput3"
                   type="date"
                   v-model.number="scope.row.saleDateOfReceipt"
@@ -100,6 +122,7 @@
               <template v-if="item.prop == 'saleOrderConsignee'">
                 <el-input
                   class="textinput4"
+                  placeholder="(非必填)"
                   v-model.number="scope.row.saleOrderConsignee"
                 ></el-input>
               </template>
@@ -107,9 +130,17 @@
               <template v-if="item.prop == 'saleOrderConsigneeTel'">
                 <el-input
                   class="textinput5"
+                  placeholder="(非必填)"
                   v-model.number="scope.row.saleOrderConsigneeTel"
                 ></el-input>
               </template>
+              <!-- 排车数(不可见) -->
+            <template v-if="item.prop == 'arragneCount'">
+                <el-input
+                  class="textinput6"
+                  v-model.number="scope.row.arragneCount"
+                ></el-input>
+              </template>
             </template>
             <template v-else>
               <span>{{ scope.row[item.prop] }}</span>
@@ -117,10 +148,26 @@
           </template>
         </el-table-column>
         <!-- 操作列 -->
-        <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="200">
           <template slot-scope="scope">
+            
+                
+            <el-button
+              @click="copyRow(scope.$index,scope.row)"
+              type="text"
+              size="big"
+            >
+              复制
+            </el-button>
+
+            <el-input
+            style="width: 50px;"
+              placeholder="(非必填)"
+              v-model.number="scope.row.arragneCount"
+            ></el-input>
+
             <el-button
-              @click.native.prevent="deleteRow(scope.$index, selectionList)"
+              @click="deleteRow(scope.$index)"
               type="text"
               icon="el-icon-close"
               size="big"
@@ -129,54 +176,46 @@
         </el-table-column>
       </el-table>
     </div>
-
-    <el-drawer
-      :visible.sync="drawer"
-      :direction="direction"
-      :close-on-press-escape="true"
-      :show-close="true"
-      :wrapperClosable="true"
+    <!-- 收货地址的模态框 -->
+    <el-drawer 
+      :visible.sync="addressDrawer" 
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :wrapperClosable="false"
       modal
-      size="30%"
+      close-on-press-escape
+    
     >
       <el-input
         placeholder="请输入内容"
-        v-model="textInput"
-        style="margin-top: 10px; margin-left: 20px;width: 200px"
+        v-model="addressText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
         clearable
       >
       </el-input>
       <el-button
         type="primary"
         class="btn"
-        @click="onclick1()"
-        style="margin-bottom: 15px"
+        @click="selectAddressClick"
+        style="margin-left: 5px"
       >
         <i class="el-icon-search"></i>查询
       </el-button>
-      <dilTable
-        v-bind.sync="frist"
-        @radio-change="currentRadioChange1"
-      ></dilTable>
-    </el-drawer>
-    <el-drawer
-      title="选择物资信息"
-      :visible.sync="table"
-      direction="rtl"
-      size="50%"
-      :show-close="false"
-    >
-      <el-input placeholder="请输入内容" v-model="input"  
-      style="margin-top: 10px; margin-left: 20px;width:160px" clearable> </el-input
-      ><el-button type="primary" class="btn" @click="onclick" style="margin-left: 4px;">
-        <i class="el-icon-search"></i>查询
+      <el-button
+        type="primary"
+        class="btn"
+        @click="addAddressClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
       </el-button>
-      <el-button @click="open">取消</el-button>
-      <el-button type="primary" @click="makeSure1">确定</el-button>
       <div class="tablecls">
-        <!-- 查询所有的物资 -->
-        <dilTable v-bind.sync="option" @selection-change="selectionChange">
-        </dilTable>
+        <!-- 查询所有的收货地址 -->
+        <dilTable
+          v-bind.sync="Address"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
       </div>
     </el-drawer>
 
@@ -195,12 +234,25 @@ export default {
     return {
       textInput: "",
       input: "",
+      //排车数默认
+      arragneCount: 1,
+      //初始化车序号
+      arragneCxh: 1,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=" + this.$route.params.saleOrderId,
         // 控制显示多选列
         selectionType: "select",
       },
+      //是否打开收货地址的模态框
+      addressDrawer:false,
+      //收货地址的表格
+      addressText:null,
+      //线路表格的框计算输入的值
+      Address: {
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        selectionType: "radio",
+      },
       table: false,
       selectionList: [],
       selectionList1: [],
@@ -225,14 +277,10 @@ export default {
       ],
       values: "yes",
       tableTop: [
-        {
-          prop: "materialCode",
-          label: "物资编码",
-          width: "120",
-        },
         {
           prop: "cxh",
           label: "车序号",
+          width: "80",
           slot: true,
         },
         {
@@ -247,29 +295,38 @@ export default {
         },
         {
           prop: "orderPlanWeight",
-          label: "件数",
+          label: "重量",
+          width: "80",
           slot: true,
         },
         {
-          prop: "saleShipperAddressName",
-          label: "收货地址",
-          width: "300",
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "230",
           slot: true,
         },
         {
-          prop: "saleDateOfReceipt",
-          label: "收货日期",
-          width: "110",
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
           slot: true,
         },
         {
           prop: "saleOrderConsignee",
           label: "收货客户",
+          width: "150",
           slot: true,
         },
         {
           prop: "saleOrderConsigneeTel",
           label: "收货客户电话号码",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "arragneCount",
+          label: "复制数",
+          width: "80",
           slot: true,
         },
       ],
@@ -282,49 +339,107 @@ export default {
   watch: {
     value() {
       if (this.value) {
-        this.tableTop[4]={
+        this.tableTop[3]={
           prop: "orderPlanWeight",
-          label: "重量",
+          label: "件数",
           slot: true,
         };
       } else {
-        this.tableTop[4]={
+        this.tableTop[3]={
           prop: "orderPlanWeight",
-          label: "件数",
+          label: "重量",
           slot: true,
         };
       }
     },
   },
   methods: {
-    deleteRow(index, rows) {
-      rows.splice(index, 1);
-    },
     //点击浏览事件
     ondrawer(row,index) {
       this.row = row;
       this.row.index = index;
       this.drawer = true;
     },
+    //复制多条的方法
+    copyRow(index,row){
+      console.log("this.selectionList",this.selectionList)
+      console.log("row",row)
+      let arr = [];
+      for(var i = 0 ;i<this.selectionList.length; i++){
+        if(i == index){
+          arr.push(this.selectionList[i]);
+          for(var j = 0;j<this.selectionList[i].arragneCount; j++){
+            arr.push({
+            Specification:row.Specification,
+            arragneCount:this.arragneCount,
+            cxh:row.cxh,
+            materialName:row.materialName,
+            orderPlanWeight:row.orderPlanWeight,
+            saleDateOfReceipt:row.saleDateOfReceipt,
+            saleMaterialId:row.saleMaterialId,
+            saleOrderConsignee:row.saleOrderConsignee,
+            saleDateOfReceipt:row.saleDateOfReceipt,
+            saleOrderConsigneeTel:row.saleOrderConsigneeTel,
+            saleShipperAddressId:row.saleShipperAddressId,
+            saleShipperAddressName:row.saleShipperAddressName,
+          })
+
+          }
+        }else{
+          arr.push(this.selectionList[i]);
+        }
+      }
+      this.selectionList = [];
+      this.selectionList = arr;
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index){
+      this.selectionList.splice(index,1)
+    },
     //监听模态框点击事件
     currentRadioChange1(radioList) {
       this.selectionList[this.row.index].saleShipperAddressId = radioList.addressId;
       this.selectionList[this.row.index].saleShipperAddressName = radioList.address;
     },
-    //收货地址模态框查询
-    onclick1() {
-      this.option.requestUrl =
-        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" + this.textInput;
+    //收货地址模态窗口的框计算
+    selectAddressClick(){
+      this.Address.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
+    },
+    //收货地址模态窗口的点击事件
+    addAddressClick(){
+      this.selectionList[this.addressIndex].saleShipperAddressName = this.addressMap.address
+      this.selectionList[this.addressIndex].saleShippingAddressId = this.addressMap.addressId
+      this.addressDrawer = false;
+      let arr = this.selectionList;
+      this.selectionList = [];
+      arr.forEach((e)=>{
+        this.selectionList.push({
+          //销售订单与物资表主键
+            Specification:e.Specification,
+            arragneCount:e.arragneCount,
+            cxh:e.cxh,
+            materialName:e.materialName,
+            orderPlanWeight:e.orderPlanWeight,
+            saleDateOfReceipt:e.saleDateOfReceipt,
+            saleMaterialId:e.saleMaterialId,
+            saleOrderConsignee:e.saleOrderConsignee,
+            saleDateOfReceipt:e.saleDateOfReceipt,
+            saleOrderConsigneeTel:e.saleOrderConsigneeTel,
+            saleShipperAddressId:e.saleShipperAddressId,
+            saleShipperAddressName:e.saleShipperAddressName,
+        })
+      })
+    },
+    //收货地址点击浏览的事件
+    select(index){
+      this.addressDrawer = true;
+      this.addressIndex = index ;
+    },
+    //收货地址模态框单选选中的事件
+    currentRadioChange2(val){
+      this.addressMap = {};
+      this.addressMap = val;
     },
-    // dianji() {
-    //   this.axios.get("/api/v1/ams/getAddressDeliveryAddress").then((res) => {
-    //     if (res.data.code == "200") {
-    //       console.log(res);
-    //       this.options1 = res.data.data;
-    //     }
-    //   });
-    // },
-    //物资模态框查询
     // 框计算
     onclick() {
       this.option.requestUrl =
@@ -347,12 +462,12 @@ export default {
         this.table = false;
       }
     },
-    // 返回主界面
-    makeSure1() {
+    // 进行排车
+    arragne() {
       this.selectionList1.forEach((e) => {
         var addmap = {
-          materialCode: e.materialCode,
-          cxh: null,
+          // materialCode: e.materialCode,
+          cxh: this.arragneCxh,
           materialName: e.materialName,
           Specification: e.specificationModel,
           orderPlanWeight: null,
@@ -362,12 +477,17 @@ export default {
           saleOrderConsignee: null,
           saleOrderConsigneeTel: null,
           saleMaterialId: e.saleMaterialId,
-          materialTheoreticalWeight: e.materialTheoreticalWeight,
+          // materialTheoreticalWeight: e.materialTheoreticalWeight,
+          arragneCount : this.arragneCount,
         };
         this.selectionList.push(addmap);
+        //车序号自增
+        this.arragneCxh++;
       });
       this.selectionList1 = [];
       this.table = false;
+      //重置销售订单信息
+      this.option.requestUrl = "/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=" + this.$route.params.saleOrderId + "&i=" + new Date();
     },
     // 返回选中的物资信息
     selectionChange(selection) {
@@ -410,7 +530,7 @@ export default {
         mapItem.materialNumber=item.orderPlanWeight;
         mapList.push(mapItem);
       });
-      // console.log("mapList",mapList);
+      console.log("mapList",mapList);
         this.axios.post("/api/v1/ams/addTruckNo", mapList).then((res) => {
           if (res.data.code == "200") {
             this.$router.go(-1);
@@ -471,10 +591,10 @@ export default {
   margin-left: -16rem;
 }
 .textinput {
-  width: 50px;
+  width: 70px;
 }
 .textinput1 {
-  width: 50px;
+  width: 70px;
   text-align: center;
   size: small;
 }
@@ -483,12 +603,15 @@ export default {
   margin-right: 30px;
 }
 .textinput3 {
-  width: 270px;
+  width: 240px;
 }
 .textinput4 {
-  width: 60px;
+  width: 120px;
 }
 .textinput5 {
   width: 120px;
 }
+.textinput6{
+  width: 70px;
+}
 </style>

+ 3 - 1
src/views/inward/components/inwardImport/daZhou/addTruckLoad.vue

@@ -45,7 +45,9 @@ export default {
     };
   },
   created() {
-    this.form.loadTime = new Date();
+    this.form = {
+      loadTime:new Date(),
+    }
   }, 
   methods: {
     selectionChange(val) {

+ 3 - 1
src/views/inward/components/inwardImport/oldAreaRailScale/addTruckLoad.vue

@@ -39,7 +39,9 @@ export default {
   },
 
   created() {
-    this.form.loadTime = new Date();
+    this.form = {
+      loadTime:new Date(),
+    }
     this.form.loadingId = '老区轨道衡'
   },
 

+ 3 - 1
src/views/inward/components/offsetSteel/truckTrain/addApproveWagonPlease.vue

@@ -62,7 +62,9 @@ export default {
     // this.unit();
   },
   created(){
-      this.form1.resultApproveDate = new Date();
+      this.form1 = {
+        resultApproveDate: new Date(),
+      }
   },
   methods: {
     handleCheckedCitiesChange(value) {

+ 2 - 1
src/views/inward/components/offsetSteel/truckTrain/addWagonPlease.vue

@@ -35,7 +35,8 @@ export default {
     // this.unit();
   },
   created(){
-      this.form1.resultPleaseDate = new Date();
+      this.form1 = {resultPleaseDate:new Date()}
+      
   },
   methods: {
     handleCheckedCitiesChange(value) {

+ 8 - 2
src/views/queue/components/qmsEnFacotory/queueFApply.vue

@@ -6,7 +6,9 @@
             <el-input
                 placeholder="请输入内容"
                 v-model="inputText"
-                clearable>
+                clearable
+                class="input"
+            >
             </el-input>
             <el-button type="primary" class="btn" @click="onclick">
                 <i class="el-icon-search"></i>查询
@@ -35,7 +37,7 @@ export default {
     }
 }
 </script>
-<style lang="scss" scoped>
+<style lang="scss">
     .sale{
         .top{
             width: 100%;height: 5rem;
@@ -43,5 +45,9 @@ export default {
             align-items: center;
             padding-left: 2.5rem;
         }
+        .input{
+            width: 250px;
+            margin-right: 20px;
+        }
     }
 </style>

+ 92 - 61
src/views/sale/components/transport_appointment/openDistribution.vue

@@ -15,12 +15,9 @@
       <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 未抢单 -->
       	<el-tab-pane label="未接收" name="first" >
-						  <dilTable v-bind.sync="first" ref="table">
+						  <dilTable v-bind.sync="first" ref="table" @selection-change="currentSelectChange">
              <el-table-column fixed="right" label="操作" width="120">
         <template slot-scope="scope">
-          <el-button @click="Grab(scope)" type="text" size="small">
-            接收
-          </el-button>
           <el-button @click="detailclick(scope.row)" type="text" size="small">
             物资详情
           </el-button>
@@ -45,9 +42,8 @@
             </el-form>
           </template>
         </el-table-column>
-
-
       </dilTable>
+
 		</el-tab-pane>
      	<el-tab-pane label="已接收" name="second">
 				<dilTable v-bind.sync="second" ref="table1">
@@ -82,21 +78,14 @@
           </template>
         </el-table-column>
       </dilTable>
-      <!-- <el-drawer title="司机排班信息表" :visible.sync="drawer" :direction="direction" :before-close="handleClose"
-				:modal="false" size="30%" style="margin-top: 5.625rem;">
-        <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-left:20px;width:160px" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick()"  style="margin-bottom:15px">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-				<dilTable v-bind.sync="third" @radio-change="currentRadioChange"></dilTable>
-				<div>
-					<el-button type="primary" @click="makeSure">派发</el-button>
-				</div>
-			</el-drawer> -->
 		</el-tab-pane>
     </el-tabs>
     
     </div>
+
+    <div class="button-box" v-if="activeName=='first'">
+      <el-button type="primary" @click="receive">接收订单</el-button>
+    </div>
   </div>
 </template>
 
@@ -112,9 +101,12 @@ export default {
       inputText:"",
       dispatchId:null,
       input:"",
+      //所有选中的车序号订单
+      selectTruckOrder: [],
       first:{
         // first请求数据的地址
         requestUrl: "",
+        selectionType: "select",
       },
       second:{
         requestUrl:"",
@@ -198,10 +190,12 @@ export default {
 
 		// 		this.drawer=true
 		// 	},
-      currentRadioChange(selection) {
-				this.mapList = selection
-        console.log(this.mapList)
-			},
+    //车序号订单表格
+    currentSelectChange(select){
+      this.selectTruckOrder = [];
+      this.selectTruckOrder = select;
+      console.log("this.selectTruckOrder",this.selectTruckOrder)
+    },
     onclick() {
         this.third.requestUrl =
         "/api/v1/oms/getCapacityAndDriverList?apiId=246&con=" + this.input;
@@ -214,8 +208,15 @@ export default {
           center:true,
         })
         .then(() => {
+          //初始化承运商SsoId
+          var carrierSsoId = '';
+          if(getCookie("orgCode") == "chengyunshang"){
+            carrierSsoId =  getCookie('userId');
+          }else{
+            carrierSsoId = null;
+          }
         this.axios.post("/api/v1/oms/addAppTruckOrder?orderType=" + 1 + 
-        "&carrierId="+ 73 +"&dispatchId=" + this.dispatchId 
+        "&carrierId="+ carrierSsoId +"&dispatchId=" + this.dispatchId 
         + "&capacityNumber=" + this.mapList.capacityNumber)
         .then((res) => {
           if(res.data.code == 200){
@@ -239,45 +240,6 @@ export default {
         });
        
       },
-  	Grab(scope){
-      console.log(scope)
-      this.$confirm("是否接收", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          var carrierSsoId = '';
-          if(getCookie("orgCode") == "chengyunshang"){
-            carrierSsoId =  getCookie('userId');
-          }else{
-            carrierSsoId = null;
-          }
-          this.axios
-            .post("/api/v1/ams/lockDispatchSaleOrder?dispatchId="+ scope.row.dispatchId+"&carrierSsoId=" + carrierSsoId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "接单成功!",
-                });     
-                this.$router.go(0);
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "删除操作已取消!",
-          });
-        });
-    },
 
     // -------查看物资详情(未接收)
     detailclick(row) {
@@ -344,6 +306,67 @@ export default {
         });
     },
 
+    //接收所有已选中的订单
+    receive(){
+      this.$confirm("是否接收已选中的订单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          //初始化承运商SsoId
+          var carrierSsoId = '';
+          if(getCookie("orgCode") == "chengyunshang"){
+            carrierSsoId =  getCookie('userId');
+          }else{
+            carrierSsoId = null;
+          }
+          //所有选中的分派Id
+          var dispatchIdList = [];
+          this.selectTruckOrder.forEach((item,i) => {
+              //初始化mapItem
+              var mapItem = {
+                //分派Id
+                dispatchId : 0,
+              }
+              mapItem.dispatchId = item.dispatchId;
+              dispatchIdList.push(mapItem);
+          })
+          //保存承运商SsoId和所有选中的分派Id
+          let map = {
+            carrierSsoId : carrierSsoId,
+            mapList : dispatchIdList
+          }
+          console.log("map",map)
+          //请求后端
+          this.axios
+            .post("/api/v1/ams/lockDispatchSaleOrderList",map)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "接收成功!",
+                });     
+                this.$router.go(0);
+              } else {
+                this.$message({
+                  message: "接单失败,请联系管理员!",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "接单操作已取消!",
+          });
+        });
+
+      
+    }
+
   }
 }
 </script>
@@ -358,4 +381,12 @@ export default {
     }
   }
 }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 </style>

+ 18 - 11
src/views/sale/components/transport_appointment/openDistributionSection.vue

@@ -2,12 +2,11 @@
   <!-- 定向派单接单选择路段顺序号 -->
   <div id="contractDetails">
     <page-title>选择路段顺序号和车</page-title>
-
     <div class="lineId from">
       <div class="materialId">
         <span class="text">选择路线:</span>
-        <el-input class="input" v-model="lineName" disabled> </el-input>
-        <el-button type="primary" class="btn" @click="table = true">浏览</el-button>
+        <el-input class="input" v-model="lineNameAndRouter" disabled> </el-input>
+        <el-button type="primary" class="btn" @click="tableOpen">浏览</el-button>
       </div>
     </div>
     
@@ -15,7 +14,7 @@
       <div class="materialId">
         <span class="text">选择车辆:</span>
         <el-input class="input" v-model="capacityNumber" disabled> </el-input>
-        <el-button type="primary" @click="drawer = true" class="truckBtn"
+        <el-button type="primary" @click="drawerOpen" class="truckBtn"
           >浏览</el-button
         >
       </div>
@@ -42,7 +41,7 @@
       </div>
     </el-drawer>
 
-    <el-drawer title="选择车" :visible.sync="drawer" :direction="direction" :before-close="handleClose"
+    <el-drawer title="选择车" :visible.sync="drawer" :direction="direction"
 				:modal="false" size="30%" style="margin-top: 2.625rem;">
         <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-left:20px;width:160px" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick2()"  style="margin-bottom:15px">
@@ -73,6 +72,8 @@ export default {
       drawer: false,
       // 线路名称
       lineName: "",
+      //线路名称和路段
+      lineNameAndRouter : "",
       //线路id
       lineId: null,
       // 车牌号
@@ -91,11 +92,7 @@ export default {
     };
   },
   methods: {
-    onClick(index) {
-      this.selectionList.splice(index, 1);
-    },
     onclick1() {
-        
         this.option.requestUrl =
           "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
 
@@ -105,7 +102,16 @@ export default {
           "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&index=" +
           this.input;
     },
-    
+    //打开车辆模态框
+    drawerOpen(){
+        this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId="+ getCookie('userId')+"&i=" + new Date(),
+        this.drawer = true;
+    },
+    //打开线路模态框
+    tableOpen(){
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"+"&i=" + new Date(),
+         this.table = true;
+    },
     // 返回
     onClickCancel() {
       this.$router.push("/openDistribution");
@@ -115,6 +121,7 @@ export default {
     },
     currentRadioChange5(selection) {
       this.lineName = selection.lineName;
+      this.lineNameAndRouter = selection.lineName +"  "+selection.lineDesk;
       this.lineId = selection.lineId;
     },
     // 确认
@@ -173,7 +180,7 @@ export default {
     text-align: right;
   }
   .input{
-    width: 250px;
+    width: 380px;
     margin-right: 20px;
   }
 }

+ 39 - 6
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue

@@ -2,7 +2,20 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -14,18 +27,38 @@
 </template>
 
 <script>
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=7",
+        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=null&endTime=null&i=" +new Date(),
       },
-      input: "",
+      startTime: null,
+      endTime: null,
     };
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&con=" + this.input;
+      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/getRLFLReport?apiId=382&orderType=7&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
     },
   },
 };
@@ -39,8 +72,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor{
+      margin: 20px;
     }
   }
 }

+ 39 - 6
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelOldMonitor.vue

@@ -2,7 +2,20 @@
 <template>
   <div class="purchasFuelOldMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -14,18 +27,38 @@
 </template>
 
 <script>
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=6",
+        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=null&endTime=null&i=" +new Date(),
       },
-      input: "",
+      startTime: null,
+      endTime: null,
     };
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&con=" + this.input;
+      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/getRLFLReport?apiId=382&orderType=6&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
     },
   },
 };
@@ -39,8 +72,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor{
+      margin: 20px;
     }
   }
 }

+ 39 - 6
src/views/statisticalReport/components/purchaseAccessoriesMonitor.vue

@@ -2,7 +2,20 @@
 <template>
   <div class="purchaseAccessoriesMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -14,18 +27,38 @@
 </template>
 
 <script>
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=5",
+        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=null&endTime=null&i=" +new Date(),
       },
-      input: "",
+      startTime: null,
+      endTime: null,
     };
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=5&con=" + this.input;
+      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/getRLFLReport?apiId=382&orderType=5&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=5&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
     },
   },
 };
@@ -39,8 +72,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor{
+      margin: 20px;
     }
   }
 }

+ 39 - 6
src/views/statisticalReport/components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue

@@ -2,7 +2,20 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -14,18 +27,38 @@
 </template>
 
 <script>
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=18",
+        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=null&endTime=null&i=" +new Date(),
       },
-      input: "",
+      startTime: null,
+      endTime: null,
     };
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=18&con=" + this.input;
+      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/getRLFLReport?apiId=382&orderType=18&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=18&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
     },
   },
 };
@@ -39,8 +72,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor{
+      margin: 20px;
     }
   }
 }

+ 39 - 6
src/views/statisticalReport/components/purchaseChemicalMaterials/purchaseChemicalMaterialsOld.vue

@@ -2,7 +2,20 @@
 <template>
   <div class="purchasFuelOldMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -14,18 +27,38 @@
 </template>
 
 <script>
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=17",
+        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=17&startTime=null&endTime=null&i=" +new Date(),
       },
-      input: "",
+      startTime: null,
+      endTime: null,
     };
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=17&con=" + this.input;
+      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/getRLFLReport?apiId=382&orderType=17&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=17&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
     },
   },
 };
@@ -39,8 +72,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor{
+      margin: 20px;
     }
   }
 }

+ 45 - 14
src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue

@@ -1,11 +1,27 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        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>
+      <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"></dilTable>
@@ -14,27 +30,42 @@
 </template>
 
 <script>
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
       option: {
-        requestUrl: "",
+        requestUrl: "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&i=" +new Date(),
       },
-      input: "",
+      startTime: null,
+      endTime: null,
       tableTitle:'销售统计报表'
     };
   },
-  created(){
-      if(getCookie('orgCode') == 'chengyunshang'){
-          this.option.requestUrl = '/api/v1/tms/getAllSaleReport?apiId=423'
-      }else{
-          this.option.requestUrl = '/api/v1/tms/getAllSaleReport?apiId=423'
-      }
-  },
   methods: {
+    refresh(){
+      this.$router.go(0);
+    },
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllSaleReport?api=423&con=" + this.input;
+      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/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
     },
   },
 };
@@ -48,8 +79,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor{
+      margin: 20px;
     }
   }
 }

+ 67 - 20
src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue

@@ -1,11 +1,18 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker v-model="startTime" type="date" placeholder="选择日期">
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="date" 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>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
     <div class="table">
       <dilTable ref="excelDom" v-bind.sync="option"></dilTable>
@@ -14,32 +21,72 @@
 </template>
 
 <script>
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js';
 export default {
   data() {
     return {
       option: {
-        requestUrl: "",
+        requestUrl:'',
       },
-      input: "",
-      tableTitle:"零星进厂统计报表"
+      startTime: null,
+      endTime: null,
+      tableTitle: "零星进厂统计报表",
     };
+  },   
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=null&endTime=null&i=" +
+        new Date();
+    } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12&startTime=null&endTime=null&i=" +
+        new Date();
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
+        getCookie("userId") +
+        "&startTime=null&endTime=null&i=" +
+        new Date();
+    }
   },
-  created(){
-      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport1?apiId=424'
+  methods: {
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
       }
-      else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12"
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
       }
-      else{
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=' + getCookie("orgCode")
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&i=" +
+          new Date();
       }
-      console.log(this.option.requestUrl)
-  },
-  methods: {
-    onclick() {
-      this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?api=424&con=" + this.input;
     },
   },
 };
@@ -53,8 +100,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor {
+      margin: 20px;
     }
   }
 }

+ 43 - 11
src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

@@ -1,7 +1,20 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <el-input class="input" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span>进厂时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -14,30 +27,49 @@
 </template>
 
 <script>
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile';
+import { getCookie } from '@/utils/util.js';
 export default {
   data() {
     return {
       option: {
         requestUrl: "",
       },
-      input: "",
+      startTime: null,
+      endTime: null,
       tableTitle:'零星出厂统计报表'
     };
   }, 
   created(){
       if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425'
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=' +new Date();
       }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13"
-      }
-      else{
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("orgCode")
+          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +new Date();
+      }else{
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("userId")+"&startTime=null&endTime=null&i=" +new Date();
       }
   },
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?api=425&con=" + this.input;
+      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/getSporadicSuppliesReport2?apiId=425&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
     },
   },
 };
@@ -51,8 +83,8 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .input{
-      width: 250px;
+    .el-date-editor{
+      margin: 20px;
     }
   }
 }