Parcourir la source

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!494
黄梓星 il y a 1 an
Parent
commit
4defe30d71

+ 46 - 2
src/components/super-table/index.vue

@@ -56,6 +56,11 @@ export default {
     storageKey: {
       type: String,
     },
+    showSummary:{
+      type:Boolean,
+      default:false,
+    },
+
   },
   components: {
     ElDictTag: () => import("@/components/DictTag/index.vue"),
@@ -150,7 +155,7 @@ export default {
     value:{
       handler: function (newValue) {
         if(this.value.length > 0){
-          this.$refs.superTable.clearSelection();
+          this.$refs.superTable&& this.$refs.superTable.clearSelection();
         }
       },
       immediate: true,
@@ -269,11 +274,48 @@ export default {
         }
       }
     },
+    getSummaries(param){
+      if(this.showSummary){
+        const { columns, data } = param;
+				const sums = [];
+				columns.forEach((column, index) => {
+
+				if (index === 0 && !column.property) {
+				   sums[index] = '合计';
+				   return;
+				}
+
+				const values = data.map(item => Number(item[column.property]));
+        //  if (column.property == 'businessProportion' ||column.property =='rankMagnitude' ) {
+
+        let sumColumn = this.showColumns.filter(({item,attr}) => attr.isSummary && item.key === column.property);
+        
+        if (sumColumn.length) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return '';
+            }
+          }, 0);
+          sums[index];
+          }
+				});
+				return sums;
+
+      }
+    }
   },
   created() {},
   mounted() {
     this.extendMethod();
   },
+  updated() {
+    this.$nextTick(()=>{
+      this.$refs.superTable.doLayout();
+    })
+  },
   destroyed() {},
 };
 </script>
