|
@@ -0,0 +1,109 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-dialog
|
|
|
+ title="出口价格库"
|
|
|
+ :visible.sync="visible"
|
|
|
+ width="60%"
|
|
|
+ append-to-body
|
|
|
+ @closed="closed"
|
|
|
+ v-dialog-drag
|
|
|
+ >
|
|
|
+ <span>
|
|
|
+ <avue-crud
|
|
|
+ ref="crud"
|
|
|
+ :data="data"
|
|
|
+ :option="tableOption"
|
|
|
+ :page.sync="page"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @on-load="getList"
|
|
|
+ @saveColumn="saveColumn"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ :cell-style="cellStyle"
|
|
|
+ :table-loading="loading"
|
|
|
+ >
|
|
|
+ </avue-crud>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="visible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="importData" :disabled="selectionList.length==0">导 入</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import option from "./config/priceLibrary.json";
|
|
|
+import { getPricebank } from "@/api/basicData/customerInquiry";
|
|
|
+import { dateFormat } from "@/util/date";
|
|
|
+import _ from "lodash";
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ loading: true,
|
|
|
+ data: [],
|
|
|
+ tableOption: option,
|
|
|
+ height: window.innerHeight - 500,
|
|
|
+ page: {
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
+ selectionList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ props: {},
|
|
|
+ filters: {},
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.visible = true;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ cellStyle() {
|
|
|
+ return "padding:0;height:40px;";
|
|
|
+ },
|
|
|
+ importData() {
|
|
|
+ this.visible = false;
|
|
|
+ },
|
|
|
+ currentChange(val) {
|
|
|
+ this.page.currentPage = val;
|
|
|
+ },
|
|
|
+ sizeChange(val) {
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.page.pageSize = val;
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ const data = {
|
|
|
+ billType: "CG",
|
|
|
+ statusTime: dateFormat(new Date(), "yyyy-MM-dd")
|
|
|
+ };
|
|
|
+ this.loading = true;
|
|
|
+ getPricebank(this.page.currentPage, this.page.pageSize, data)
|
|
|
+ .then(res => {
|
|
|
+ this.data = res.data.data.records ? res.data.data.records : [];
|
|
|
+ this.page.total = res.data.data.total;
|
|
|
+ console.log(this.page.total);
|
|
|
+ if (this.page.total > 0) {
|
|
|
+ this.tableOption.height = window.innerHeight - 500;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ selectionChange(list){
|
|
|
+ this.$emit('importLibray',list)
|
|
|
+ this.selectionList=list
|
|
|
+ },
|
|
|
+ closed(){
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {}
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss"></style>
|