Browse Source

计划外入库、、供应商发票勾选颜色

master_hella_20240701
wangyufei 5 months ago
parent
commit
ac39a7b17e
  1. 14
      src/components/Table/src/Table.vue
  2. 3
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  3. 1
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

14
src/components/Table/src/Table.vue

@ -61,6 +61,7 @@ export default defineComponent({
default: () => [] default: () => []
}, },
searchTableSelectionsList:[],// searchTableSelectionsList:[],//
selectionColor: propTypes.bool.def(false),
}, },
emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows'], emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows'],
setup(props, { attrs, slots, emit, expose }) { setup(props, { attrs, slots, emit, expose }) {
@ -369,6 +370,13 @@ export default defineComponent({
) )
} }
const selectionBg = ({row}) => {
if (unref(getProps).selectionColor&&elTableRef.value?.getSelectionRows().includes(row)) {
return 'selectionRow'
}
return 'tableRow'
}
return () => ( return () => (
<div v-loading={unref(getProps).loading}> <div v-loading={unref(getProps).loading}>
<ElTable default-expand-all={true} <ElTable default-expand-all={true}
@ -376,7 +384,7 @@ export default defineComponent({
ref={elTableRef} ref={elTableRef}
data={unref(getProps).data} data={unref(getProps).data}
header-cell-class-name="tableHeader" header-cell-class-name="tableHeader"
row-class-name="tableRow" row-class-name={selectionBg}
cell-class-name="tableRow" cell-class-name="tableRow"
onSelect={selectRow} onSelect={selectRow}
onSelect-all={selectAll} onSelect-all={selectAll}
@ -418,6 +426,10 @@ export default defineComponent({
--el-bg-color:#f5f5f5; --el-bg-color:#f5f5f5;
} }
.el-table .selectionRow{
--el-table-tr-bg-color: var(--el-color-primary-light-9);
}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.el-button.is-text) { :deep(.el-button.is-text) {

3
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -608,6 +608,9 @@ const tableSelectionDelete = (selection) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
data.subList.forEach(row=>{
row['expireDate'] = row['validityDays']?addDay(row['produceDate'],row['validityDays']).format('YYYY-MM-DD'):''
})
try { try {
if (formType === 'create') { if (formType === 'create') {
console.log("【计划外入库子列表】",data.subList) console.log("【计划外入库子列表】",data.subList)

1
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -19,6 +19,7 @@
<ContentWrap> <ContentWrap>
<Table ref="tableRef" <Table ref="tableRef"
:selection="true" :selection="true"
:selectionColor="true"
v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"

Loading…
Cancel
Save