Преглед изворни кода

对应更新新班表格行列隐藏,包含隐藏、顺序调整,固定

002390 пре 1 година
родитељ
комит
d42b73e6a6

+ 4 - 4
src/components/popover-select/components/CUSTOMERDEPT_PARAM.js

@@ -1,9 +1,9 @@
 // 客户部门
 export default [
-  {
-    key: "id",
-    title: "客户ID",
-  },
+  // {
+  //   key: "id",
+  //   title: "客户ID",
+  // },
   {
     key: "code",
     title: "客户编码",

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

@@ -94,8 +94,10 @@
           </el-row>
         </el-drawer>
       </template>
-      <slot name="operation" :scope="scope"></slot>
-      <template slot-scope="scope"> </template>
+      <template slot-scope="scope"> 
+        <slot name="operation" :scope="scope"></slot>
+
+      </template>
     </el-table-column>
   </el-table>
 </template>

+ 14 - 4
src/views/purchase/purchase-order/column.js

@@ -4,7 +4,8 @@
 // } from "@/utils/init/index.js";
 
 export const TableColumns = [
-  { item:{ 
+  { 
+    item:{ 
       key: "puOrgName", title: "采购组织", inputType: "Input",},
     attr:{
       isHidden:true,
@@ -409,7 +410,10 @@ export const TableColumns = [
   },
 },
   // { item:{key: "midOrderNo", title: "中台采购订单号" },
-];
+].map(({ item, attr }) => ({
+  attr,
+  item: { ...item, hidden: true, fixed: false },
+}));
 
 export const TabColumns = [
   {
@@ -836,7 +840,10 @@ export const TabColumns = [
       // { item:{key: "createByName", title: "创建人",width:100, },
       // { item:{key: "updateByName", title: "更新人" ,width:100,},
       
-    ]
+    ].map(({ item, attr }) => ({
+      attr,
+      item: { ...item, hidden: true, fixed: false },
+    }))
   },
   {
     title: '执行结果',
@@ -899,7 +906,10 @@ export const TabColumns = [
   },
       // { item:{key: "createByName", title: "创建人", },
       // { item:{key: "updateByName", title: "更新人", },
-    ]
+    ].map(({ item, attr }) => ({
+      attr,
+      item: { ...item, hidden: true, fixed: false },
+    }))
   },
 ];
 

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

@@ -648,14 +648,12 @@ export default {
           >采购退货</el-button> -->
           <el-button type="primary" size="mini" @click="handlePaymentRequest">付款申请</el-button>
 
-          <!-- <el-button size="mini">附件管理</el-button>
-          <el-button size="mini">单据追溯</el-button> -->
         </el-button-group>
 
-        <el-hide-table-column-button
+        <!-- <el-hide-table-column-button
           v-model="tableColumns"
           size="mini"
-        ></el-hide-table-column-button>
+        ></el-hide-table-column-button> -->
 
       </el-col>
     </el-row>
@@ -674,6 +672,7 @@ export default {
       <el-table-column type="index" width="50" label="序号"></el-table-column>
       <el-table-column fixed="right" label="操作" width="120">
           <template slot-scope="scope">
+          <!-- <template #operation="{scope}"> -->
             <el-button 
               v-if="scope.row.status == '2'"
               type="text" 
@@ -710,82 +709,6 @@ export default {
     
     </el-super-table>
 
-    <!-- <el-table 
-      @row-dblclick="handleOpenSeeDrawer" 
-      @row-click="handleDetailsData" 
-      :data="tableData" 
-      border
-      stripe
-      size="mini"
-      highlight-current-row
-      @select="handleSelect"
-      height="450"
-      style="width: 100%; margin: 20px 0 0 0"
-    >
-      <el-table-column type="selection" width="45" ></el-table-column>
-      <el-table-column type="index" width="50" label="序号"></el-table-column>
-      <el-table-column 
-        v-for="({item}, index) in tableShowColumns" 
-        :key="index" 
-        :prop="item.key" 
-        :label="item.title"
-        :width="item.width || 180" 
-        :show-overflow-tooltip="item.showOverflowTooltip || true"
-      >
-
-        <template slot-scope="scope">
-          <dict-tag v-if="item.inputType === 'Select'" 
-            size="small" 
-            :value="scope.row[item.key]"
-            :options="dict.type[item.referName]"
-           />
-
-          <el-checkbox v-else-if="item.inputType === 'Checkbox'"
-            v-model="scope.row[item.key]" 
-            disabled 
-            true-label="Y"
-            false-label="N"
-          > </el-checkbox>
-          <span v-else>{{item.precision ? keepTwoDecimalStr(scope.row[item.key]):scope.row[item.key] }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column fixed="right" label="操作" width="120">
-        <template slot-scope="scope">
-          <el-button 
-            v-if="scope.row.status == '2'"
-            type="text" 
-            size="small" 
-            @click.stop="handleOpenEditDrawer(scope.row)"
-            v-hasPermi="['material:order:edit']">
-           修订
-          </el-button>
-          <el-button 
-            v-if="scope.row.status == '0' || scope.row.status == '3'"
-            type="text" 
-            size="small" 
-            @click.stop="handleOpenEditDrawer(scope.row)"
-            v-hasPermi="['material:order:edit']">
-           编辑
-          </el-button>
-          <el-button 
-            v-if="(scope.row.status == '0' || scope.row.status == '3') && scope.row.source == '3'" 
-            type="text" 
-            size="small" 
-            @click.stop="handleDeleteList(scope.row)"
-            v-hasPermi="['material:order:remove']"
-          >删除</el-button>
-          <el-button 
-            v-if="scope.row.status == '0' || scope.row.status == '3'" 
-            type="text" 
-            size="mini"
-            v-hasPermi="['material:order:toOa']" 
-            @click.stop="handleSubmit(scope.row)"
-          >提交</el-button>
-        </template>
-      </el-table-column>
-
-    </el-table> -->
-
     <pagination
       v-show="page.total>0"
       :total="page.total"
@@ -824,43 +747,7 @@ export default {
             ></el-table-column>
             <el-table-column type="index" width="50" label="序号"></el-table-column>
           </el-super-table>
-          <!-- <el-table 
-            :data="tabTableDatas[column.key]" 
-            style="width: 100%" 
-            highlight-current-row
-            :height="tabTableDatas[column.key].length ? 300 : 100"
-            @select="handleTabSelect"
-          >
-            <el-table-column
-              v-if=" tabName === 'puOrderItemList'" 
-              type="selection" 
-              width="45"
-            ></el-table-column>
-            <el-table-column type="index" width="50" label="序号"></el-table-column>
-            <el-table-column 
-              v-for="(cColumn, cIndex)  in column.tableColumns" 
-              :key="cIndex" 
-              :prop="cColumn.key"
-              :label="cColumn.title" 
-              :width="cColumn.width || 180"
-              :show-overflow-tooltip="cColumn.showOverflowTooltip || true"
-            >
-              <template slot-scope="scope">
-                <dict-tag v-if="cColumn.referName" 
-                  size="small" 
-                  :value="scope.row[cColumn.key]"
-                  :options="dict.type[cColumn.referName]"
-                 />
-                <el-checkbox v-else-if="cColumn.inputType === 'Checkbox'" 
-                  v-model="scope.row[cColumn.key]"
-                  disabled
-                  true-label="Y" 
-                  false-label="N"
-                ></el-checkbox>
-                <span v-else>{{cColumn.precision ? keepTwoDecimalStr(scope.row[cColumn.key]): scope.row[cColumn.key] }}</span>
-              </template>
-            </el-table-column>
-          </el-table> -->
+         
         </el-tab-pane>
         
       </el-tabs>