|
@@ -0,0 +1,127 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-card class="box-card">
|
|
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
|
|
+ <span style="font-weight: bold">准入范围</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-table :data="basisList" border size="mini">
|
|
|
|
|
+ <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
|
|
|
|
|
+ <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <el-pagination
|
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
|
+ :page-sizes="[10, 50, 100, 200, 400]"
|
|
|
|
|
+ :page-size="size"
|
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
+ :total="currentItemCount"
|
|
|
|
|
+ ></el-pagination>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import { mapGetters } from "vuex";
|
|
|
|
|
+import dataapi from "@/api/oilsupplier/dataentry";
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "BasisList",
|
|
|
|
|
+ components: {},
|
|
|
|
|
+ props: {},
|
|
|
|
|
+ watch: {},
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ basisList: [],
|
|
|
|
|
+ size: 10,
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ currentItemCount: 0,
|
|
|
|
|
+ SupplierTypeCode: "",
|
|
|
|
|
+ SupplierId:""
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ initData() {
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ SupplierTypeCode: this.SupplierTypeCode,
|
|
|
|
|
+ _currentPage: this.currentPage,
|
|
|
|
|
+ _size: this.size
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$axios
|
|
|
|
|
+ .get("/select/zrfwselect", {
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ _this.SupplierId = res.data.items[0].SupplierId;
|
|
|
|
|
+ _this.basisList = res.data.items;
|
|
|
|
|
+ _this.currentItemCount = res.data.currentItemCount;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ getvalue(SupplierTypeCode) {
|
|
|
|
|
+ this.SupplierTypeCode = SupplierTypeCode;
|
|
|
|
|
+ this.initData();
|
|
|
|
|
+ },
|
|
|
|
|
+ handleSizeChange(value) {
|
|
|
|
|
+ this.size = value;
|
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
|
+ this.initData();
|
|
|
|
|
+ },
|
|
|
|
|
+ handleCurrentChange(value) {
|
|
|
|
|
+ this.currentPage = value;
|
|
|
|
|
+ this.initData();
|
|
|
|
|
+ },
|
|
|
|
|
+ toPdf() {
|
|
|
|
|
+ dataapi
|
|
|
|
|
+ .pdfexport(this.SupplierId, "02", this.$axios)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ // response
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ // this.$message({
|
|
|
|
|
+ // type: 'success'
|
|
|
|
|
+ // message: res.data.message
|
|
|
|
|
+ // })
|
|
|
|
|
+ let docurl = res.data.item;
|
|
|
|
|
+ let pdfurl;
|
|
|
|
|
+ // 内网服务器专用
|
|
|
|
|
+ if (process.client && docurl.indexOf("upfile") === 0) {
|
|
|
|
|
+ const myDomain = window.location.host;
|
|
|
|
|
+ // location.href = 'http://' + myDomain + '/' + docurl
|
|
|
|
|
+ pdfurl = "http://" + myDomain + "/" + docurl;
|
|
|
|
|
+ let requestParams = {
|
|
|
|
|
+ pdfUrl: pdfurl,
|
|
|
|
|
+ watermark: "猪刚烈烧饼"
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$axios
|
|
|
|
|
+ .post("supplierdataentry/word-to-pdf-watermark", requestParams)
|
|
|
|
|
+ .then(function(res) {
|
|
|
|
|
+ window.open("http://" + myDomain + "/" + res.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // location.href = 'http://' + docurl
|
|
|
|
|
+ pdfurl = "http://" + docurl;
|
|
|
|
|
+ let requestParams = {
|
|
|
|
|
+ pdfUrl: pdfurl,
|
|
|
|
|
+ watermark: "猪刚烈烧饼"
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$axios
|
|
|
|
|
+ .post("supplierdataentry/word-to-pdf-watermark", requestParams)
|
|
|
|
|
+ .then(function(res) {
|
|
|
|
|
+ window.open("http://" + res.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.error(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style>
|
|
|
|
|
+</style>
|