Browse Source

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002201 1 year ago
parent
commit
fb34587f74

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

@@ -15,7 +15,7 @@ export default {
     // 分页
     page: {
       type: [Object],
-      require: true,
+      require: false,
     },
     // 模板
     columns: {
@@ -407,7 +407,7 @@ export default {
         </template>
       </div>
       <pagination
-        v-if="page"
+        v-if="pagination"
         v-show="!selectState"
         :total="page.total"
         :page.sync="page.pageNum"

+ 88 - 39
src/views/material/basicFile/details.vue

@@ -660,8 +660,15 @@
     </el-dialog>
 
     <!-- 参照弹窗 -->
-    <el-dialog :title="MoreDataDialog.msg.name" :visible.sync="MoreDataDialog.show" width="70%" class="MoreDataDialog"
-               :close-on-press-escape="false" :close-on-click-modal="false" :before-close="handleCloseRefer">
+    <el-dialog 
+      :title="MoreDataDialog.msg.name" 
+      :visible.sync="MoreDataDialog.show" 
+      width="70%" 
+      class="MoreDataDialog"
+      :close-on-press-escape="false" 
+      :close-on-click-modal="false" 
+      :before-close="handleCloseRefer"
+    >
       <div>
         <el-row>
           <el-col :span="1.5">
@@ -669,22 +676,40 @@
           </el-col>
         </el-row>
         <!-- 树形 -->
-        <el-tree class="referTree" v-loading="MoreDataDialog.loading" v-if="MoreDataDialog.type == 'tree'"
-                 :data="MoreDataDialog.list" @node-click="handleNodeClick" :key="refer"
-                 :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps" node-key="id">
+        <el-tree 
+          class="referTree" 
+          v-loading="MoreDataDialog.loading" 
+          v-if="MoreDataDialog.type == 'tree'"
+          :data="MoreDataDialog.list" 
+          @node-click="handleNodeClick" 
+          :key="refer"
+          :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps" 
+          node-key="id"
+        >
         </el-tree>
         <!-- queryMedcineItemDrug -->
         <!-- 列表 -->
         <div v-else>
-          <el-table  border :data="MoreDataDialog.list" v-loading="MoreDataDialog.loading" style="width: 100%"
-                    @row-click="handleCurentRow" highlight-current-row>
+          <el-table  
+            border 
+            :data="MoreDataDialog.list"
+            v-loading="MoreDataDialog.loading" 
+            style="width: 100%"
+            @row-click="handleCurentRow" 
+            highlight-current-row
+          >
             <el-table-column type="index" label="序号" width="55" align="center"/>
             <el-table-column v-for="m in MoreDataDialog.form" v-if="m.show" :prop="m.prop" :label="m.name"/>
           </el-table>
 
-          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                         :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50, 100]"
-                         layout="total, sizes, prev, pager, next, jumper" :total="queryParams.total">
+          <el-pagination 
+            @size-change="handleSizeChange" 
+            @current-change="handleCurrentChange"
+            :current-page="queryParams.pageNum" 
+            :page-sizes="[10, 20, 50, 100]"
+            layout="total, sizes, prev, pager, next, jumper" 
+            :total="queryParams.total"
+          >
           </el-pagination>
         </div>
 
@@ -1509,7 +1534,8 @@
 
       // 新增
       handleInster() {
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '物料只能通过申请审批增加,不能在节点直接录入!',
           type: 'warning'
         });
@@ -1529,7 +1555,8 @@
             // 查询其他标签页列表详情
             this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
           } else {
-            this.$message({
+            this.$notify({
+              title: '警告',
               message: '修改请选择单个数据!',
               type: 'warning'
             });
@@ -1583,10 +1610,11 @@
               break;
           }
         } else {
-          this.$message({
-            message: '请选择需要删除的数据!',
-            type: 'warning'
-          });
+          this.$notify({
+              title: '警告',
+              message: '请选择需要删除的数据!',
+              type: 'warning'
+            });
         }
       },
       // 其他标签页刷新
@@ -1728,7 +1756,8 @@
             _this.maintainNewVersion = res.data.result;
             // 维护版本消息展示 by shiy 2023/05/31
             if (!res.data.result) {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: res.data.msg,
                 type: 'warning'
               });
