Преглед на файлове

【新增】供应链管理-采购管理-采购入库单

莫绍宝 преди 3 години
родител
ревизия
d20203c44b
променени са 4 файла, в които са добавени 464 реда и са изтрити 0 реда
  1. 10 0
      src/api/supply/purchase.js
  2. 5 0
      src/views/supply/purchase.vue
  3. 197 0
      src/views/supply/purchase/components/enter_detail.vue
  4. 252 0
      src/views/supply/purchase/enter_list.vue

+ 10 - 0
src/api/supply/purchase.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/purchase.vue

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

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

@@ -0,0 +1,197 @@
+<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-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">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: 'EnterDetail',
+  componentName: 'EnterDetail',
+  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;
+    }
+  }
+
+  .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>

+ 252 - 0
src/views/supply/purchase/enter_list.vue

@@ -0,0 +1,252 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail && !isShowExamine">
+      <!-- 筛选条件 -->
+      <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="chNum">
+                <el-input v-model="screenForm.chNum" 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">
+              <el-form-item label="供货单位" prop="company">
+                <el-input v-model="screenForm.company" placeholder="请输入供货单位"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="厂对应单号" prop="factoryNum">
+                <el-input v-model="screenForm.factoryNum" placeholder="请输入厂对应单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="厂产品代码" prop="factoryCode">
+                <el-input v-model="screenForm.factoryCode" placeholder="请输入厂产品代码"></el-input>
+              </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">
+            <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+          </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="操作" 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>
+    
+    <EnterDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+
+  </div>
+</template>
+
+<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 {
+  components: {
+    EnterDetail,
+  },
+  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: {
+    isShowDetail() {
+      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'detail';
+    },
+    isShowExamine() {
+      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'examine';
+    },
+  },
+
+  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 = {};
+    },
+
+    // 导出
+    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>
+
+<style lang="scss" scoped>
+
+</style>