|
|
@@ -13,7 +13,7 @@
|
|
|
v-model="queryParams.loanFromId"
|
|
|
placeholder="请选择物资柜"
|
|
|
clearable
|
|
|
- class="!w-240px"
|
|
|
+ class="!w-230px"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in cabinets"
|
|
|
@@ -28,7 +28,7 @@
|
|
|
v-model="queryParams.status"
|
|
|
placeholder="请选择状态"
|
|
|
clearable
|
|
|
- class="!w-240px"
|
|
|
+ class="!w-230px"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.MATERIAL_EXCEPTION_STATUS)"
|
|
|
@@ -42,26 +42,24 @@
|
|
|
<el-date-picker
|
|
|
v-model="createTime"
|
|
|
type="datetimerange"
|
|
|
- :default-time="['00:00:00', '23:59:59']"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
range-separator="-"
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
|
- class="!w-240px"
|
|
|
- :shortcuts="dateShortcuts"
|
|
|
- @change="handleClearTime"
|
|
|
+ class="!w-290px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="异常解除时间">
|
|
|
<el-date-picker
|
|
|
v-model="handleTime"
|
|
|
type="datetimerange"
|
|
|
- :default-time="['00:00:00', '23:59:59']"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
range-separator="-"
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
|
- class="!w-240px"
|
|
|
- :shortcuts="dateShortcuts"
|
|
|
- @change="handleClearTime2"
|
|
|
+ class="!w-290px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -116,35 +114,35 @@ const createTime = ref<[Date, Date] | null>(null) // 异常发生时间
|
|
|
const handleTime = ref<[Date, Date] | null>(null) // 异常解除时间
|
|
|
|
|
|
// 日期快捷选项
|
|
|
-const dateShortcuts = [
|
|
|
- {
|
|
|
- text: '最近一周',
|
|
|
- value: () => {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
- return [start, end]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近一个月',
|
|
|
- value: () => {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
|
- return [start, end]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近三个月',
|
|
|
- value: () => {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
|
|
- return [start, end]
|
|
|
- }
|
|
|
- }
|
|
|
-]
|
|
|
+// const dateShortcuts = [
|
|
|
+// {
|
|
|
+// text: '最近一周',
|
|
|
+// value: () => {
|
|
|
+// const end = new Date()
|
|
|
+// const start = new Date()
|
|
|
+// start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
+// return [start, end]
|
|
|
+// }
|
|
|
+// },
|
|
|
+// {
|
|
|
+// text: '最近一个月',
|
|
|
+// value: () => {
|
|
|
+// const end = new Date()
|
|
|
+// const start = new Date()
|
|
|
+// start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
|
+// return [start, end]
|
|
|
+// }
|
|
|
+// },
|
|
|
+// {
|
|
|
+// text: '最近三个月',
|
|
|
+// value: () => {
|
|
|
+// const end = new Date()
|
|
|
+// const start = new Date()
|
|
|
+// start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
|
|
+// return [start, end]
|
|
|
+// }
|
|
|
+// }
|
|
|
+// ]
|
|
|
|
|
|
// 查询参数
|
|
|
const queryParams = reactive({
|
|
|
@@ -207,21 +205,21 @@ const resetQuery = () => {
|
|
|
handleQuery()
|
|
|
}
|
|
|
|
|
|
-/** 清空时间范围 */
|
|
|
-const handleClearTime = (value: [Date, Date] | null) => {
|
|
|
- if (!value) {
|
|
|
- queryParams.startTime = undefined
|
|
|
- queryParams.endTime = undefined
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/** 清空处理时间范围 */
|
|
|
-const handleClearTime2 = (value: [Date, Date] | null) => {
|
|
|
- if (!value) {
|
|
|
- queryParams.handleStartTime = undefined
|
|
|
- queryParams.handleEndTime = undefined
|
|
|
- }
|
|
|
-}
|
|
|
+// /** 清空时间范围 */
|
|
|
+// const handleClearTime = (value: [Date, Date] | null) => {
|
|
|
+// if (!value) {
|
|
|
+// queryParams.startTime = undefined
|
|
|
+// queryParams.endTime = undefined
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// /** 清空处理时间范围 */
|
|
|
+// const handleClearTime2 = (value: [Date, Date] | null) => {
|
|
|
+// if (!value) {
|
|
|
+// queryParams.handleStartTime = undefined
|
|
|
+// queryParams.handleEndTime = undefined
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
/** 初始化 */
|
|
|
onMounted(async () => {
|