优化
This commit is contained in:
@@ -33,20 +33,20 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column prop="bill_status" label="状态" align="center" width="110px" :formatter="bill_statusFormat" />
|
||||
<el-table-column show-overflow-tooltip prop="seq_no" label="明细序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" label="已分配重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" label="未分配重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column prop="quality_scode" label="品质类型" align="center" width="110px" :formatter="quality_scodeFormat" />
|
||||
<el-table-column prop="ivt_level" label="库存等级" align="center" width="100px" :formatter="ivt_levelFormat" />
|
||||
<el-table-column prop="is_active" label="是否可用" align="center" width="110px" :formatter="is_activeFormat" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单编号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="bill_status" label="状态" align="center" width="60" :formatter="bill_statusFormat" />
|
||||
<el-table-column prop="seq_no" label="序号" align="center" width="60" />
|
||||
<el-table-column prop="material_code" label="物料编码" align="center" min-width="110px" />
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150"/>
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" min-width="120" />
|
||||
<el-table-column prop="plan_qty" label="重量" :formatter="crud.formatNum3" align="center" min-width="100" />
|
||||
<el-table-column prop="assign_qty" label="已分配重量" :formatter="crud.formatNum3" align="center" min-width="100" />
|
||||
<el-table-column prop="unassign_qty" label="未分配重量" :formatter="crud.formatNum3" align="center" min-width="100" />
|
||||
<el-table-column prop="quality_scode" label="品质类型" min-width="80" align="center" :formatter="quality_scodeFormat" />
|
||||
<el-table-column prop="ivt_level" label="库存等级" align="center" min-width="80" :formatter="ivt_levelFormat" />
|
||||
<el-table-column prop="is_active" label="是否可用" align="center" min-width="80" :formatter="is_activeFormat" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center" min-width="80" width="130px" :formatter="invtypeFormat" />
|
||||
<el-table-column prop="source_bill_code" label="源单编号" align="center" min-width="120" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" min-width="100" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
@@ -63,17 +63,17 @@
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="seq_no" label="明细序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="桶号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="real_qty" label="出入库重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="出入库点" align="center" />
|
||||
<el-table-column prop="seq_no" label="序号" align="center" width="60" />
|
||||
<el-table-column prop="storagevehicle_code" label="托盘号" align="center" min-width="100" />
|
||||
<el-table-column prop="bucketunique" label="桶号" align="center" min-width="120" />
|
||||
<el-table-column prop="material_code" label="物料编码" align="center" min-width="110px" />
|
||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="140" />
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" min-width="100" />
|
||||
<el-table-column prop="real_qty" label="出入库重量" :formatter="crud.formatNum3" align="center" min-width="100" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" align="center" min-width="100" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" align="center" min-width="100" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" min-width="100" />
|
||||
<el-table-column prop="point_code" label="出入库点" align="center" min-width="100" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
|
||||
@@ -151,7 +151,8 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
@@ -188,9 +189,9 @@
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column prop="biz_date" width="100" align="center" label="业务日期"/>
|
||||
<el-table-column show-overflow-tooltip :formatter="bill_typeFormat" align="center" width="130" prop="bill_type" label="单据类型"/>
|
||||
<el-table-column :formatter="bill_typeFormat" align="center" width="130" prop="bill_type" label="单据类型"/>
|
||||
<el-table-column prop="io_type" :formatter="ioFormat" label="出入库类型" width="100" align="center"/>
|
||||
<el-table-column prop="stor_name" label="仓库" show-overflow-tooltip width="80" align="center"/>
|
||||
<el-table-column prop="stor_name" label="仓库" width="80" align="center"/>
|
||||
<el-table-column prop="input_optname" label="业务员" align="center"/>
|
||||
<el-table-column min-width="200" prop="name" label="部门" align="center"/>
|
||||
<el-table-column min-width="200" align="center" prop="supp_name" label="供应商"/>
|
||||
@@ -232,6 +233,7 @@ import DivDialog from '@/views/wms/statistics/ioStorQuery/DivDialog'
|
||||
import TaskDialog from '@/views/wms/statistics/ioStorQuery/TaskDialog'
|
||||
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'IoStorQuery2',
|
||||
@@ -268,6 +270,7 @@ export default {
|
||||
currentRow: null,
|
||||
checkrows: [],
|
||||
storlist: [],
|
||||
query_flag: true,
|
||||
billtypelist: []
|
||||
}
|
||||
},
|
||||
@@ -284,9 +287,15 @@ export default {
|
||||
checkoutbill.getType().then(res => {
|
||||
this.billtypelist = res
|
||||
})
|
||||
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
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
|
||||
}
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
fun(val) {
|
||||
@@ -295,6 +304,19 @@ export default {
|
||||
ioFormat(row, column) {
|
||||
return this.dict.label.io_type[row.io_type]
|
||||
},
|
||||
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()
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
|
||||
@@ -14,7 +14,16 @@
|
||||
|
||||
<el-form-item label="日期">
|
||||
<label slot="label">日 期:</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="产品批次">
|
||||
@@ -34,7 +43,7 @@
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入批次"
|
||||
placeholder="请输入产品编码"
|
||||
style="width: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
@@ -57,22 +66,22 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="100" align="center" />
|
||||
<el-table-column prop="create_time" label="日期" width="150px" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="workorder_code" label="工令号" width="120px" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="120" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="pcsn" label="批次" min-width="150" show-overflow-tooltip fixed />
|
||||
<el-table-column prop="yl_thw" label="碳化钨" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_gf" label="钴粉" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_tf" label="碳粉" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_wf" label="钨粉" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_other" label="其他有色金属粉" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_yzj" label="抑制剂(添加剂)" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="fl_cxj" label="成型剂" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="cp_rf" label="软废返工料" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="total" label="合计" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="in_dateTime" label="成品入库日期" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="out_weight" label="成品产出量" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yield" label="产出率" min-width="150" show-overflow-tooltip :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="create_time" label="日期" width="150px" fixed />
|
||||
<el-table-column prop="workorder_code" label="工令号" width="120px" fixed />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="120" fixed />
|
||||
<el-table-column prop="pcsn" label="批次" min-width="150" fixed />
|
||||
<el-table-column prop="yl_thw" label="碳化钨" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_gf" label="钴粉" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_tf" label="碳粉" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_wf" label="钨粉" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_other" label="其他有色金属粉" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yl_yzj" label="抑制剂(添加剂)" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="fl_cxj" label="成型剂" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="cp_rf" label="软废返工料" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="total" label="合计" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="in_dateTime" label="成品入库日期" min-width="150" />
|
||||
<el-table-column prop="out_weight" label="成品产出量" min-width="150" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="yield" label="产出率" min-width="150" :formatter="crud.formatNum3"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -87,6 +96,7 @@ import pagination from '@crud/Pagination'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import crudPowderproductionquery from '@/api/wms/statistics/powderproductionquery'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'PowderProductionQuery',
|
||||
@@ -115,15 +125,35 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
query_flag: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
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
|
||||
}
|
||||
return true
|
||||
},
|
||||
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()
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
|
||||
@@ -26,23 +26,23 @@
|
||||
@current-change="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column show-overflow-tooltip min-width="140" prop="create_time" label="日期" />
|
||||
<el-table-column show-overflow-tooltip min-width="130" prop="workorder_code" label="工令号" />
|
||||
<el-table-column show-overflow-tooltip prop="worktask_code" label="工序任务号" min-width="130"/>
|
||||
<el-table-column show-overflow-tooltip prop="device_name" label="设备" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" min-width="130" />
|
||||
<el-table-column show-overflow-tooltip prop="product_series" label="系列" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" min-width="130"/>
|
||||
<el-table-column show-overflow-tooltip prop="product_qty" label="生产重量" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip prop="planstart_time" label="计划开始时间" min-width="140"/>
|
||||
<el-table-column show-overflow-tooltip prop="planend_time" label="计划结束时间" min-width="140"/>
|
||||
<el-table-column show-overflow-tooltip prop="start_time" label="实际开始时间" min-width="140"/>
|
||||
<el-table-column show-overflow-tooltip prop="end_time" label="实际结束时间" min-width="140"/>
|
||||
<el-table-column show-overflow-tooltip prop="status" label="状态" :formatter="formatStatus"/>
|
||||
<el-table-column show-overflow-tooltip prop="workprocedure_name" label="工序" />
|
||||
<el-table-column show-overflow-tooltip prop="start_name" label="工序开始人员" width="130px"/>
|
||||
<el-table-column show-overflow-tooltip prop="end_name" label="工序结束人员" width="130px"/>
|
||||
<el-table-column min-width="140" prop="create_time" label="日期" />
|
||||
<el-table-column min-width="130" prop="workorder_code" label="工令号" />
|
||||
<el-table-column prop="worktask_code" label="工序任务号" min-width="130"/>
|
||||
<el-table-column prop="device_name" label="设备" min-width="100" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="130" />
|
||||
<el-table-column prop="product_series" label="系列" :formatter="seriesFormat" min-width="100" />
|
||||
<el-table-column prop="pcsn" label="批次" min-width="130"/>
|
||||
<el-table-column prop="product_qty" label="生产重量" min-width="100" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" min-width="100" />
|
||||
<el-table-column prop="planstart_time" label="计划开始时间" min-width="140"/>
|
||||
<el-table-column prop="planend_time" label="计划结束时间" min-width="140"/>
|
||||
<el-table-column prop="start_time" label="实际开始时间" min-width="140"/>
|
||||
<el-table-column prop="end_time" label="实际结束时间" min-width="140"/>
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatus" min-width="100" />
|
||||
<el-table-column prop="workprocedure_name" label="工序" min-width="100" />
|
||||
<el-table-column prop="start_name" label="工序开始人员" min-width="130px"/>
|
||||
<el-table-column prop="end_name" label="工序结束人员" min-width="130px"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<!-- <pagination />-->
|
||||
@@ -77,6 +77,7 @@
|
||||
import CRUD, { presenter, header } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import crudProductionday from '@/api/wms/statistics/productionday'
|
||||
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
|
||||
|
||||
export default {
|
||||
name: 'TaskDtlDialog',
|
||||
@@ -109,6 +110,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
XLList: [],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
@@ -124,6 +126,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudseriesProcessRoute.getXLlist2().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
@@ -140,6 +147,13 @@ export default {
|
||||
open() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
seriesFormat(row) {
|
||||
for (const item of this.XLList) {
|
||||
if (item.id === row.product_series_id) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
const data = {
|
||||
'worktask_id': current.worktask_id,
|
||||
|
||||
@@ -15,7 +15,16 @@
|
||||
|
||||
<el-form-item label="日期">
|
||||
<label slot="label">日 期:</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="产品批次">
|
||||
@@ -35,7 +44,7 @@
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入批次"
|
||||
placeholder="请输入产品编码"
|
||||
style="width: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
@@ -67,10 +76,10 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column type="selection" width="45" />
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" width="150px" show-overflow-tooltip />
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" align="center" min-width="140" />
|
||||
</template>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
@@ -89,6 +98,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import TaskDtlDialog from '@/views/wms/statistics/productionDayQuery/TaskDtlDialog'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'ProductionDayQuery',
|
||||
@@ -118,6 +128,7 @@ export default {
|
||||
return {
|
||||
cols: [],
|
||||
statusList: [],
|
||||
query_flag: true,
|
||||
openParam: null,
|
||||
viewDialog: false,
|
||||
permission: {
|
||||
@@ -125,9 +136,17 @@ export default {
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
created() {
|
||||
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
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
|
||||
}
|
||||
crudProductionday.getHeader().then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
@@ -135,6 +154,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()
|
||||
},
|
||||
view() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
this.openParam = _selectData[0]
|
||||
|
||||
@@ -42,7 +42,16 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<label slot="label">日 期:</label>
|
||||
<date-range-picker v-model="query.createTime" class="date-item" style="width: 210px" />
|
||||
<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="物料">
|
||||
@@ -155,6 +164,7 @@ import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import AddDialog from '@/views/wms/ql/inspectionsheet/AddDialog'
|
||||
import ResultPutDialog from '@/views/wms/ql/inspectionsheet/ResultPutDialog'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'SheetQuery',
|
||||
@@ -187,6 +197,7 @@ export default {
|
||||
currentRow: {},
|
||||
resultPutDialog: false,
|
||||
openParam: {},
|
||||
query_flag: true,
|
||||
passList: [
|
||||
{ 'label': '合格', 'value': '01' },
|
||||
{ 'label': '不合格', 'value': '02' }
|
||||
@@ -199,10 +210,16 @@ export default {
|
||||
crudInspectionsheetmst.getStatus().then(res => {
|
||||
this.statusList = res
|
||||
})
|
||||
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
|
||||
}
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
@@ -228,6 +245,19 @@ export default {
|
||||
this.currentRow = current
|
||||
}
|
||||
},
|
||||
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()
|
||||
},
|
||||
handleCurrentChange(current) {
|
||||
if (current === null) {
|
||||
this.currentRow = {}
|
||||
|
||||
Reference in New Issue
Block a user