dengjunjie
5 天以前 4f39dcc195f28fa275fc2d065fbf1bf6a46c21b7
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js
@@ -38,6 +38,20 @@
        //框架初始化配置后
        //如果要配置明细表,在此方法操作
        //this.detailOptions.columns.forEach(column=>{ });
        this.detailOptions.columns.forEach(x => {
        if (x.field == 'materielCode') {
          x.onChange = (val, option) => {
            // this.$error(val.materielCode)
            this.http.post("/api/MaterielInfo/GetMaterielInfo?materielCode=" + val.materielCode, {}, true).then(
              source => {
                if (!source.status) return this.$error(source.message);
                val.materielName = source.data.materielName;
                this.refresh();
              })
            }
          }
      })
      },
      searchBefore(param) {
        //界面查询前,可以给param.wheres添加查询参数
@@ -50,6 +64,21 @@
      },
      addBefore(formData) {
        //新建保存前formData为对象,包括明细表,可以给给表单设置值,自己输出看formData的值
        let req = true;
      formData.detailData.forEach(x => {
        if (!x.hasOwnProperty('materielCode')) {
          req = false;
          return this.$error("物料编号不能为空")
        }
        if (!x.hasOwnProperty('batchNo')) {
          req = false;
          return this.$error("批次号不能为空")
        }
        if (!x.hasOwnProperty('orderQuantity')) {
          req = false;
          return this.$error("单据数量不能为空")
        }
      })
        return true;
      },
      updateBefore(formData) {