Explorar el Código

报表-订单统计表--查询条件起始月份

liangy hace 3 años
padre
commit
dbbd194946

+ 6 - 0
src/api/reportForms/cost-allocation-table.js

@@ -1 +1,7 @@
 /** 报表 -- 成本分配表 **/
+
+import { getAction, postAction, deleteAction } from '@/api/manage'
+
+const queryByPlanNum = params => getAction('/cost/syCostAllocation/queryByPlanNum', params)
+
+export { queryByPlanNum }

+ 8 - 14
src/views/reportForms/cost-allocation-table.vue

@@ -2,9 +2,9 @@
   <!-- 成本分配表 (保存后数据到单证的成本分配汇总内)-->
   <div id="costAllocationTable">
     <a-card :bordered="false">
-      <!-- 主表信息 点击搜索后 全部回显--->
+      <!-- 主表信息 点击搜索后 回显--->
       <div class="table-page-search-wrapper">
-        <a-form-model layout="inline" ref="form" :model="costAllocationTable" :rules="validatorRules">
+        <a-form-model layout="inline" ref="form" :model="costAllocationTable">
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-model-item label="计划单号" prop="planNum">
@@ -202,10 +202,10 @@
           </a-row>
         </a-form-model>
       </div>
-
-      <!--tabs 组件引入  -->
+    </a-card>
+    <!--tabs 组件引入  -->
+    <a-card :bordered="false" style=" marginTop:10px;">
       <tabs />
-
       <!-- 事故单 -->
       <div style="margin:40px 0">
         <h6 class="table-title">事故单</h6>
@@ -242,7 +242,7 @@
       <div class="note-one" style="marginTop:40px;">
         <h6 class="table-title">备注信息 1</h6>
         <div class="noteDetail">
-          <a-form-model ref="form" :model="costAllocationTable" :rues="validatorRules">
+          <a-form-model ref="form" :model="costAllocationTable">
             <a-form-model-item prop="noteOne">
               <a-input
                 type="textarea"
@@ -259,7 +259,7 @@
       <!-- <div class="note-one" style="marginTop:40px;">
         <h6 class="table-title">备注信息 2</h6>
         <div class="noteDetail">
-          <a-form-model ref="form" :model="costAllocationTable" :rues="validatorRules">
+          <a-form-model ref="form" :model="costAllocationTable" >
             <a-form-model-item prop="noteOne">
               <a-input
                 type="textarea"
@@ -271,7 +271,6 @@
           </a-form-model>
         </div>
       </div> -->
-
       <!-- 页面底部保存 -->
       <a-row :gutter="24" style="marginTop:40px;float:right">
         <a-col :md="12" :sm="12">
@@ -343,11 +342,7 @@ export default {
         { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
       ],
       costPayData: [{}],
-      visible: true, // 成本分配  新增
-
-      validatorRules: {
-        planNum: [{ required: true, message: '请输入计划单号进行搜索', trigger: 'blur' }]
-      }
+      visible: true // 成本分配  新增
     }
   },
   created() {},
@@ -366,7 +361,6 @@ export default {
           console.log('22')
         })
       })
