优化
This commit is contained in:
@@ -11,34 +11,17 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<!-- <el-form-item label="桶类型">
|
||||
<label slot="label">桶 类 型:</label>
|
||||
<el-select
|
||||
v-model="query.storagevehicle_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选桶类型"
|
||||
class="filter-item"
|
||||
style="width: 230px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.MD_BUCKET_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="生成日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
@input="onInput()"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -214,6 +197,7 @@ import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import crudBucketrecord from "@/api/wms/basedata/master/bucketrecord";
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
const defaultForm = { bagrecord_id: null, bag_id: null, material_id: null, pcsn: null, qty_unit_id: null, qty_unit_name: null, storage_qty: null, seqno: null, remark: null, waste_type: null, return_person: null, print_times: null, status: null, input_optid: null, input_optname: null, input_time: null, bucketunique: null, makeup_optid: null, makeup_optname: null, makeup_time: null, print_type: null }
|
||||
export default {
|
||||
@@ -248,20 +232,22 @@ export default {
|
||||
{ 'code': '02', 'name': '组桶' },
|
||||
{ 'code': '03', 'name': '清洗' }
|
||||
],
|
||||
open: true,
|
||||
query_flag: true,
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
created() {
|
||||
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.open) {
|
||||
this.open = false
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
},
|
||||
hand(value) {
|
||||
@@ -288,6 +274,19 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
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()
|
||||
},
|
||||
print: function() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
for (let i = 0; i < _selectData.length; i++) {
|
||||
|
||||
@@ -48,11 +48,12 @@
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
@input="onInput()"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -160,7 +161,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table :max-height="590" ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table ref="table" v-loading="crud.loading" :max-height="590" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-permission="['admin','productplanproc:edit','productplanproc:del']" fixed="right" label="操作" width="70px" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -203,6 +204,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
const defaultForm = { bucket_record_id: null, bucketunique: null, storagevehicle_type: null, material_id: null, pcsn: null, ivt_level: null, is_active: null, quality_scode: null, qty_unit_id: null, qty_unit_name: null, storage_qty: null, record_order: null, bag_qty: null, remark: null, print_times: null, status: null, create_id: null, create_name: null, create_time: null, storagevehicle_id: null, storagevehicle_code: null, makeup_optid: null, makeup_optname: null, makeup_time: null, instor_optid: null, instor_optname: null, instor_time: null, outstor_optid: null, outstor_optname: null, outstor_time: null, instor_optid2: null, instor_optname2: null, instor_time2: null, print_type: null }
|
||||
export default {
|
||||
@@ -236,7 +238,7 @@ export default {
|
||||
return {
|
||||
StatusList: [],
|
||||
TypeList: [],
|
||||
open: true,
|
||||
query_flag: true,
|
||||
QualityList: [],
|
||||
IvtList: [],
|
||||
permission: {
|
||||
@@ -258,15 +260,15 @@ export default {
|
||||
crudBucketrecord.getIvtList().then(res => {
|
||||
this.IvtList = res
|
||||
})
|
||||
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.open) {
|
||||
this.open = false
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
},
|
||||
hand(value) {
|
||||
@@ -300,6 +302,19 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
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()
|
||||
},
|
||||
formatIsName(row, column) {
|
||||
if (row.is_active === '1') {
|
||||
return '是'
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="方案编码" prop="inspection_scheme_code">
|
||||
<el-input v-model="form.inspection_scheme_code" style="width: 370px;" />
|
||||
<el-input v-model="form.inspection_scheme_code" style="width: 370px;" :disabled="true" placeholder="系统生成" />
|
||||
</el-form-item>
|
||||
<el-form-item label="方案名称" prop="inspection_scheme_name">
|
||||
<el-input v-model="form.inspection_scheme_name" style="width: 370px;" />
|
||||
@@ -216,9 +216,6 @@ export default {
|
||||
inspection_item_type: null,
|
||||
permission: {},
|
||||
rules: {
|
||||
inspection_scheme_code: [
|
||||
{ required: true, message: '检验方案编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
inspection_scheme_name: [
|
||||
{ required: true, message: '检验方案名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user