智慧农业后台管理页面
shuishen
2022-07-29 77c7b741c00ea1e400ae308b613bee9cb2a212a2
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhny_web
9 files modified
205 ■■■■■ changed files
src/router/views/index.js 2 ●●● patch | view | raw | blame | history
src/views/farm/farm.vue 1 ●●●● patch | view | raw | blame | history
src/views/farmplant/inventorylist.vue 75 ●●●●● patch | view | raw | blame | history
src/views/farmplant/retrievallist.vue 54 ●●●●● patch | view | raw | blame | history
src/views/farmplant/salelist.vue 51 ●●●●● patch | view | raw | blame | history
src/views/soldrecord/soldrecord.vue 6 ●●●●● patch | view | raw | blame | history
src/views/statistics/stock.vue 6 ●●●●● patch | view | raw | blame | history
src/views/stock/stockout.vue 6 ●●●●● patch | view | raw | blame | history
src/views/task/task.vue 4 ●●●● patch | view | raw | blame | history
src/router/views/index.js
@@ -126,7 +126,7 @@
        component: Layout,
        children: [{
            path: '/stockout',
            name: '已出资待使用农资',
            name: '已出库待使用农资',
            meta: {
                i18n: 'index',
            },
src/views/farm/farm.vue
@@ -180,6 +180,7 @@
            label:"360全景地址",
            prop:"panoramic",
            labelWidth:145,
            hide:true,
            rules:[{
              required:false,
              message:"请输入地址",
src/views/farmplant/inventorylist.vue
@@ -1,17 +1,21 @@
<template>
        <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :before-open="beforeOpen"
               :page.sync="page"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
    </avue-crud>
  <basic-container>
      <avue-crud :option="option"
             :table-loading="loading"
             :data="data"
             ref="crud"
             v-model="form"
             :permission="permissionList"
             :before-open="beforeOpen"
             :page.sync="page"
             @search-change="searchChange"
             @search-reset="searchReset"
             @current-change="currentChange"
             @size-change="sizeChange"
             @refresh-change="refreshChange"
             @on-load="onLoad">
      </avue-crud>
  </basic-container>
</template>
<script>
@@ -52,8 +56,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: "损耗数量",
@@ -71,23 +88,13 @@
                        label:"损耗时间",
                        prop:"lossTime",
                    },
                ],
                ],
            },
            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,11 +113,21 @@
                    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>
<style>
</style>
</style>
src/views/farmplant/retrievallist.vue
@@ -1,5 +1,6 @@
<template>
<avue-crud :option="option"
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
@@ -7,11 +8,14 @@
               :permission="permissionList"
               :before-open="beforeOpen"
               :page.sync="page"
               @search-change="searchChange"
               @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>
<script>
@@ -53,15 +57,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: "备注",
@@ -71,24 +88,13 @@
                        label:"出库时间",
                        prop:"createTime",
                    },
                ],
                ],
            },
            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,11 +112,21 @@
                    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>
<style>
</style>
</style>
src/views/farmplant/salelist.vue
@@ -1,4 +1,5 @@
<template>
  <basic-container>
        <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
@@ -7,11 +8,14 @@
               :permission="permissionList"
               :before-open="beforeOpen"
               :page.sync="page"
               @search-change="searchChange"
                @search-reset="searchReset"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
    </avue-crud>
  </basic-container>
</template>
<script>
@@ -53,15 +57,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: "销售价格",
@@ -75,23 +92,13 @@
                        label:"销售时间",
                        prop:"saleTime",
                    },
                ],
                ],
            },
            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,11 +117,21 @@
                    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>
<style>
</style>
</style>
src/views/soldrecord/soldrecord.vue
@@ -112,6 +112,12 @@
              span: 6,
              prop: "amount1",
            },
            {
              label:"变更时间",
              disabled:true,
              span:6,
              prop:"createTime"
            }
          ]
        },
        data: []
src/views/statistics/stock.vue
@@ -202,6 +202,12 @@
              return prev;
            }
          }, 0);
          // sums[index] += " 公斤";
          var x = String(sums[index]).indexOf(".")+1;//得到小数点的位置
          var y = String(sums[index]).length - x;//小数点的位数
          if(y>4){
            sums[index] = sums[index].toFixed(3)
          }
          sums[index] += " 公斤";
        } else {
          sums[index] = "N/A";
src/views/stock/stockout.vue
@@ -230,6 +230,12 @@
          }
        );
      }
        //退回数量未填写
      if(row.spn == null || row.span==""){
        this.$message.warning("退回数量不能为空,请填写退回数量");
        done()
      }
    },
    //农资类型select 改变事件
    stypeChange(value) {
src/views/task/task.vue
@@ -97,6 +97,7 @@
        selection: true,
        dialogClickModal: false,
        gradeBoxVisible: false,
        disabled:false,
        column: [
          {
            label: "任务名称",
@@ -707,6 +708,9 @@
        getDetail(this.form.id).then(res => {
          this.form = res.data.data;
        });
        if(type=="edit"){
          this.form.status==0?this.option.disabled=true:this.option.disabled=false
        }
      }
      done();
    },