dengjunjie
2 天以前 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js
@@ -96,16 +96,16 @@
        // }
        if (!x.hasOwnProperty('batchNo')) {
          req = false;
          return this.$error("柜号不能为空");
          return this.$error("批号不能为空");
        }
      })
      // if (formData.detailData.length > 3) return this.$error("入库单明细不能超过3个");
      if (formData.detailData.length > 1) return this.$error("入库单明细不能超过1个");
      return req;
    },
    updateBefore(formData) {
      //编辑保存前formData为对象,包括明细表、删除行的Id
      // this.$error(formData.detailData.length)
      // if (formData.detailData.length > 3) return this.$error("入库单明细不能超过3个");
      if (formData.detailData.length > 1) return this.$error("入库单明细不能超过1个");
      return true;
    },
    rowClick({ row, column, event }) {
@@ -119,30 +119,33 @@
      //(3)this.editFormFields.字段='xxx';
      //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看:console.log(this.editFormOptions)
      if (this.currentAction == 'Add') {
        let locationCodes = this.getOption("locationCode");
        locationCodes.bind.data.splice(0);
        this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then(
          source => {
            if (!source.status) return this.$error(source.message);
            for (let i = 0; i < source.data.length; i++) {
              locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] });
        this.editFormOptions.forEach(x => {
          x.forEach(option => {
            if (option.field == 'orderNo' || option.field == 'orderType') {
              option.readonly = false
            }
            this.refresh();
          })
          this.editFormOptions.forEach(x => {
            x.forEach(option => {
              if (option.field == 'orderNo' || option.field == 'orderType') {
                option.readonly = false
              }
            })
          })
        })
        this.detailOptions.columns.forEach(x => {
          if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') {
            x.readonly = false
          }
        });
      } else {
      let locationCodes = this.getOption("locationCode");
      locationCodes.bind.data.splice(0);
      this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then(
        source => {
          if (!source.status) return this.$error(source.message);
          for (let i = 0; i < source.data.length; i++) {
            locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] });
          }
          this.refresh();
        })
      }
      else {
        this.editFormOptions.forEach(x => {
          x.forEach(option => {
            if (option.field == 'orderNo' || option.field == 'orderType') {
@@ -150,11 +153,11 @@
            }
          })
        })
        // this.detailOptions.columns.forEach(x => {
        //   if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') {
        //     x.readonly = true// row.orderStatus > 0
        //   }
        // });
        this.detailOptions.columns.forEach(x => {
          if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') {
            x.readonly = true// row.orderStatus > 0
          }
        });
      }
      // if (row.orderStatus != '0') {
      // this.detailOptions.columns.forEach(x => {