智慧农业后台管理页面
guoshilong
2022-09-14 c958cd7bfaedfd090394db69896f7a574962434a
src/views/task/task.vue
@@ -168,7 +168,7 @@
              value: "stockId1"
            },
            change: function (value) {
              console.log(value.value)
              // console.log(value.value)
            }
          },
          {
@@ -274,6 +274,7 @@
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        emptyBtn:false,
        column: [
          {
            label: "任务名称",
@@ -341,7 +342,7 @@
              value: "stockId1"
            },
            change: function (value) {
              console.log(value.value)
              // console.log(value.value)
            }
          },
          {
@@ -482,7 +483,7 @@
              value: "stock_id1"
            },
            change: function (value) {
              console.log(value.value)
              // console.log(value.value)
            }
          },
          {
@@ -497,6 +498,7 @@
          {
            label: "拍照照片",
            prop: "type",
            value:"1",
            span: 6,
            disabled: true,
            type: "switch",
@@ -595,9 +597,16 @@
    }
  },
  methods: {
    //入库
    //处理
    submitR(row, done, loading) {
      var that = this;
      if(row.type == "0"){
        if(row.tp == ""){
          that.$message.warning("请上传照片")
          done()
          return
        }
      }
      updatechuli(row).then(
        () => {
          that.onLoad(this.page);
@@ -679,6 +688,14 @@
      });
    },
    rowUpdate(row, index, done, loading) {
      if(row.stockNum<0){
        this.$message({
          type: "warning",
          message: "农资量不能为负数!"
        });
        done();
        return
      }
      update(row).then(() => {
        this.onLoad(this.page);
        this.$message({