src/views/dnc/base/modules/ProductStructure/Product/ProductModalForm.vue
@@ -30,7 +30,7 @@
</template>
<script>
  import { httpAction, getAction } from '@/api/manage'
  import { httpAction } from '@/api/manage'
  export default {
    name: 'ProductModalForm',
@@ -61,17 +61,12 @@
          ],
          productNo: [
            { required: true, message: '请输入产品代号!' }
          ],
          ]
        },
        url: {
          add: '/mdc/mdcPartProcessInfo/add',
          edit: '/mdc/mdcPartProcessInfo/edit'
          add: '/nc/product/add',
          edit: '/nc/product/edit'
        }
      }
    },
    computed: {
      formDisabled() {
        return this.disabled
      }
    },
    created() {
@@ -86,7 +81,6 @@
      edit(record) {
        this.model = Object.assign({}, record)
        console.log('model', this.model)
        this.visible = true
      },
      submitForm() {
@@ -96,11 +90,13 @@
          if (valid) {
            that.confirmLoading = true
            let httpUrl = ''
            let method = 'post'
            let method = ''
            if (!this.model.id) {
              httpUrl += this.url.add
              method = 'post'
            } else {
              httpUrl += this.url.edit
              method = 'put'
              httpUrl += this.url.edit + `/${this.model.id}`
            }
            httpAction(httpUrl, this.model, method).then((res) => {
              if (res.success) {