-
     },
     //  主表:人民币费用支出  弹框
     mainTableExpenseCNY() {

+ 5 - 3
src/views/reportForms/cost-allocation-table/tabs.vue

@@ -953,9 +953,11 @@ export default {
 }
 
 /deep/ .ant-tabs {
-  margin: 40px 0;
-  border: 1px dashed gray; //rgba(24, 144, 255, 0.3);
-  padding: 12px;
+  border: 5px solid rgba(24, 144, 255,.5);
+  padding: 10px;
   border-radius: 12px;
 }
+/deep/ .ant-card-body {
+  padding: 0 !important;
+}
 </style>

+ 6 - 7
src/views/reportForms/order-statistics/chart/external/departmentChart.vue

@@ -71,10 +71,10 @@ export default {
         },
 
         legend: {
-          // textStyle: {
-          //   fontSize: 16,
-          //   color: '#5470c6'
-          // },
+          textStyle: {
+            fontSize: 16,
+            color: '#5470c6'
+          },
           data: ['实际数量', '本币金额']
         },
         grid: {
@@ -82,7 +82,7 @@ export default {
           left: '6%', // 组件离容器左侧的距离。
           right: '6%',
           borderColor: 'none', //网格的边框颜色
-          bottom: '20%' //
+          bottom: '20%' 
         },
 
         xAxis: {
@@ -157,11 +157,10 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-
       window.addEventListener('resize', () => {
         if (myChart) {
           myChart.resize()
-          console.log('eee')
+          // console.log('eee')
         }
       })
     }

+ 16 - 21
src/views/reportForms/order-statistics/external-statistics.vue

@@ -10,20 +10,19 @@
               <a-form-item label="起始年月">
                 <a-range-picker
                   style="width: 100%"
-                  v-model="queryParam.timeRange"
                   placeholder="['开始年月', '结束年月']"
                   format="YYYY-MM"
                   :mode="mode2"
                   :value="value"
                   @panelChange="handlePanelChange"
-                  @change="handleChange"
+                  @change="monthChange"
                 />
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-item label="部门">
-                <a-input placeholder="请输入订单号" v-model="queryParam.department"></a-input>
+                <a-input placeholder="请输入部门" v-model="queryParam.department"></a-input>
                 <!-- <a-select placeholder="请选择部门" v-model="queryParam.">
                   <a-select-option :value="''">请选择</a-select-option>
                   <a-select-option :value="0">业务一部</a-select-option>
@@ -65,7 +64,7 @@
     <a-card :bordered="false" style="marginTop:10px;">
       <div class="chart">
         <!-- 部门 "-->
-        <div class="departmentChart" style="background:rgba(255, 165, 0,.08);">
+        <div class="departmentChart" style="background:rgba(255, 165, 0,.09);">
           <departmentChart />
         </div>
         <!-- 客户 -->
@@ -168,7 +167,6 @@ export default {
         vendorType: '外部',
         startYearMonth: '',
         endYearMonth: '',
-        // timeRange: [],
         department: '',
         customer: ''
       },
@@ -179,7 +177,7 @@ export default {
         // pageSize: '' //一页多少
       },
       mode2: ['month', 'month'],
-      value: []
+      value: [] //起始月份
       // dateFormat: 'YYYY-MM-DD'
     }
   },
