houjie
2023-08-23 1ec4da063b3195f4f46af969a9d170bda2df7c2a
src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementForm.vue
@@ -59,7 +59,6 @@
          :dataSource='sparesScrapRequirementDetailTable.dataSource'
          :maxHeight='300'
          :disabled='formDisabled'
          @valueChange="changeAuxiliaryQuantity"
          :alwaysEdit='true'
          :rowNumber='true'
          :bordered='bordered'
@@ -182,7 +181,7 @@
          },
          {
            title: '主单位',
            title: '单位',
            key: 'mainUnitIdName',
            type: JVXETypes.normal,
            align:'center',
@@ -191,7 +190,7 @@
            defaultValue: ''
          },
          {
            title: '主单位',
            title: '单位',
            key: 'mainUnitId',
            type: JVXETypes.hidden,
            align:'center',
@@ -199,7 +198,7 @@
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
         /*  {
            title: '辅单位',
            key: 'auxiliaryUnitIdName',
            align:'center',
@@ -216,7 +215,7 @@
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          }, */
          {
            title: '主数量',
            key: 'mainQuantity',
@@ -225,7 +224,7 @@
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: 0,
            Function({cellValue, row, column}){
/*             Function({cellValue, row, column}){
              console.log(cellValue)
              console.log(row)
              console.log(column)
@@ -237,7 +236,7 @@
              }
              console.log(cellValue)
              return cellValue
            },
            }, */
            validateRules: [
              {
                required: true,
@@ -255,7 +254,7 @@
            ]
          },
          {
         /*  {
            title: '辅数量',
            key: 'auxiliaryQuantity',
            type: JVXETypes.normal,
@@ -263,7 +262,7 @@
            align:'center',
            placeholder: '请输入${title}',
            defaultValue: 0
          },
          }, */
          {
            title: '备件id',
            key: 'sparePartId',
@@ -460,13 +459,13 @@
      this.$emit('close')
      this.$refs.form.clearValidate()
    },
    changeAuxiliaryQuantity(target){
/*     changeAuxiliaryQuantity(target){
      console.log(target.columnIndex)
      let num=target.columnIndex
      if (target.columnIndex ===num){
        target.row.auxiliaryQuantity=Math.abs(target.row.conversionRatio*target.row.mainQuantity)
      }
    }
    } */
  }
}
</script>