Kaynağa Gözat

报表【成本分配表】页面逻辑调整+其他小修改

liangyan0105 3 yıl önce
ebeveyn
işleme
35a7d9fc42

+ 10 - 1
src/views/cost-allocation-total/list.vue

@@ -67,6 +67,7 @@
         </span>
       </a-table>
     </a-card>
+
     <!-- 详情 大抽屉 -->
     <details-drawer ref="detailsDrawer" :father="aa" @ok="modalFormOk"></details-drawer>
   </div>
@@ -122,7 +123,15 @@ export default {
         //     return moment(text).format('YYYY-MM-DD')
         //   }
         // },
-        { title: '出运日期', width: 120, dataIndex: 'outData', className: 'replacecolor' },
+        {
+          title: '出运日期',
+          width: 120,
+          dataIndex: 'outData',
+          customRender: text => {
+            return moment(text).format('YYYY-MM-DD')
+          },
+          className: 'replacecolor'
+        },
         { title: '成衣件数', width: 90, dataIndex: 'clothesQuantity', className: 'replacecolor' },
         { title: '销售美元', width: 120, dataIndex: 'SalesUSD', className: 'replacecolor' },
         { title: '销售人民币', width: 120, dataIndex: 'SalesCNY', className: 'replacecolor' },

+ 68 - 122
src/views/reportForms/cost-allocation-add.vue

@@ -1,65 +1,62 @@
 <template>
-  <!-- 成本分配 新增(新增后数据到单证的成本分配汇总内)-->
+  <!-- 成本分配 (保存后数据到单证的成本分配汇总内)-->
   <div id="costAllocationAdd">
-    <!-- <a-drawer
-      title="新增"
-      width="89%"
-      placement="right"
-      :closable="true"
-      :visible="visible"
-      @close="handleCancel"> -->
-
     <a-card :bordered="false">
-      <!-- 主表信息 填写-->
+      <!-- 主表信息 -->
       <div class="table-page-search-wrapper">
         <a-form-model layout="inline" ref="form" :model="costAllocationAdd" :rules="validatorRules">
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-model-item label="计划单号" prop="planNum">
-                <a-input placeholder="请输入计划单号" v-model="costAllocationAdd.planNum"></a-input>
+                <!-- <a-input placeholder="请输入计划单号" v-model="costAllocationAdd.planNum"></a-input> -->
+                <a-input-search
+                  placeholder="请输入计划单号"
+                  enter-button
+                  v-model="costAllocationAdd.planNum"
+                  @search="onSearch"
+                />
               </a-form-model-item>
             </a-col>
-
+            <!-- 输入【计划单号】点击搜索后,回显以下所有信息,【备注】需要输入,后进行保存 -->
             <a-col :md="6" :sm="8">
               <a-form-model-item label="产品款号" prop="poStyleNum">
-                <a-input placeholder="请输入外销员" v-model="costAllocationAdd.poStyleNum"></a-input>
+                <a-input v-model="costAllocationAdd.poStyleNum" disabled></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="外销员" prop="exportSales">
-                <a-input placeholder="请输入外销员" v-model="costAllocationAdd.exportSales"></a-input>
+                <a-input v-model="costAllocationAdd.exportSales" disabled></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="成衣合同号" prop="garmentContractNo">
-                <a-input placeholder="请输入成衣合同号" v-model="costAllocationAdd.garmentContractNo"></a-input>
+                <a-input v-model="costAllocationAdd.garmentContractNo"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="部门" prop="department">
-                <a-input placeholder="请输入部门" v-model="costAllocationAdd.department"></a-input>
+                <a-input v-model="costAllocationAdd.department"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="客户简称" prop="customerShortName">
-                <a-input placeholder="请输入客户简称" v-model="costAllocationAdd.customerShortName"></a-input>
+                <a-input v-model="costAllocationAdd.customerShortName"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="加工单位" prop="processUnit">
-                <a-input placeholder="请输入加工单位" v-model="costAllocationAdd.processUnit"></a-input>
+                <a-input v-model="costAllocationAdd.processUnit"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="出运日期" prop="outData">
                 <a-date-picker
-                  placeholder="请输入出运日期"
                   style="width: 100%"
                   :format="dateFormat"
                   v-model="costAllocationAdd.outData"
@@ -69,13 +66,13 @@
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="计划数量" prop="planQuantity">
-                <a-input placeholder="请输入计划数量" v-model="costAllocationAdd.planQuantity"></a-input>
+                <a-input v-model="costAllocationAdd.planQuantity"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="美元外销总价" prop="USDTotalExportPrice">
-                <a-input placeholder="请输入美元外销总价" v-model="costAllocationAdd.USDTotalExportPrice"></a-input>
+                <a-input v-model="costAllocationAdd.USDTotalExportPrice"></a-input>
               </a-form-model-item>
             </a-col>
 
@@ -83,7 +80,6 @@
               <a-form-model-item label="人民币费用支出" prop="RMBExpense">
                 <a-input
                   v-model="costAllocationAdd.RMBExpense"
-                  placeholder="请输入人民币费用支出"
                   style="color:#027db4;"
                   @click="mainTableExpenseCNY"
                 ></a-input>
@@ -92,19 +88,19 @@
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="税率%" prop="taxRate">
-                <a-input placeholder="请输入税率" v-model="costAllocationAdd.taxRate"></a-input>
+                <a-input v-model="costAllocationAdd.taxRate"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="实际出货数量" prop="actualShipQuantity">
-                <a-input placeholder="请输入实际出货数量" v-model="costAllocationAdd.actualShipQuantity"></a-input>
+                <a-input v-model="costAllocationAdd.actualShipQuantity"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="人民币外销金额" prop="RMBExportAmount">
-                <a-input placeholder="请输入人民币外销金额" v-model="costAllocationAdd.RMBExportAmount"></a-input>
+                <a-input v-model="costAllocationAdd.RMBExportAmount"></a-input>
               </a-form-model-item>
             </a-col>
 
@@ -112,7 +108,6 @@
               <a-form-model-item label="美元费用支出" prop="USDExpense">
                 <a-input
                   v-model="costAllocationAdd.USDExpense"
-                  placeholder="请输入美元费用支出"
                   style="color:#027db4;"
                   @click="mainTableExpenseUSD"
                 ></a-input>
@@ -121,91 +116,79 @@
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="加工费" prop="processCost">
-                <a-input placeholder="请输入加工费" v-model="costAllocationAdd.processCost"></a-input>
+                <a-input v-model="costAllocationAdd.processCost"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="短出数" prop="shortSeveral">
-                <a-input placeholder="请输入短出数" v-model="costAllocationAdd.shortSeveral"></a-input>
+                <a-input v-model="costAllocationAdd.shortSeveral"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="短出货值" prop="shortValue">
-                <a-input placeholder="请输入短出货值" v-model="costAllocationAdd.shortValue"></a-input>
+                <a-input v-model="costAllocationAdd.shortValue"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="短出面料成本" prop="fabricShortCost">
-                <a-input placeholder="请输入短出面料成本" v-model="costAllocationAdd.fabricShortCost"></a-input>
+                <a-input v-model="costAllocationAdd.fabricShortCost"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="事故单美金金额" prop="accidentUSDAmount">
-                <a-input placeholder="请输入事故单美金金额" v-model="costAllocationAdd.accidentUSDAmount"></a-input>
+                <a-input v-model="costAllocationAdd.accidentUSDAmount"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="面料含税成本" prop="fabricCostIncludesTax">
-                <a-input placeholder="请输入面料含税成本" v-model="costAllocationAdd.fabricCostIncludesTax"></a-input>
+                <a-input v-model="costAllocationAdd.fabricCostIncludesTax"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="辅料含税成本" prop="excipienCostIncludesTax">
-                <a-input placeholder="请输入辅料含税成本" v-model="costAllocationAdd.excipienCostIncludesTax"></a-input>
+                <a-input v-model="costAllocationAdd.excipienCostIncludesTax"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="销售订单本币总额" prop="salesOrdersLocalTotal">
-                <a-input
-                  placeholder="请输入销售订单本币总额"
-                  v-model="costAllocationAdd.salesOrdersLocalTotal"
-                ></a-input>
+                <a-input v-model="costAllocationAdd.salesOrdersLocalTotal"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="事故单人民币金额" prop="accidentCNYAmount">
-                <a-input placeholder="请输入事故单人民币金额" v-model="costAllocationAdd.accidentCNYAmount"></a-input>
+                <a-input v-model="costAllocationAdd.accidentCNYAmount"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="面料不含税成本" prop="fabricCostNotIncludesTax">
-                <a-input
-                  placeholder="请输入面料不含税成本"
-                  v-model="costAllocationAdd.fabricCostNotIncludesTax"
-                ></a-input>
+                <a-input v-model="costAllocationAdd.fabricCostNotIncludesTax"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="辅料不含税成本" prop="excipienCostNotIncludesTax">
-                <a-input
-                  placeholder="请输入辅料不含税成本"
-                  v-model="costAllocationAdd.excipienCostNotIncludesTax"
-                ></a-input>
+                <a-input v-model="costAllocationAdd.excipienCostNotIncludesTax"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="销售订单原币总额" prop="salesOrdersOriginalTotal">
-                <a-input
-                  placeholder="请输入销售订单原币总额"
-                  v-model="costAllocationAdd.salesOrdersOriginalTotal"
-                ></a-input>
+                <a-input v-model="costAllocationAdd.salesOrdersOriginalTotal"></a-input>
               </a-form-model-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="制单人" prop="preparedBy">
-                <a-input placeholder="请输入制单人" v-model="costAllocationAdd.preparedBy"></a-input>
+                <a-input v-model="costAllocationAdd.preparedBy"></a-input>
               </a-form-model-item>
             </a-col>
 
@@ -218,10 +201,7 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- </a-card> -->
 
-      <!-- 子表 -->
-      <!-- <a-card :bordered="false" style="marginTop:10px;"> -->
       <!--tabs 组件引入  -->
       <tabs />
 
@@ -257,53 +237,41 @@
         </a-table>
       </div>
 
-      <!-- 备注信息 1 根据角色权限控制【填写】、【查看】-->
+      <!-- 备注信息 1 根据角色判断 显示备注 1 或备注 2-->
       <div class="note-one" style="marginTop:40px;">
         <h6 class="table-title">备注信息 1</h6>
         <div class="noteDetail">
-          <a-input type="textarea" v-model="noteOne" placeholder="请输入备注 1" style="minHeight:100px;" />
-          <a-button type="primary" @click="savenoteOne">保存</a-button>
+          <a-form-model ref="form" :model="costAllocationAdd" :rues="validatorRules">
+            <a-form-model-item prop="noteOne">
+              <a-input
+                type="textarea"
+                v-model="costAllocationAdd.noteOne"
+                placeholder="请输入备注"
+                style="minHeight:100px;"
+              />
+            </a-form-model-item>
+          </a-form-model>
         </div>
       </div>
 
       <!-- 备注信息 2 根据角色权限控制【填写】、【查看】-->
-      <div class="note-two" style="margin:40px 0 40px 0;">
+      <!-- <div class="note-two" style="margin:40px 0 40px 0;">
         <h6 class="table-title">备注信息 2</h6>
         <div class="noteDetail">
           <a-input type="textarea" v-model="noteTwo" placeholder="请输入备注 2" style="minHeight:100px;" />
-          <a-button type="primary" @click="savenoteTwo">保存</a-button>
         </div>
-      </div>
+      </div> -->
 
-      <a-row :gutter="24">
+      <!-- 页面底部保存 -->
+      <a-row :gutter="24" style="marginTop:40px;float:right">
         <a-col :md="12" :sm="12">
-
+          <a-button type="primary" @click="save">
+            保存
+          </a-button>
         </a-col>
       </a-row>
     </a-card>
 
-    <!-- 页面底部保存取消 -->
-    <!-- <div
-      :style="{
-        position: 'absolute',
-        right: 0,
-        bottom: 0,
-        width: '100%',
-        borderTop: '1px solid #e9e9e9',
-        padding: '10px 16px',
-        background: '#fff',
-        textAlign: 'right',
-        zIndex: 1
-      }"
-    >
-      <a-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
-        <a-button :style="{ marginRight: '8px' }">取消</a-button>
-      </a-popconfirm>
-      <a-button type="primary" @click="submitAdd">
-        提交
-      </a-button>
-    </div> -->
-
     <!-- 弹框 -->
     <div>
       <!-- 主表 人民币费用支出  弹框 -->