@@ -1782,7 +1811,11 @@
               this.handleRefresh();
             })
           } else {
-            this.$message.error('存在必填项未填写');
+            this.$notify.error({
+              title: '错误',
+              message: '存在必填项未填写!'
+            });
+            
             console.log('error submit!!');
             return false;
           }
@@ -1828,10 +1861,12 @@
                 })
               })
             } else {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: '请选择需要删除的信息!',
                 type: 'warning'
               });
+              
             }
             break;
           // 取消
@@ -1861,10 +1896,12 @@
                 })
                 // 保存
               } else {
-                this.$message({
-                  message: '不能保存空数据或存在数据为空!',
-                  type: 'warning'
-                });
+                this.$notify({
+                title: '警告',
+                message: '不能保存空数据或存在数据为空!',
+                type: 'warning'
+              });
+                
               }
             } else {
               // 非编辑状态
@@ -1876,10 +1913,11 @@
           default:
             console.log('物料类别刷新');
             if (this.materialType.isEdit) {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: '请先保存数据!',
                 type: 'warning'
-              })
+              });
             } else {
               this.materialType.loading = true;
               this.getTagList('material_medcine_item', (form) => {
@@ -1895,10 +1933,11 @@
       handleCloseTypeDetails(done) {
 
         console.log('物料类别弹窗关闭前');
-        this.materialType.isEdit ? this.$message({
-          message: '请先保存数据!',
-          type: 'warning'
-        }) : done();
+        this.materialType.isEdit ? this.$notify({
+                title: '警告',
+                message: '请先保存数据!',
+                type: 'warning'
+              }): done();
 
       },
       // 保存修改并新增
@@ -1951,7 +1990,8 @@
         console.log('其他页签详情弹窗关闭事件');
         // 处于编辑状态
         if (this.otherDeatils.isEdit) {
-          this.$message({
+          this.$notify({
+            title: '警告',
             message: '请先退出编辑操作',
             type: 'warning'
           });
@@ -2082,7 +2122,8 @@
               let drug = _this.materialType.value.filter(d => d.drugId == _this.MoreDataDialog.value['id'])
               console.log(drug, 'drug------------------------------------');
               if (drug.length) {
-                _this.$message({
+                _this.$notify({
+                  title: '警告',
                   message: '不能维护相同的物料类别!',
                   type: 'warning'
                 });
@@ -2208,7 +2249,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2240,7 +2282,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2269,7 +2312,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2298,7 +2342,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2328,7 +2373,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2357,7 +2403,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2538,11 +2585,13 @@
 <style lang="scss">
   .material-details {
     padding: 12px;
-    height: calc(100vh - 158px);
+    height: 100%;
+    // height: calc(100vh - 158px);
     box-sizing: border-box;
 
     .el-card__body {
-      height: calc(100vh - 160px);
+      height: calc(100vh - 80px);
+      // height: 100%;
       box-sizing: border-box;
       padding: 12px;
       overflow-y: auto;

+ 51 - 28
src/views/material/basicFile/index.vue

@@ -40,6 +40,11 @@
 
       </el-row>
 
+     
+    </div>
+
+    <!-- 主体列表 -->
+    <el-card class="material-list" v-loading="loading">
       <el-row 
         :gutter="10" 
         class="mb10"
@@ -97,17 +102,27 @@
 
 
       </el-row>
-    </div>
 
-    <!-- 主体列表 -->
-    <el-card class="material-list" v-loading="loading">
-      <el-table border :data="taskList" ref="materialTable" @cell-dblclick="handledbClick" :row-key="getRowKey"
-                @selection-change="handleSelectionChange" @select="handleSelect" @select-all="handleSelectAll">
+      <el-table 
+        border 
+        :data="taskList" 
+        ref="materialTable" 
+        @cell-dblclick="handledbClick" 
+        :row-key="getRowKey"
+        @selection-change="handleSelectionChange" 
+        @select="handleSelect" 
+        @select-all="handleSelectAll"
+      >
         <!--  -->
         <el-table-column type="selection" width="45" :reserve-selection="true"/>
         <el-table-column type="index" label="序号" width="55" align="center"/>
-        <el-table-column width="150" v-for="h in  tableHeader" v-if="h.show" :label="h.name" align="center"
-                         show-overflow-tooltip>
+        <el-table-column 
+          width="150" 
+          v-for="h in  tableHeader" v-if="h.show" 
+          :label="h.name" 
+          align="center"
+          show-overflow-tooltip
+        >
           <!-- :prop="h.attribute == 'select' ? `${h.prop}Name` : h.prop" -->
           <template slot-scope="scope">
             {{ h.attribute == 'select' ? scope.row[`${h.prop}Name`] :
@@ -119,9 +134,14 @@
         </el-table-column>
       </el-table>
 
-      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                     :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50, 100]"
-                     layout="total, sizes, prev, pager, next, jumper" :total="total">
+      <el-pagination 
+        @size-change="handleSizeChange" 
+        @current-change="handleCurrentChange"
+        :current-page="queryParams.pageNum" 
+        :page-sizes="[10, 20, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper" 
+        :total="total"
+      >
       </el-pagination>
     </el-card>
 
@@ -216,7 +236,8 @@
       },
       // 新增
       handleInster() {
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '物料只能通过申请审批增加,不能在节点直接录入!',
           type: 'warning'
         });
@@ -231,7 +252,8 @@
             }
           });
         } else {
-          this.$message({
+          this.$notify({
+            title: '警告',
             message: `${this.checkedList.length > 1 ? '修改只能选择单个数据!' : '请选择需要修改的信息!'}`,
             type: 'warning'
           });
@@ -252,8 +274,9 @@
             }
           })
         } else {
-          this.$message({
-            message: '请选择需要删除的数据!',
+          this.$notify({
+            title: '警告',
+            message: `请选择需要删除的数据!`,
             type: 'warning'
           });
         }
@@ -364,21 +387,23 @@
                       })
                     }
                   }
-                  this.$message({
+                  this.$notify({
                     message: res.data.msg,
                     type: res.data.flag ? 'warning' : 'success'
                   });
+                  
                 } else {
-                  this.$message({
+                  this.$notify({
                     message: res.msg,
                     type: res.code == 200 ? 'success' : 'warning'
                   });
                 }
               })
             } else {
-              this.$message({
+              this.$notify({
+                title:'警告',
                 message: '请上传文件之后在确认!',
-                type: 'warning'
+                type: 'warning',
               });
             }
             break;
@@ -407,10 +432,11 @@
           }
           this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         } else {
-          this.$message({
-            message: '请选择需要导出的数据!',
-            type: 'warning'
-          });
+          this.$notify({
+                title:'警告',
+                message: '请选择需要导出的数据!',
+                type: 'warning'
+              });
         }
 
       },
@@ -543,7 +569,7 @@
 <style lang="scss">
   .material-list {
     // height: calc(100% - 100px);
-    height: calc(100% - 70px);
+    // height: calc(100% - 70px);
 
 
     .el-card__body {
@@ -551,17 +577,14 @@
       box-sizing: border-box;
 
       .el-table {
-        height: calc(100% - 35px);
+        // height: calc(100% - 35px);
         overflow: auto;
 
         .el-table__body-wrapper {
           // height: calc(100% - 150px);
-          height: calc(100% - 70px);
+          // height: calc(100% - 70px);
           overflow-y: auto !important;
           overflow-x: auto !important;
-          // .el-table__body {
-          //   height: 100%;
-          // }
         }
       }
     }

+ 1 - 1
src/views/material/basicFile/style/index.scss

@@ -1,6 +1,6 @@
 // 物料信息基础档案
 .material-basic {
-  height: calc(100vh - 84px);
+  // height: calc(100vh - 84px);
   padding: 12px;
   box-sizing: border-box;
 

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

@@ -150,6 +150,7 @@ export default {
       :columns="TableColumns"
       index
       checkbox
+      pagination
       hiddenColumns
       filterColumns
       height="600"

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

@@ -139,6 +139,7 @@ export default {
       :columns="TableColumns"
       index
       checkbox
+      pagination
       hiddenColumns
       filterColumns
       height="600"

+ 23 - 10
src/views/purchase/contract/add/columns.js

@@ -92,7 +92,7 @@ export default function useColumns() {
       item: { key: "grossRateAverage", title: "平均毛利率 (%)", require: true },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -121,7 +121,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -183,7 +183,7 @@ export default function useColumns() {
     },
     {
       item: { key: "guaranteePeriodEnd", title: "质保期限", require: true },
-      attr: { is: "el-input-number", precision: CONFIG.precision },
+      attr: { is: "el-input-number", precision: 2 },
     },
     {
       item: { key: "freightMethods", title: "运费承担方式" },
@@ -333,6 +333,7 @@ export default function useColumns() {
           item: {
             title: "物料名称",
             key: "materialName",
+            require: true 
           },
           attr: {
             is: "el-popover-select-v2",
@@ -383,7 +384,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "税率%", key: "tax" },
+          item: { title: "税率%", key: "tax" ,require: true },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "ntaxrate",
@@ -400,7 +401,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "含税单价", key: "taxPrice" },
+          item: { title: "含税单价", key: "taxPrice", require: true  },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
@@ -417,7 +418,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "无税单价", key: "taxFreePrice" },
+          item: { title: "无税单价", key: "taxFreePrice",require: true  },
           attr: {
             formatter: (prop) => {
               const { tax = 0, taxPrice = 0 } = prop;
@@ -524,6 +525,7 @@ export default function useColumns() {
           item: {
             title: "付款起点",
             key: "origin",
+            require: true 
           },
           attr: {
             is: "el-select",
@@ -531,14 +533,14 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "账期天数", key: "paymetDays" },
+          item: { title: "账期天数", key: "paymetDays" , require: true },
           attr: {
             is: "el-input-number",
-            precision: CONFIG.precision,
+            precision: 2,
           },
         },
         {
-          item: { title: "付款比例%", key: "ratio" },
+          item: { title: "付款比例%", key: "ratio" , require: true },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
@@ -575,6 +577,7 @@ export default function useColumns() {
           item: {
             title: "结算方式",
             key: "paymentMeans",
+            require: true 
           },
           attr: {
             is: "el-popover-select-v2",
@@ -620,6 +623,16 @@ export default function useColumns() {
         { item: { title: "组织编码", key: "org", width: "auto" }, attr: {} },
       ],
     },
-  ];
+  ].map(({item,attr,TableColumns}) =>({
+    attr,
+    item,
+    TableColumns:TableColumns.map(({item, attr}) =>({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+  
+    }))
+
+  }))
+  ;
   return { TableColumns, TabColumns };
 }

+ 27 - 9
src/views/purchase/contract/add/index.vue

@@ -126,10 +126,28 @@ export default {
       this.params.buyerName = buyerName;
       this.params.puDept = puDept;
       this.params.puDeptName = puDeptName;
-      this.params["currency"] = '1002Z0100000000001K1';
-      this.params["currencyName"] = '人民币';
+      const  {id,code, name } =  await this.getCurrency("人民币");
+      this.params.currency = id;
+      this.params.currencyCode = code;
+      this .params.currencyName = name;
       this.visible = await this.fetchCode();
     },
+    async getCurrency(search){
+
+      let page = {pageNum: 1, pageSize:10,}
+
+      const { code, rows } = await REFER(
+          {
+            isPage:true,
+            search,
+            type: 'CURRENCY_PARAM',
+          },
+          page
+      );
+      if(code == 200){
+        return rows[0];
+      }
+    },
     //
     async hide() {
       const {
@@ -184,7 +202,8 @@ export default {
       });
     },
   },
-  created() {},
+  created() {
+  },
   mounted() {},
   destroyed() {},
 };
@@ -246,6 +265,7 @@ export default {
             :dict="dict"
             :ref="tabName"
             :columns="columns"
+            :iconOperation="false"
             :size="$attrs.size"
           >
             <template slot="materialName" slot-scope="scope">
@@ -261,20 +281,18 @@ export default {
             <el-table-column fixed="right" label="操作" width="75">
               <template slot="header" slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-plus"
+                  type="text"
                   :size="$attrs.size"
                   @click="useRowAdd(tabName)"
-                >
+                >增行
                 </el-button>
               </template>
               <template slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-minus"
+                  type="text"
                   :size="$attrs.size"
                   @click.native.prevent="useRowRemove(tabName, scope)"
-                >
+                >删行
                 </el-button>
               </template>
             </el-table-column>

+ 15 - 5
src/views/purchase/contract/edit/columns.js

@@ -92,7 +92,7 @@ export default function useColumns() {
       item: { key: "grossRateAverage", title: "平均毛利率 (%)", require: true },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -121,7 +121,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -183,7 +183,7 @@ export default function useColumns() {
     },
     {
       item: { key: "guaranteePeriodEnd", title: "质保期限", require: true },
-      attr: { is: "el-input-number", precision: CONFIG.precision },
+      attr: { is: "el-input-number", precision: 2 },
     },
     {
       item: { key: "freightMethods", title: "运费承担方式" },
@@ -534,7 +534,7 @@ export default function useColumns() {
           item: { title: "账期天数", key: "paymetDays" },
           attr: {
             is: "el-input-number",
-            precision: CONFIG.precision,
+            precision: 2,
           },
         },
         {
@@ -620,6 +620,16 @@ export default function useColumns() {
         { item: { title: "组织编码", key: "org", width: "auto" }, attr: {} },
       ],
     },
-  ];
+  ].map(({item,attr,TableColumns}) =>({
+    attr,
+    item,
+    TableColumns:TableColumns.map(({item, attr}) =>({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+  
+    }))
+
+  }))
+  ;
   return { TableColumns, TabColumns };
 }

+ 32 - 21
src/views/purchase/contract/edit/index.vue

@@ -234,9 +234,32 @@ export default {
       :title="title"
       :visible.sync="visible"
       append-to-body
+      :show-close="false"
       destroy-on-close
       @close="hide"
     >
+
+    <div slot="title" 
+          style="
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+          ">
+        <h3>{{title}}</h3>
+        <div style="text-align: right">
+          <el-button
+          type="primary"
+          :size="$attrs.size"
+          :loading="loading"
+          @click="useSubmit('superForm')"
+          >确 认</el-button
+        >
+          <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        </div>
+        
+      </div>
       <el-super-form
         v-model="params"
         :dict="dict"
@@ -249,6 +272,7 @@ export default {
         style="padding: 20px"
       ></el-super-form>
       <el-tabs v-model="tabName" style="margin: 0 20px">
+        
         <el-tab-pane
           v-for="{ item, TableColumns: columns } in TabColumns"
           :key="item.key"
@@ -262,6 +286,7 @@ export default {
             :ref="tabName"
             :columns="columns"
             :size="$attrs.size"
+            :iconOperation="false"
           >
             <template slot="materialName" slot-scope="scope">
               <component
@@ -276,45 +301,31 @@ export default {
             <el-table-column fixed="right" label="操作" width="100">
               <template slot="header" slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-plus"
+                  type="text"
                   :size="$attrs.size"
                   @click="useRowAdd(tabName)"
-                >
+                >增行
                 </el-button>
               </template>
               <template slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-check"
+                  type="text"
                   :size="$attrs.size"
                   @click.native.prevent="useRowSubmit(tabName, scope)"
-                >
+                >更新
                 </el-button>
                 <el-button
-                  circle
-                  icon="el-icon-minus"
+                  type="text"
                   :size="$attrs.size"
                   @click.native.prevent="useRowRemove(tabName, scope)"
-                >
+                >删行
                 </el-button>
               </template>
             </el-table-column>
           </el-super-table>
         </el-tab-pane>
       </el-tabs>
-      <div style="padding: 20px; text-align: right">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          :size="$attrs.size"
-          :loading="loading"
-          @click="useSubmit('superForm')"
-          >确 认</el-button
-        >
-      </div>
+      
     </el-drawer>
   </el-button>
 </template>

+ 3 - 1
src/views/purchase/contract/index.vue

@@ -101,7 +101,7 @@ export default {
       @reset="useReset"
       @submit="useQuery(params, page)"
     ></el-super-search>
-    <div style="margin: 0 0 20px 0; text-align: right">
+    <div style="margin: 20px 0 ; text-align: right">
       <el-button-group>
         <add-button
           :size="size"
@@ -168,9 +168,11 @@ export default {
       v-model="tableData"
       :size="size"
       :dict="dict"
+      max-height="600"
       :columns="TableColumns"
       :selectable="setSelectable"
       checkbox
+      pagination
       @row-dblclick="useSee"
       @selection-change="useSelect"
       :page="page"

+ 15 - 5
src/views/purchase/contract/see/columns.js

@@ -92,7 +92,7 @@ export default function useColumns() {
       item: { key: "grossRateAverage", title: "平均毛利率 (%)", require: true },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -121,7 +121,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -183,7 +183,7 @@ export default function useColumns() {
     },
     {
       item: { key: "guaranteePeriodEnd", title: "质保期限", require: true },
-      attr: { is: "el-input-number", precision: CONFIG.precision },
+      attr: { is: "el-input-number", precision: 2 },
     },
     {
       item: { key: "freightMethods", title: "运费承担方式" },
@@ -534,7 +534,7 @@ export default function useColumns() {
           item: { title: "账期天数", key: "paymetDays" },
           attr: {
             is: "el-input-number",
-            precision: CONFIG.precision,
+            precision: 2,
           },
         },
         {
@@ -620,6 +620,16 @@ export default function useColumns() {
         { item: { title: "组织编码", key: "org", width: "auto" }, attr: {} },
       ],
     },
-  ];
+  ].map(({item,attr,TableColumns}) =>({
+    attr,
+    item,
+    TableColumns:TableColumns.map(({item, attr}) =>({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+  
+    }))
+
+  }))
+  ;
   return { TableColumns, TabColumns };
 }

+ 2 - 1
src/views/purchase/contract/see/index.vue

@@ -30,7 +30,7 @@ export default {
     } = useColumns();
     return {
       column: 2,
-      width: "50%",
+      width: "100%",
       title: "明 细",
       visible: false,
       loading: false,
@@ -129,6 +129,7 @@ export default {
             :size="$attrs.size"
             :dict="dict"
             :columns="columns"
+            :iconOperation="false"
           >
           </el-super-table>
         </el-tab-pane>

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

@@ -551,7 +551,7 @@ export default {
     ></el-super-search>
   
     <!-- 操作 -->
-    <el-row :gutter="24" type="flex" justify="end" style="margin-bottom: 16px;">
+    <el-row :gutter="24" type="flex" justify="end" style="margin: 20px 0;">
       <el-col :span="24" style="text-align: right;">
         <el-button size="mini" type="primary" @click="handleOpenAddDrawer"
           v-hasPermi="['material:order:add']">新增</el-button>
@@ -587,6 +587,7 @@ export default {
       :columns="tableColumns"
       :selectable="setSelectable"
       checkbox
+      pagination
       :page="page"
       :iconOperation="false"
       @pagination="fetchList(params, page)"
@@ -668,7 +669,6 @@ export default {
             :columns="column.tableColumns"
             :selectable="setTabSelectable"
             :checkbox="setTabSelectable()"
-            :page="{pageNum: 1, pageSize: 10, total: 0}"
             :iconOperation="false"
             @select="handleTabSelect"
           >

+ 4 - 0
src/views/purchase/transferOrder/add.vue

@@ -1760,6 +1760,8 @@ export default {
       this.basicForm.updateBy = "";
       this.basicForm.updateByName = "";
       this.basicForm.updateTime = "";
+      this.isDRCk = false
+      this.isDCCk = false
     },
     handleData() {
       console.log("222");
@@ -2017,6 +2019,7 @@ export default {
         classify: null,
         customerLogistic: null,
         customerLogisticName: null,
+        delFlag: 0
       };
       this.materialInfo.push(newLine);
     },
@@ -2026,6 +2029,7 @@ export default {
         ...item,
         delFlag: index === $index ? "2" : item.delFlag,
       }));
+      console.log('看看列表',this.materialInfo)
     },
     //
     rowClassName(prop) {

+ 25 - 0
src/views/purchase/transferOrder/index.vue

@@ -76,6 +76,7 @@
           class="exporttable"
           border
           show-summary
+          :summary-method="getSummaries"
           highlight-current-row
           max-height="680"
           style="font-size: 12px;"
@@ -374,6 +375,30 @@ export default {
     this.getList(this.queryParams)
   },
   methods: {
+    // 指定列合计
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计';
+          return;
+        }
+        const values = data.map(item => Number(item[column.property]));
+        if (column.property === 'qty') {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index];
+        }
+      });
+      return sums
+    },
     formatterBillType(row) {
       switch (row.billType) {
         case '5X-01':