Quellcode durchsuchen

成本分配汇总

jbb vor 2 Jahren
Ursprung
Commit
5ce19fa4cf
2 geänderte Dateien mit 88 neuen und 66 gelöschten Zeilen
  1. 1 1
      src/api/document/cost-allocation-total.js
  2. 87 65
      src/views/cost-allocation-total/list.vue

+ 1 - 1
src/api/document/cost-allocation-total.js

@@ -3,7 +3,7 @@
 import { getAction, postAction, deleteAction } from '@/api/manage'
 
 // 分页列表查询
-const costList = params => getAction('/cost/syCostAllocation/list', params)
+const costList = params => getAction('/orderData/syCostLossReview/queryCostAllocationPage', params)
 
 // 详情
 const costByPlanNum = params => getAction('/cost/syCostAllocation/queryByPlanNum', params)

+ 87 - 65
src/views/cost-allocation-total/list.vue

@@ -7,22 +7,70 @@
         <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.index"></a-input>
+              <a-form-item label="计划单号">
+                <a-input placeholder="请输入序号" v-model="queryParam.planNum"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
-              <a-form-item label="计划单号" has-feedback>
-                <a-input placeholder="请输入计划单号" v-model="queryParam.planNum"></a-input>
+              <a-form-item label="产品款号" has-feedback>
+                <a-input placeholder="请输入" v-model="queryParam.poStyleNum"></a-input>
               </a-form-item>
             </a-col>
 
+            <a-col :md="6" :sm="8">
+              <a-form-item label="外销员">
+                <a-input placeholder="请输入" v-model="queryParam.exportSales"></a-input>
+              </a-form-item>
+            </a-col>
+            <template v-if="toggleSearchStatus">
+              <a-col :md="6" :sm="8">
+              <a-form-item label="成衣合同号">
+                <a-input placeholder="请输入" v-model="queryParam.garmentContractno"></a-input>
+              </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-form-item>
+            </a-col>
             <a-col :md="6" :sm="8">
               <a-form-item label="客户简称">
-                <a-input placeholder="请输入客户简称" v-model="queryParam.customerShortame"></a-input>
+                <a-input placeholder="请输入" v-model="queryParam.customerShortame"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="加工单位">
+                <a-input placeholder="请输入" v-model="queryParam.processUnit"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="出运日期">
+                <a-date-picker style="width: 100%" v-model="outdata"  @change="changeData" :format="dateFormat"> </a-date-picker>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="计划数量">
+                <a-input placeholder="请输入" v-model="queryParam.planQuantity"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="实际出货数量">
+                <a-input placeholder="请输入" v-model="queryParam.actualShipquantity"></a-input>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="短出数">
+                <a-input placeholder="请输入" v-model="queryParam.shortseveral"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="制单人">
+                <a-input placeholder="请输入" v-model="queryParam.preparedBy"></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">
@@ -48,7 +96,7 @@
         :data-source="costAllocationData"
         :loading="loading"
         :pagination="pagination"
-        :scroll="{ x: 1500 }"
+        :scroll="{ x: 1000 }"
         @change="handleTableChange"
       >
         <!-- 单据状态 -->
