qushaowei
2024-03-28 585fb0bbd4a7bc7f8f333ecba7c5fecd2ee5cbc2
src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementForm.vue
@@ -6,7 +6,7 @@
        <a-row>
          <a-col :span="12">
            <a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
              <a-input v-model="model.num" placeholder="请输入单据号" :disabled="true"></a-input>
              <a-input v-model="model.num" placeholder="将由系统自动生成" :disabled="true"></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
@@ -338,7 +338,6 @@
  },
  created() {
    this.initOptions()
    this.initNum()
  },
  methods: {
@@ -380,16 +379,6 @@
            });
          }
        }, */
    initNum() {
      getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => {
        if (res.success) {
          this.model.num = res.message
          /* this.model.setFieldsValue({ num: res.message }); */
        }
      })
    },
    initOptions() {
      getAction(this.url.loadOptions).then(res => {
@@ -471,6 +460,12 @@
      if (this.model.id) {
        let params = { id: this.model.id }
        this.requestSubTableData(this.url.sparesScrapRequirementDetail.list, params, this.sparesScrapRequirementDetailTable)
      }else{
        getAction(this.url.getNum, { type: 'SparePartRequirement', length: '4' }).then((res) => {
        if (res.success) {
          this.model.num = res.message
        }
      })
      }
    },
    //校验所有一对一子表表单