@@ -293,13 +335,15 @@ export default {
       v-bind="$attrs"
       v-on="$listeners"
       style="flex: 1"
+      :show-summary="showSummary"
+      :summary-method="getSummaries"
     >
       <!-- 多选 -->
       <el-table-column
         v-if="checkbox"
         :column-key="rowKey"
         fixed
-        width="50"
+        width="60"
         align="center"
         type="selection"
         reserve-selection

+ 3 - 0
src/components/super-table/once/filters.vue

@@ -7,6 +7,7 @@
     placement="bottom"
     popper-class="p-0"
     class="icon-filter"
+    v-model="visible"
     :style="{
       color: innerValue && innerValue.length ? '#1890ff' : '',
       display: innerValue && innerValue.length ? 'inline-block' : '',
@@ -64,6 +65,7 @@ export default {
     return {
       disabled: false,
       selectData: [],
+      visible:false,
     };
   },
   props: {
@@ -132,6 +134,7 @@ export default {
     // 筛选
     onFilter() {
       this.innerValue = this.selectData;
+      this.visible = false;
     },
   },
   created() {},

+ 15 - 0
src/views/material/changeApply/columns.js

@@ -77,6 +77,21 @@ export default function useColumns() {
         is: "el-input",
       },
     },
+    // {
+    //   item:{
+    //     key: "puPersonnelIdName",
+    //     title: "采购员",
+    //   },
+    //   attr: {
+    //     clearable:true,
+    //     is: "el-popover-select-v2",
+    //     referName: "CONTACTS_PARAM",
+    //     valueKey: "name",
+    //     dataMapping: {
+    //       puPersonnelId: "code",
+    //     },
+    //   },
+    // },
   
   ].map(({ item, attr }) => ({
     attr,

+ 27 - 1
src/views/purchase/purchase-order/add/column.js

@@ -89,6 +89,7 @@ const PurColumns =[
     controlsPosition: "right",
     isShow:true,
     disabled:true,
+    
   },
   {
     key: "warehouseName",
@@ -464,6 +465,7 @@ const PurchaseTabColumns =[
         controlsPosition: "right",
         width: 120,
         require: true,
+        isSummary:true,
       },
       { 
         key: "taxPrice", 
@@ -473,7 +475,6 @@ const PurchaseTabColumns =[
         // precision:2,
         require: true,
         disabled:true,
-        width: 180,
        },
       { 
         key: "money", 
@@ -483,6 +484,7 @@ const PurchaseTabColumns =[
         // precision:2,
         disabled:true,
         width: 180,
+        isSummary:true,
        },
        { 
         key: "isGift", 
@@ -505,6 +507,7 @@ const PurchaseTabColumns =[
         // precision:2,
         disabled:true,
         width: 180,
+        isSummary:true,
        },
       { 
         key: "discountRule", 
@@ -563,6 +566,7 @@ const PurchaseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { key: "isArrival", title: "到货关闭", inputType: "Checkbox", disabled:true,},
       { key: "isStorage", title: "入库关闭", inputType: "Checkbox", disabled:true, },
@@ -582,6 +586,7 @@ const PurchaseTabColumns =[
         controlsPosition: "right",
         disabled:true,
         width: 180 ,
+        isSummary:true,
       },
       { 
         key: "originalMoney", 
@@ -591,6 +596,7 @@ const PurchaseTabColumns =[
         // precision:2,
         disabled:true,
         width: 180,
+        isSummary:true,
       },
     ]
   },
@@ -654,6 +660,7 @@ const PurchaseTabColumns =[
         controlsPosition: "right",
         width: 180,
         require: true,
+        isSummary:true,
       },
       { 
         key: "stroageQty", 
@@ -661,6 +668,7 @@ const PurchaseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "stockQty", 
@@ -668,6 +676,7 @@ const PurchaseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "invoiceQty", 
@@ -675,6 +684,7 @@ const PurchaseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "rollbackQty", 
@@ -682,6 +692,7 @@ const PurchaseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "backStockQty", 
@@ -689,6 +700,7 @@ const PurchaseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "floatQty", 
@@ -696,6 +708,7 @@ const PurchaseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       // { 
       //   key: "createByName", 
@@ -1188,6 +1201,7 @@ const CauseTabColumns =[
         controlsPosition: "right",
         width: 120,
         require: true,
+        isSummary:true,
       },
       { 
         key: "taxPrice", 
@@ -1212,6 +1226,7 @@ const CauseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 120,
+        isSummary:true,
       },
       { 
         key: "taxPrice", 
@@ -1229,6 +1244,7 @@ const CauseTabColumns =[
         // precision:2,
         disabled:true,
         width: 180,
+        isSummary:true,
        },
        { 
         key: "ntaxnetprice", 
@@ -1284,6 +1300,7 @@ const CauseTabColumns =[
         // precision:2,
         disabled:true,
         width: 180,
+        isSummary:true,
        },
        {
         key: "goodsWarehouseName",
@@ -1330,6 +1347,7 @@ const CauseTabColumns =[
         controlsPosition: "right",
         disabled:true,
         width: 180 ,
+        isSummary:true,
       },
       { 
         key: "originalMoney", 
@@ -1339,6 +1357,7 @@ const CauseTabColumns =[
         // precision:2,
         disabled:true,
         width: 180,
+        isSummary:true,
       },
       { key: "discountRule", title: "折扣规则编码", inputType: "Input", width: 180 },
       { key: "demandCode", title: "采购需求单号", inputType: "Input", width: 180 },
@@ -1406,6 +1425,7 @@ const CauseTabColumns =[
         controlsPosition: "right",
         width: 180,
         require: true,
+        isSummary:true,
       },
       { 
         key: "stroageQty", 
@@ -1413,6 +1433,7 @@ const CauseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "stockQty", 
@@ -1420,6 +1441,7 @@ const CauseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "invoiceQty", 
@@ -1427,6 +1449,7 @@ const CauseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "rollbackQty", 
@@ -1434,6 +1457,7 @@ const CauseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "backStockQty", 
@@ -1441,6 +1465,7 @@ const CauseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       { 
         key: "floatQty", 
@@ -1448,6 +1473,7 @@ const CauseTabColumns =[
         inputType: "InputNumber",
         controlsPosition: "right",
         width: 180, 
+        isSummary:true,
       },
       // { 
       //   key: "createByName", 

+ 176 - 111
src/views/purchase/purchase-order/add/index.vue

@@ -74,7 +74,7 @@ export default {
       get(){
         return `${this.params['puOrderItemList'].length ? 
                   (this.params['puOrderItemList'].length > 8 ? 500 :
-                   (this.params['puOrderItemList'].length *60) +100)
+                   (this.params['puOrderItemList'].length *60) +170)
                 : 120}px`
       },
       set(){}
@@ -633,7 +633,14 @@ export default {
 
         this.$modal.loading("正在上传文件,请稍候...");
 
-        let {code,data} = await orderApi.orderImport(formData);
+        let tabList = {
+          puOrderItemList: [...this.params.puOrderItemList],
+          puOrderExecuteList: [...this.params.puOrderExecuteList],
+        }
+
+        console.log(tabList,'tabList-------------------------');
+
+        let {code,data} = await orderApi.orderImport(formData,tabList);
 
         if(code == 200) {
           // this.tabLoading = true;
@@ -707,7 +714,40 @@ export default {
     //   let role =  roles.find(item => item === "syfz-purchaseorder") || "procurementManager";
     //   return role;
     // },
+    getSummaries(param){
+        const { columns, data } = param;
+				const sums = [];
+        let { tabColumns, tabName } = this;
+
+				columns.forEach((column, index) => {
 
+				if (index === 0) {
+				   sums[index] = '合计';
+				   return;
+				}
+
+				const values = data.map(item => Number(item[column.property]));
+       
+        let sumColumn = tabColumns.find(tab => tab.key === tabName).tableColumns.filter(({key,isSummary}) => isSummary && key === column.property);
+        
+        if (sumColumn.length) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return '';
+            }
+          }, 0);
+          sums[index];
+          }
+				});
+				return sums;
+
+        // return 0
+
+      
+    }
 
   },
   created() {
@@ -913,126 +953,151 @@ export default {
             :virtualized="true"
           >
       <!-- row-key绑定列唯一值,height一定要设置否则会滚动条滚动位置不对且数据滚动全部加载完后会出现白板-->
-          
-            <el-table 
+            <template slot-scope="{ headerCellFixedStyle, cellFixedStyle }">
+
+              <el-table 
               :row-key="column.key === 'puOrderItemList' ? 'rowNo' :'rowno'" 
               :data="tableData" 
               style="width: 100%"
-              :height="tabHeight"
               border
+              :headerCellStyle="headerCellFixedStyle"
+              :cellStyle="cellFixedStyle"
+              max-height="500px"
+              show-summary
+              :summary-method="getSummaries"
             >
               <template slot="empty">
                 <el-empty description="暂无数据"></el-empty>
               </template>
-              <el-table-column
-                v-for="(cColumn, cIndex) in column.tableColumns"
-                :key="cIndex"
-                :label="cColumn.title"
-                :width="cColumn.width || 80"
-              >
-              <template slot="header" slot-scope="scope">
-                <span v-if="cColumn.require" style="color: #ff4949">*</span>
-                <span>
-                  {{ cColumn.title }}
-                </span>
-              </template>
 
-                <template slot-scope="scope">
-                  <el-form-item 
-                    label-width="0" 
-                    >
-                    <!-- :prop="`${column.key}.${scope.$index}.${[cColumn.key]}`"
-                    :rules="{ required: cColumn.require || false, message: `${cColumn.title}不能为空`, trigger: 'change' }" -->
-                    <el-tag v-if="cColumn.key === 'index'" >
-                      {{ scope.$index + 1 }}
-                    </el-tag>
-                    <el-input
-                      v-if="cColumn.inputType === 'Input'"
-                      v-model="scope.row[cColumn.key]"
-                      :placeholder="cColumn.placeholder"
-                      :clearable="cColumn.clearable"
-                      :disabled="cColumn.disabled"
-                      size="mini"
-                      style="width: 100%"
-                    ></el-input>
-
-                    <!--  -->
-                    <dr-popover-select
-                      v-if="cColumn.inputType === 'PopoverSelect'"
-                      v-model="scope.row[cColumn.key]"
-                      :source.sync="scope.row"
-                      :title="cColumn.title"
-                      :value-key="cColumn.valueKey"
-                      :type="cColumn.referName"
-                      :disabled="cColumn.disabled"
-                      :multiple="cColumn.multiple"
-                      :placeholder="cColumn.placeholder"
-                      :data-mapping="cColumn.dataMapping"
-                      :query-params="cColumn.queryParams"
-                      @change="handleTabReferChange"
-                      size="mini"
+              
+
+                <el-table-column
+                  v-for="(cColumn, cIndex) in column.tableColumns"
+                  :key="cIndex"
+                  :label="cColumn.title"
+                  :width="cColumn.width || 80"
+                >
+                <template slot="header" slot-scope="scope">
+                  <span v-if="cColumn.require" style="color: #ff4949">*</span>
+                  <span>
+                    {{ cColumn.title }}
+                  </span>
+                </template>
+  
+                  <template slot-scope="scope">
+                    <el-form-item 
+                      label-width="0" 
+                      >
+                      <!-- :prop="`${column.key}.${scope.$index}.${[cColumn.key]}`"
+                      :rules="{ required: cColumn.require || false, message: `${cColumn.title}不能为空`, trigger: 'change' }" -->
+                      <el-tag v-if="cColumn.key === 'index'" >
+                        {{ scope.$index + 1 }}
+                      </el-tag>
+                      <el-input
+                        v-if="cColumn.inputType === 'Input'"
+                        v-model="scope.row[cColumn.key]"
+                        :placeholder="cColumn.placeholder"
+                        :clearable="cColumn.clearable"
+                        :disabled="cColumn.disabled"
+                        size="mini"
+                        style="width: 100%"
+                      ></el-input>
+  
+                      <!--  -->
+                      <dr-popover-select
+                        v-if="cColumn.inputType === 'PopoverSelect'"
+                        v-model="scope.row[cColumn.key]"
+                        :source.sync="scope.row"
+                        :title="cColumn.title"
+                        :value-key="cColumn.valueKey"
+                        :type="cColumn.referName"
+                        :disabled="cColumn.disabled"
+                        :multiple="cColumn.multiple"
+                        :placeholder="cColumn.placeholder"
+                        :data-mapping="cColumn.dataMapping"
+                        :query-params="cColumn.queryParams"
+                        @change="handleTabReferChange"
+                        size="mini"
+                      >
+                      </dr-popover-select>
+  
+                      <el-input-number
+                        v-if="cColumn.inputType === 'InputNumber'"
+                        v-model="scope.row[cColumn.key]"
+                        :precision="cColumn.precision"
+                        :controls-position="cColumn.controlsPosition"
+                        :placeholder="cColumn.placeholder"
+                        @change="handleInputChange(scope.row, cColumn.key)"
+                        :clearable="cColumn.clearable"
+                        :disabled="cColumn.disabled"
+                        :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
+                        size="mini"
+                        style="width: 100%"
+                      ></el-input-number>
+  
+                      <el-select
+                        v-if="cColumn.inputType === 'Select'"
+                        v-model="scope.row[cColumn.key]"
+                        filterable
+                        size="mini"
+                        :disabled="cColumn.disabled"
+                        :clearable="cColumn.clearable"
+                        :placeholder="cColumn.placeholder"
+                        style="width: 100%"
+                        @change="handleTabSelectChange(cColumn.key,scope.row)"
+                      >
+                        <el-option
+                          v-for="item in dict.type[cColumn.referName]"
+                          :key="item.value"
+                          :label="item.label"
+                          :value="item.value"
+                        ></el-option>
+                      </el-select>
+  
+                      <el-checkbox
+                        v-if="cColumn.inputType === 'Checkbox'"
+                        v-model="scope.row[cColumn.key]"
+                        :disabled="cColumn.disabled"
+                        true-label="Y"
+                        false-label="N"
+                        @change="handleTabCheckbox(cColumn.key,scope.row)"
+                      ></el-checkbox>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+  
+                <VirtualColumn
+                  vfixed="right"
+                  label="操作"
+                  width="80">
+                  <template slot-scope="scope">
+                    <el-button
+                      @click.native.prevent="
+                        delTableRow(params[tabName], scope.$index)
+                      "
+                      type="text"
+                      size="small"
                     >
-                    </dr-popover-select>
-
-                    <el-input-number
-                      v-if="cColumn.inputType === 'InputNumber'"
-                      v-model="scope.row[cColumn.key]"
-                      :precision="cColumn.precision"
-                      :controls-position="cColumn.controlsPosition"
-                      :placeholder="cColumn.placeholder"
-                      @change="handleInputChange(scope.row, cColumn.key)"
-                      :clearable="cColumn.clearable"
-                      :disabled="cColumn.disabled"
-                      :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
-                      size="mini"
-                      style="width: 100%"
-                    ></el-input-number>
-
-                    <el-select
-                      v-if="cColumn.inputType === 'Select'"
-                      v-model="scope.row[cColumn.key]"
-                      filterable
-                      size="mini"
-                      :disabled="cColumn.disabled"
-                      :clearable="cColumn.clearable"
-                      :placeholder="cColumn.placeholder"
-                      style="width: 100%"
-                      @change="handleTabSelectChange(cColumn.key,scope.row)"
+                      删行
+                    </el-button>
+                  </template>
+                </VirtualColumn>
+                <!-- <el-table-column fixed="right" label="操作" width="80">
+                  <template slot-scope="scope">
+                    <el-button
+                      @click.native.prevent="
+                        delTableRow(params[tabName], scope.$index)
+                      "
+                      type="text"
+                      size="small"
                     >
-                      <el-option
-                        v-for="item in dict.type[cColumn.referName]"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value"
-                      ></el-option>
-                    </el-select>
-
-                    <el-checkbox
-                      v-if="cColumn.inputType === 'Checkbox'"
-                      v-model="scope.row[cColumn.key]"
-                      :disabled="cColumn.disabled"
-                      true-label="Y"
-                      false-label="N"
-                      @change="handleTabCheckbox(cColumn.key,scope.row)"
-                    ></el-checkbox>
-                  </el-form-item>
-                </template>
-              </el-table-column>
-
-              <el-table-column fixed="right" label="操作" width="80">
-                <template slot-scope="scope">
-                  <el-button
-                    @click.native.prevent="
-                      delTableRow(params[tabName], scope.$index)
-                    "
-                    type="text"
-                    size="small"
-                  >
-                    删行
-                  </el-button>
-                </template>
-              </el-table-column>
-            </el-table>
+                      删行
+                    </el-button>
+                  </template>
+                </el-table-column> -->
+              </el-table>
+            </template>
           </virtual-scroll>
 
 

+ 37 - 12
src/views/purchase/purchase-order/column.js

@@ -74,25 +74,25 @@ export const TableColumns = [
     },
   },
   // { item:{key: "paymentAgreement", title: "付款协议" },
-  
   { 
-    item:{key: "buyerName", title: "采购员" ,width:100,},
+    item:{ key: "createByName", title: "制单人" ,width:100,},
     attr:{
       isHidden:true,
     },
   },
+  
   { 
     item:{key: "puDeptName", title: "采购部门",width:100, },
     attr:{
       isHidden:true,
     },
   },
-  { 
-    item:{key: "customerName", title: "收货客户" ,width:100,},
-    attr:{
-      isHidden:true,
-    },
-  },
+  // { 
+  //   item:{key: "customerName", title: "收货客户" ,width:100,},
+  //   attr:{
+  //     isHidden:true,
+  //   },
+  // },
   // { 
   //   key: "isDeliver", 
   //   title: "是否发货",
@@ -130,6 +130,7 @@ export const TableColumns = [
     item:{key: "qty", title: "总数量",width:80,},
     attr:{
       isHidden:true,
+      isSummary:true,
     },
   },
   { 
@@ -145,6 +146,7 @@ export const TableColumns = [
       //   return prop ? (prop * 1).toFixed(2) : prop;
       // },
       isHidden:true,
+      isSummary:true,
     },
  },
   // {
@@ -190,6 +192,7 @@ export const TableColumns = [
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
       isHidden:true,
+      isSummary:true,
     },
   },
   { 
@@ -200,6 +203,7 @@ export const TableColumns = [
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
       isHidden:true,
+      isSummary:true,
      
     },
     width:100,
@@ -269,15 +273,16 @@ export const TableColumns = [
     },
   },
   { 
-    item:{ key: "applyPaymentMoney", title: "累计付款申请金额", },
+    item:{ key: "applyPaymentMoney", title: "累计付款申请金额", width:100, },
     attr:{
       // is: "el-computed-input-v2",
           // formatter: (prop) => {
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
       isHidden:true,
+      isSummary:true,
+     
     },
-    width:100,
   },
   { 
     item:{ key: "paymentMoney", title: "累计付款金额" ,},
@@ -287,6 +292,7 @@ export const TableColumns = [
       //       return prop ? (prop * 1).toFixed(2) : prop;
       //     },
       isHidden:true,
+      isSummary:true,
     },
     width:100,
   },
@@ -298,6 +304,7 @@ export const TableColumns = [
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
       isHidden:true,
+      isSummary:true,
     },
     width:100,
   },
@@ -417,7 +424,7 @@ export const TableColumns = [
     width:100,
   },
   { 
-    item:{ key: "createByName", title: "创建人" ,width:100,},
+    item:{key: "buyerName", title: "采购员" ,width:100,},
     attr:{
       isHidden:true,
     },
@@ -596,6 +603,7 @@ export const TabColumns = [
         item:{key: "qty", title: "数量",width:120, },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
@@ -617,6 +625,7 @@ export const TabColumns = [
       { 
         item:{key: "money", title: "价税合计" ,width:120, },
         attr:{
+          isSummary:true,
           // is: "el-computed-input-v2",
           // formatter: (prop) => {
           //   return prop ? (prop * 1).toFixed(2) : prop;
@@ -639,6 +648,7 @@ export const TabColumns = [
           // formatter: (prop) => {
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
+          isSummary:true,
         },
       },
       { 
@@ -655,7 +665,8 @@ export const TabColumns = [
           title: "含税净价", 
           width:80, 
         },
-        attr:{},
+        attr:{
+        },
        },
       { 
         item:{key: "arrivalQty", title: "已到货数量" , width:80,},
@@ -664,6 +675,7 @@ export const TabColumns = [
           // formatter: (prop) => {
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
+          isSummary:true,
         },
       },
       { 
@@ -673,6 +685,7 @@ export const TabColumns = [
           // formatter: (prop) => {
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
+          isSummary:true,
         },
       },
       { 
@@ -691,6 +704,7 @@ export const TabColumns = [
           // formatter: (prop) => {
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
+          isSummary:true,
         },
       },
       // { 
@@ -904,6 +918,7 @@ export const TabColumns = [
         item:{key: "originalQty", title: "原始数量" ,width:80,},
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
@@ -917,12 +932,14 @@ export const TabColumns = [
           // formatter: (prop) => {
           //   return prop ? (prop * 1).toFixed(2) : prop;
           // },
+          isSummary:true,
         },
       },
       { 
         item:{key: "reservedQty", title: "预留数量",width:80, },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
@@ -1060,42 +1077,50 @@ export const TabColumns = [
         item:{key: "qty", title: "数量",width:120, },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
         item:{key: "stroageQty", title: "累计到货主数量",width:120,  },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
         item:{key: "stockQty", title: "累计入库主数量",width:120,  },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
         item:{key: "invoiceQty", title: "累计开票主数量",width:120,  },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
+        
         item:{key: "rollbackQty", title: "累计退货主数量",width:120,  },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
         item:{key: "backStockQty", title: "累计退库主数量",width:120,  },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       { 
         item:{key: "floatQty", title: "未到货数量",width:120, },
         attr:{
           isHidden:true,
+          isSummary:true,
         },
       },
       // { item:{key: "createByName", title: "创建人", },

+ 161 - 121
src/views/purchase/purchase-order/edit/index.vue

@@ -48,7 +48,7 @@ export default {
         let length = this.params['puOrderItemList'].filter(item => item.delFlag === '0').length;
         return `${length ? 
                   (length > 8 ? 500 :
-                   (length *60) +100)
+                   (length *60) +170)
                 : 120}px`
       },
       set(){}
@@ -720,6 +720,40 @@ export default {
 
       this.download('/pu/order/downloadFailData',{}, `物料信息模板${new Date().getTime()}.xlsx`);
     },
+    getSummaries(param){
+        const { columns, data } = param;
+				const sums = [];
+        let { tabColumns, tabName } = this;
+
+				columns.forEach((column, index) => {
+
+				if (index === 0) {
+				   sums[index] = '合计';
+				   return;
+				}
+
+				const values = data.map(item => Number(item[column.property]));
+       
+        let sumColumn = tabColumns.find(tab => tab.key === tabName).tableColumns.filter(({key,isSummary}) => isSummary && key === column.property);
+        
+        if (sumColumn.length) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return '';
+            }
+          }, 0);
+          sums[index];
+          }
+				});
+				return sums;
+
+        // return 0
+
+      
+    }
 
   },
   created() {},
@@ -889,129 +923,135 @@ export default {
               @change="(virtualList) => tableData = virtualList" 
               :virtualized="true"
             >
-            <!-- row-key绑定列唯一值,height一定要设置否则会滚动条滚动位置不对且数据滚动全部加载完后会出现白板-->
-            <el-table 
-              border
-              :data="tableData" 
-              style="width: 100%"
-              :height="tabHeight"
-            >
-              <el-table-column label="序号">
-                <template slot-scope="scope">
-                  {{ scope.$index + 1 }}
-                </template>
-              </el-table-column>
-              <el-table-column 
-                v-for="(cColumn, cIndex) in column.tableColumns" 
-                :key="cIndex" 
-                :prop="cColumn.key"
-                :label="cColumn.title" 
-                :width="cColumn.width"
+              <template slot-scope="{ headerCellFixedStyle, cellFixedStyle }">
+              <!-- row-key绑定列唯一值,height一定要设置否则会滚动条滚动位置不对且数据滚动全部加载完后会出现白板-->
+                <el-table 
+                  border
+                  :data="tableData" 
+                  style="width: 100%"
+                  :headerCellStyle="headerCellFixedStyle"
+                  :cellStyle="cellFixedStyle"
+                  max-height="500px"
+                  show-summary
+                  :summary-method="getSummaries"
                 >
-                <template slot="header" slot-scope="scope">
-                  <span v-if="cColumn.require" style="color: #ff4949">*</span>
-                  <span>
-                    {{ cColumn.title }}
-                  </span>
-                </template>
-                <template slot-scope="scope">
-
-                  <el-form-item 
-                    label-width="0" 
+                  <el-table-column label="序号">
+                    <template slot-scope="scope">
+                      {{ scope.$index + 1 }}
+                    </template>
+                  </el-table-column>
+                  <el-table-column 
+                    v-for="(cColumn, cIndex) in column.tableColumns" 
+                    :key="cIndex" 
+                    :prop="cColumn.key"
+                    :label="cColumn.title" 
+                    :width="cColumn.width"
                     >
-                    <!-- :prop="`${column.key}.${scope.$index}.${[cColumn.key]}`"
-                    :rules="{ required: cColumn.require || false, message: `${cColumn.title}不能为空`, trigger: 'change' }" -->
-
-                  <span v-if="!cColumn.inputType">
-                    {{ scope.row[cColumn.key] }}
-                  </span>
-
-                  <el-input v-if="cColumn.inputType === 'Input'" 
-                    v-model="scope.row[cColumn.key]"
-                    :placeholder="cColumn.placeholder" 
-                    :clearable="cColumn.clearable" 
-                    :disabled="cColumn.disabled"
-                    :size="size" 
-                    style="width: 100%"
-                    ></el-input>
-
-                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" 
-                    v-model="scope.row[cColumn.key]"
-                    :source.sync="scope.row" 
-                    :title="cColumn.title" 
-                    :value-key="cColumn.valueKey"
-                    :disabled="cColumn.disabled" 
-                    :type="cColumn.referName" 
-                    :multiple="cColumn.multiple"
-                    :placeholder="cColumn.placeholder" 
-                    :data-mapping="cColumn.dataMapping"
-                    :query-params="cColumn.queryParams" 
-                    size="mini" 
-                    @change="handleTabReferChange"
-                  ></dr-popover-select>
-
-                  <el-select v-if="cColumn.inputType === 'Select'" 
-                    v-model="scope.row[cColumn.key]" size="mini"
-                    :disabled="cColumn.disabled" 
-                    :clearable="cColumn.clearable" 
-                    :placeholder="cColumn.placeholder"
-                    style="width: 100%"
-                    @change="handleTabSelectChange(cColumn.key,scope.row)"
+                    <template slot="header" slot-scope="scope">
+                      <span v-if="cColumn.require" style="color: #ff4949">*</span>
+                      <span>
+                        {{ cColumn.title }}
+                      </span>
+                    </template>
+                    <template slot-scope="scope">
+
+                      <el-form-item 
+                        label-width="0" 
+                        >
+                        <!-- :prop="`${column.key}.${scope.$index}.${[cColumn.key]}`"
+                        :rules="{ required: cColumn.require || false, message: `${cColumn.title}不能为空`, trigger: 'change' }" -->
+
+                      <span v-if="!cColumn.inputType">
+                        {{ scope.row[cColumn.key] }}
+                      </span>
+
+                      <el-input v-if="cColumn.inputType === 'Input'" 
+                        v-model="scope.row[cColumn.key]"
+                        :placeholder="cColumn.placeholder" 
+                        :clearable="cColumn.clearable" 
+                        :disabled="cColumn.disabled"
+                        :size="size" 
+                        style="width: 100%"
+                        ></el-input>
+
+                      <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" 
+                        v-model="scope.row[cColumn.key]"
+                        :source.sync="scope.row" 
+                        :title="cColumn.title" 
+                        :value-key="cColumn.valueKey"
+                        :disabled="cColumn.disabled" 
+                        :type="cColumn.referName" 
+                        :multiple="cColumn.multiple"
+                        :placeholder="cColumn.placeholder" 
+                        :data-mapping="cColumn.dataMapping"
+                        :query-params="cColumn.queryParams" 
+                        size="mini" 
+                        @change="handleTabReferChange"
+                      ></dr-popover-select>
+
+                      <el-select v-if="cColumn.inputType === 'Select'" 
+                        v-model="scope.row[cColumn.key]" size="mini"
+                        :disabled="cColumn.disabled" 
+                        :clearable="cColumn.clearable" 
+                        :placeholder="cColumn.placeholder"
+                        style="width: 100%"
+                        @change="handleTabSelectChange(cColumn.key,scope.row)"
+                      >
+                        <el-option 
+                          v-for="item in dict.type[cColumn.referName]" 
+                          :key="item.value" 
+                          :label="item.label"
+                          :value="item.value"
+                        ></el-option>
+                      </el-select>
+
+                      <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
+                        v-model="scope.row[cColumn.key]"
+                        :disabled="cColumn.disabled" 
+                        true-label="Y" 
+                        false-label="N"
+                        @change="handleTabCheckbox(cColumn.key,scope.row)"
+                      ></el-checkbox>
+                      <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
+                        v-model="scope.row[cColumn.key]"
+                        :precision="cColumn.precision"
+                        :controls-position="cColumn.controlsPosition"
+                        :max="getInputNumberMax(cColumn.key, scope.row)"
+                        :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
+                        @change="handleInputChange(scope.row, cColumn.key)" 
+                        :placeholder="cColumn.placeholder"
+                        :clearable="cColumn.clearable" 
+                        :disabled="cColumn.disabled" 
+                        :size="size" 
+                        style="width: 100%"
+                      ></el-input-number>
+
+                    </el-form-item>
+                    </template>
+                  </el-table-column>
+
+
+                  <!-- 修订:不可删除、增行
+                  编辑:自制:可删可增 -->
+                  <!-- v-if="!handleIsRevise()" -->
+                  <VirtualColumn
+                    v-if="!handleIsRevise()"
+                    vfixed="right"
+                    label="操作"
+                    width="120"
                   >
-                    <el-option 
-                      v-for="item in dict.type[cColumn.referName]" 
-                      :key="item.value" 
-                      :label="item.label"
-                      :value="item.value"
-                    ></el-option>
-                  </el-select>
-
-                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
-                    v-model="scope.row[cColumn.key]"
-                    :disabled="cColumn.disabled" 
-                    true-label="Y" 
-                    false-label="N"
-                    @change="handleTabCheckbox(cColumn.key,scope.row)"
-                  ></el-checkbox>
-                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
-                    v-model="scope.row[cColumn.key]"
-                    :precision="cColumn.precision"
-                    :controls-position="cColumn.controlsPosition"
-                    :max="getInputNumberMax(cColumn.key, scope.row)"
-                    :min="cColumn.key === 'reservedQty' ? 0 : -Infinity"
-                    @change="handleInputChange(scope.row, cColumn.key)" 
-                    :placeholder="cColumn.placeholder"
-                    :clearable="cColumn.clearable" 
-                    :disabled="cColumn.disabled" 
-                    :size="size" 
-                    style="width: 100%"
-                  ></el-input-number>
-
-                </el-form-item>
-                </template>
-              </el-table-column>
-
-
-              <!-- 修订:不可删除、增行
-              编辑:自制:可删可增 -->
-              <!-- v-if="!handleIsRevise()" -->
-              <el-table-column 
-                v-if="!handleIsRevise()"
-                fixed="right" 
-                label="操作" 
-                width="120" >
-                <template slot-scope="scope"
-              >
-              <!-- v-if="!handleIsRevise()"  -->
-                  <el-button 
-                    @click.native.prevent="delTableRow(params[tabName], scope.row,tabName)" 
-                    type="text" 
-                    size="small"
-                    > 删行
-                  </el-button>
-                </template>
-              </el-table-column>
-            </el-table>
+                    <template slot-scope="scope">
+                      <el-button 
+                        @click.native.prevent="delTableRow(params[tabName], scope.row,tabName)" 
+                        type="text" 
+                        size="small"
+                        > 删行
+                      </el-button>
+                    </template>
+                  </VirtualColumn>
+                  
+                </el-table>
+              </template>
           </virtual-scroll>
            
           </el-tab-pane>

+ 4 - 2
src/views/purchase/purchase-order/index.vue

@@ -54,6 +54,7 @@ export default {
       timeOut:null,
     };
   },
+
   computed: {
     $dicts: {
       get: function () {
@@ -64,7 +65,7 @@ export default {
       get(){
         return `${this.tabTableDatas['puOrderItemList'].length ? 
                   (this.tabTableDatas['puOrderItemList'].length > 8 ? 500 :
-                   (this.tabTableDatas['puOrderItemList'].length *50) +100)
+                   (this.tabTableDatas['puOrderItemList'].length *50) +170)
                 : 120}px`
       },
       set(){}
@@ -172,7 +173,6 @@ export default {
       for (const key in this.tabTableDatas) {
         this.tabTableDatas[key] = []
       }
-
       this.$refs.puOrderItemList[0].$refs.superTable.clearSelection();
 
       // this.checkedList = [];
@@ -735,6 +735,7 @@ export default {
         index
         checkbox
         pagination
+        showSummary
         :page="page"
         convenitentOperation
         @pagination="fetchList(params, page)"
@@ -828,6 +829,7 @@ export default {
               :selectable="setTabSelectable"
               :checkbox="setTabSelectable()"
               convenitentOperation
+              showSummary
               @select="handleTabSelect"
               @selection-change="handleTabSelectionChange"
             >

+ 135 - 95
src/views/purchase/purchase-order/see/index.vue

@@ -58,8 +58,7 @@ export default {
       get(){
         let length = this.params['puOrderItemList'].filter(item => item.delFlag === '0').length;
         return `${length ? 
-                  (length > 8 ? 500 :
-                   (length *60) +100)
+                  (length > 8 ? 500 :  (length *60) +170)
                 : 120}px`
       },
       set(){}
@@ -160,6 +159,40 @@ export default {
     beforeOpen() { 
       
     },
+    getSummaries(param){
+        const { columns, data } = param;
+				const sums = [];
+        let { tabColumns, tabName } = this;
+
+				columns.forEach((column, index) => {
+
+				if (index === 0) {
+				   sums[index] = '合计';
+				   return;
+				}
+
+				const values = data.map(item => Number(item[column.property]));
+       
+        let sumColumn = tabColumns.find(tab => tab.key === tabName).tableColumns.filter(({key,isSummary}) => isSummary && key === column.property);
+        
+        if (sumColumn.length) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return '';
+            }
+          }, 0);
+          sums[index];
+          }
+				});
+				return sums;
+
+        // return 0
+
+      
+    }
   },
   created() { 
 
@@ -351,100 +384,107 @@ export default {
               :virtualized="true"
             >
             <!-- row-key绑定列唯一值,height一定要设置否则会滚动条滚动位置不对且数据滚动全部加载完后会出现白板-->
-            <el-table 
-              :data="tableData" 
-              style="width: 100%"  
-              :height="tabHeight"
-              border
-            >
-              <el-table-column label="序号">
-                <template slot-scope="scope">
-                  {{ scope.$index + 1 }}
-                </template>
-              </el-table-column>
-              <el-table-column 
-                v-for="(cColumn, cIndex) in column.tableColumns" 
-                :key="cIndex" 
-                :prop="cColumn.key"
-                :label="cColumn.title" 
-                :width="cColumn.width"
-              >
-                <template slot="header" slot-scope="scope">
-                  <span v-if="cColumn.require" style="color: #ff4949">*</span>
-                  <span>
-                    {{ cColumn.title }}
-                  </span>
-                </template>
-                <template slot-scope="scope">
-                  <el-form-item  label-width="0">
-                    <span v-if="!cColumn.inputType">
-                      {{ scope.row[cColumn.key] }}
-                    </span>
-                    
-                    <el-input v-if="cColumn.inputType === 'Input'" 
-                      v-model="scope.row[cColumn.key]"
-                      :placeholder="cColumn.placeholder" 
-                      :clearable="cColumn.clearable" 
-                      readonly 
-                      size="mini"
-                      style="width: 100%"
-                    ></el-input>
-
-                    <!--  -->
-                    <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'"
-                      v-model="scope.row[cColumn.key]"
-                      :source.sync="scope.row" 
-                      :title="cColumn.title" 
-                      :value-key="cColumn.valueKey" 
-                      disabled
-                      :type="cColumn.referName" 
-                      :multiple="cColumn.multiple" 
-                      :placeholder="cColumn.placeholder"
-                      :data-mapping="cColumn.dataMapping" 
-                      :query-params="cColumn.queryParams" 
-                      size="mini" 
-                    ></dr-popover-select>
-
-                    <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
-                      v-model="scope.row[cColumn.key]"
-                      :precision="cColumn.precision"
-                      :controls-position="cColumn.controlsPosition" 
-                      :placeholder="cColumn.placeholder"
-                      :clearable="cColumn.clearable" 
-                      disabled 
-                      size="mini" 
-                      style="width: 100%"
-                    ></el-input-number>
-
-                    <el-select v-if="cColumn.inputType === 'Select'" 
-                      v-model="scope.row[cColumn.key]" 
-                      disabled 
-                      size="mini"
-                      :clearable="cColumn.clearable" 
-                      :placeholder="cColumn.placeholder" 
-                      style="width: 100%">
-                      <el-option 
-                        v-for="item in dict.type[cColumn.referName]" 
-                        :key="item.value" 
-                        :label="item.label"
-                        :value="item.value"
-                      ></el-option>
-                    </el-select>
-
-                    <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
-                      v-model="scope.row[cColumn.key]" 
-                      disabled
-                      true-label="Y" 
-                      false-label="N"
-                    ></el-checkbox>
-
-
-                  </el-form-item>
+              <template slot-scope="{ headerCellFixedStyle, cellFixedStyle }">
+                <el-table 
+                  border
+                  :data="tableData" 
+                  style="width: 100%"  
+                  :row-key="column.key === 'puOrderItemList' ? 'rowNo' :'rowno'"
                   
-                </template>
-              </el-table-column>
-            </el-table>
-          
+                  :headerCellStyle="headerCellFixedStyle"
+                  :cellStyle="cellFixedStyle"
+                  max-height="500px"
+                  show-summary
+                  :summary-method="getSummaries"
+                >
+                  <el-table-column label="序号">
+                    <template slot-scope="scope">
+                      {{ scope.$index + 1 }}
+                    </template>
+                  </el-table-column>
+                  <el-table-column 
+                    v-for="(cColumn, cIndex) in column.tableColumns" 
+                    :key="cIndex" 
+                    :prop="cColumn.key"
+                    :label="cColumn.title" 
+                    :width="cColumn.width"
+                  >
+                    <template slot="header" slot-scope="scope">
+                      <span v-if="cColumn.require" style="color: #ff4949">*</span>
+                      <span>
+                        {{ cColumn.title }}
+                      </span>
+                    </template>
+                    <template slot-scope="scope">
+                      <el-form-item  label-width="0">
+                        <span v-if="!cColumn.inputType">
+                          {{ scope.row[cColumn.key] }}
+                        </span>
+                        
+                        <el-input v-if="cColumn.inputType === 'Input'" 
+                          v-model="scope.row[cColumn.key]"
+                          :placeholder="cColumn.placeholder" 
+                          :clearable="cColumn.clearable" 
+                          readonly 
+                          size="mini"
+                          style="width: 100%"
+                        ></el-input>
+
+                        <!--  -->
+                        <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'"
+                          v-model="scope.row[cColumn.key]"
+                          :source.sync="scope.row" 
+                          :title="cColumn.title" 
+                          :value-key="cColumn.valueKey" 
+                          disabled
+                          :type="cColumn.referName" 
+                          :multiple="cColumn.multiple" 
+                          :placeholder="cColumn.placeholder"
+                          :data-mapping="cColumn.dataMapping" 
+                          :query-params="cColumn.queryParams" 
+                          size="mini" 
+                        ></dr-popover-select>
+
+                        <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
+                          v-model="scope.row[cColumn.key]"
+                          :precision="cColumn.precision"
+                          :controls-position="cColumn.controlsPosition" 
+                          :placeholder="cColumn.placeholder"
+                          :clearable="cColumn.clearable" 
+                          disabled 
+                          size="mini" 
+                          style="width: 100%"
+                        ></el-input-number>
+
+                        <el-select v-if="cColumn.inputType === 'Select'" 
+                          v-model="scope.row[cColumn.key]" 
+                          disabled 
+                          size="mini"
+                          :clearable="cColumn.clearable" 
+                          :placeholder="cColumn.placeholder" 
+                          style="width: 100%">
+                          <el-option 
+                            v-for="item in dict.type[cColumn.referName]" 
+                            :key="item.value" 
+                            :label="item.label"
+                            :value="item.value"
+                          ></el-option>
+                        </el-select>
+
+                        <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
+                          v-model="scope.row[cColumn.key]" 
+                          disabled
+                          true-label="Y" 
+                          false-label="N"
+                        ></el-checkbox>
+
+
+                      </el-form-item>
+                      
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </template>
           </virtual-scroll>
             
           </el-tab-pane>

+ 54 - 34
src/views/purchase/task/columns.js

@@ -1,6 +1,5 @@
 export default function useColumns() {
   const TableColumns = [
-    { item: { key: "code", title: "订单生成单号",width :160 }, attr: {} },
     {
       item: { key: "status", title: "状态" ,width :100},
       attr: {
@@ -9,77 +8,98 @@ export default function useColumns() {
 
       },
     },
-
     {
       item: { key: "existPrice", title: "是否有价格",width :100 },
       attr: { is: "el-dict-tag", dictName: "sys_true_false" },
     },
-    { item: { key: "demandCode", title: "需求单号",width :150 }, attr: {} },
-    { item: { key: "materialName", title: "物料",width :150 }, attr: {} },
     {
       item: { key: "materialCode", title: "物料编码",width :150 },
       attr: {},
     },
-    {
-      item: { key: "materialDesc", title: "物料描述",width :100 },
-      attr: {},
-    },
+    { item: { key: "materialName", title: "物料名称",width :150 }, attr: {} },
+    { item: { key: "specification", title: "规格",width :100 }, attr: {} },
     {
       item: { key: "manufacturerName", title: "生产厂家" ,width :100},
       attr: {},
     },
-    { item: { key: "puQty", title: "采购数量",width :100 }, attr: {} },
+    { item: { key: "unitName", title: "单位" ,width :100}, attr: {} },
+    { item: { key: "puQty", title: "采购数量",width :100 }, 
+      attr: {
+        isSummary:true,
+      } 
+    },
     {
       item: { key: "executeQty", title: "已执行数量" ,width :100},
-      attr: {},
+      attr: {
+        isSummary:true,
+      },
     },
     {
       item: { key: "residueQty", title: "未执行数量",width :100 },
-      attr: {},
-    },
-    {
-      item: { key: "priceType", title: "价格类型" ,width :100},
-      attr: { is: "el-dict-tag", dictName: "sys_price_type" },
+      attr: {
+        isSummary:true,
+      },
     },
-    { item: { key: "puUnitName", title: "采购单位",width :100 }, attr: {} },
-    { item: { key: "specification", title: "规格",width :100 }, attr: {} },
     { item: { key: "buyerName", title: "采购员",width :100 }, attr: {} },
     {
-      item: { key: "supplierName", title: "建议供应商",width :100 },
+      item: { key: "customerName", title: "收货客户",width :100 },
       attr: {},
     },
-    { item: { key: "puOrgName", title: "采购组织",width :100 }, attr: {} },
-    { item: { key: "currencyName", title: "币种",width :100 }, attr: {} },
-    { item: { key: "source", title: "需求单号" ,width :100}, attr: {} },
+    { item: { key: "demandCode", title: "需求单号",width :150 }, attr: {} },
     {
-      item: { key: "customerName", title: "收货客户",width :100 },
+      item: { key: "assignSupplierName", title: "指定供应商" ,width :100},
       attr: {},
     },
+    { item: { key: "code", title: "订单生成单号",width :160 }, attr: {} },
     {
-      item: { key: "assignSupplierName", title: "指定供应商" ,width :100},
+      item: { key: "demandOrgName", title: "需求组织" ,width :100},
       attr: {},
     },
     { item: { key: "demandDate", title: "需求时间",width :100 }, attr: {} },
-    { item: { key: "projectName", title: "项目名称",width :100 }, attr: {} },
     {
-      item: { key: "demandPersonalName", title: "需求人",width :100 },
-      attr: {},
+      item: { key: "isBack", title: "是否退回",width :100 },
+      attr: { is: "el-dict-tag", dictName: "sys_yes_no" ,width :100},
     },
+    { item: { key: "baskCause", title: "退回原因" ,width :100}, attr: {} },
+    { item: { key: "backDate", title: "退回日期",width :100 }, attr: {} },
     {
-      item: { key: "demandOrgName", title: "需求组织" ,width :100},
+      item: { key: "demandPersonalName", title: "需求人",width :100 },
       attr: {},
     },
+    
     {
       item: { key: "demandDeptName", title: "需求部门",width :100 },
       attr: {},
     },
-    {
-      item: { key: "isBack", title: "是否退回",width :100 },
-      attr: { is: "el-dict-tag", dictName: "sys_yes_no" ,width :100},
-    },
-    { item: { key: "baskCause", title: "退回原因" ,width :100}, attr: {} },
-    { item: { key: "backDate", title: "退回日期",width :100 }, attr: {} },
-    { item: { key: "unitName", title: "单位" ,width :100}, attr: {} },
+    // {
+    //   item: { key: "materialDesc", title: "物料描述",width :100 },
+    //   attr: {},
+    // },
+    
+    
+    // {
+    //   item: { key: "priceType", title: "价格类型" ,width :100},
+    //   attr: { is: "el-dict-tag", dictName: "sys_price_type" },
+    // },
+    
+    // { item: { key: "puUnitName", title: "采购单位",width :100 }, attr: {} },
+    
+    
+    // {
+    //   item: { key: "supplierName", title: "建议供应商",width :100 },
+    //   attr: {},
+    // },
+    // { item: { key: "puOrgName", title: "采购组织",width :100 }, attr: {} },
+    // { item: { key: "currencyName", title: "币种",width :100 }, attr: {} },
+    // { item: { key: "source", title: "需求单号" ,width :100}, attr: {} },
+   
+   
+    
+    // { item: { key: "projectName", title: "项目名称",width :100 }, attr: {} },
+    
+    
+    
+    
   ].map(({ item, attr }) => ({
     attr,
     item: {

+ 1 - 0
src/views/purchase/task/index.vue

@@ -174,6 +174,7 @@ export default {
       checkbox
       pagination
       convenitentOperation
+      showSummary
       @row-select="useSelect"
       @pagination="useQuery(params, page)"
     >

+ 3 - 0
src/views/purchase/task/xie-yi-zhi-cai/column.js

@@ -26,6 +26,7 @@ export const TableColumns = [
       formatter: (prop) => {
         return (prop * 1);
       },
+      // isSummary:true,
     },
   },
   
@@ -61,6 +62,7 @@ export const TableColumns = [
       formatter: (prop) => {
         return (prop * 1);
       },
+      // isSummary:true,
     },
   },
   {
@@ -73,6 +75,7 @@ export const TableColumns = [
         return puQty - executeQty;
       },
       controlsPosition: "right",
+      isSummary:true,
     },
   },
   {

+ 1 - 0
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -185,6 +185,7 @@ export default {
           :columns="tableColumns"
           :size="$attrs.size"
           :dict="dict"
+          showSummary
         >
           <template slot="purchaseQuantity" slot-scope="scope">
             <component