002390 1 年之前
父节点
当前提交
c10cac0843

+ 36 - 0
src/views/material/basicFile/columns.js

@@ -24,6 +24,17 @@ export const SearchColumns = [
       referName: "MATERIAL_PARAM",
     },
   },
+  // {
+  //   item: {
+  //     key: "classIds",
+  //     title: "物料分类",
+  //   },
+  //   attr: {
+  //     is: "el-popover-tree-select",
+  //     referName: "MATERIALCLASSIFY_PARAM",
+  //     valueKey: "id",
+  //   },
+  // },
   {
     item:{
       key: "isEnable",
@@ -37,6 +48,31 @@ export const SearchColumns = [
   },
   {
     item:{
+      key: "puPersonnelIdName",
+      title: "采购员",
+    },
+    attr: {
+      clearable:true,
+      is: "el-popover-select-v2",
+      referName: "CONTACTS_PARAM",
+      valueKey: "name",
+      dataMapping: {
+        puPersonnelId: "code",
+      },
+    },
+  },
+  {
+    item:{
+      key: "registrant",
+      title: "注册人/上市许可持有人",
+    },
+    attr: {
+      clearable:true,
+      is: "el-input",
+    },
+  },
+  {
+    item:{
       key: "isSync",
       title: "是否同步NC",  
     },

+ 7 - 2
src/views/material/basicFile/details.vue

@@ -517,8 +517,8 @@
     <el-dialog title="操作提示" :visible.sync="optionDialog.show" width="30%" center>
       <span>是否确认{{ optionDialog.op }}?</span>
       <span slot="footer">
-        <el-button @click="handleOptionCancal">取 消</el-button>
         <el-button type="primary" @click="handleComfirmOption('cancal')">确 定</el-button>
+        <el-button @click="handleOptionCancal">取 消</el-button>
       </span>
     </el-dialog>
 
@@ -696,6 +696,7 @@
             v-loading="MoreDataDialog.loading" 
             style="width: 100%"
             @row-click="handleCurentRow" 
+            @row-dblclick="handleDbClick"
             highlight-current-row
           >
             <el-table-column type="index" label="序号" width="55" align="center"/>
@@ -715,8 +716,8 @@
 
         <!-- 按钮 -->
         <el-row class="more-button">
-          <el-button round size="small" @click="handleConcalRefer">取消</el-button>
           <el-button round size="small" type="primary" @click="handleConfirmRefer">确认</el-button>
+          <el-button round size="small" @click="handleConcalRefer">取消</el-button>
         </el-row>
       </div>
     </el-dialog>
@@ -2064,6 +2065,10 @@
         console.log(row, '修改-更多数据表格——选择行');
         this.MoreDataDialog.value = row;
       },
+      handleDbClick(row){
+        this.MoreDataDialog.value = row;
+        this.handleConfirmRefer();
+      },
       // 参照弹窗确认
       handleConfirmRefer() {
 

+ 2 - 2
src/views/material/basicFile/index.vue

@@ -6,7 +6,6 @@
     <!-- 主体列表 -->
     <el-card class="material-list" v-loading="loading">
 
-      
     <div style="margin: 0 0 10px 0;">
       <!-- 查询条件 -->
       <el-super-search
@@ -606,7 +605,7 @@
           vm.queryForm = vm.$store.state.query.queryVlue;
           // 清空选中数据
           vm.checkedList = [];
-          vm.$refs.materialTable.clearSelection();
+          vm.$refs.materialTable &&vm.$refs.materialTable.clearSelection();
         }
         vm.getTagList('material');
         vm.getMaterialList('material');
@@ -634,6 +633,7 @@
     .el-card__body {
       height: 100%;
       box-sizing: border-box;
+      padding: 10px;
 
       .el-table {
         overflow: auto;

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

@@ -9,7 +9,7 @@
   }
 
   .el-card{
-    overflow: auto;
+    // overflow: auto;
     box-sizing: border-box;
   }
 

+ 72 - 0
src/views/material/requisition/columns.js

@@ -0,0 +1,72 @@
+
+
+ export const TableColumns = [
+    { item: { key: "orgName", title: "所属组织" ,width:150,}, attr: {} },
+    { item: { key: "billCode", title: "单据编码" }, attr: {} },
+   
+    { item: { key: "status", title: "单据状态",width:120, }, 
+      attr: {
+        
+        is: "el-dict-tag",
+        dictName: "documents_status", // 字典名
+      } 
+    },
+    {
+      item: { key: "createName", title: "申请人",width:150, },
+      attr: { },
+    },
+    { item: { key: "createTime", title: "申请时间",width:150, }, attr: {} },
+    { 
+      item: { key: "name", title: "物料名称" }, 
+      attr: {} 
+    },
+    // { 
+    //   item: { key: "materialCode", title: "物料编码" }, 
+    //   attr: {
+   
+    //   } 
+    // },
+    { item: { key: "createName", title: "创建人" ,width:150, }, attr: {} },
+    { item: { key: "createTime", title: "创建时间" ,width:150,}, attr: {} },
+    {
+      item: { key: "updateName", title: "最后修改人" ,width:150, },
+      attr: {  },
+    },
+    { item: { key: "updateTime", title: "最后修改时间" ,width:150,}, attr: {} },
+   
+  ].map(({ item, attr }) => ({
+    attr,
+    item: { ...item, hidden: true, fixed: false },
+  }));
+
+ export const SearchColumns = [
+    {
+      item: { key: "billCode", title: "单据编码" },
+      attr: {
+        is: "el-input",
+        clearable:true,
+      },
+    },
+    {
+      item: { key: "name", title: "物料名称" },
+      attr: {
+        is: "el-popover-select-v2",
+        referName: "MATERIAL_PARAM",
+        valueKey: "name",
+        clearable:true,
+      },
+    },
+    {
+      item: { key: "status", title: "单据状态" },
+      attr: {
+        is: "el-select",
+        dictName: "documents_status",
+        clearable: true,
+      },
+    },
+  
+  ].map(({ item, attr }) => ({
+    attr,
+    item: { ...item, hidden: true, span: item.span || 6 },
+  }));
+

+ 411 - 0
src/views/material/requisition/index copy.vue

@@ -0,0 +1,411 @@
+<template>
+  <div class="requisition" v-loading="failLoad">
+    <div class="applyList" v-if="isList">
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
+          <el-input
+            v-model="queryParams.billCode"
+            size="small"
+            placeholder="请输入单据编码查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
+
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
+          <el-input
+            v-model="queryParams.name"
+            size="small"
+            placeholder="请输入物料名称查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
+
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">单据状态</span>
+          <el-select
+            v-model="queryParams.status"
+            size="small"
+            placeholder="请选择单据状态"
+            clearable
+            style="width: 240px">
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-col>
+
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
+        </el-col>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>高级查询</el-button>
+        </el-col> -->
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="reset">重置</el-button>
+        </el-col>
+
+      </el-row>
+
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain
+                     @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" @click="handleImport">批量导入</el-button>
+        </el-col>
+        <!-- 导入弹窗 -->
+        <el-dialog 
+          title="批量导入" 
+          :visible.sync="importData.show" 
+          width="35%" 
+          center
+          :before-close="handlefileDialogColse"
+        >
+          <div class="mb-import">
+            <el-upload 
+              accept=".xls, .xlsx" 
+              ref="upload" 
+              action="#" 
+              :on-remove="handleFileRemove"
+              :file-list="importData.list" 
+              :auto-upload="false" 
+              :on-change="handleChangeFile" 
+              :limit="1"
+              style="text-align: center;"
+            >
+              <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+              <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
+            </el-upload>
+
+          </div>
+          <span slot="footer">
+        <el-button @click="handleImportData('cancal')">取 消</el-button>
+        <el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
+      </span>
+        </el-dialog>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导入</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导出</el-button>
+        </el-col> -->
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量提交</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量删除</el-button>
+        </el-col> -->
+      </el-row>
+
+      <el-card>
+        <el-table
+          :data="tableList"
+          class="request-table"
+          fit
+          max-height="680"
+          @selection-change="handleSelectionChange"
+          @select="handleSelect"
+        >
+          <el-table-column type="selection" width="45"></el-table-column>
+          <el-table-column label="序号" align="center" type="index" width="50"/>
+          <el-table-column label="所属组织" align="center" width="200" prop="orgName"/>
+          <el-table-column label="单据编码" align="center" width="200" prop="billCode"/>
+          <el-table-column label="申请人" align="center" prop="createName"/>
+          <el-table-column label="申请时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug"/>
+          <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
+          <el-table-column label="物料名称" align="center" width="150" prop="name"/>
+          <el-table-column label="创建人" align="center" prop="createName"/>
+          <el-table-column label="创建时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="最后修改人" align="center" width="120" prop="updateName"/>
+          <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime"/>
+          <el-table-column
+            fixed="right"
+            label="操作"
+            align="center"
+            width="180"
+          >
+            <template slot-scope="scope">
+              <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+              <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
+                         size="small">编辑
+              </el-button>
+              <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
+              <el-button type="text" size="small" @click="deleteRow(scope.row)"
+                         v-if="scope.row.status == 0 || scope.row.status == 3">删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size=queryParams.pageSize
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          style="text-align: center;">
+        </el-pagination>
+      </el-card>
+    </div>
+
+    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"
+               v-if="!isList"/>
+  </div>
+</template>
+
+<script>
+  import addReq from './add.vue';
+  import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
+  import {saveAs} from "file-saver";
+  import { blobValidate } from "@/utils/ruoyi";
+
+  export default {
+    name: 'requisition',
+    components: {
+      addReq
+    },
+    data() {
+      return {
+        failLoad: false,
+        tableList: [],
+        queryParams: {
+          billCode: '',
+          name: '',
+          status: '',
+          pageNum: 1,
+          pageSize: 10
+        },
+        options: [{
+          value: 0, label: '未提交'
+        }, {
+          value: 1, label: '审批中'
+        }, {
+          value: 2, label: '已完成'
+        }, {
+          value: 3, label: '已驳回'
+        },],
+        total: 0,
+        // isComponent
+        isComponent: 'addReq',
+        isList: true,
+        // 页面状态
+        page: '',
+        rowDetail: {},
+        disable: false,
+        checkedList: [],
+        importData: {
+          show: false,
+          list: []
+        },
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      this.getList(this.queryParams)
+    },
+    methods: {
+      reset() {
+        this.queryParams.billCode = ''
+        this.queryParams.name = ''
+        this.queryParams.status = ''
+        this.queryParams.pageNum = 1
+        this.getList(this.queryParams)
+      },
+      newAdd() {
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'add'
+        this.disable = false
+      },
+      // 复制
+      handleCopy() {
+        this.isList = false;
+        this.isComponent = 'addReq';
+        this.page = 'copy';
+        this.rowDetail = this.checkedList[0];
+        this.disable = false;
+      },
+      // 导入
+      handleImport() {
+        this.importData.show = true
+      },
+      // 删除文件
+      handleFileRemove(file, fileList) {
+        console.log('删除文件', file, 'file', fileList, 'fileList');
+        this.importData.list = fileList;
+      },
+      // 文件发生改变
+      handleChangeFile(file, fileList) {
+        this.importData.list = fileList;
+      },
+      // 导入弹窗操作
+      handleImportData(type) {
+        switch (type) {
+          // 取消
+          case 'cancal':
+            this.importData.list = [];
+            this.importData.show = false;
+            break;
+          // 确认
+          case 'confirm':
+            if (this.importData.list.length) {
+
+              let formData = new FormData();
+
+              formData.append('file', this.importData.list[0].raw);
+              importData(formData).then(res => {
+                if (res.code == 200) {
+                  this.importData.show = false;
+                  this.importData.list = [];
+                  if (res.data.flag) {
+                    this.failLoad = true;
+                    console.log(res.data.datas)
+                    let param = {failDatas: res.data.datas}
+                    if (null != param) {
+
+                      fileImport(param).then(res => {
+                        console.log('res',res)
+                        const isBlob = blobValidate(res);
+                        if (isBlob) {
+                          const blob = new Blob([res]);
+                          saveAs(blob, '导入失败的物料申请单数据.xlsx');
+                        }
+                        this.failLoad = false;
+                      })
+                    }
+                  }
+                  this.$message({
+                    message: res.data.msg,
+                    type: res.data.flag ? 'warning' : 'success'
+                  });
+                } else {
+                  this.$message({
+                    message: res.msg,
+                    type: res.code == 200 ? 'success' : 'warning'
+                  });
+                }
+              })
+            } else {
+              this.$message({
+                message: '请上传文件之后在确认!',
+                type: 'warning'
+              });
+            }
+            break;
+        }
+      },
+      handlefileDialogColse(done){
+        this.importData.list = [];
+        done();
+      },
+      // Select框
+      handleSelect(selection, row) {
+
+        this.checkedList = selection;
+
+        console.log(this.checkedList, 'this.checkedList');
+
+      },
+      getList(val) {
+        console.log('val', val)
+        getReqList(val).then(res => {
+          if (res.code === 200) {
+            this.tableList = res.rows
+            this.total = res.total
+          }
+        })
+        this.checkedList = [];
+      },
+      // 表格内状态栏判断值
+      statusJug(row) {
+        if (row.status == 0) {
+          return '未提交'
+        } else if (row.status == 1) {
+          return '审批中'
+        } else if (row.status == 2) {
+          return '已完成'
+        } else if (row.status == 3) {
+          return '已驳回'
+        }
+      },
+      //
+      handleSelectionChange() {
+
+      },
+      check(row) {
+        console.log('查看详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'check'
+        this.rowDetail = row
+        this.disable = true
+      },
+      edit(row) {
+        console.log('修改先加载详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'edit'
+        this.rowDetail = row
+        this.disable = false
+      },
+      commit(row) {
+        console.log('row', row)
+      },
+      deleteRow(row) {
+        this.$confirm('是否删除此条数据?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          delReq(row.id).then(res => {
+            if (res.code === 200) {
+              this.$message({
+                message: res.msg,
+                type: 'success'
+              });
+              this.getList(this.queryParams)
+            }
+          })
+        }).catch(() => {
+        })
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`);
+        this.queryParams.pageSize = val
+        this.getList(this.queryParams)
+      },
+      handleCurrentChange(val) {
+        console.log(`当前页: ${val}`);
+        this.queryParams.pageNum = val
+        this.getList(this.queryParams)
+      }
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .requisition {
+    height: calc(100vh - 84px);
+    padding: 12px;
+    box-sizing: border-box;
+  }
+</style>

+ 112 - 120
src/views/material/requisition/index.vue

@@ -1,82 +1,58 @@
 <template>
   <div class="requisition" v-loading="failLoad">
     <div class="applyList" v-if="isList">
-      <el-row :gutter="10" class="mb10">
-        <el-col :span="1.5">
-          <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
-          <el-input
-            v-model="queryParams.billCode"
-            size="small"
-            placeholder="请输入单据编码查询"
-            clearable
-            style="width: 240px"
-          />
-        </el-col>
-
-        <el-col :span="1.5">
-          <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
-          <el-input
-            v-model="queryParams.name"
-            size="small"
-            placeholder="请输入物料名称查询"
-            clearable
-            style="width: 240px"
-          />
-        </el-col>
-
-        <el-col :span="1.5">
-          <span style="font-size: 14px;margin-right: 5px;">单据状态</span>
-          <el-select
-            v-model="queryParams.status"
-            size="small"
-            placeholder="请选择单据状态"
-            clearable
-            style="width: 240px">
-            <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-        </el-col>
 
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
-        </el-col>
-        <!-- <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>高级查询</el-button>
-        </el-col> -->
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain @click="reset">重置</el-button>
-        </el-col>
+     
+      <el-card>
 
-      </el-row>
+        <el-super-search
+        v-model="params"
+        :size="size"
+        :dict="dict"
+        :columns="SearchColumns"
+        @reset="reset"
+        @submit="getList"
+      ></el-super-search>
 
-      <el-row :gutter="10" class="mb10">
+      <el-row :gutter="10" class="mb10" type="flex" justify="end" style="margin-top: 15px;">
         <el-col :span="1.5">
-          <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
+          <el-button type="primary" :size="size" plain @click="newAdd">新增</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
+          <el-button :size="size" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button type="primary" size="small" plain
+          <el-button type="primary" :size="size" plain
                      @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
           </el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button size="small" @click="handleImport">批量导入</el-button>
+          <el-button :size="size" @click="handleImport">批量导入</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <!-- <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button> -->
         </el-col>
         <!-- 导入弹窗 -->
-        <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center
-                   :before-close="handlefileDialogColse">
+        <el-dialog 
+          title="批量导入" 
+          :visible.sync="importData.show" 
+          width="35%" 
+          center
+          :before-close="handlefileDialogColse"
+        >
           <div class="mb-import">
-            <el-upload class="upload-demo" accept=".xls, .xlsx" ref="upload" action="#" :on-remove="handleFileRemove"
-                       :file-list="importData.list" :auto-upload="false" :on-change="handleChangeFile" :limit="1">
+            <el-upload 
+              accept=".xls, .xlsx" 
+              ref="upload" 
+              action="#" 
+              :on-remove="handleFileRemove"
+              :file-list="importData.list" 
+              :auto-upload="false" 
+              :on-change="handleChangeFile" 
+              :limit="1"
+              style="text-align: center;"
+            >
               <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
-              <el-button style="margin-left: 10px;" size="small" type="success" @click="handleDownTemplate">下载模板
-              </el-button>
               <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
             </el-upload>
 
@@ -86,75 +62,55 @@
         <el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
       </span>
         </el-dialog>
-        <!-- <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>导入</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>导出</el-button>
-        </el-col> -->
-        <!-- <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>批量提交</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="primary" size="small" plain>批量删除</el-button>
-        </el-col> -->
       </el-row>
 
-      <el-card>
-        <el-table
-          :data="tableList"
-          class="request-table"
-          fit
-          max-height="680"
+
+        <el-super-table
+          style="height: 600px;"
+          v-model="tableList"
+          :dict="dict"
+          :columns="TableColumns"
+          :size="size"
+          pagination
+          index
+          checkbox
+          convenitentOperation
+          :page="pageStatus"
+          @pagination="getList"
+          @row-dblclick="check"
           @selection-change="handleSelectionChange"
           @select="handleSelect"
         >
-          <el-table-column type="selection" width="45"></el-table-column>
-          <el-table-column label="序号" align="center" type="index" width="50"/>
-          <el-table-column label="所属组织" align="center" width="200" prop="orgName"/>
-          <el-table-column label="单据编码" align="center" width="200" prop="billCode"/>
-          <el-table-column label="申请人" align="center" prop="createName"/>
-          <el-table-column label="申请时间" align="center" width="150" prop="createTime"/>
-          <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug"/>
-          <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
-          <el-table-column label="物料名称" align="center" width="150" prop="name"/>
-          <el-table-column label="创建人" align="center" prop="createName"/>
-          <el-table-column label="创建时间" align="center" width="150" prop="createTime"/>
-          <el-table-column label="最后修改人" align="center" width="120" prop="updateName"/>
-          <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime"/>
-          <el-table-column
+      <el-table-column
             fixed="right"
             label="操作"
             align="center"
-            width="180"
+            width="120"
           >
             <template slot-scope="scope">
-              <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+              <el-button type="text" :size="size" @click="check(scope.row)">查看</el-button>
               <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
-                         size="small">编辑
+                         :size="size">编辑
               </el-button>
-              <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
-              <el-button type="text" size="small" @click="deleteRow(scope.row)"
+              <el-button type="text" :size="size" @click="deleteRow(scope.row)"
                          v-if="scope.row.status == 0 || scope.row.status == 3">删除
               </el-button>
             </template>
           </el-table-column>
-        </el-table>
+      </el-super-table>
 
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :page-sizes="[5, 10, 15, 20]"
-          :page-size=queryParams.pageSize
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          style="text-align: center;">
-        </el-pagination>
       </el-card>
     </div>
 
-    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"
-               v-if="!isList"/>
+    <component 
+      :is="isComponent" 
+      v-model="isList" 
+      :pageStu="page" 
+      :disable="disable" 
+      :row="rowDetail" 
+      @refresh="getList"
+      v-if="!isList
+    "/>
   </div>
 </template>
 
@@ -163,16 +119,28 @@
   import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
   import {saveAs} from "file-saver";
   import { blobValidate } from "@/utils/ruoyi";
+  import { SearchColumns, TableColumns } from './columns';
+  import { initDicts } from "@/utils/init.js";
+
 
   export default {
     name: 'requisition',
+    dicts:[...initDicts([...SearchColumns,...TableColumns])],
     components: {
-      addReq
+      addReq,
+      ElSuperTable: () => import("@/components/super-table/index.vue"),
+      ElSuperSearch: () => import("@/components/super-search/index.vue"),
     },
     data() {
+      const params = this.$init.params(SearchColumns);
       return {
         failLoad: false,
         tableList: [],
+        size:'mini',
+        params:params,
+        SearchColumns:SearchColumns,
+        TableColumns:TableColumns,
+        pageStatus: { pageNum: 1, pageSize: 10, total: 0 },
         queryParams: {
           billCode: '',
           name: '',
@@ -211,11 +179,29 @@
       this.getList(this.queryParams)
     },
     methods: {
+      // 批量提交
+      handleBatchSubmit(){
+        let filterList = this.checkedList.filter(item => (item.status ==='0' ||item.status ==='3') )
+        
+        console.log(filterList,'filterList');
+        if(filterList.length){  
+
+
+        }else{
+          this.$notify.warning({
+            title: '警告',
+            message: '存在不符合提交条件数据或未选择数据!',
+          });
+        }
+      },
       reset() {
-        this.queryParams.billCode = ''
-        this.queryParams.name = ''
-        this.queryParams.status = ''
-        this.queryParams.pageNum = 1
+        // this.queryParams.billCode = ''
+        // this.queryParams.name = ''
+        // this.queryParams.status = ''
+        // this.queryParams.pageNum = 1
+        this.pageStatus.pageNum = 1;
+        this.pageStatus.pageSize = 10;
+        this.params = this.$init.params(SearchColumns);
         this.getList(this.queryParams)
       },
       newAdd() {
@@ -301,6 +287,10 @@
             break;
         }
       },
+      handlefileDialogColse(done){
+        this.importData.list = [];
+        done();
+      },
       // Select框
       handleSelect(selection, row) {
 
@@ -311,10 +301,12 @@
       },
       getList(val) {
         console.log('val', val)
-        getReqList(val).then(res => {
+        
+        getReqList({...this.params,...this.pageStatus}).then(res => {
           if (res.code === 200) {
-            this.tableList = res.rows
-            this.total = res.total
+            this.tableList = res.rows;
+            // this.total = res.total;
+            this.pageStatus.total = res.total;
           }
         })
         this.checkedList = [];
@@ -332,8 +324,8 @@
         }
       },
       //
-      handleSelectionChange() {
-
+      handleSelectionChange(selection) {
+        this.checkedList = selection;
       },
       check(row) {
         console.log('查看详情', row)
@@ -388,7 +380,7 @@
 
 <style scoped lang="scss">
   .requisition {
-    height: calc(100vh - 84px);
+    // height: calc(100vh - 84px);
     padding: 12px;
     box-sizing: border-box;
   }

+ 15 - 15
src/views/purchase/purchase-order/add/column.js

@@ -156,7 +156,7 @@ export const Columns = [
     title: "价税合计", 
     inputType: "InputNumber",
     controlsPosition: "right", 
-    precision:2,
+    // precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -165,7 +165,7 @@ export const Columns = [
     title: "原始总金额", 
     inputType: "InputNumber",
     controlsPosition: "right", 
-    precision:2,
+    // precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -174,7 +174,7 @@ export const Columns = [
     title: "无税金额", 
     inputType: "InputNumber",  
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true, 
     disabled:true,
   },
@@ -236,7 +236,7 @@ export const Columns = [
     title: "订单使用返利金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true, 
     require: true,
   },
@@ -245,7 +245,7 @@ export const Columns = [
     title: "订单抵扣余款金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true, 
     require: true,
   },
@@ -371,7 +371,7 @@ export const Columns = [
     title: "累计付款申请金额", 
     inputType: "InputNumber", 
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true,
     disabled:true,
   },
@@ -380,7 +380,7 @@ export const Columns = [
     title: "累计付款金额", 
     inputType: "InputNumber", 
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true,
   },
   { 
@@ -388,7 +388,7 @@ export const Columns = [
     title: "发票金额", 
     inputType: "InputNumber",
     controlsPosition: "right",
-    precision:2,
+    // precision:2,
     isShow:true,
    },
   {
@@ -669,7 +669,7 @@ export const TabColumns = [
         title: "含税单价", 
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         require: true,
         disabled:true,
         width: 180,
@@ -679,7 +679,7 @@ export const TabColumns = [
         title: "价税合计", 
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
        },
@@ -689,7 +689,7 @@ export const TabColumns = [
         // inputType: "Input",
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },
@@ -698,7 +698,7 @@ export const TabColumns = [
         title: "折扣金额", 
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
        },
@@ -723,7 +723,7 @@ export const TabColumns = [
         title: "无税单价",
         inputType: "InputNumber",
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },
@@ -732,7 +732,7 @@ export const TabColumns = [
         title: "无税金额", 
         inputType: "InputNumber", 
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },
@@ -835,7 +835,7 @@ export const TabColumns = [
         title: "原始金额", 
         inputType: "InputNumber", 
         controlsPosition: "right",
-        precision:2,
+        // precision:2,
         disabled:true,
         width: 180,
       },

+ 10 - 3
src/views/purchase/purchase-order/index.vue

@@ -308,6 +308,8 @@ export default {
 
         this.handleConfirmTips(async()=>{
 
+          this.loading = true;
+
           let { code } = await orderApi.submit({ puOrderIds});
 
           if (code == 200) {
@@ -318,6 +320,9 @@ export default {
 
         })
       } catch (error) {} 
+      finally{
+        this.loading = false;
+      }
     },
 
     // 判断“整单退回”按钮
@@ -662,7 +667,10 @@ export default {
           :disabled="judgeIsLineReturn()"
         >行退回</el-button>
       </el-row>
-      <el-tabs v-model="tabName" @tab-click="handleTabClick" style="width: 100%;padding: 20px 10px;height: 1000px;">
+      <el-tabs 
+        v-model="tabName" 
+        @tab-click="handleTabClick" 
+        style="width: 100%;padding: 20px 10px;">
         <el-tab-pane 
           v-for="(column, index) in tabColumns" 
           :key="index" 
@@ -670,10 +678,9 @@ export default {
           :name="column.key"
         >
           <el-super-table
-            style="padding: 20px 10px;height: 800px;"
+            style="height: 300px;"
             v-model="tabTableDatas[column.key]"
             :ref="column.key"
-            max-height="500"
             :dict="dict"
             :columns="column.tableColumns"
             :selectable="setTabSelectable"