@@ -313,7 +281,6 @@
       <!-- 事故单 -->
       <accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
     </div>
-    <!-- </a-drawer> -->
   </div>
 </template>
 
@@ -334,7 +301,7 @@ export default {
   data() {
     return {
       loading: false, // 表格加载
-      costAllocationAdd: [], // 成本分配统计
+      costAllocationAdd: {}, // 成本分配统计
       dateFormat: 'YYYY-MM-DD',
       noteOne: '', // 备注 1
       noteTwo: '', // 备注 2
@@ -367,15 +334,17 @@ export default {
       visible: true, // 成本分配  新增
 
       validatorRules: {
-        planNum: [{ required: true, message: '计划单号不能为空', trigger: 'blur' }],
-        poStyleNum: [{ required: true, message: '产品款号不能为空', trigger: 'blur' }],
-        exportSales: [{ required: true, message: '外销员不能为空', trigger: 'blur' }]
-        // 确定必填项
+        planNum: [{ required: true, message: '请输入计划单号进行搜索', trigger: 'blur' }]
       }
     }
   },
   created() {},
   methods: {
+    // 【计划单号】 搜索
+    onSearch(value) {
+      console.log('【计划单号】 ', value)
+      // 根据计划单号查询该页面所有信息且回显
+    },
     //  主表:人民币费用支出  弹框
     mainTableExpenseCNY() {
       console.log('点击:主表人民币费用支出')
@@ -399,46 +368,23 @@ export default {
         }
       }
     },
-    // ---------------------------------------
-    // 保存备注 1
-    savenoteOne() {
-      console.log('保存 备注 1')
-    },
-    // 保存备注 2
-    savenoteTwo() {
-      console.log('保存 备注 2')
-    },
 
     // --------------------------------------
-    // 抽屉 取消
-    handleCancel() {
-      console.log('点击抽屉取消')
-      this.close()
-    },
-    // 抽屉 提交
-    submitAdd() {
-      console.log('保存新增、刷新单证【成本分配汇总】数据')
+    // 页面 保存
+    save() {
+      console.log('保存该计划单号的备注、数据保存到单证【成本分配汇总】')
       const that = this
-      // 触发表单验证
       this.$refs.form.validate(valid => {
         if (valid) {
-          that.confirmLoading = true
+          //  alert('保存!')
+          console.log('备注信息:', this.costAllocationAdd.noteOne, '计划单号:', this.costAllocationAdd.planNum)
+          // that.$message.success(res.message)
+          that.$message.success('保存成功,数据添加到成本分配汇总')
+        } else {
+          this.$message.info('请选择计划单号、输入备注信息')
         }
       })
-      // 验证通过后,
-      // this.getShipmentList() // 刷新 成本分配汇总
-
-      this.$router.push('/cost-allocation-total/list') // 暂定跳转页面,客户未确定
-      this.close()
     },
-    // --------------------------------------
-    close() {
-      this.$emit('close')
-      this.visible = false
-      this.$refs.form.resetFields()
-    },
-
-    // --------------------------------------------------
     // father 方法
     aa() {},
     bb() {},

+ 20 - 11
src/views/reportForms/cost-allocation-table/tabs.vue

@@ -74,55 +74,64 @@
                 <a-form layout="inline">
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出货数量合计">
-                      <a-input v-model="totalInfo.shipmentQuantity"></a-input>
+                      52940
+                      <!-- <a-input v-model="totalInfo.shipmentQuantity"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="辅料金额合计">
-                      <a-input v-model="totalInfo.accessoriesAmount"></a-input>
+                      106010
+                      <!-- <a-input v-model="totalInfo.accessoriesAmount"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="辅料不含税金额合计">
-                      <a-input v-model="totalInfo.accessoriesExcludTax"></a-input>
+                      90151.26
+                      <!-- <a-input v-model="totalInfo.accessoriesExcludTax"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出运美元外销总价">
-                      <a-input v-model="totalInfo.exportPriceUSD"></a-input>
+                      67541.9
+                      <!-- <a-input v-model="totalInfo.exportPriceUSD"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出运加工费">
-                      <a-input v-model="totalInfo.shipProcesFees"></a-input>
+                      79779.88
+                      <!-- <a-input v-model="totalInfo.shipProcesFees"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="面料不含税金额合计">
-                      <a-input v-model="totalInfo.fabricExcludTax"></a-input>
+                      77470.69
+                      <!-- <a-input v-model="totalInfo.fabricExcludTax"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="出运人民币外销金额">
-                      <a-input v-model="totalInfo.exportedAmountRMB"></a-input>
+                      178557.45
+                      <!-- <a-input v-model="totalInfo.exportedAmountRMB"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="合计金额">
-                      <a-input v-model="totalInfo.amountTotal"></a-input>
+                      2299583.26
+                      <!-- <a-input v-model="totalInfo.amountTotal"></a-input> -->
                     </a-form-item>
                   </a-col>
 
                   <a-col :md="6" :sm="8">
                     <a-form-item label="面料金额合计">
-                      <a-input v-model="totalInfo.fabricAmount"></a-input>
+                      29413.13
+                      <!-- <a-input v-model="totalInfo.fabricAmount"></a-input> -->
                     </a-form-item>
                   </a-col>
                 </a-form>
@@ -944,8 +953,8 @@ export default {
 }
 
 /deep/ .ant-tabs {
-  margin:40px 0;
-  border: 1px dashed gray;//rgba(24, 144, 255, 0.3);
+  margin: 40px 0;
+  border: 1px dashed gray; //rgba(24, 144, 255, 0.3);
   padding: 12px;
   border-radius: 12px;
 }

+ 84 - 84
src/views/reportForms/order-statistics/external-statistics.vue

@@ -1,80 +1,83 @@
 <template>
   <!-- 订单外部统计表-->
-  <a-card :bordered="false">
+  <div id="externalStatistics">
+
     <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <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="请选择开始年月"
-                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"
-              />
-            </a-form-item>
-          </a-col>
-
-          <a-col :md="6" :sm="8">
-            <a-form-item label="部门">
-              <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-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <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="请选择开始年月"
+                  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-select placeholder="请选择客户" v-model="queryParam.customer">
+              <a-form-item label="结束年月">
+                <a-month-picker
+                  placeholder="请选择结束年月"
+                  format="YYYY-MM"
+                  style="width:100%;"
+                  v-model="queryParam.endYearMonth"
+                />
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="部门">
+                <a-select placeholder="请选择部门" v-model="queryParam.department">
                   <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-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>
-
-          <a-col :md="6" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-
-    <!-- 操作按钮  -->
-    <div class="table-operator">
-      <a-button type="primary" @click="externalChart" icon="area-chart">订单外部分析图</a-button>
-    </div>
-
-    <!-- table区域  rowKey="id" :scroll="{ x: 1500 }" -->
-    <div>
+
+            <template v-if="toggleSearchStatus">
+              <a-col :md="6" :sm="8">
+                <a-form-item label="客户">
+                  <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-col :md="6" :sm="8">
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                <a @click="handleToggleSearch" style="margin-left: 8px">
+                  {{ toggleSearchStatus ? '收起' : '展开' }}
+                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+
+    <!-- 操作按钮  订单外部分析图-->
+    <a-card :bordered="false" style="marginTop:10px;">
+      <div class="table-operator">
+        <a-button type="primary" @click="externalChart" icon="area-chart">订单外部分析图</a-button>
+      </div>
+
+      <!-- table区域  rowKey="id" :scroll="{ x: 1500 }" -->
       <a-table
         bordered
         :row-key="record => record.id"
@@ -85,11 +88,11 @@
         @change="handleTableChange"
       >
       </a-table>
-    </div>
+    </a-card>
 
     <!-- 查看分析图 弹框 -->
     <externalChart-modal ref="externalChartModal" :father="aa"></externalChart-modal>
-  </a-card>
+  </div>
 </template>
 
 <script>
@@ -107,13 +110,11 @@ export default {
     // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
     return {
       description: '订单外部统计表',
-      // 订单内部统计表 表头
       externalStatisticsColumns: [
         {
           title: '部门',
           width: 140,
           dataIndex: 'department',
-          // fixed: 'left',
           className: 'replacecolor'
         },
         {
@@ -140,19 +141,17 @@ export default {
           title: '供应商',
           width: 140,
           dataIndex: 'supplier',
-          // fixed: 'left',
           className: 'replacecolor'
         },
-        //  {
-        //   title: '创建时间',
-        //   dataIndex: 'createTime',
-        //   align: 'center',
-        //   sorter: true,
-        //   customRender: text => {
-        //     return moment(text).format('YYYY-MM-DD')
-        //   }
-        // },
-        { title: '计划到货月份', width: 120, dataIndex: 'planDeliveryMonth', className: 'replacecolor' },
+        {
+          title: '计划到货月份',
+          width: 120,
+          dataIndex: 'planDeliveryMonth',
+          customRender: text => {
+            return moment(text).format('YYYY-MM')
+          },
+          className: 'replacecolor'
+        },
         { title: '含税单价', width: 120, dataIndex: 'priceInTax', className: 'replacecolor' },
         {
           title: '实际数量',
@@ -182,6 +181,7 @@ export default {
         department: '',
         customer: ''
       }
+      // dateFormat: 'YYYY-MM-DD'
     }
   },
   created() {

+ 84 - 84
src/views/reportForms/order-statistics/interior-statistics.vue

@@ -1,80 +1,82 @@
 <template>
   <!-- 订单内部统计表-->
-  <a-card :bordered="false">
+  <div id="interiorStatistics">
+
     <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <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="请选择开始年月"
-                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"
-              />
-            </a-form-item>
-          </a-col>
-
-          <a-col :md="6" :sm="8">
-            <a-form-item label="部门">
-              <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-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <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="请选择开始年月"
+                  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-select placeholder="请选择客户" v-model="queryParam.customer">
+              <a-form-item label="结束年月">
+                <a-month-picker
+                  placeholder="请选择结束年月"
+                  format="YYYY-MM"
+                  style="width:100%;"
+                  v-model="queryParam.endYearMonth"
+                />
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="部门">
+                <a-select placeholder="请选择部门" v-model="queryParam.department">
                   <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-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>
-
-          <a-col :md="6" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-
-    <!-- 操作按钮  -->
-    <div class="table-operator">
-      <a-button type="primary" @click="interiorChart" icon="area-chart">订单内部分析图</a-button>
-    </div>
-
-    <!-- table区域  rowKey="id" :scroll="{ x: 1500 }" -->
-    <div>
+
+            <template v-if="toggleSearchStatus">
+              <a-col :md="6" :sm="8">
+                <a-form-item label="客户">
+                  <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-col :md="6" :sm="8">
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                <a @click="handleToggleSearch" style="margin-left: 8px">
+                  {{ toggleSearchStatus ? '收起' : '展开' }}
+                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+
+    <!-- 操作按钮 订单内部分析图 -->
+    <a-card :bordered="false" style="marginTop:10px;">
+      <div class="table-operator">
+        <a-button type="primary" @click="interiorChart" icon="area-chart">订单内部分析图</a-button>
+      </div>
+      <!-- table区域  rowKey="id" :scroll="{ x: 1500 }" -->
       <a-table
         bordered
         :row-key="record => record.id"
@@ -85,11 +87,11 @@
         @change="handleTableChange"
       >
       </a-table>
-    </div>
+    </a-card>
 
     <!-- 查看分析图 弹框 -->
     <interiorChart-modal ref="interiorChartModal" :father="aa"></interiorChart-modal>
-  </a-card>
+  </div>
 </template>
 
 <script>
@@ -106,8 +108,6 @@ export default {
   data() {
     // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
     return {
-      description: '订单内部统计表',
-      // 订单内部统计表 表头
       interiorStatisticsColumns: [
         {
           title: '部门',
@@ -140,19 +140,18 @@ export default {
           title: '供应商',
           width: 140,
           dataIndex: 'supplier',
-          // fixed: 'left',
           className: 'replacecolor'
         },
-        //  {
-        //   title: '创建时间',
-        //   dataIndex: 'createTime',
-        //   align: 'center',
-        //   sorter: true,
-        //   customRender: text => {
-        //     return moment(text).format('YYYY-MM-DD')
-        //   }
-        // },
-        { title: '计划到货月份', width: 120, dataIndex: 'planDeliveryMonth', className: 'replacecolor' },
+
+        {
+          title: '计划到货月份',
+          width: 120,
+          dataIndex: 'planDeliveryMonth',
+          customRender: text => {
+            return moment(text).format('YYYY-MM')
+          },
+          className: 'replacecolor'
+        },
         { title: '含税单价', width: 120, dataIndex: 'priceInTax', className: 'replacecolor' },
         {
           title: '实际数量',
@@ -182,6 +181,7 @@ export default {
         department: '',
         customer: ''
       }
+      // dateFormat: 'YYYY-MM-DD'
     }
   },
   created() {

+ 91 - 73
src/views/reportForms/supply-capacity-table.vue

@@ -1,86 +1,88 @@
 <template>
   <!-- 供应商产能报表 -->
-  <a-card :bordered="false">
+  <div id="supplyCapacityTable">
     <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-row :gutter="24">
-          <a-col :md="6" :sm="8">
-            <a-form-item label="订单号">
-              <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
-            </a-form-item>
-          </a-col>
-
-          <a-col :md="6" :sm="8">
-            <a-form-item label="开始日期">
-              <a-date-picker
-                placeholder="请选择开始日期"
-                style="width: 100%"
-                format="YYYY-MM"
-                v-model="queryParam.startDate"
-              ></a-date-picker>
-            </a-form-item>
-          </a-col>
-
-          <a-col :md="6" :sm="8">
-            <a-form-item label="结束日期">
-              <a-date-picker
-                placeholder="请选择结束日期"
-                style="width: 100%"
-                format="YYYY-MM"
-                v-model="queryParam.endDate"
-              ></a-date-picker>
-            </a-form-item>
-          </a-col>
-
-          <template v-if="toggleSearchStatus">
+    <a-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
             <a-col :md="6" :sm="8">
-              <a-form-item label="订单类型">
-                <a-select placeholder="请选择订单类型" v-model="queryParam.orderType">
-                  <a-select-option :value="''">请选择</a-select-option>
-                  <a-select-option :value="0">订单类型1</a-select-option>
-                  <a-select-option :value="1">订单类型2</a-select-option>
-                  <a-select-option :value="2">订单类型3</a-select-option>
-                </a-select>
+              <a-form-item label="订单号">
+                <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
-              <a-form-item label="供应商">
-                <a-input placeholder="请输入供应商" v-model="queryParam.supplier"></a-input>
+              <a-form-item label="开始日期">
+                <a-date-picker
+                  placeholder="请选择开始日期"
+                  style="width: 100%"
+                  format="YYYY-MM"
+                  v-model="queryParam.startDate"
+                ></a-date-picker>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
-              <a-form-item label="计划单号">
-                <a-input placeholder="请输入计划单号" v-model="queryParam.planNum"></a-input>
+              <a-form-item label="结束日期">
+                <a-date-picker
+                  placeholder="请选择结束日期"
+                  style="width: 100%"
+                  format="YYYY-MM"
+                  v-model="queryParam.endDate"
+                ></a-date-picker>
               </a-form-item>
             </a-col>
-          </template>
-
-          <a-col :md="6" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
+
+            <template v-if="toggleSearchStatus">
+              <a-col :md="6" :sm="8">
+                <a-form-item label="订单类型">
+                  <a-select placeholder="请选择订单类型" v-model="queryParam.orderType">
+                    <a-select-option :value="''">请选择</a-select-option>
+                    <a-select-option :value="0">订单类型1</a-select-option>
+                    <a-select-option :value="1">订单类型2</a-select-option>
+                    <a-select-option :value="2">订单类型3</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="供应商">
+                  <a-input placeholder="请输入供应商" v-model="queryParam.supplier"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="计划单号">
+                  <a-input placeholder="请输入计划单号" v-model="queryParam.planNum"></a-input>
+                </a-form-item>
+              </a-col>
+            </template>
+
+            <a-col :md="6" :sm="8">
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                <a @click="handleToggleSearch" style="margin-left: 8px">
+                  {{ toggleSearchStatus ? '收起' : '展开' }}
+                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button type="primary" @click="handleExportXls('供应链产能报表')" icon="download">合并导出</a-button>
-      <a-button type="primary" @click="monthlySupplyExport" icon="download">月份供应商合计导出</a-button>
-      <a-button type="primary" @click="monthlyDepartExport" icon="download">月份部门合计导出</a-button>
-    </div>
-
-    <!-- 合计 table  rowKey="id" :scroll="{ x: 1500 }"  -->
-    <div>
+    <a-card :bordered="false" style="marginTop:10px;">
+      <div class="table-operator">
+        <a-button type="primary" @click="handleExportXls('供应链产能报表')" icon="download">合并导出</a-button>
+        <a-button type="primary" @click="monthlySupplyExport" icon="download">月份供应商合计导出</a-button>
+        <a-button type="primary" @click="monthlyDepartExport" icon="download">月份部门合计导出</a-button>
+      </div>
+
+      <!-- 合计 table  rowKey="id" :scroll="{ x: 1500 }"  -->
       <a-table
         bordered
         :row-key="record => record.id"
@@ -91,8 +93,8 @@
         @change="handleTableChange"
       >
       </a-table>
-    </div>
-  </a-card>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -101,7 +103,7 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
 export default {
-  name: 'SupplyCapacityTable', // 供应产能报表
+  name: 'SupplyCapacityTable', // 供应产能报表
   mixins: [JeecgListMixin],
   components: { JEllipsis, moment },
 
@@ -109,7 +111,6 @@ export default {
     // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
     return {
       description: '供应商产能报表',
-      // 供应链产能 表头
       supplyCapacityColumns: [
         {
           title: '订单号',
@@ -151,8 +152,24 @@ export default {
         },
         { title: '累计入库数量', width: 120, dataIndex: 'accumulativeInQuantity', className: 'replacecolor' },
         { title: '单位', width: 100, dataIndex: 'unit', className: 'replacecolor' },
-        { title: '计划到货月份', width: 120, dataIndex: 'planDeliveryMonth', className: 'replacecolor' },
-        { title: '计划到货日期', width: 120, dataIndex: 'planDeliveryData', className: 'replacecolor' },
+        {
+          title: '计划到货月份',
+          width: 120,
+          dataIndex: 'planDeliveryMonth',
+          customRender: text => {
+            return moment(text).format('YYYY-MM')
+          },
+          className: 'replacecolor'
+        },
+        {
+          title: '计划到货日期',
+          width: 120,
+          dataIndex: 'planDeliveryData',
+          customRender: text => {
+            return moment(text).format('YYYY-MM-DD')
+          },
+          className: 'replacecolor'
+        },
         { title: '系数', width: 100, dataIndex: 'coefficient', className: 'replacecolor' }
       ],
       supplyCapacityData: [{ orderNum: '3749505' }],
@@ -166,6 +183,7 @@ export default {
         supplier: '',
         planNum: ''
       }
+      // dateFormat: 'YYYY-MM-DD'
     }
   },
   created() {

+ 5 - 0
src/views/shipment-details/addShipDetDrawer.vue

@@ -414,6 +414,11 @@ export default {
       visible: false,
       confirmLoading: false,
       dateFormat: 'YYYY-MM-DD',
+      //       dateFormat:{
+      //   type: String,
+      //   default: 'YYYY-MM-DD',
+      //   required: false
+      // },
       validatorRules: {
         orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }], // 单据号
         billDate: [{ required: true, message: '单据日期不能为空', trigger: 'blur' }],

+ 5 - 12
src/views/shipment-details/shipmentList.vue

@@ -16,7 +16,7 @@
               <a-form-item label="开始时间">
                 <a-date-picker
                   placeholder="请选择开始时间"
-                  @change="startTimeChange"
+                  :format="dateFormat"
                   style="width: 100%"
                   v-model="queryParam.startTime"
                 />
@@ -27,7 +27,7 @@
               <a-form-item label="结束时间" style="width:100%;">
                 <a-month-picker
                   placeholder="请选择结束时间"
-                  @change="endTimeChange"
+                  :format="dateFormat"
                   style="width: 100%"
                   v-model="queryParam.endTime"
                 />
@@ -39,7 +39,7 @@
                 <a-form-item label="发货日期">
                   <a-date-picker
                     placeholder="请选择发货日期"
-                    @change="shipDateChange"
+                    :format="dateFormat"
                     style="width: 100%"
                     v-model="queryParam.deliveryDate"
                   />
@@ -467,21 +467,14 @@ export default {
         salesman: '',
         styleNum: '',
         refer: ''
-      }
+      },
+      dateFormat: 'YYYY-MM-DD'
     }
   },
   created() {
     // this.getShipmentList() // 发运明细列表
   },
   methods: {
-    // 开始时间
-    startTimeChange() {},
-    // 结束时间
-    endTimeChange() {},
-    // 发货日期
-    shipDateChange() {},
-    // --------------------------------------
-
     // 查询按钮
     searchQuery() {
       // this.getAnnList() // 渲染公告