|
@@ -1,70 +1,59 @@
|
|
<template>
|
|
<template>
|
|
- <a-card :bordered="false" style="margin-bottom: 10px" class="mb-2">
|
|
|
|
- <a-form ref="searchFormRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
- <a-col :span="6">
|
|
|
|
- <a-form-item label="点位名称" name="loadPoint">
|
|
|
|
- <a-input v-model:value="searchFormState.loadPoint" placeholder="查询点位名称" allow-clear />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :span="9">
|
|
|
|
- <a-form-item label="装货开始时间" name="confStartTime">
|
|
|
|
- <a-range-picker v-model:value="searchFormState.confStartTime" value-format="YYYY-MM-DD HH:mm" show-time allow-clear />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :span="9">
|
|
|
|
- <a-form-item label="装货结束时间" name="confEndTime">
|
|
|
|
- <a-range-picker v-model:value="searchFormState.confEndTime" value-format="YYYY-MM-DD HH:mm" show-time allow-clear />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
- <a-col :span="6">
|
|
|
|
- <a-form-item label="装货员" name="loadUser">
|
|
|
|
- <a-input v-model:value="searchFormState.loadUser" placeholder="查询货品名称" allow-clear />
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :span="9"></a-col>
|
|
|
|
- <a-col :span="9">
|
|
|
|
- <a-button type="primary" @click="tableRef.refresh()">查询</a-button>
|
|
|
|
- <a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
|
|
|
-
|
|
|
|
- <a-button type="primary" @click="formRef.onOpen()" v-if="hasPerm('bizLoadTimeAdd')">
|
|
|
|
- <template #icon><plus-outlined /></template>
|
|
|
|
- 新增
|
|
|
|
- </a-button>
|
|
|
|
- </a-col>
|
|
|
|
- </a-row>
|
|
|
|
- </a-form>
|
|
|
|
- </a-card>
|
|
|
|
- <a-card :bordered="false">
|
|
|
|
- <s-table
|
|
|
|
- ref="tableRef"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- bordered
|
|
|
|
- :row-key="(record) => record.id"
|
|
|
|
- >
|
|
|
|
- <template #bodyCell="{ column, record, index }">
|
|
|
|
- <template v-if="column.dataIndex === 'serial'">
|
|
|
|
- {{ index + 1 }}
|
|
|
|
|
|
+ <a-drawer title="装货时间配置" :width="650" :open="visible" :destroy-on-close="true" @close="onClose">
|
|
|
|
+ <a-card :bordered="false" style="margin-bottom: 10px" class="mb-2">
|
|
|
|
+ <a-form ref="searchFormRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
|
|
|
|
+ <a-row :gutter="24">
|
|
|
|
+ <a-col :span="9">
|
|
|
|
+ <a-form-item label="装货开始时间" name="confStartTime">
|
|
|
|
+ <a-range-picker v-model:value="searchFormState.confStartTime" value-format="YYYY-MM-DD HH:mm" show-time allow-clear />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="9">
|
|
|
|
+ <a-form-item label="装货结束时间" name="confEndTime">
|
|
|
|
+ <a-range-picker v-model:value="searchFormState.confEndTime" value-format="YYYY-MM-DD HH:mm" show-time allow-clear />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="6">
|
|
|
|
+ <a-button type="primary" @click="tableRef.refresh()">查询</a-button>
|
|
|
|
+ <a-button style="margin: 0 8px" @click="reset">重置</a-button>
|
|
|
|
+
|
|
|
|
+ <a-button type="primary" @click="formRef.onOpen()" v-if="hasPerm('bizLoadTimeAdd')">
|
|
|
|
+ <template #icon><plus-outlined /></template>
|
|
|
|
+ 新增
|
|
|
|
+ </a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
|
|
+ </a-card>
|
|
|
|
+ <a-card :bordered="false">
|
|
|
|
+ <s-table
|
|
|
|
+ ref="tableRef"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ bordered
|
|
|
|
+ :row-key="(record) => record.id"
|
|
|
|
+ >
|
|
|
|
+ <template #bodyCell="{ column, record, index }">
|
|
|
|
+ <template v-if="column.dataIndex === 'serial'">
|
|
|
|
+ {{ index + 1 }}
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="column.dataIndex === 'action'">
|
|
|
|
+ <a-space>
|
|
|
|
+ <a @click="formRef.onOpen(record)" v-if="hasPerm('bizLoadTimeEdit')">编辑</a>
|
|
|
|
+ <a-divider type="vertical" v-if="hasPerm(['bizLoadTimeEdit', 'bizLoadTimeDelete'], 'and')" />
|
|
|
|
+ <a-button type="link" danger size="small" v-if="hasPerm('bizLoadTimeDelete')" @click="deleteConfig(record)">删除</a-button>
|
|
|
|
+ </a-space>
|
|
|
|
+ </template>
|
|
</template>
|
|
</template>
|
|
- <template v-if="column.dataIndex === 'action'">
|
|
|
|
- <a-space>
|
|
|
|
- <a @click="formRef.onOpen(record)" v-if="hasPerm('bizLoadTimeEdit')">编辑</a>
|
|
|
|
- <a-divider type="vertical" v-if="hasPerm(['bizLoadTimeEdit', 'bizLoadTimeDelete'], 'and')" />
|
|
|
|
- <a-button type="link" danger size="small" v-if="hasPerm('bizLoadTimeDelete')" @click="deleteConfig(record)">删除</a-button>
|
|
|
|
- </a-space>
|
|
|
|
- </template>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
- </a-card>
|
|
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-card>
|
|
|
|
+ </a-drawer>
|
|
<Form ref="formRef" @successful="tableRef.refresh()" />
|
|
<Form ref="formRef" @successful="tableRef.refresh()" />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="bizloadtime">
|
|
<script setup name="bizloadtime">
|
|
import { cloneDeep } from 'lodash-es'
|
|
import { cloneDeep } from 'lodash-es'
|
|
- import Form from './loadtimeform.vue'
|
|
|
|
|
|
+ import Form from './timeform.vue'
|
|
import bizLoadTimeApi from '@/api/biz/bizLoadTimeApi'
|
|
import bizLoadTimeApi from '@/api/biz/bizLoadTimeApi'
|
|
|
|
|
|
const searchFormState = ref({})
|
|
const searchFormState = ref({})
|
|
@@ -77,20 +66,20 @@
|
|
title: '装货点位',
|
|
title: '装货点位',
|
|
dataIndex: 'loadPoint'
|
|
dataIndex: 'loadPoint'
|
|
},
|
|
},
|
|
- {
|
|
|
|
- title: '装货员',
|
|
|
|
- dataIndex: 'loadUser'
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
title: '装货时间段',
|
|
title: '装货时间段',
|
|
dataIndex: 'beginTime-endTime'
|
|
dataIndex: 'beginTime-endTime'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '可约次数',
|
|
|
|
|
|
+ title: '可预约次数',
|
|
dataIndex: 'availableNumber'
|
|
dataIndex: 'availableNumber'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '已约次数',
|
|
|
|
|
|
+ title: '已预约日期',
|
|
|
|
+ dataIndex: 'alreadyDate'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '已预约次数',
|
|
dataIndex: 'alreadyNumber'
|
|
dataIndex: 'alreadyNumber'
|
|
},
|
|
},
|
|
]
|
|
]
|
|
@@ -103,32 +92,23 @@
|
|
width: 150
|
|
width: 150
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- const selectedRowKeys = ref([])
|
|
|
|
- // 列表选择配置
|
|
|
|
- const options = {
|
|
|
|
- // columns数字类型字段加入 needTotal: true 可以勾选自动算账
|
|
|
|
- alert: {
|
|
|
|
- show: true,
|
|
|
|
- clear: () => {
|
|
|
|
- selectedRowKeys.value = ref([])
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- rowSelection: {
|
|
|
|
- onChange: (selectedRowKey, selectedRows) => {
|
|
|
|
- selectedRowKeys.value = selectedRowKey
|
|
|
|
- }
|
|
|
|
|
|
+ // 打开抽屉
|
|
|
|
+ const onOpen = (record) => {
|
|
|
|
+ recordData.value = record
|
|
|
|
+ searchFormState.value = {
|
|
|
|
+ loadPointId: record.id
|
|
}
|
|
}
|
|
|
|
+ visible.value = true
|
|
}
|
|
}
|
|
|
|
+ // 加载字段数据
|
|
const loadData = (parameter) => {
|
|
const loadData = (parameter) => {
|
|
- const searchFormParam = cloneDeep(searchFormState.value)
|
|
|
|
- return bizLoadTimeApi.bizLoadTimePage(Object.assign(parameter, searchFormParam)).then((data) => {
|
|
|
|
- return data
|
|
|
|
|
|
+ return bizLoadTimeApi.bizLoadTimePage(Object.assign(parameter, searchFormState.value)).then((res) => {
|
|
|
|
+ return res
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- // 重置
|
|
|
|
- const reset = () => {
|
|
|
|
- searchFormRef.value.resetFields()
|
|
|
|
- tableRef.value.refresh(true)
|
|
|
|
|
|
+ // 关闭抽屉
|
|
|
|
+ const onClose = () => {
|
|
|
|
+ visible.value = false
|
|
}
|
|
}
|
|
// 删除
|
|
// 删除
|
|
const deleteConfig = (record) => {
|
|
const deleteConfig = (record) => {
|
|
@@ -144,8 +124,8 @@
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
|
|
- customerApi
|
|
|
|
- .customerDelete(params)
|
|
|
|
|
|
+ customerAccountApi
|
|
|
|
+ .customerAccountDelete(params)
|
|
.then(() => {
|
|
.then(() => {
|
|
tableRef.value.refresh(true)
|
|
tableRef.value.refresh(true)
|
|
})
|
|
})
|
|
@@ -156,4 +136,8 @@
|
|
onCancel() {}
|
|
onCancel() {}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ // 调用这个函数将子组件的一些数据和方法暴露出去
|
|
|
|
+ defineExpose({
|
|
|
|
+ onOpen
|
|
|
|
+ })
|
|
</script>
|
|
</script>
|