智慧农业后台管理页面
guoshilong
2022-07-22 674ca48a554127e528e78108179907125ed4766c
新增搜索和地区三级显示
3 files modified
134 ■■■■■ changed files
src/views/farmplant/inventorylist.vue 43 ●●●●● patch | view | raw | blame | history
src/views/farmplant/retrievallist.vue 46 ●●●●● patch | view | raw | blame | history
src/views/farmplant/salelist.vue 45 ●●●●● patch | view | raw | blame | history
src/views/farmplant/inventorylist.vue
@@ -7,6 +7,8 @@
               :permission="permissionList"
               :before-open="beforeOpen"
               :page.sync="page"
               @search-change="searchChange"
               @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
@@ -52,8 +54,21 @@
                menu: false,
                column:[
                    {
                        label: "品种名",
                        prop :"strainName",
                        label: "品种",
                        prop :"strainId",
                        search:true,
                        hide:true,
                        display:true,
                        type:"select",
                        dicUrl:'api/strain/strain-tree',
                        props:{
                            label:"strainName",
                            value:"id"
                        }
                    },
                    {
                        label: "品种",
                        prop :"strainName"
                    },
                    {
                        label: "损耗数量",
@@ -76,18 +91,8 @@
            data:[],
        };
    },
    mounted(){
        this.initData();
    },
    methods: {
        initData(){
            getInventoryPage(this.page.currentPage,this.page.pageSize).then((res)=>{
                if(res.data.code == 200){
                    this.data = res.data.data.records
                    this.page.total = res.data.data.total
                }
            })
        },
        currentChange(currentPage) {
            this.page.currentPage = currentPage;
        },
@@ -106,7 +111,17 @@
                    this.loading = false;
                }
            })
      }
        },
        searchReset() {
            this.query = {};
            this.onLoad(this.page);
        },
        searchChange(params, done) {
            this.query = params;
            this.page.currentPage = 1;
            this.onLoad(this.page, params);
            done();
        },
    }
}
</script>
src/views/farmplant/retrievallist.vue
@@ -7,6 +7,8 @@
               :permission="permissionList"
               :before-open="beforeOpen"
               :page.sync="page"
               @search-change="searchChange"
               @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
@@ -53,15 +55,28 @@
                column:[
                    {
                        label: "品种",
                        prop :"strainName",
                        prop :"strainId",
                        search:true,
                        hide:true,
                        display:true,
                        type:"select",
                        dicUrl:'api/strain/strain-tree',
                        props:{
                            label:"strainName",
                            value:"id"
                        }
                    },
                    {
                        label: "品种",
                        prop :"strainName"
                    },
                    {
                        label: "出库数量",
                        prop :"saleNum",
                    },
                    {
                        label: "出库去向",
                        prop :"district",
                        label:"销售地",
                        prop:"saleDestination2"
                    },
                    {
                        label: "备注",
@@ -76,19 +91,8 @@
            data:[],
        };
    },
    mounted(){
        this.initData();
    },
    methods: {
        initData(){
            getPage(this.page.currentPage,this.page.pageSize).then((res)=>{
                if(res.data.code == 200){
                    this.data = res.data.data.records
                    this.page.total = res.data.data.total
                }
            })
        },
                currentChange(currentPage) {
        currentChange(currentPage) {
            this.page.currentPage = currentPage;
        },
        sizeChange(pageSize) {
@@ -106,7 +110,17 @@
                    this.loading = false;
                }
            })
      }
        },
        searchReset() {
            this.query = {};
            this.onLoad(this.page);
        },
        searchChange(params, done) {
            this.query = params;
            this.page.currentPage = 1;
            this.onLoad(this.page, params);
            done();
        },
    }
}
</script>
src/views/farmplant/salelist.vue
@@ -7,6 +7,8 @@
               :permission="permissionList"
               :before-open="beforeOpen"
               :page.sync="page"
               @search-change="searchChange"
                @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
@@ -53,15 +55,28 @@
                column:[
                    {
                        label: "品种",
                        prop :"strainName",
                        prop :"strainId",
                        search:true,
                        hide:true,
                        display:false,
                        type:"select",
                        dicUrl:'api/strain/strain-tree',
                        props:{
                            label:"strainName",
                            value:"id"
                        }
                    },
                    {
                        label: "品种",
                        prop :"strainName"
                    },
                    {
                        label: "销售数量",
                        prop :"saleNum",
                    },
                    {
                        label: "销售地",
                        prop :"district",
                        label:"销售地",
                        prop:"saleDestination2"
                    },
                    {
                        label: "销售价格",
@@ -80,18 +95,8 @@
            data:[],
        };
    },
    mounted(){
        this.initData();
    },
    methods: {
        initData(){
            getPage(this.page.currentPage,this.page.pageSize).then((res)=>{
                if(res.data.code == 200){
                    this.data = res.data.data.records
                    this.page.total = res.data.data.total
                }
            })
        },
        currentChange(currentPage) {
            this.page.currentPage = currentPage;
        },
@@ -110,7 +115,17 @@
                    this.loading = false;
                }
            })
      }
        },
        searchReset() {
            this.query = {};
            this.onLoad(this.page);
        },
        searchChange(params, done) {
            this.query = params;
            this.page.currentPage = 1;
            this.onLoad(this.page, params);
            done();
        },
    }
}
</script>