优化
This commit is contained in:
@@ -13,7 +13,16 @@
|
||||
>
|
||||
|
||||
<el-form-item label="到货日期">
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据编号">
|
||||
@@ -96,13 +105,13 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
||||
<el-table-column prop="1" label="物料编码" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="2" label="物料名称" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="3" label="批号" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="4" label="重量" min-width="100" show-overflow-tooltip fixed />
|
||||
<el-table-column type="index" label="序号" width="60" align="center" fixed />
|
||||
<el-table-column prop="1" label="物料编码" min-width="110" fixed />
|
||||
<el-table-column prop="2" label="物料名称" min-width="150" fixed />
|
||||
<el-table-column prop="3" label="批号" min-width="130" fixed />
|
||||
<el-table-column prop="4" label="重量" min-width="100" fixed />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" width="120px" show-overflow-tooltip />
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" align="center" min-width="220" />
|
||||
</template>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -122,6 +131,7 @@ import DateRangePicker from '@/components/DateRangePicker'
|
||||
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
|
||||
import {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'RawUatWcQuery',
|
||||
@@ -159,11 +169,16 @@ export default {
|
||||
beforeCreate() {
|
||||
},
|
||||
created() {
|
||||
|
||||
this.crud.query.createTime = [new Date().daysAgo(30), new Date()]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if(this.query_flag){
|
||||
this.crud.query.begin_time = (new Date().daysAgo(30)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
var str = this.$route.path
|
||||
// var material_type_id = str.substring(str.length - 2)
|
||||
// 截取最后一个/之后的内容
|
||||
@@ -182,6 +197,19 @@ export default {
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
mytoQuery(array1) {
|
||||
if (array1 === null) {
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
} else {
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
|
||||
Reference in New Issue
Block a user