廖井涛
2024-06-14 fd596adc9e93e777d2dec6dacf8003c4b8dbf960
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
@@ -27,14 +27,14 @@
      })
      request.post("/MaterialStore/deleteMaterialStore",flowData.value).then((res) => {
        if(res.code==200 && res.data===true){
          ElMessage.success("删除成功")
          ElMessage.success(t('basicData.msg.deleteSuccess'))
          router.push({path:'/main/ingredients/SelectIngredients',query:{random:Math.random()}})
        }else{
          ElMessage.warning("删除失败")
          ElMessage.warning(t('basicData.msg.deleteFail'))
          router.push("/login")
        }
      }).catch((err)=>{
        ElMessage.error('系统错误')
        ElMessage.error(t('basicData.msg.ServerConnectionError'))
        router.push("/login")
      })
      return
@@ -45,12 +45,12 @@
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'),
  }
]
@@ -87,14 +87,14 @@
let arr = [
  {type:'expand',fixed:'left',slots: { content:'content' },width: '60'},
  {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:'left'},
  { type: 'seq',fixed:'left', title: '自序', width: '80' },
  {field: 'id', width: '150',title: '物料编码', sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}
  {title: t('basicData.operate'), width: '110', slots: { default: 'button_slot' },fixed:'left'},
  { type: 'seq',fixed:'left', title: t('basicData.Number'), width: '80' },
  {field: 'id', width: '150',title: t('mainIngredient.materialCode'), sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}
]
//第一次加载默认
value.value='原片'
filterData.value.type='原片'
value.value=t('mainIngredient.originalFilm')
filterData.value.type=t('mainIngredient.originalFilm')
request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => {
  if(res.code==200){
    gridOptions.columns.splice(0,gridOptions.columns.length)
@@ -276,7 +276,7 @@
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
          return t('basicData.total')
        }
        return ''
@@ -297,7 +297,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"
@@ -332,8 +332,8 @@
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')"
                   v-if="userStore.user.permissions.indexOf('SelectIngredients.edit') > -1"
                   link type="primary" size="small">编辑</el-button>
        <el-popconfirm @confirm="getTableRow(row,'delete')" title="确定删除?">
                   link type="primary" size="small">{{ $t('basicData.edit') }}</el-button>
        <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
          <template #reference>
            <el-button  link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
          </template>