Kaynağa Gözat

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

jbb 2 yıl önce
ebeveyn
işleme
4a7c52370f

+ 44 - 2
src/views/reportForms/fabric-loss-table.vue

@@ -396,6 +396,7 @@ export default {
       // 采购订单 表头
       purchaseOrderColumns: [
         { title: '货物名称', width: 180, dataIndex: 'cinvName', className: 'replacecolor', align:'left'},
+        /*
         { title: '批号', width: 80, dataIndex: 'cbatch', className: 'replacecolor',
           customRender:function(text,record,index){
             if (text == null || text == undefined){
@@ -414,6 +415,25 @@ export default {
               return text;
             }
           }
+        },*/
+        { title: '订单号', width: 80, dataIndex: 'cpoid', className: 'replacecolor',
+          customRender:function(text,record,index){
+            if (text == null || text == undefined){
+              return "";
+            }
+            if (text.indexOf(",")>-1){
+              const arr = text.split(',');
+              return (<div>
+              {
+                arr.map(t=>{
+                  return (<li>{t}</li>)
+                })
+              }
+              </div>)
+            }else{
+              return text;
+            }
+          }
         },
         { title: '计划数量', dataIndex: 'iquantity', width: 80, className: 'replacecolor' },
         {
@@ -608,8 +628,13 @@ export default {
         { title: '账套号', width: 120, dataIndex: 'caccount', className: 'replacecolor' },
         { title: '支出单号', width: 120, dataIndex: 'cspvcode', className: 'replacecolor' },
         { title: '费用项目', dataIndex: 'cexpName', width: 120, className: 'replacecolor' },
-        { title: ' 支出本币金额', dataIndex: 'inatMoney', width: 120, className: 'replacecolor' },
-        { title: '支出原币金额', dataIndex: 'imoney', width: 120, className: 'replacecolor' },
+        { title: '支出人民币金额', dataIndex: 'inatMoney', width: 120, className: 'replacecolor' },
+        { title: '支出美元金额', dataIndex: 'imoney', width: 120, className: 'replacecolor',customRender: (text, record, index) => {
+            if (record.imoney == record.inatMoney)
+              return "";
+            else
+              return record.imoney;
+           } },
         { title: '发票号', dataIndex: 'cinvoinceNo', width: 120, className: 'replacecolor' },
         { title: '制单人', dataIndex: 'cmaker', width: 120, className: 'replacecolor' }
       ],
@@ -680,12 +705,18 @@ export default {
 
             if (record.cinvName == '来源余纱') {
               this.$refs.surplusYarnModal.surplusYarnData = record.fabricPoOrderOutList;
+              this.$refs.surplusYarnModal.allDataList = record.fabricPoOrderOutList;
+              this.$refs.surplusYarnModal.queryParam = {};
               this.$refs.surplusYarnModal.surplusYarnModVis = true
             }else if (record.cinvName == '其他入库的纱') {
               this.$refs.otherYarnsInModal.otherYarnsInData = record.fabricPoOrderOutList;
+              this.$refs.otherYarnsInModal.allDataList = record.fabricPoOrderOutList;
+              this.$refs.otherYarnsInModal.queryParam = {};
               this.$refs.otherYarnsInModal.otherYarnsInModVis = true
             } else {
               this.$refs.purchaseAmountModal.purchaseAmountData = record.fabricPoOrderInList;
+              this.$refs.purchaseAmountModal.allDataList = record.fabricPoOrderInList;
+              this.$refs.purchaseAmountModal.queryParam = {};
               this.$refs.purchaseAmountModal.purchaseAmountModVis = true
             }
           }
@@ -699,6 +730,8 @@ export default {
         on: {
           click: event => {
             this.$refs.surplusYarnModal.surplusYarnData = record.fabricPoOrderOutList;
+            this.$refs.surplusYarnModal.allDataList = record.fabricPoOrderOutList;
+            this.$refs.surplusYarnModal.queryParam = {};
             this.$refs.surplusYarnModal.surplusYarnModVis = true
           }
         }
@@ -711,6 +744,8 @@ export default {
         on: {
           click: event => {
             this.$refs.materialsOutQuantityModal.materialsOutQuantityData = record.fabricMoOrderCKList;
+            this.$refs.materialsOutQuantityModal.allDataList = record.fabricMoOrderCKList;
+            this.$refs.materialsOutQuantityModal.queryParam = {};
             this.$refs.materialsOutQuantityModal.materialsOutQuantityModVis = true
           }
         }
@@ -723,6 +758,8 @@ export default {
         on: {
           click: event => {
             this.$refs.purchaseInQuantityModal.purchaseInQuantityData = record.fabricMoOrderRKList;
+            this.$refs.purchaseInQuantityModal.allDataList = record.fabricMoOrderRKList;
+            this.$refs.purchaseInQuantityModal.queryParam = {};
             this.$refs.purchaseInQuantityModal.purchaseInQuantityModVis = true
           }
         }
@@ -736,6 +773,8 @@ export default {
         on: {
           click: event => {
             this.$refs.invoiceNumModal.invoiceNumData = record.fabricCostClothDetailList;
+            this.$refs.invoiceNumModal.allDataList = record.fabricCostClothDetailList;
+            this.$refs.invoiceNumModal.queryParam = {};
             this.$refs.invoiceNumModal.invoiceNumModVis = true;
           }
         }
@@ -790,6 +829,7 @@ export default {
         on: {
           click: event => {
             this.$refs.invoiceQuantityModal.invoiceQuantityData = record.fabricCostClothesDetailList;
+            this.$refs.invoiceQuantityModal.allDataList = record.fabricCostClothesDetailList;
             this.$refs.invoiceQuantityModal.invoiceQuantityModVis = true;
           }
         }
@@ -802,6 +842,8 @@ export default {
         on: {
           click: event => {
             this.$refs.invoiceQuantityModal.invoiceQuantityData = record.fabricCostAssistDetailList;
+            this.$refs.invoiceQuantityModal.allDataList = record.fabricCostAssistDetailList;
+            this.$refs.invoiceQuantityModal.queryParam = {};
             this.$refs.invoiceQuantityModal.invoiceQuantityModVis = true
           }
         }

+ 51 - 10
src/views/reportForms/fabric-loss-table/invoiceNumModal.vue

@@ -4,7 +4,6 @@
     v-model="invoiceNumModVis"
     :confirmLoading="confirmLoading"
     width="86%"
-    style="top:330px;left:100px;"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -15,13 +14,7 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="物料">
-                <a-input placeholder="请输入物料" v-model="queryParam.material"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="开票单价">
-                <a-input placeholder="请输入开票单价" v-model="queryParam.invoicingPrice"></a-input>
+                <a-input placeholder="请输入物料" v-model="queryParam.cinvName"></a-input>
               </a-form-item>
             </a-col>
 
@@ -47,6 +40,8 @@
           :columns="invoiceNumColumns"
           :data-source="invoiceNumData"
           :pagination="false"
+          :scroll="{ y: 500 }"
+          :footer="showTotal"
         >
         </a-table>
         <!-- 导出 打印 返回  -->
@@ -75,6 +70,16 @@ export default {
     return {
       // 表头
       invoiceNumColumns: [
+        {
+          title: '序号',
+          width:80,
+           customRender: (text, record, index) => {
+            if (record.cinvName == "合计")
+              return "";
+            else
+              return index + 1;
+           }
+        },
         {
           title: '物料',
           dataIndex: 'cinvName',
@@ -105,6 +110,7 @@ export default {
         }
       ],
       invoiceNumData: [],
+      allDataList:[],
 
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
@@ -125,6 +131,25 @@ export default {
     }
   },
   created() {},
+  computed: {
+    // 合计展示
+    totalDataSource(){
+      // 开票成本-衬衣 合计
+      var item = {
+        "cinvName":"合计"
+      };
+      var iquantity = 0,inatSum = 0;
+      for (let row of this.invoiceNumData){
+        iquantity += row.iquantity*1;
+        inatSum += row.inatSum*1;
+      }
+      
+      item.iquantity= parseFloat(iquantity.toFixed(4));
+      item.inatSum= parseFloat(inatSum.toFixed(2));
+      return [item];
+
+    }
+  },
   methods: {
     // 第一行 导出
     handleExportXls() {},
@@ -138,7 +163,11 @@ export default {
       this.close()
     },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.invoiceNumData = this.allDataList.filter(e=>
+        (this.queryParam.cinvName == null || e.cinvName.toLowerCase().indexOf(this.queryParam.cinvName.toLowerCase())>-1)
+      );
+    },
     // 重置
     searchReset() {
       this.queryParam = {}
@@ -147,7 +176,19 @@ export default {
     close() {
       this.$emit('close')
       this.invoiceNumModVis = false
-    }
+    },
+    showTotal(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.invoiceNumColumns}
+          dataSource={this.totalDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
   }
 }
 </script>

+ 49 - 2
src/views/reportForms/fabric-loss-table/invoiceQuantityModal.vue

@@ -4,7 +4,6 @@
     v-model="invoiceQuantityModVis"
     :confirmLoading="confirmLoading"
     width="86%"
-    style="top:330px;left:100px;"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -17,6 +16,8 @@
           :data-source="invoiceQuantityData"
           :pagination="false"
           bordered
+          :scroll="{ y: 500 }"
+          :footer="showTotal"
         >
         </a-table>
 
@@ -43,6 +44,16 @@ export default {
     return {
       // 表头
       invoiceQuantityColumns: [
+        {
+          title: '序号',
+          width:80,
+           customRender: (text, record, index) => {
+            if (record.cinvName == "合计")
+              return "合计";
+            else
+              return index + 1;
+           }
+        },
         {
           title: '开票数',
           dataIndex: 'iquantityInvoice',
@@ -73,6 +84,7 @@ export default {
         }
       ],
       invoiceQuantityData: [],
+      allDataList:[],
       size: 'small', // 查询按钮变小
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
@@ -88,6 +100,29 @@ export default {
     }
   },
   created() {},
+  computed: {
+    // 合计展示
+    totalDataSource(){
+      // 开票成本-衬衣 合计
+      var item = {
+        "cinvName":"合计"
+      };
+      var iquantityInvoice = 0,iquantityInvoiceN = 0, iquantitySettle=0, iquantitySettleN=0;
+      for (let row of this.invoiceQuantityData){
+        iquantityInvoice += row.iquantityInvoice*1;
+        iquantityInvoiceN += row.iquantityInvoiceN*1;
+        iquantitySettle += row.iquantitySettle*1;
+        iquantitySettleN += row.iquantitySettleN*1;
+      }
+      
+      item.iquantityInvoice= parseFloat(iquantityInvoice.toFixed(4));
+      item.iquantityInvoiceN= parseFloat(iquantityInvoiceN.toFixed(4));
+      item.iquantitySettle= parseFloat(iquantitySettle.toFixed(4));
+      item.iquantitySettleN= parseFloat(iquantitySettleN.toFixed(4));
+      return [item];
+
+    }
+  },
   methods: {
     // 第一行 导出
     handleExportXls() {},
@@ -104,7 +139,19 @@ export default {
     close() {
       this.$emit('close')
       this.invoiceQuantityModVis = false
-    }
+    },
+    showTotal(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.invoiceQuantityColumns}
+          dataSource={this.totalDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
   }
 }
 </script>

+ 55 - 12
src/views/reportForms/fabric-loss-table/materialsOutQuantityModal.vue

@@ -4,7 +4,6 @@
     v-model="materialsOutQuantityModVis"
     :confirmLoading="confirmLoading"
     width="86%"
-    style="top:330px;left:100px;"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -15,25 +14,25 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="批号">
-                <a-input placeholder="请输入批号" v-model="queryParam.batchNum"></a-input>
+                <a-input placeholder="请输入批号" v-model="queryParam.cbatchOut"></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-input placeholder="请输入供应商" v-model="queryParam.cvenAbbName"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-item label="物料编码">
-                <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
+                <a-input placeholder="请输入物料编码" v-model="queryParam.cinvCodeOut"></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.materialName"></a-input>
+                  <a-input placeholder="请输入物料名称" v-model="queryParam.cinvNameOut"></a-input>
                 </a-form-item>
               </a-col>
             </template>
@@ -59,6 +58,8 @@
           :columns="materialsOutQuantityColumns"
           :data-source="materialsOutQuantityData"
           :pagination="false"
+          :scroll="{ y: 500 }"
+          :footer="showTotal"
         >
         </a-table>
 
@@ -89,11 +90,14 @@ export default {
       // 表头
       materialsOutQuantityColumns: [
         {
-          title: '入库类型',
-          dataIndex: 'cbusType',
-          width: 80,
-          key: '',
-          className: 'replacecolor'
+          title: '序号',
+          width:80,
+           customRender: (text, record, index) => {
+            if (record.cvenAbbName == "合计")
+              return "";
+            else
+              return index + 1;
+           }
         },
         {
           title: '供应商',
@@ -163,6 +167,7 @@ export default {
         
       ],
       materialsOutQuantityData: [],
+      allDataList:[],
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,
@@ -177,6 +182,25 @@ export default {
       }
     }
   },
+  computed: {
+    // 合计展示
+    totalDataSource(){
+      // 开票成本-衬衣 合计
+      var item = {
+        "cvenAbbName":"合计"
+      };
+      var iquantity = 0,imoney = 0;
+      for (let row of this.materialsOutQuantityData){
+        iquantity += row.iquantity*1;
+        imoney += row.imoney*1;
+      }
+      
+      item.iquantity= parseFloat(iquantity.toFixed(4));
+      item.imoney= parseFloat(imoney.toFixed(2));
+      return [item];
+
+    }
+  },
   // 接收父组件 方法
   props: {
     father: {
@@ -198,7 +222,14 @@ export default {
       this.close()
     },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.materialsOutQuantityData = this.allDataList.filter(e=>
+        (this.queryParam.cbatchOut == null || e.cbatchOut.toLowerCase().indexOf(this.queryParam.cbatchOut.toLowerCase())>-1) && 
+        (this.queryParam.cvenAbbName == null || e.cvenAbbName.toLowerCase().indexOf(this.queryParam.cvenAbbName.toLowerCase())>-1) &&
+        (this.queryParam.cinvCodeOut == null || e.cinvCodeOut.toLowerCase().indexOf(this.queryParam.cinvCodeOut.toLowerCase())>-1) &&
+        (this.queryParam.cinvNameOut == null || e.cvenAbbName.toLowerCase().indexOf(this.queryParam.cinvNameOut.toLowerCase())>-1)
+      );
+    },
     // 重置
     searchReset() {
       this.queryParam = {}
@@ -207,7 +238,19 @@ export default {
     close() {
       this.$emit('close')
       this.materialsOutQuantityModVis = false
-    }
+    },
+    showTotal(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.materialsOutQuantityColumns}
+          dataSource={this.totalDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
   }
 }
 </script>

+ 54 - 9
src/views/reportForms/fabric-loss-table/otherYarnsInModal.vue

@@ -4,7 +4,6 @@
     v-model="otherYarnsInModVis"
     :confirmLoading="confirmLoading"
     width="86%"
-    style="top:330px;left:100px;"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -15,13 +14,13 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="委外订单号">
-                <a-input placeholder="请输入委外订单号" v-model="queryParam.purchaseAboardOrderNum"></a-input>
+                <a-input placeholder="请输入委外订单号" v-model="queryParam.ccode"></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-input placeholder="请输入计划号" v-model="queryParam.cplanCode"></a-input>
               </a-form-item>
             </a-col>
 
@@ -47,6 +46,8 @@
           :columns="otherYarnsInColumns"
           :data-source="otherYarnsInData"
           :pagination="false"
+          :scroll="{ y: 500 }"
+          :footer="showTotal"
         >
         </a-table>
         <!-- 导出 打印 返回  -->
@@ -76,10 +77,14 @@ export default {
       // 表头
       otherYarnsInColumns: [
         {
-          title: '使用数量',
-          dataIndex: 'iquantity',
-          width: 120,
-          className: 'replacecolor'
+          title: '序号',
+          width:80,
+           customRender: (text, record, index) => {
+            if (record.ccode == "合计")
+              return "";
+            else
+              return index + 1;
+           }
         },
         {
           title: '委外订单号',
@@ -87,6 +92,13 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
+        {
+          title: '使用数量',
+          dataIndex: 'iquantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+        
         {
           title: '计划号',
           dataIndex: 'cplanCode',
@@ -101,6 +113,7 @@ export default {
         }
       ],
       otherYarnsInData: [],
+      allDataList:[],
 
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
@@ -121,6 +134,23 @@ export default {
     }
   },
   created() {},
+  computed: {
+    // 合计展示
+    totalDataSource(){
+      // 开票成本-衬衣 合计
+      var item = {
+        "ccode":"合计"
+      };
+      var iquantity = 0;
+      for (let row of this.otherYarnsInData){
+        iquantity += row.iquantity*1;
+      }
+      
+      item.iquantity= parseFloat(iquantity.toFixed(4));
+      return [item];
+
+    }
+  },
   methods: {
     // 第一行 导出
     handleExportXls() {},
@@ -134,7 +164,10 @@ export default {
       this.close()
     },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.otherYarnsInData = this.allDataList.filter(e=>(this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1) 
+        && (this.queryParam.cplanCode == null || e.cplanCode.toLowerCase().indexOf(this.queryParam.cplanCode.toLowerCase())>-1));
+    },
     // 重置
     searchReset() {
       this.queryParam = {}
@@ -143,7 +176,19 @@ export default {
     close() {
       this.$emit('close')
       this.otherYarnsInModVis = false
-    }
+    },
+    showTotal(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.otherYarnsInColumns}
+          dataSource={this.totalDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
   }
 }
 </script>

+ 63 - 11
src/views/reportForms/fabric-loss-table/purchaseAmountModal.vue

@@ -4,7 +4,6 @@
     v-model="purchaseAmountModVis"
     :confirmLoading="confirmLoading"
     width="86%"
-    style="top:330px;left:100px;"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -14,14 +13,8 @@
         <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.yarnNum"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="采购单价">
-                <a-input placeholder="请输入采购单价" v-model="queryParam.purchasePrice"></a-input>
+              <a-form-item label="单据号">
+                <a-input placeholder="请输入单据号" v-model="queryParam.ccode"></a-input>
               </a-form-item>
             </a-col>
 
@@ -47,6 +40,8 @@
           :columns="purchaseAmountColumns"
           :data-source="purchaseAmountData"
           :pagination="false"
+          :scroll="{ y: 500 }"
+          :footer="showTotal"
         >
         </a-table>
         <!-- 导出 打印 返回  -->
@@ -75,6 +70,16 @@ export default {
     return {
       // 表头
       purchaseAmountColumns: [
+        {
+          title: '序号',
+          width:80,
+           customRender: (text, record, index) => {
+            if (record.ccode == "合计")
+              return "";
+            else
+              return index + 1;
+           }
+        },
         {
           title: '单据号',
           dataIndex: 'ccode',
@@ -89,6 +94,13 @@ export default {
           key: '',
           className: 'replacecolor'
         },
+        {
+          title: '批号',
+          dataIndex: 'cbatch',
+          width: 120,
+          key: '',
+          className: 'replacecolor'
+        },
         {
           title: '入库单数量',
           dataIndex: 'iquantity',
@@ -133,6 +145,7 @@ export default {
         }
       ],
       purchaseAmountData: [],
+      allDataList:[],
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,
@@ -152,6 +165,31 @@ export default {
       default: null
     }
   },
+  computed: {
+    // 合计展示
+    totalDataSource(){
+      // 开票成本-衬衣 合计
+      var item = {
+        "ccode":"合计"
+      };
+      var iquantity = 0,iquantityInvoice=0,iquantityNInvoice=0,iquantitySettle=0,iquantityNSettle=0;
+      for (let row of this.purchaseAmountData){
+        iquantity += row.iquantity*1;
+        iquantityInvoice += row.iquantityInvoice*1;
+        iquantityNInvoice += row.iquantityNInvoice*1;
+        iquantitySettle += row.iquantitySettle*1;
+        iquantityNSettle += row.iquantityNSettle*1;
+      }
+      
+      item.iquantity= parseFloat(iquantity.toFixed(4));
+      item.iquantityInvoice = parseFloat(iquantityInvoice.toFixed(4));
+      item.iquantityNInvoice = parseFloat(iquantityNInvoice.toFixed(4));
+      item.iquantitySettle = parseFloat(iquantitySettle.toFixed(4));
+      item.iquantityNSettle = parseFloat(iquantityNSettle.toFixed(4));
+      return [item];
+
+    }
+  },
   created() {},
   methods: {
     // 第一行 导出
@@ -166,7 +204,9 @@ export default {
       this.close()
     },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.purchaseAmountData = this.allDataList.filter(e=> this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1);
+    },
     // 重置
     searchReset() {
       this.queryParam.title = ''
@@ -176,7 +216,19 @@ export default {
     close() {
       this.$emit('close')
       this.purchaseAmountModVis = false
-    }
+    },
+    showTotal(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.purchaseAmountColumns}
+          dataSource={this.totalDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
   }
 }
 </script>

+ 60 - 6
src/views/reportForms/fabric-loss-table/purchaseInQuantityModal.vue

@@ -4,7 +4,6 @@
     v-model="purchaseInQuantityModVis"
     :confirmLoading="confirmLoading"
     width="86%"
-    style="top:330px;left:100px;"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -15,13 +14,13 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="委外订单号">
-                <a-input placeholder="请输入委外订单号" v-model="queryParam.aboardorderNum"></a-input>
+                <a-input placeholder="请输入委外订单号" v-model="queryParam.ccode"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
-              <a-form-item label="下游委外订单号">
-                <a-input placeholder="请输入下游委外订单号" v-model="queryParam.downAboardorderNum"></a-input>
+              <a-form-item label="号">
+                <a-input placeholder="请输入批号" v-model="queryParam.cbatch"></a-input>
               </a-form-item>
             </a-col>
 
@@ -47,6 +46,8 @@
           :columns="purchaseInQuantityColumns"
           :data-source="purchaseInQuantityData"
           :pagination="false"
+          :scroll="{ y: 500 }"
+          :footer="showTotal"
         >
         </a-table>
 
@@ -76,6 +77,16 @@ export default {
     return {
       // 表头
       purchaseInQuantityColumns: [
+        {
+          title: '序号',
+          width:80,
+           customRender: (text, record, index) => {
+            if (record.cbatch == "合计")
+              return "";
+            else
+              return index + 1;
+           }
+        },
         {
           title: '批号',
           dataIndex: 'cbatch',
@@ -134,6 +145,7 @@ export default {
         }
       ],
       purchaseInQuantityData: [],
+      allDataList:[],
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,
@@ -153,6 +165,31 @@ export default {
     }
   },
   created() {},
+  computed: {
+    // 合计展示
+    totalDataSource(){
+      // 开票成本-衬衣 合计
+      var item = {
+        "cbatch":"合计"
+      };
+      var iquantityIn = 0,isumBillQuantity = 0,isumBillQuantityN=0,isquantity=0,isquantityN=0;
+      for (let row of this.purchaseInQuantityData){
+        iquantityIn += row.iquantityIn*1;
+        isumBillQuantity += row.isumBillQuantity*1;
+        isumBillQuantityN += row.isumBillQuantityN*1;
+        isquantity += row.isquantity*1;
+        isquantityN += row.isquantityN*1;
+      }
+      
+      item.iquantityIn= parseFloat(iquantityIn.toFixed(4));
+      item.isumBillQuantity= parseFloat(isumBillQuantity.toFixed(4));
+      item.isumBillQuantityN= parseFloat(isumBillQuantityN.toFixed(4));
+      item.isquantity= parseFloat(isquantity.toFixed(4));
+      item.isquantityN= parseFloat(isquantityN.toFixed(4));
+      return [item];
+
+    }
+  },
   methods: {
     // 第一行 导出
     handleExportXls() {},
@@ -166,7 +203,12 @@ export default {
       this.close()
     },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.purchaseInQuantityData = this.allDataList.filter(e=>
+        (this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1) && 
+        (this.queryParam.cbatch == null || e.cbatch.toLowerCase().indexOf(this.queryParam.cbatch.toLowerCase())>-1) 
+      );
+    },
     // 重置
     searchReset() {
       this.queryParam = {}
@@ -175,7 +217,19 @@ export default {
     close() {
       this.$emit('close')
       this.purchaseInQuantityModVis = false
-    }
+    },
+    showTotal(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.purchaseInQuantityColumns}
+          dataSource={this.totalDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
   }
 }
 </script>

+ 54 - 9
src/views/reportForms/fabric-loss-table/surplusYarnModal.vue

@@ -4,7 +4,6 @@
     v-model="surplusYarnModVis"
     :confirmLoading="confirmLoading"
     width="86%"
-    style="top:330px;left:100px;"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -15,13 +14,13 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="委外订单号">
-                <a-input placeholder="请输入委外订单号" v-model="queryParam.aboardorderNum"></a-input>
+                <a-input placeholder="请输入委外订单号" v-model="queryParam.ccode"></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-input placeholder="请输入计划号" v-model="queryParam.cplanCode"></a-input>
               </a-form-item>
             </a-col>
 
@@ -47,6 +46,8 @@
           :columns="surplusYarnColumns"
           :data-source="surplusYarnData"
           :pagination="false"
+          :scroll="{ y: 500 }"
+          :footer="showTotal"
         >
         </a-table>
         <!-- 导出 打印 返回  -->
@@ -76,19 +77,30 @@ export default {
       // 表头
       surplusYarnColumns: [
         {
-          title: '使用数量',
-          dataIndex: 'iquantity',
+          title: '序号',
+          width:80,
+           customRender: (text, record, index) => {
+            if (record.ccode == "合计")
+              return "";
+            else
+              return index + 1;
+           }
+        },
+        {
+          title: '委外订单号',
+          dataIndex: 'ccode',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
-          title: '委外订单号',
-          dataIndex: 'ccode',
+          title: '使用数量',
+          dataIndex: 'iquantity',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
+        
         {
           title: '计划号',
           dataIndex: 'cplanCode',
@@ -105,6 +117,7 @@ export default {
         }
       ],
       surplusYarnData: [],
+      allDataList:[],
 
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
@@ -124,6 +137,23 @@ export default {
       default: null
     }
   },
+  computed: {
+    // 合计展示
+    totalDataSource(){
+      // 开票成本-衬衣 合计
+      var item = {
+        "ccode":"合计"
+      };
+      var iquantity = 0;
+      for (let row of this.surplusYarnData){
+        iquantity += row.iquantity*1;
+      }
+      
+      item.iquantity= parseFloat(iquantity.toFixed(4));
+      return [item];
+
+    }
+  },
   created() {},
   methods: {
     // 第一行 导出
@@ -138,7 +168,10 @@ export default {
       this.close()
     },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.surplusYarnData = this.allDataList.filter(e=>(this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1) 
+        && (this.queryParam.cplanCode == null || e.cplanCode.toLowerCase().indexOf(this.queryParam.cplanCode.toLowerCase())>-1));
+    },
     // 重置
     searchReset() {
       this.queryParam = {}
@@ -147,7 +180,19 @@ export default {
     close() {
       this.$emit('close')
       this.surplusYarnModVis = false
-    }
+    },
+    showTotal(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.surplusYarnColumns}
+          dataSource={this.totalDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
   }
 }
 </script>