廖井涛
2024-08-05 43e115a7de2c763c36d79e610a3abb1d833ea892
north-glass-erp/northglass-erp/src/views/sd/basicData/CreateBasicData.vue
@@ -140,7 +140,7 @@
      basic.value.input=basic.value.input+"mm"
    }
  }
  console.log(basic.value)
  basic.value.input=basic.value.input.trim()
  request.post(`/basicData/addBasicData`, basic.value).then(res => {
    if (res.data) {
      ElMessage.success(t('basicData.msg.saveSuccess'))
@@ -157,7 +157,7 @@
  let submitArr  = props.rowIndex
  submitArr.basicType = basic.value.basicType[0]
  submitArr.basicCategory = basic.value.basicType[1]
  submitArr.basicName = basic.value.input
  submitArr.basicName = basic.value.input.trim()
  submitArr.nickname = basic.value.nickname
  request.post(`/basicData/updateBasicData`, submitArr).then(res => {
    if (res.data) {
@@ -178,13 +178,11 @@
  const isLt2M = file.size / 1024 / 1024 < 5;
  if (!isJPG) {
    this.$message.error('上传头像图片只能是 JPG或者PNG 格式!')
    this.$refs.upload.clearFiles()
    ElMessage.warning(t('orderBasicData.msg2'))
    return
  }
  if (!isLt2M) {
    this.$message.error('上传头像图片大小不能超过 5MB!')
    this.$refs.upload.clearFiles()
    ElMessage.warning(t('orderBasicData.msg1'))
    return
  }
@@ -210,7 +208,7 @@
            v-model="basic.basicType"
            @change="handleChange"
            :options="options"
            placeholder=""
            :placeholder="$t('processCard.pleaseSelect')"
            :disabled="props.rowIndex"
        />
      </el-col>
@@ -239,8 +237,8 @@
            action="https://jsonplaceholder.typicode.com/posts/"
            :file-list="fileList"
            :auto-upload="false">
          <el-button slot="trigger" size="small" type="primary" >选取文件</el-button>
          <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过5m</div>
          <el-button slot="trigger" size="small" type="primary" >{{ $t('orderBasicData.selectFile') }}</el-button>
          <div slot="tip" class="el-upload__tip">{{ $t('orderBasicData.msg3') }}</div>
        </el-upload>
      </el-col>
    </el-row>