@@ -107,84 +155,52 @@ export default {
       // 成本分配汇总 表头
       costAllocationColumns: [
         {
-          title: '号',
+          title: '计划单号',
           width: 90,
-          dataIndex: 'index',
-          customRender: (text, record, index) => `${index + 1}`,
-          fixed: 'left',
-          className: 'replacecolor'
+          dataIndex: 'planNum',
+          // customRender: (text, record, index) => `${index + 1}`,
+          // fixed: 'left',
+          className: 'replacecolor',
+           ellipsis: true
         },
-        { title: '计划单号', width: 120, dataIndex: 'planNum', fixed: 'left', className: 'replacecolor' },
-        { title: '款号', width: 120, dataIndex: 'poStyleNum', className: 'replacecolor' },
-        { title: '业务员', width: 120, dataIndex: 'exportSales', className: 'replacecolor' },
+        { title: '产品款号', width: 120, dataIndex: 'poStyleNum',  ellipsis: true, className: 'replacecolor' },
+        { title: '外销员', width: 120, dataIndex: 'exportSales',  ellipsis: true,className: 'replacecolor' },
+        { title: '成衣合同号', width: 140, dataIndex: 'garmentContractno', ellipsis: true, className: 'replacecolor' },
         {
           title: '部门',
           width: 120,
           dataIndex: 'department',
+          ellipsis: true,
           className: 'replacecolor'
         },
-        { title: '客户简称', width: 150, dataIndex: 'customerShortame', className: 'replacecolor' },
-        { title: '加工单位', width: 220, dataIndex: 'processUnit', align: 'left', className: 'replacecolor' },
-        //  {
-        //   title: '创建时间',
-        //   dataIndex: 'createTime',
-        //   align: 'center',
-        //   sorter: true,
-        //   customRender: text => {
-        //     return moment(text).format('YYYY-MM-DD')
-        //   }
-        // },
+        { title: '客户简称', width: 150, dataIndex: 'customerShortame', ellipsis: true, className: 'replacecolor' },
+        { title: '加工单位', width: 220, dataIndex: 'processUnit', ellipsis: true, align: 'left', className: 'replacecolor' },
         {
           title: '出运日期',
           width: 120,
           dataIndex: 'outdata',
           customRender: text => {
-            return moment(text).format('YYYY-MM-DD')
+            if(text!==''&&text){
+              
+              return moment(parseInt(text)).format('YYYY-MM-DD')
+            }else{
+              return ''
+            }
+            
           },
           className: 'replacecolor'
         },
-        { title: '成衣件数', width: 90, dataIndex: 'actualShipquantity', className: 'replacecolor' },
-        { title: '销售美元', width: 120, dataIndex: 'usdTotalexportprice', className: 'replacecolor' },
-        { title: '销售人民币', width: 120, dataIndex: 'rmbExportamount', className: 'replacecolor' },
-        { title: '面料(不含税)', width: 120, dataIndex: 'fabriccostNotincludestax', className: 'replacecolor' },
-        { title: '辅料(不含税)', width: 120, dataIndex: 'excipiencostNotincludestax', className: 'replacecolor' },
-        { title: '加工费(CNY)', width: 120, dataIndex: 'rmbProcesscost', className: 'replacecolor' },
-        { title: '加工费(USD)', width: 120, dataIndex: 'usdProcesscost', className: 'replacecolor' },
-        { title: '费用支出(汇总CNY)', width: 160, dataIndex: 'rmbExpense', className: 'replacecolor' },
-        { title: '费用支出(汇总USD)', width: 160, dataIndex: 'usdExpense', className: 'replacecolor' },
-        { title: '事故单人民币金额', width: 160, dataIndex: 'accidentcnyAmount', className: 'replacecolor' },
-        {
-          title: '备注',
-          width: 180,
-          dataIndex: 'remarks',
-          customRender: t => ellipsis(t),
-          className: 'replacecolor',
-          scopedSlots: { customRender: 'remarks' }
-        },
-        {
-          title: '单据状态',
-          width: 120,
-          dataIndex: 'billstatus',
-          className: 'replacecolor',
-          fixed: 'right',
-          scopedSlots: { customRender: 'billstatus' }
-        },
-        {
-          title: '操作',
-          dataIndex: 'operation',
-          scopedSlots: { customRender: 'operationSlot' },
-          fixed: 'right',
-          width: 160,
-          className: 'replacecolor'
-        }
+        { title: '计划数量', width: 90, dataIndex: 'planQuantity', ellipsis: true, className: 'replacecolor' },
+        { title: '实际出货数量', width: 120, dataIndex: 'actualShipquantity', ellipsis: true, className: 'replacecolor' },
+        { title: '短出数', width: 120, dataIndex: 'shortseveral', ellipsis: true, className: 'replacecolor' },
+        { title: '制单人', width: 120, dataIndex: 'preparedBy', ellipsis: true, className: 'replacecolor' },
       ],
       costAllocationData: [],
+      outdata:'',
+      dateFormat: 'YYYY-MM-DD',
       // 查询条件
       queryParam: {
-        index: '',
-        planNum: '',
-        customerShortame: '',
-        pageNo: '' // 点击的页数
+        
       },
       // 分页
       pagination: {
@@ -206,12 +222,13 @@ export default {
         costList(this.queryParam).then(res => {
           if (res.success) {
             this.costAllocationData = res.result.records
-            console.log('成本分配汇总数据', this.costAllocationData)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
+          }else{
+            this.$message.error(res.message);
           }
         })
       })
@@ -253,6 +270,11 @@ export default {
     searchQuery() {
       this.getCostList()
     },
+    changeData(){
+      var dd =moment(this.outdata).format('YYYY-MM-DD')
+      dd = dd+' '+'00:00:00'
+      this.queryParam.outdata = moment(dd).valueOf()
+    },
     searchReset() {
       this.queryParam.pageNo = ''
       this.queryParam = {}