no message
							parent
							
								
									225dc1e51f
								
							
						
					
					
						commit
						c0667d5424
					
				| 
						 | 
				
			
			@ -35,7 +35,7 @@ export const itemApi = {
 | 
			
		|||
     * 删除  @author  霍锦
 | 
			
		||||
     */
 | 
			
		||||
    delete: (id: number) => {
 | 
			
		||||
        return getRequest('tem/delete', {id});
 | 
			
		||||
        return getRequest('/item/delete', {id});
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,13 +37,13 @@
 | 
			
		|||
    <!---------- 表格操作行 begin ----------->
 | 
			
		||||
    <a-row class="smart-table-btn-block">
 | 
			
		||||
      <div class="smart-table-operate-block">
 | 
			
		||||
        <a-button @click="showForm" type="primary" size="small">
 | 
			
		||||
        <a-button @click="showForm" type="primary" v-privilege="'item:add'">
 | 
			
		||||
          <template #icon>
 | 
			
		||||
            <PlusOutlined/>
 | 
			
		||||
          </template>
 | 
			
		||||
          新建
 | 
			
		||||
        </a-button>
 | 
			
		||||
        <a-button @click="confirmBatchDelete" type="primary" danger size="small"
 | 
			
		||||
        <a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'item:batchDelete'"
 | 
			
		||||
                  :disabled="selectedRowKeyList.length == 0">
 | 
			
		||||
          <template #icon>
 | 
			
		||||
            <DeleteOutlined/>
 | 
			
		||||
| 
						 | 
				
			
			@ -70,11 +70,32 @@
 | 
			
		|||
    >
 | 
			
		||||
      <template #bodyCell="{ text, record, column }">
 | 
			
		||||
 | 
			
		||||
        <template v-if="column.dataIndex === 'disabledFlag'">
 | 
			
		||||
          <a-tag :color="text ? 'processing' : 'error'">{{ text ? '启用' : '禁用' }}</a-tag>
 | 
			
		||||
        </template>
 | 
			
		||||
 | 
			
		||||
        <template v-if="column.dataIndex === 'unit'">
 | 
			
		||||
          <DictPreview :options="itemUnit.ITEM_UNIT" :value="text"/>
 | 
			
		||||
        </template>
 | 
			
		||||
 | 
			
		||||
        <template v-if="column.dataIndex === 'itemType'">
 | 
			
		||||
          <DictPreview :options="itemType.ITEM_TYPE" :value="text"/>
 | 
			
		||||
        </template>
 | 
			
		||||
 | 
			
		||||
        <template v-if="column.dataIndex === 'action'">
 | 
			
		||||
          <div class="smart-table-operate">
 | 
			
		||||
            <a-button @click="showForm(record)" type="link">编辑</a-button>
 | 
			
		||||
            <a-button @click="onDelete(record)" danger type="link">删除</a-button>
 | 
			
		||||
            <a-button @click="showForm(record)" type="link" v-privilege="'item:update'">
 | 
			
		||||
              <template #icon>
 | 
			
		||||
                <EditOutlined/>
 | 
			
		||||
              </template>
 | 
			
		||||
              编辑
 | 
			
		||||
            </a-button>
 | 
			
		||||
            <a-button @click="onDelete(record)" danger type="link" v-privilege="'item:delete'">
 | 
			
		||||
              <template #icon>
 | 
			
		||||
                <DeleteOutlined/>
 | 
			
		||||
              </template>
 | 
			
		||||
              删除
 | 
			
		||||
            </a-button>
 | 
			
		||||
          </div>
 | 
			
		||||
        </template>
 | 
			
		||||
      </template>
 | 
			
		||||
| 
						 | 
				
			
			@ -111,7 +132,11 @@ import {smartSentry} from '/@/lib/smart-sentry';
 | 
			
		|||
import TableOperator from '/@/components/support/table-operator/index.vue';
 | 
			
		||||
import ItemForm from '/@/views/business/base/item/item-form.vue';
 | 
			
		||||
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const";
 | 
			
		||||
import DictPreview from '/@/components/dict-preview/index.vue';
 | 
			
		||||
import {useDict} from '/@/utils/dict';
 | 
			
		||||
 | 
			
		||||
const itemUnit = useDict('ITEM_UNIT');
 | 
			
		||||
const itemType = useDict('ITEM_TYPE');
 | 
			
		||||
// ---------------------------- 表格列 ----------------------------
 | 
			
		||||
 | 
			
		||||
const columns = ref([
 | 
			
		||||
| 
						 | 
				
			
			@ -121,7 +146,7 @@ const columns = ref([
 | 
			
		|||
    ellipsis: true,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    title: '物料编码',
 | 
			
		||||
    title: '物料',
 | 
			
		||||
    dataIndex: 'itemCode',
 | 
			
		||||
    ellipsis: true,
 | 
			
		||||
  },
 | 
			
		||||
| 
						 | 
				
			
			@ -130,6 +155,11 @@ const columns = ref([
 | 
			
		|||
    dataIndex: 'itemName',
 | 
			
		||||
    ellipsis: true,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    title: '物料类型',
 | 
			
		||||
    dataIndex: 'itemType',
 | 
			
		||||
    ellipsis: true,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    title: '单位',
 | 
			
		||||
    dataIndex: 'unit',
 | 
			
		||||
| 
						 | 
				
			
			@ -141,15 +171,11 @@ const columns = ref([
 | 
			
		|||
    ellipsis: true,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    title: '是否禁用',
 | 
			
		||||
    title: '是否启用',
 | 
			
		||||
    dataIndex: 'disabledFlag',
 | 
			
		||||
    ellipsis: true,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    title: '物料类型',
 | 
			
		||||
    dataIndex: 'itemType',
 | 
			
		||||
    ellipsis: true,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    title: '创建时间',
 | 
			
		||||
    dataIndex: 'createTime',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue