Bladeren bron

【新增】
1.采购管理
2.调拨单

莫绍宝 3 jaren geleden
bovenliggende
commit
a2c40b401a

+ 10 - 0
src/api/supply/allot.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/admin/user/mch/list',
+    method: 'get',
+    params
+  })
+}

+ 5 - 0
src/views/supply/allot.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    <router-view />
+  </div>
+</template>

+ 188 - 0
src/views/supply/allot/components/location_detail.vue

@@ -0,0 +1,188 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div id="printData">
+      <div class="main-title">
+        <div class="title">调拨单</div>
+      </div>
+
+      <div class="diy-form-1">
+        <el-row :gutter="20">
+          <el-col :span="8" class="item">
+            <div class="label">单据编号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">日期:</div>
+            <div class="value">2022-12-22</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">调拨申请单号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">仓库:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">转出仓位:</div>
+            <div class="value">2022-12-22</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">转入仓位:</div>
+            <div class="value">2022-12-22</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经手人:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="16" class="item">
+            <div class="label">备注:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">外仓印刷单号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">现存量:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核人:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核日期:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单人:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="diy-table-2">
+        <div class="head">
+          <el-row :gutter="20">
+            <el-col :span="2">序号</el-col>
+            <el-col :span="4">产品编号</el-col>
+            <el-col :span="8">产品名称</el-col>
+            <el-col :span="2">规格型号</el-col>
+            <el-col :span="2">内机编码</el-col>
+            <el-col :span="2">外机编码</el-col>
+            <el-col :span="2">单位</el-col>
+            <el-col :span="2">数量</el-col>
+          </el-row>
+        </div>
+        <div class="body">
+          <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
+            <el-col :span="2">{{ index + 1 }}</el-col>
+            <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
+            <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
+            <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
+            <el-col :span="2">{{ item.price || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+          </el-row>
+        </div>
+        <div class="foot">
+          <el-row :gutter="20">
+            <el-col :span="24">合计</el-col>
+          </el-row>
+        </div>
+      </div>
+      
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getList } from "@/api/supply/allot";
+
+export default {
+  name: 'LocationDetail',
+  componentName: 'LocationDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printData',
+        clickMounted: function() {
+          console.log('clickMounted');
+        },
+        openCallback: function() {
+          console.log('openCallback');
+        },
+        closeCallback: function() {
+          console.log('closeCallback');
+        },
+      },
+      goodsList: [{
+        goodsId: 1,
+      }]
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 30px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 175 - 0
src/views/supply/allot/components/warehouse_detail.vue

@@ -0,0 +1,175 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div id="printData">
+      <div class="main-title">
+        <div class="title">调拨单</div>
+      </div>
+
+      <div class="diy-form-1">
+        <el-row :gutter="20">
+          <el-col :span="8" class="item">
+            <div class="label">单据编号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">日期:</div>
+            <div class="value">2022-12-22</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">调拨申请单号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">转出仓库:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">转入仓库:</div>
+            <div class="value">2022-12-22</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核日期:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经手人:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="16" class="item">
+            <div class="label">备注:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">外仓印刷单号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">现存量:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核人:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单人:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="diy-table-2">
+        <div class="head">
+          <el-row :gutter="20">
+            <el-col :span="2">序号</el-col>
+            <el-col :span="4">产品编号</el-col>
+            <el-col :span="8">产品名称</el-col>
+            <el-col :span="2">规格型号</el-col>
+            <el-col :span="2">内机编码</el-col>
+            <el-col :span="2">外机编码</el-col>
+            <el-col :span="2">单位</el-col>
+            <el-col :span="2">数量</el-col>
+          </el-row>
+        </div>
+        <div class="body">
+          <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
+            <el-col :span="2">{{ index + 1 }}</el-col>
+            <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
+            <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
+            <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
+            <el-col :span="2">{{ item.price || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+          </el-row>
+        </div>
+        <div class="foot">
+          <el-row :gutter="20">
+            <el-col :span="24">合计</el-col>
+          </el-row>
+        </div>
+      </div>
+      
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getList } from "@/api/supply/allot";
+
+export default {
+  name: 'WarehouseDetail',
+  componentName: 'WarehouseDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printData'
+      },
+      goodsList: [{
+        goodsId: 1,
+      }]
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 30px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 220 - 0
src/views/supply/allot/location_list.vue

@@ -0,0 +1,220 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据编号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入单据编号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="物料名称" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入物料名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="申请日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fr">
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+            <el-table-column align="center" label="单据编号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单据类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="调拨类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请组织" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单据状态" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="关闭状态" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="物料编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="物料名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="辅助属性" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请数量" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="调出仓位" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="调入仓位" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="120" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toDetail('detail', scope.row)">详情</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    
+    <LocationDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getList } from "@/api/supply/allot";
+import LocationDetail from "@/views/supply/allot/components/location_detail";
+
+export default {
+  components: {
+    LocationDetail,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+
+      jumpType: '',
+      queryItem: {},
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    },
+    isShowDetail() {
+      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'detail';
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入详情
+    toDetail(type, item) {
+      this.jumpType = type;
+      this.queryItem = item;
+    },
+
+    backList() {
+      this.jumpType = '';
+      this.queryItem = {};
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 219 - 0
src/views/supply/allot/warehouse_list.vue

@@ -0,0 +1,219 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据编号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入单据编号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="物料名称" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入物料名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="申请日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fr">
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+            <el-table-column align="center" label="单据编号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单据类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="调拨类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请组织" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单据状态" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="关闭状态" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="物料编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="物料名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="辅助属性" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请数量" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="调出仓库" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="调入仓库" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="120" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toDetail('detail', scope.row)">详情</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    
+    <WarehouseDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getList } from "@/api/supply/allot";
+import WarehouseDetail from "@/views/supply/allot/components/warehouse_detail";
+
+export default {
+  components: {
+    WarehouseDetail,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+
+      jumpType: '',
+      queryItem: {},
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    },
+    isShowDetail() {
+      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'detail';
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入详情
+    toDetail(type, item) {
+      this.jumpType = type;
+      this.queryItem = item;
+    },
+
+    backList() {
+      this.jumpType = '';
+      this.queryItem = {};
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 0 - 29
src/views/supply/purchase/components/enter_detail.vue

@@ -165,33 +165,4 @@ export default {
       padding-left: 10px;
     }
   }
-
-  .diy-form-1 {
-    .item {
-      display: flex;
-      height: 40px;
-      .label {
-        width: 100px;
-        display: flex;
-        align-items: center;
-        padding-right: 10px;
-        box-sizing: border-box;
-        font-size: 14px;
-        color: #606266;
-        font-weight: 700;
-      }
-      .value {
-        flex: 1;
-        display: flex;
-        align-items: center;
-        box-sizing: border-box;
-        font-size: 14px;
-        color: #333333;
-        input {
-          border: none;
-          padding: 0;
-        }
-      }
-    }
-  }
 </style>

+ 200 - 0
src/views/supply/purchase/components/purchase_detail.vue

@@ -0,0 +1,200 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div id="printData">
+      <div class="main-title">
+        <div class="title">入库单</div>
+      </div>
+
+      <div class="diy-form-1">
+        <el-row :gutter="20">
+          <el-col :span="8" class="item">
+            <div class="label">业务类型:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单日期:</div>
+            <div class="value">2022-12-22</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单编号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">采购类型:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">供应商:</div>
+            <div class="value">2022-12-22</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">部门:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">业务员:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">税率:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">付款条件:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">币种:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">任务日期:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">备注:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">登录编号:</div>
+            <div class="value">212212121212121</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="diy-table-2">
+        <div class="head">
+          <el-row :gutter="20">
+            <el-col :span="2">序号</el-col>
+            <el-col :span="4">产品编号</el-col>
+            <el-col :span="8">产品名称</el-col>
+            <el-col :span="2">规格型号</el-col>
+            <el-col :span="2">内机编码</el-col>
+            <el-col :span="2">外机编码</el-col>
+            <el-col :span="2">单位</el-col>
+            <el-col :span="2">数量</el-col>
+          </el-row>
+        </div>
+        <div class="body">
+          <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
+            <el-col :span="2">{{ index + 1 }}</el-col>
+            <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
+            <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
+            <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
+            <el-col :span="2">{{ item.price || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+          </el-row>
+        </div>
+        <div class="foot">
+          <el-row :gutter="20">
+            <el-col :span="24">合计</el-col>
+          </el-row>
+        </div>
+      </div>
+
+      <div class="diy-form-1">
+        <el-row :gutter="20">
+          <el-col :span="8" class="item">
+            <div class="label">制单人:</div>
+            <div class="value">张三</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核人:</div>
+            <div class="value">李四</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">变更人:</div>
+            <div class="value">李四</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">现存量:</div>
+            <div class="value">200</div>
+          </el-col>
+        </el-row>
+      </div>
+      
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getList } from "@/api/supply/purchase";
+
+export default {
+  name: 'PurchaseDetail',
+  componentName: 'PurchaseDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printData'
+      },
+      goodsList: [{
+        goodsId: 1,
+      }]
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 30px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 11 - 18
src/views/supply/purchase/enter_list.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <div v-show="!isShowDetail && !isShowExamine">
+    <div v-show="!isShowDetail">
       <!-- 筛选条件 -->
       <div class="screen-container">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
@@ -62,7 +62,7 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fr">
-            <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
           </div>
         </div>
         <div class="table">
@@ -119,7 +119,6 @@
 <script>
 import { COMMON_SELECT } from '@/utils/select_data'
 import { getList } from "@/api/supply/purchase";
-import { downloadFiles } from '@/utils/util'
 import EnterDetail from "@/views/supply/purchase/components/enter_detail";
 
 export default {
@@ -153,12 +152,18 @@ export default {
   },
 
   computed: {
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    },
     isShowDetail() {
       return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'detail';
     },
-    isShowExamine() {
-      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'examine';
-    },
   },
 
   created() {
@@ -231,18 +236,6 @@ export default {
       this.jumpType = '';
       this.queryItem = {};
     },
-
-    // 导出
-    handleExport() {
-      let screenData = {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
-      };
-      downloadFiles('admin/user/mch/export', screenData);
-    },
   }
 }
 </script>

+ 192 - 0
src/views/supply/purchase/plan_list.vue

@@ -0,0 +1,192 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="采购计划单号" prop="orderNum">
+              <el-input v-model="screenForm.orderNum" placeholder="请输入采购计划单号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品名称" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品编码" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入产品编码"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="规格型号" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入规格型号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="品类" prop="status">
+              <el-select v-model="screenForm.status" placeholder="全部">
+                <el-option label="全部" value=""></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="12" :lg="18" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fr">
+          <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+        </div>
+      </div>
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="单据号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单价" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="金额" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="状态" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal">
+        </el-pagination>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getList } from "@/api/supply/purchase";
+
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+
+      jumpType: '',
+      queryItem: {},
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 240 - 0
src/views/supply/purchase/purchase_list.vue

@@ -0,0 +1,240 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="业务类型" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入业务类型"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="采购类型" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入采购类型"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="供应商" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入供应商"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fr">
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+            <el-table-column align="center" label="业务类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单编号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="采购类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="供应商" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="部门" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="业务员" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="税率" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="付款条件" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="币种" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="任务日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="备注" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="登录编号" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="厂对应单号" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="存货编码" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="存货名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="主计量" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="原币含税单价" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="原币单价" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="原币税额" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="原币价税合计" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="采购单价" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="计划到货日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="行关闭人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="预留" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制单人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="变更人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="现存量" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="120" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toDetail('detail', scope.row)">详情</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    
+    <PurchaseDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getList } from "@/api/supply/purchase";
+import PurchaseDetail from "@/views/supply/purchase/components/purchase_detail";
+
+export default {
+  components: {
+    PurchaseDetail,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+
+      jumpType: '',
+      queryItem: {},
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    },
+    isShowDetail() {
+      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'detail';
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入详情
+    toDetail(type, item) {
+      this.jumpType = type;
+      this.queryItem = item;
+    },
+
+    backList() {
+      this.jumpType = '';
+      this.queryItem = {};
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 216 - 0
src/views/supply/purchase/sum_list.vue

@@ -0,0 +1,216 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="销售单号" prop="orderNum">
+              <el-input v-model="screenForm.orderNum" placeholder="请输入销售单号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="销售类型" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入销售类型"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品名称" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品编码" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入产品编码"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="规格型号" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入规格型号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="品类" prop="status">
+              <el-select v-model="screenForm.status" placeholder="全部">
+                <el-option label="全部" value=""></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入经销商名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商编码" prop="chName">
+              <el-input v-model="screenForm.chName" placeholder="请输入经销商编码"></el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="24" :lg="24" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fr">
+          <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+        </div>
+      </div>
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="单据号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单价" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="金额" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商编码" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal">
+        </el-pagination>
+      </div>
+    </div>
+
+    <div class="">
+      <div>
+        <el-button size="small" type="primary">提 交</el-button>
+      </div>
+      <div style="margin-top: 10px; font-size: 14px; color: #666;">注:提交成功后,系统将自动生成采购计划订单</div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getList } from "@/api/supply/purchase";
+
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+
+      jumpType: '',
+      queryItem: {},
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 10 - 14
src/views/supply/sales/sales_list.vue

@@ -78,7 +78,7 @@
             <el-button size="small" type="warning" icon="el-icon-close">退单</el-button>
           </div>
           <div class="fr">
-            <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
           </div>
         </div>
         <div class="table">
@@ -127,7 +127,6 @@
 <script>
 import { COMMON_SELECT } from '@/utils/select_data'
 import { getList } from "@/api/supply/sales";
-import { downloadFiles } from '@/utils/util'
 import SalesDetail from "@/views/supply/sales/components/sales_detail";
 import SalesExamine from "@/views/supply/sales/components/sales_examine";
 
@@ -163,6 +162,15 @@ export default {
   },
 
   computed: {
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    },
     isShowDetail() {
       return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'detail';
     },
@@ -241,18 +249,6 @@ export default {
       this.jumpType = '';
       this.queryItem = {};
     },
-
-    // 导出
-    handleExport() {
-      let screenData = {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
-      };
-      downloadFiles('admin/user/mch/export', screenData);
-    },
   }
 }
 </script>