智慧农业后台管理页面
guoshilong
2022-10-15 865cb55abb66b49368952f88098190941c688511
限制字符输入;销售价格修改为必填
12 files modified
111 ■■■■ changed files
src/api/stockfactory/stockfactory.js 12 ●●●●● patch | view | raw | blame | history
src/components/map/plotMap.vue 2 ●●●●● patch | view | raw | blame | history
src/views/farm/farmingrecord.vue 3 ●●●● patch | view | raw | blame | history
src/views/farmplant/farmproductstock.vue 11 ●●●●● patch | view | raw | blame | history
src/views/farmplant/process.vue 11 ●●●●● patch | view | raw | blame | history
src/views/recovery/recovery.vue 1 ●●●● patch | view | raw | blame | history
src/views/remote/remote.vue 23 ●●●● patch | view | raw | blame | history
src/views/retrieval/retrieval.vue 1 ●●●● patch | view | raw | blame | history
src/views/stock/stock.vue 2 ●●●●● patch | view | raw | blame | history
src/views/stockfactory/stockfactory.vue 4 ●●●● patch | view | raw | blame | history
src/views/wel/plant.vue 34 ●●●● patch | view | raw | blame | history
src/views/wel/stock.vue 7 ●●●●● patch | view | raw | blame | history
src/api/stockfactory/stockfactory.js
@@ -12,6 +12,18 @@
    })
}
export const getPage = (current, size, params) => {
  return request({
    url: '/api/stockfactory/stockfactory/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetail = (id) => {
    return request({
        url: '/api/stockfactory/stockfactory/detail',
src/components/map/plotMap.vue
@@ -365,8 +365,6 @@
                plotRegionLayer.addOverlay(polygon)
                addPlotLayers.push({ center, name: item.landName, id: item.id })
            }
        },
        /**
         * 地块画线
src/views/farm/farmingrecord.vue
@@ -268,6 +268,7 @@
                        label: "备注",
                        prop: "remarks",
                        type: "textarea",
                        maxlength:200,
                        span: 24,
                        labelWidth: 110,
                        hide: true,
@@ -331,7 +332,7 @@
            })
            return ids.join(",")
        },
    },
    },
    mounted () {
    },
    methods: {
src/views/farmplant/farmproductstock.vue
@@ -515,11 +515,19 @@
                        prop: "salePrice",
                        span: 24,
                        type: "number",
                        rules: [
                            {
                              required: true,
                              message: "请输入销售价格",
                              trigger: "blur",
                            },
                        ],
                    },
                    {
                        label: "品牌",
                        prop: "saleBrand",
                        span: 24,
                        maxlength:100,
                    },
                    // {
                    //     label: "操作人",
@@ -630,6 +638,7 @@
                    {
                        label: "备注",
                        prop: "remarks",
                        maxlength:200,
                        span: 24,
                    },
                    // {
@@ -755,6 +764,7 @@
                    {
                        label: "备注",
                        prop: "remarks",
                        maxlength:200,
                        span: 24,
                    },
                    // {
@@ -878,6 +888,7 @@
                    {
                        label: "备注",
                        prop: "remarks",
                        maxlength:200,
                        span: 24,
                    },
                    // {
src/views/farmplant/process.vue
@@ -417,11 +417,19 @@
                        prop: "salePrice",
                        span: 24,
                        type: "number",
                        rules: [
                            {
                              required: true,
                              message: "请输入销售价格",
                              trigger: "blur",
                            },
                        ],
                    },
                    {
                        label: "品牌",
                        prop: "saleBrand",
                        span: 24,
                        maxlength:100,
                    },
                    // {
                    //     label: "操作人",
@@ -506,6 +514,7 @@
                    {
                        label: "备注",
                        prop: "remarks",
                        maxlength:200,
                        span: 24,
                    },
                    // {
@@ -610,6 +619,7 @@
                    {
                        label: "备注",
                        prop: "remarks",
                        maxlength:200,
                        span: 24,
                    },
                    // {
@@ -707,6 +717,7 @@
                    {
                        label: "备注",
                        prop: "remarks",
                        maxlength:200,
                        span: 24,
                    },
                    // {
src/views/recovery/recovery.vue
@@ -259,6 +259,7 @@
                        prop: "remark",
                        span: 24,
                        type: "textarea",
                        maxlength:200,
                        labelWidth: 145,
                        rules: [
                            {
src/views/remote/remote.vue
@@ -91,6 +91,7 @@
                        prop: "reName",
                        search: true,
                        searchSpan:4,
                        maxlength:40,
                        rules: [{
                            required: true,
                            message: "请输入专题名称",
@@ -209,30 +210,11 @@
                            trigger: "reType"
                        }]
                    },
                    // {
                    //     label: "是否展示",
                    //     prop: "reType",
                    //     type: "select",
                    //     dicData: [
                    //         {
                    //             label: "展示",
                    //             value: "0"
                    //         },
                    //         {
                    //             label: "不展示",
                    //             value: "1"
                    //         },
                    //     ],
                    //     rules: [{
                    //         required: true,
                    //         message: "请输入是否展示",
                    //         trigger: "reType"
                    //     }]
                    // },
                    {
                        label: "服务地址",
                        prop: "reUrl",
                        span: 24,
                        maxlength:200,
                        rules: [{
                            required: true,
                            message: "请输入服务地址",
@@ -242,6 +224,7 @@
                    {
                        label: "介绍",
                        type: "textarea",
                        maxlength:200,
                        prop: "reContext",
                        span: 24,
                        rules: [
src/views/retrieval/retrieval.vue
@@ -110,6 +110,7 @@
                    {
                        label: "出库备注",
                        prop: "remarks",
                        maxlength:200,
                        rules: [{
                            required: true,
                            message: "请输入出库备注",
src/views/stock/stock.vue
@@ -315,6 +315,7 @@
            label: "备注",
            type: "textarea",
            prop: "remarks",
            maxlength:200,
            span: 23,
          },
        ]
@@ -474,6 +475,7 @@
            label: "备注",
            type: "textarea",
            prop: "remarks1",
            maxlength:200,
            span: 23,
          },
        ]
src/views/stockfactory/stockfactory.vue
@@ -32,7 +32,7 @@
</template>
<script>
  import {getList, getDetail, add, update, remove} from "@/api/stockfactory/stockfactory";
  import {getPage, getDetail, add, update, remove} from "@/api/stockfactory/stockfactory";
  import {mapGetters} from "vuex";
  export default {
@@ -228,7 +228,7 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
src/views/wel/plant.vue
@@ -51,13 +51,7 @@
            label: "品种",
            prop: "varieties",
            labelWidth:110,
            // rules: [
            //   {
            //     required: true,
            //     message: "请输入种养品名称",
            //     trigger: "blur",
            //   },
            // ],
            maxlength:40,
          },
          {
            label: "品种图片",
@@ -91,7 +85,7 @@
            prop: "plant",
            labelWidth:110,
            type: "select",
            value:"3",
            // value:"3",
            dicData:[
              {
                label:"有机",
@@ -123,7 +117,7 @@
            prop: "plantingWay",
            type: "select",
            labelWidth:110,
            value:"0",
            // value:"0",
            dicData:[
              {
                label:"移栽",
@@ -150,7 +144,7 @@
            label: "作业方式",
            prop: "jobWay",
            labelWidth:110,
            value:"0",
            // value:"0",
            type: "select",
            dicData:[
              {
@@ -182,13 +176,6 @@
            },
            cascader: ["otherLandId"],
            labelWidth: 110,
            // rules: [
            //   {
            //     required: true,
            //     message: "请选择所属农场",
            //     trigger: "blur",
            //   },
            // ],
          },
          {
            label: "秧苗来源地块",
@@ -203,13 +190,6 @@
            },
            dicUrl: `/api/land/land/getLandList?farmId={{key}}`,
            labelWidth: 110,
            // rules: [
            //   {
            //     required: true,
            //     message: "请选择农产品",
            //     trigger: "blur",
            //   },
            // ],
          },
          {
            label: "种植时间",
@@ -355,6 +335,10 @@
    //初始化
    init(item) {
      var that = this;
      that.visible = true;
      if (that.$refs.form){
        that.$refs.form.resetForm()
      }
      this.form['operator'] = this.userInfo.user_id;
      //计算当前时间
      this.getNowTime();
@@ -363,7 +347,6 @@
      if(item.strainId){
        that.form.strainId = item.strainId
        strainColumn.disabled = true
      }else{
        strainColumn.disabled = false
        that.form.farmId = that.$farmId
@@ -383,7 +366,6 @@
          });
          otherLandColumn.dicData = landArr
        })
      this.visible = true;
      //获取农地数据
      getLandList(this.$farmId).then((res)=>{
          if(res.data.code==200){
src/views/wel/stock.vue
@@ -146,6 +146,7 @@
            label: "备注",
            type: "textarea",
            prop: "remarks",
            maxlength:200,
            span: 24,
          },
        ]
@@ -176,9 +177,9 @@
        //秒 getSeconds():(0 ~ 59)
        var second = date.getSeconds();
        //赋值
        this.form['time'] = year + '-'
                          + this.addZero(month) + '-'
                          + this.addZero(day) + ' '
        this.form['time'] = year + '-'
                          + this.addZero(month) + '-'
                          + this.addZero(day) + ' '
                          + this.addZero(hour);
    },
    //小于10的拼接上0字符串