@@ -206,33 +204,30 @@ export default {
     handlePanelChange(value, mode) {
       this.value = value
       this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
-      console.log('this.mode2', this.mode2)
-
-      console.log('value.dateString[0]', moment(value[0]))
-      console.log('value.dateString[1]', moment(value[0]))
-      // this.queryParam.startYearMonth = dateString[0]
-      // this.queryParam.endYearMonth = dateString[1]
+      // console.log('this.mode2', this.mode2)
+      this.queryParam.startYearMonth = value[0].format('YYYY-MM')
+      this.queryParam.endYearMonth = value[1].format('YYYY-MM')
+      console.log('开始年月:', this.queryParam.startYearMonth)
+      console.log('结束年月:', this.queryParam.endYearMonth)
+      setFieldsValue({
+        timeRange: value
+      })
     },
-    // onDateChange(value, dateString) {
-    //   console.log('起年月', dateString[0], '始年月', dateString[1])
-    //   this.queryParam.startYearMonth = dateString[0]
-    //   this.queryParam.endYearMonth = dateString[1]
-    // }
+
     // 时间发生变化的回调,发生在用户选择时间时
-    handleChange(value) {
-      console.log('?', value)
+    monthChange(value) {
       this.value = value
-      console.log('this.value', this.value)
+      console.log('what------monthChange')
     },
     searchQuery() {
       this.getExternalData()
     },
     searchReset() {
       this.queryParam = {}
+      this.value = [] //起始年月重置
       this.getExternalData()
     },
 
-    // 分页、排序、筛选变化时触发
     handleTableChange(pagination, filters, sorter) {
       // console.log('当前页信息>>>>',pagination)
       this.queryParam.pageNo = pagination.current

+ 41 - 31
src/views/reportForms/order-statistics/interior-statistics.vue

@@ -7,55 +7,42 @@
         <a-form layout="inline" @keyup.enter.native="searchQuery">
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
-              <a-form-item label="始年月">
-                <!--  :disabled-date="disabledDate" 不可选择的日期 -->
-                <a-month-picker
-                  placeholder="请选择开始年月"
+              <a-form-item label="始年月">
+                <a-range-picker
+                  style="width: 100%"
+                  placeholder="['开始年月', '结束年月']"
                   format="YYYY-MM"
-                  style="width:100%;"
-                  v-model="queryParam.startYearMonth"
-                />
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="结束年月">
-                <a-month-picker
-                  placeholder="请选择结束年月"
-                  format="YYYY-MM"
-                  style="width:100%;"
-                  v-model="queryParam.endYearMonth"
+                  :mode="mode2"
+                  :value="value"
+                  @panelChange="handlePanelChange"
+                  @change="monthChange"
                 />
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-item label="部门">
-                <a-input placeholder="请输入订单号" v-model="queryParam.department"></a-input>
-
+                <a-input placeholder="请输入部门" v-model="queryParam.department"></a-input>
                 <!-- <a-select placeholder="请选择部门" v-model="queryParam.department">
                   <a-select-option :value="''">请选择</a-select-option>
                   <a-select-option :value="0">业务一部</a-select-option>
                   <a-select-option :value="1">业务二部</a-select-option>
-                  <a-select-option :value="2">业务三部</a-select-option>
-                  <a-select-option :value="2">业务四部</a-select-option>
                 </a-select> -->
               </a-form-item>
             </a-col>
 
-            <template v-if="toggleSearchStatus">
-              <a-col :md="6" :sm="8">
-                <a-form-item label="客户">
-                  <a-select placeholder="请选择客户" v-model="queryParam.customer">
+            <a-col :md="6" :sm="8">
+              <a-form-item label="客户">
+                <a-input placeholder="请输入客户" v-model="queryParam.customer"></a-input>
+                <!-- <a-select placeholder="请选择客户" v-model="queryParam.customer">
                     <a-select-option :value="''">请选择</a-select-option>
                     <a-select-option :value="0">FD</a-select-option>
                     <a-select-option :value="1">PMK</a-select-option>
-                    <a-select-option :value="2">AUCHAN</a-select-option>
-                    <a-select-option :value="2">BIOWORLD</a-select-option>
-                  </a-select>
-                </a-form-item>
-              </a-col>
-            </template>
+                  </a-select> -->
+              </a-form-item>
+            </a-col>
+
+            <template v-if="toggleSearchStatus"></template>
 
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@@ -199,6 +186,8 @@ export default {
         // current: '', //当前页
         // pageSize: '' //一页多少
       },
+      mode2: ['month', 'month'],
+      value: [], //起始月份
       dateFormat: 'YYYY-MM-DD'
     }
   },
@@ -222,11 +211,32 @@ export default {
         // })
       })
     },
+
+    // 日期面板变化时的回调
+    handlePanelChange(value, mode) {
+      this.value = value
+      this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
+      // console.log('this.mode2', this.mode2)
+      this.queryParam.startYearMonth = value[0].format('YYYY-MM')
+      this.queryParam.endYearMonth = value[1].format('YYYY-MM')
+      console.log('开始年月:', this.queryParam.startYearMonth)
+      console.log('结束年月:', this.queryParam.endYearMonth)
+      setFieldsValue({
+        timeRange: value
+      })
+    },
+
+    // 时间发生变化的回调,发生在用户选择时间时
+    monthChange(value) {
+      this.value = value
+      console.log('what------monthChange')
+    },
     searchQuery() {
       this.getInteriorData()
     },
     searchReset() {
       this.queryParam = {}
+      this.value = [] //起始年月重置
       this.getInteriorData()
     },
 

+ 0 - 1
src/views/reportForms/supply-capacity-table.vue

@@ -12,7 +12,6 @@
               </a-form-item>
             </a-col>
 
-            <!-- test -->
             <a-col :md="6" :sm="8">
               <a-form-item label="起始日期">
                 <a-range-picker