廖井涛
2024-06-14 fd596adc9e93e777d2dec6dacf8003c4b8dbf960
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
@@ -9,19 +9,20 @@
import  useUserInfo from "@/stores/userInfo"
import GlassType from "@/components/sd/product/GlassType.vue"
import useProductGlassTypeStore from "@/stores/sd/product/productGlassType"
import {useI18n} from "vue-i18n";
const { t } = useI18n()
const router = useRouter()
const route = useRoute()
const value = ref('')
const options = [
  {
    value: '原片',
    label: '原片'
    value: t('mainIngredient.originalFilm'),
    label: t('mainIngredient.originalFilm')
  },
  {
    value: '辅料',
    label: '辅料',
    value: t('mainIngredient.accessories'),
    label: t('mainIngredient.accessories'),
  }
]
@@ -85,7 +86,7 @@
    filterData[item.OperateType]=item.Type
    const customerName = item.Type
    if(customerName === null || customerName === undefined || customerName === ''){
      ElMessage.error('请输入'+item.OperateTypeName)
      ElMessage.error(t('mainIngredient.pleaseEnter')+item.OperateTypeName)
      isBool=false
      return
    }
@@ -100,7 +101,7 @@
  let materialStore
  if(value.value==='原片'){
  if(value.value===t('mainIngredient.originalFilm')){
     materialStore={
      id:ruleForm.value.id,
      type:value.value,
@@ -108,7 +109,7 @@
      width:BasicData.value[0].Type,
      height:BasicData.value[1].Type
    }
  }else if(value.value==='辅料'){
  }else if(value.value===t('mainIngredient.accessories')){
     materialStore={
      id:ruleForm.value.id,
      type:value.value,
@@ -121,12 +122,12 @@
    request.post("/MaterialStore/saveMaterialStore", materialStore).then((res) => {
      if(res.code==200 && res.data===true){
        resetForm()
        ElMessage.success('保存成功')
        ElMessage.success(t('basicData.msg.saveSuccess'))
      }else{
        ElMessage.warning("保存失败")
        ElMessage.warning(t('basicData.msg.saveFail'))
      }
    }).catch((err)=>{
      ElMessage.error('系统错误')
      ElMessage.error(t('basicData.msg.ServerConnectionError'))
      router.push("/login")
    })
  }
@@ -168,7 +169,7 @@
<div>
  <el-row>
  <el-col :span="4">
    <el-select v-model="value" placeholder="请选择类别" @change="getWork">
    <el-select v-model="value" :placeholder="$t('mainIngredient.pleaseSelectACategory')" @change="getWork">
      <el-option
          v-for="item in options"
          :key="item.value"
@@ -186,7 +187,7 @@
             v-for="item in BasicData" >
       <el-col :span="4.5" >
         {{item.OperateTypeName}}:
         <el-select filterable v-if="item.OperateTypeName=='膜系'" v-model="item.Type"  placeholder="请输入数据" style="width: 150px; height: 30px;" >
         <el-select filterable v-if="item.OperateTypeName==$t('mainIngredient.films')" v-model="item.Type"  :placeholder="$t('mainIngredient.pleaseEnterData')" style="width: 150px; height: 30px;" >
           <el-option
               v-for="item in titleSelectJson"
               :key="item.id"
@@ -194,7 +195,7 @@
               :value="item.basicName"
           />
         </el-select>
         <el-input v-else v-model="item.Type"  placeholder="请输入数据" style="width: 150px; height: 30px;" />
         <el-input v-else v-model="item.Type"  :placeholder="$t('mainIngredient.pleaseEnterData')" style="width: 150px; height: 30px;" />
       </el-col>