统一采购件入库页面高级管理权限

This commit is contained in:
dxc
2026-03-03 11:12:19 +08:00
parent d095a370ad
commit 348409b69d

View File

@ -634,7 +634,7 @@
</template>
<script setup lang="ts">
import {ref, reactive, onMounted, watch} from 'vue'
import {ref, reactive, onMounted, watch, computed} from 'vue'
import {Plus, Setting, Refresh, Search, Lock, Box, House, InfoFilled, Link, Printer, Camera, Delete, Picture} from '@element-plus/icons-vue'
import {ElMessage, ElMessageBox, ElLoading} from 'element-plus'
import dayjs from 'dayjs'
@ -784,34 +784,38 @@ const inspection_report_url = ref('')
const advancedFilterVisible = ref(false)
const advancedConditions = ref([{ field: '', operator: '', value: '' }])
const fieldOptions = ref([
{ value: 'company_name', label: '所属公司' },
{ value: 'material_name', label: '名称' },
{ value: 'material_type', label: '类型' },
{ value: 'category', label: '类' },
{ value: 'spec_model', label: '规格型号' },
{ value: 'unit', label: '单位' },
{ value: 'sku', label: 'SKU' },
{ value: 'barcode', label: '条码' },
{ value: 'batch_number', label: '批号' },
{ value: 'serial_number', label: '序列号' },
{ value: 'warehouse_location', label: '库位' },
{ value: 'status', label: '状态' },
{ value: 'inspection_status', label: '到检状态' },
{ value: 'qty_inbound', label: '入库量' },
{ value: 'qty_stock', label: '库存数' },
{ value: 'qty_available', label: '可用数' },
{ value: 'unit_price', label: '不含税单价' },
{ value: 'total_price', label: '不含税总价' },
{ value: 'tax_rate', label: '税率' },
{ value: 'currency', label: '币种' },
{ value: 'exchange_rate', label: '汇率' },
{ value: 'supplier_name', label: '供应商' },
{ value: 'purchaser', label: '采购人' },
{ value: 'purchaser_email', label: '采购邮箱' },
{ value: 'source_link', label: '原始链接' },
{ value: 'detail_link', label: '详情链接' },
])
const fieldOptions = computed(() => {
const allFields = [
{ value: 'company_name', label: '所属公司', perm: 'inbound_buy:company_name' },
{ value: 'material_name', label: '名称', perm: 'inbound_buy:material_name' },
{ value: 'material_type', label: '类型', perm: 'inbound_buy:material_type' },
{ value: 'category', label: '类别', perm: 'inbound_buy:category' },
{ value: 'spec_model', label: '规格型号', perm: 'inbound_buy:spec_model' },
{ value: 'unit', label: '单位', perm: 'inbound_buy:unit' },
{ value: 'sku', label: 'SKU', perm: 'inbound_buy:sku' },
{ value: 'barcode', label: '条码', perm: 'inbound_buy:barcode' },
{ value: 'batch_number', label: '批号', perm: 'inbound_buy:sn_bn' },
{ value: 'serial_number', label: '序列号', perm: 'inbound_buy:sn_bn' },
{ value: 'warehouse_location', label: '库位', perm: 'inbound_buy:warehouse_loc' },
{ value: 'status', label: '状态', perm: 'inbound_buy:status' },
{ value: 'inspection_status', label: '到检状态', perm: 'inbound_buy:inspection_status' },
{ value: 'qty_inbound', label: '入库量', perm: 'inbound_buy:qty_inbound' },
{ value: 'qty_stock', label: '库存数', perm: 'inbound_buy:qty_stock' },
{ value: 'qty_available', label: '可用数', perm: 'inbound_buy:qty_available' },
{ value: 'unit_price', label: '不含税单价', perm: 'inbound_buy:unit_price' },
{ value: 'total_price', label: '不含税总价', perm: 'inbound_buy:total_price' },
{ value: 'tax_rate', label: '税率', perm: 'inbound_buy:tax_rate' },
{ value: 'currency', label: '币种', perm: 'inbound_buy:currency' },
{ value: 'exchange_rate', label: '汇率', perm: 'inbound_buy:exchange_rate' },
{ value: 'supplier_name', label: '供应商', perm: 'inbound_buy:supplier_name' },
{ value: 'purchaser', label: '采购人', perm: 'inbound_buy:purchaser' },
{ value: 'purchaser_email', label: '采购邮箱', perm: 'inbound_buy:purchaser_email' },
{ value: 'source_link', label: '原始链接', perm: 'inbound_buy:source_link' },
{ value: 'detail_link', label: '详情链接', perm: 'inbound_buy:detail_link' }
]
// 根据用户权限过滤
return allFields.filter(item => userStore.hasPermission(item.perm))
})
const operatorOptions = ref([
{ value: 'eq', label: '等于' },
{ value: 'ne', label: '不等于' },