This commit is contained in:
zds
2022-12-01 18:59:08 +08:00
parent 238a61ccad
commit 70fe17b48c
15 changed files with 215 additions and 66 deletions

View File

@@ -76,11 +76,11 @@ public class AcceptFormulaServiceImpl implements AcceptFormulaService {
if (!StrUtil.isEmpty(accept_pcsn)) { if (!StrUtil.isEmpty(accept_pcsn)) {
map.put("accept_pcsn", "%"+accept_pcsn+"%"); map.put("accept_pcsn", "%"+accept_pcsn+"%");
} }
String begin_time = map.get("begin_time"); String begin_time = (String) whereJson.get("begin_time");
if (StrUtil.isNotEmpty(begin_time)) { if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00"); map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
} }
String end_time = map.get("end_time"); String end_time = (String) whereJson.get("end_time");
if (StrUtil.isNotEmpty(end_time)) { if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59"); map.put("end_time", end_time.substring(0,10)+" 23:59:59");
} }

View File

@@ -36,16 +36,20 @@ public class DevicePairQueryServiceImpl implements DevicePairQueryService {
String repair_code = MapUtil.getStr(whereJson, "repair_code"); String repair_code = MapUtil.getStr(whereJson, "repair_code");
String device_code = MapUtil.getStr(whereJson, "device_code"); String device_code = MapUtil.getStr(whereJson, "device_code");
String invstatus = MapUtil.getStr(whereJson, "invstatus"); String invstatus = MapUtil.getStr(whereJson, "invstatus");
String begin_time = MapUtil.getStr(whereJson, "begin_time");
String end_time = MapUtil.getStr(whereJson, "end_time");
String material_type_id = MapUtil.getStr(whereJson, "material_type_id"); String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
String class_idStr = (String) whereJson.get("class_idStr"); String class_idStr = (String) whereJson.get("class_idStr");
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("flag", "1"); map.put("flag", "1");
map.put("invstatus",invstatus); map.put("invstatus",invstatus);
map.put("begin_time",begin_time); String begin_time = MapUtil.getStr(whereJson, "begin_time");
map.put("end_time",end_time); if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10));
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10));
}
if (ObjectUtil.isNotEmpty(repair_code)) map.put("repair_code","%"+repair_code+"%"); if (ObjectUtil.isNotEmpty(repair_code)) map.put("repair_code","%"+repair_code+"%");
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%"); if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
//处理物料当前节点的所有子节点 //处理物料当前节点的所有子节点

View File

@@ -55,8 +55,8 @@
MAX(file.device_code) AS device_code, MAX(file.device_code) AS device_code,
MAX(file.device_model) AS device_model, MAX(file.device_model) AS device_model,
re.devicerecord_id, re.devicerecord_id,
MAX( file.device_name ) AS device_name, MAX(file.device_name) AS device_name,
MAX( file.extend_code ) AS extend_code MAX(file.extend_code) AS extend_code
FROM FROM
EM_BI_DeviceRepairRequest re EM_BI_DeviceRepairRequest re
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = re.devicerecord_id LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = re.devicerecord_id
@@ -68,25 +68,20 @@
OPTION 输入.classIds <> "" OPTION 输入.classIds <> ""
class.class_id in 输入.classIds class.class_id in 输入.classIds
ENDOPTION ENDOPTION
OPTION 输入.device_gz <> "" OPTION 输入.device_gz <> ""
fclass.device_faultclass_id = 输入.device_gz fclass.device_faultclass_id = 输入.device_gz
ENDOPTION ENDOPTION
OPTION 输入.device_code <> "" OPTION 输入.device_code <> ""
(file.device_code like 输入.device_code or (file.device_code like 输入.device_code or
file.device_name like 输入.device_code) file.device_name like 输入.device_code)
ENDOPTION ENDOPTION
OPTION 输入.dept_id <> "" OPTION 输入.dept_id <> ""
(dept.code like 输入.dept_id or (dept.code like 输入.dept_id or
dept.name like 输入.dept_id) dept.name like 输入.dept_id)
ENDOPTION ENDOPTION
OPTION 输入.begin_time <> "" OPTION 输入.begin_time <> ""
re.fault_time >= 输入.begin_time re.fault_time >= 输入.begin_time
ENDOPTION ENDOPTION
OPTION 输入.end_time <> "" OPTION 输入.end_time <> ""
re.fault_time <= 输入.end_time re.fault_time <= 输入.end_time
ENDOPTION ENDOPTION

View File

@@ -79,6 +79,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
if (StrUtil.isNotEmpty(map.get("buss_type"))) { if (StrUtil.isNotEmpty(map.get("buss_type"))) {
map.put("buss_type", whereJson.get("buss_type") + "%"); map.put("buss_type", whereJson.get("buss_type") + "%");
} }
String begin_time = MapUtil.getStr(whereJson, "begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
if (StrUtil.isNotEmpty(map.get("io_type"))) { if (StrUtil.isNotEmpty(map.get("io_type"))) {
map.put("io_type", map.get("io_type")); map.put("io_type", map.get("io_type"));
} }

View File

@@ -32,8 +32,14 @@ public class PhysicalQueryServiceImpl implements PhysicalQueryService {
String material_model = MapUtil.getStr(whereJson, "material_model"); String material_model = MapUtil.getStr(whereJson, "material_model");
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("flag", "1"); map.put("flag", "1");
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time")); String begin_time = MapUtil.getStr(whereJson, "begin_time");
map.put("end_time", MapUtil.getStr(whereJson, "end_time")); if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10)+" 00:00:00");
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10)+" 23:59:59");
}
map.put("inspection_code", MapUtil.getStr(whereJson, "inspection_code")); map.put("inspection_code", MapUtil.getStr(whereJson, "inspection_code"));
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn","%"+pcsn+"%"); if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn","%"+pcsn+"%");
if (ObjectUtil.isNotEmpty(material_model)) map.put("material_model","%"+material_model+"%"); if (ObjectUtil.isNotEmpty(material_model)) map.put("material_model","%"+material_model+"%");

View File

@@ -41,8 +41,14 @@ public class RawUatWcQueryServiceImpl implements RawUatWcQueryService {
String material_type_id = MapUtil.getStr(whereJson, "material_type_id"); String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("flag", "1"); map.put("flag", "1");
map.put("begin_time", MapUtil.getStr(whereJson,"begin_time")); String begin_time = MapUtil.getStr(whereJson, "begin_time");
map.put("end_time", MapUtil.getStr(whereJson,"end_time")); if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10));
}
String end_time = MapUtil.getStr(whereJson, "end_time");
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10));
}
map.put("receive_code", MapUtil.getStr(whereJson,"receive_code")); map.put("receive_code", MapUtil.getStr(whereJson,"receive_code"));
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%"); if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
map.put("bill_status", MapUtil.getStr(whereJson,"bill_status")); map.put("bill_status", MapUtil.getStr(whereJson,"bill_status"));

View File

@@ -481,9 +481,6 @@ export default {
this.mstrow = this.checkrows.pop() this.mstrow = this.checkrows.pop()
this.changeShow = true this.changeShow = true
}, },
onInput() {
this.$forceUpdate()
},
submit(status) { submit(status) {
this.checkrows = this.$refs.table.selection this.checkrows = this.$refs.table.selection
if (this.checkrows.length === 0) { if (this.checkrows.length === 0) {
@@ -541,6 +538,9 @@ export default {
this.crud.loading = false this.crud.loading = false
}) })
}, },
onInput() {
this.$forceUpdate()
},
mytoQuery(array1) { mytoQuery(array1) {
if (array1 === null) { if (array1 === null) {
this.crud.query.begin_time = '' this.crud.query.begin_time = ''

View File

@@ -12,7 +12,7 @@
label-width="80px" label-width="80px"
label-suffix=":" label-suffix=":"
> >
<el-form-item label="工令日期"> <el-form-item label="日期">
<el-date-picker <el-date-picker
v-model="query.createTime" v-model="query.createTime"
type="daterange" type="daterange"

View File

@@ -38,7 +38,7 @@
<!--表格渲染--> <!--表格渲染-->
<el-table 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" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="45" /> <el-table-column type="selection" width="45" />
<el-table-column v-permission="[]" label="操作" fixed="right" width="120px" align="center"> <el-table-column v-permission="[]" label="操作" fixed="right" min-width="120px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<udOperation <udOperation
:data="scope.row" :data="scope.row"
@@ -46,20 +46,20 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="material_code" label="碳化钨编码" width="120" align="center" /> <el-table-column prop="material_code" label="碳化钨编码" min-width="120" align="center" />
<el-table-column prop="material_name" width="120" label="碳化钨名称" align="center"> <el-table-column prop="material_name" min-width="120" label="碳化钨名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.material_name }}</el-link> <el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.material_name }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mark_code" width="150px" label="牌号" align="center" /> <el-table-column prop="mark_code" min-width="150px" label="牌号" align="center" />
<el-table-column prop="c_balance" label="碳平衡" width="90px" align="center" :formatter="crud.formatQlNum4" /> <el-table-column prop="c_balance" label="碳平衡" min-width="90" align="center" :formatter="crud.formatQlNum4" />
<el-table-column prop="liquid_rate" label="液料比" width="60" align="center" :formatter="crud.formatNum2" /> <el-table-column prop="liquid_rate" label="液料比" min-width="70" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_rate" label="球料比" width="60" align="center" :formatter="crud.formatNum2" /> <el-table-column prop="ball_rate" label="球料比" min-width="70" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_speed" label="球磨转速(RPM)" width="120px" align="center" :formatter="crud.formatNum2" /> <el-table-column prop="ball_speed" label="球磨转速(RPM)" min-width="120px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_time" label="研磨时间(h)" width="90px" align="center" :formatter="crud.formatNum2" /> <el-table-column prop="ball_time" label="研磨时间(h)" min-width="90px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="accept_qty" label="标准重量(g)" width="90px" align="center" :formatter="crud.formatNum2" /> <el-table-column prop="accept_qty" label="标准重量(g)" min-width="90px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="detail_count" label="明细数" align="center" min-width="60" /> <el-table-column prop="detail_count" label="明细数" align="center" min-width="70" />
<el-table-column prop="remark" label="备注" align="center" min-width="135" /> <el-table-column prop="remark" label="备注" align="center" min-width="135" />
<el-table-column prop="create_name" label="创建人" align="center" min-width="80" /> <el-table-column prop="create_name" label="创建人" align="center" min-width="80" />
<el-table-column prop="create_time" label="创建时间" min-width="135" align="center" /> <el-table-column prop="create_time" label="创建时间" min-width="135" align="center" />

View File

@@ -48,7 +48,16 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="维修单日期"> <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>
<el-form-item label="单据状态"> <el-form-item label="单据状态">
<el-select <el-select
@@ -105,9 +114,9 @@
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150"/> <el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150"/>
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" /> <el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
<el-table-column fixed="left" prop="use_name" label="使用班组" min-width="130"/> <el-table-column fixed="left" prop="use_name" label="使用班组" min-width="130"/>
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="70"/> <el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="80"/>
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="70"/> <el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="80"/>
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" width="95" /> <el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" width="110" />
<el-table-column fixed="left" prop="input_optname" label="创建人" min-width="90"/> <el-table-column fixed="left" prop="input_optname" label="创建人" min-width="90"/>
<el-table-column fixed="left" prop="input_time" label="创建时间" min-width="140" /> <el-table-column fixed="left" prop="input_time" label="创建时间" min-width="140" />
<el-table-column prop="bx_name" label="报修人" min-width="90"/> <el-table-column prop="bx_name" label="报修人" min-width="90"/>
@@ -287,6 +296,19 @@ export default {
return '维修计划' return '维修计划'
} }
}, },
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() { downdtl() {
if (this.currentRow !== null) { if (this.currentRow !== null) {
crud.downloadLoading = true crud.downloadLoading = true

View File

@@ -151,7 +151,8 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery" @input="onInput()"
@change="mytoQuery"
/> />
</el-form-item> </el-form-item>
<rrOperation /> <rrOperation />
@@ -238,6 +239,7 @@ import DivDialog from '@/views/wms/statistics/ioStorQuery/DivDialog'
import TaskDialog from '@/views/wms/statistics/ioStorQuery/TaskDialog' import TaskDialog from '@/views/wms/statistics/ioStorQuery/TaskDialog'
import crudStorattr from '@/api/wms/basedata/st/storattr' import crudStorattr from '@/api/wms/basedata/st/storattr'
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist' import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
import Date from '@/utils/datetime'
export default { export default {
name: 'IoStorQuery', name: 'IoStorQuery',
@@ -269,6 +271,7 @@ export default {
dis_flag: true, dis_flag: true,
work_flag: true, work_flag: true,
openParam: [], openParam: [],
query_flag: true,
mstrow: {}, mstrow: {},
currentRow: null, currentRow: null,
checkrows: [], checkrows: [],
@@ -289,9 +292,15 @@ export default {
checkoutbill.getType().then(res => { checkoutbill.getType().then(res => {
this.billtypelist = res this.billtypelist = res
}) })
this.crud.query.createTime = [new Date().daysAgo(30), new Date()]
}, },
methods: { methods: {
[CRUD.HOOK.beforeRefresh]() { [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) this.handleCurrentChange(null)
}, },
fun(val) { fun(val) {
@@ -315,6 +324,19 @@ export default {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.handleCurrentChange(null) this.handleCurrentChange(null)
}, },
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()
},
buttonChange(current) { buttonChange(current) {
if (current !== null) { if (current !== null) {
this.currentRow = current this.currentRow = current

View File

@@ -15,7 +15,16 @@
<el-form-item label="日期"> <el-form-item label="日期">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label> <label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</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>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
@@ -124,13 +133,13 @@
style="width: 100%;" style="width: 100%;"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="index" label="序号" width="100" align="center" fixed /> <el-table-column type="index" label="序号" width="60" align="center" fixed />
<el-table-column prop="0" label="质检单号" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="0" label="质检单号" min-width="130" fixed />
<el-table-column prop="1" label="物料编码" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="1" label="物料编码" min-width="130" fixed />
<el-table-column prop="20" label="物料名称" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="20" label="物料名称" min-width="130" fixed />
<el-table-column prop="2" label="批号" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="2" label="批号" min-width="130" fixed />
<template v-for="(col,index) in cols"> <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" width="140" />
</template> </template>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
@@ -150,10 +159,11 @@ import DateRangePicker from '@/components/DateRangePicker'
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst' import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
import { download } from '@/api/data' import { download } from '@/api/data'
import { downloadFile } from '@/utils' import { downloadFile } from '@/utils'
import Date from '@/utils/datetime'
export default { export default {
name: 'PhySicalQuery', name: 'PhySicalQuery',
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker }, components: { pagination, crudOperation, rrOperation },
mixins: [presenter(), header(), crud()], mixins: [presenter(), header(), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
@@ -179,6 +189,7 @@ export default {
return { return {
cols: [], cols: [],
statusList: [], statusList: [],
query_flag: true,
permission: { permission: {
}, },
rules: { rules: {
@@ -187,10 +198,16 @@ export default {
beforeCreate() { beforeCreate() {
}, },
created() { created() {
this.crud.query.createTime = [new Date().daysAgo(30), new Date()]
}, },
methods: { methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据 // 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() { [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
}
crudPhySicalQuery.getHeader().then(res => { crudPhySicalQuery.getHeader().then(res => {
this.cols = res this.cols = res
}) })
@@ -198,6 +215,19 @@ export default {
this.statusList = res this.statusList = res
}) })
}, },
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) { hand(value) {
this.crud.toQuery() this.crud.toQuery()
}, },

View File

@@ -45,13 +45,13 @@
<el-table ref="table" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="material_code" label="产品编码" width="180" /> <el-table-column prop="material_code" label="产品编码" width="180" />
<el-table-column prop="sum_qty" label="计划重量(吨)" :formatter="crud.formatNum3" min-width="80" /> <el-table-column prop="sum_qty" label="计划重量(吨)" :formatter="crud.formatNum3" min-width="100" />
<el-table-column prop="product_num" label="计划批次" min-width="80" /> <el-table-column prop="product_num" label="计划批次" min-width="80" />
<el-table-column prop="device_name" label="关键设备" width="100" /> <el-table-column prop="device_name" label="关键设备" width="100" />
<el-table-column prop="workorder_date" min-width="130" label="粉料配粉时间" /> <el-table-column prop="workorder_date" min-width="140" label="粉料配粉时间" />
<el-table-column prop="pw_time" label="粉料喷雾时间" width="130" /> <el-table-column prop="pw_time" label="粉料喷雾时间" width="140" />
<el-table-column prop="in_time" label="最后入库时间" width="130" /> <el-table-column prop="in_time" label="最后入库时间" width="140" />
<el-table-column prop="in_qty" label="入库重量(吨)" :formatter="crud.formatNum3" min-width="80" /> <el-table-column prop="in_qty" label="入库重量(吨)" :formatter="crud.formatNum3" min-width="100" />
<el-table-column prop="in_num" label="入库批数" width="80" /> <el-table-column prop="in_num" label="入库批数" width="80" />
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->

View File

@@ -13,7 +13,16 @@
> >
<el-form-item label="到货日期"> <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>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
@@ -96,13 +105,13 @@
style="width: 100%;" style="width: 100%;"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="index" label="序号" width="100" align="center" fixed /> <el-table-column type="index" label="序号" min-width="60" align="center" fixed />
<el-table-column prop="1" label="物料编码" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="1" label="物料编码" min-width="130" fixed />
<el-table-column prop="2" label="物料名称" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="2" label="物料名称" min-width="150" fixed />
<el-table-column prop="3" label="批号" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="3" label="批号" min-width="130" fixed />
<el-table-column prop="4" label="重量" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="4" label="重量" min-width="100" fixed />
<template v-for="(col,index) in cols"> <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="200" />
</template> </template>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
@@ -122,6 +131,7 @@ import DateRangePicker from '@/components/DateRangePicker'
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst' import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
import {download} from "@/api/data"; import {download} from "@/api/data";
import {downloadFile} from "@/utils"; import {downloadFile} from "@/utils";
import Date from '@/utils/datetime'
export default { export default {
name: 'RawUatCbQuery', name: 'RawUatCbQuery',
@@ -159,11 +169,16 @@ export default {
beforeCreate() { beforeCreate() {
}, },
created() { created() {
this.crud.query.createTime = [new Date().daysAgo(30), new Date()]
}, },
methods: { methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据 // 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() { [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 str = this.$route.path
// var material_type_id = str.substring(str.length - 2) // var material_type_id = str.substring(str.length - 2)
// 截取最后一个/之后的内容 // 截取最后一个/之后的内容
@@ -179,6 +194,19 @@ export default {
this.query.material_type_id = str this.query.material_type_id = str
return true 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) { hand(value) {
this.crud.toQuery() this.crud.toQuery()
}, },

View File

@@ -13,7 +13,16 @@
> >
<el-form-item label="到货日期"> <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>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
@@ -96,13 +105,13 @@
style="width: 100%;" style="width: 100%;"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="index" label="序号" width="100" align="center" fixed /> <el-table-column type="index" label="序号" width="60" align="center" fixed />
<el-table-column prop="1" label="物料编码" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="1" label="物料编码" min-width="110" fixed />
<el-table-column prop="2" label="物料名称" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="2" label="物料名称" min-width="150" fixed />
<el-table-column prop="3" label="批号" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="3" label="批号" min-width="130" fixed />
<el-table-column prop="4" label="重量" min-width="100" show-overflow-tooltip fixed /> <el-table-column prop="4" label="重量" min-width="100" fixed />
<template v-for="(col,index) in cols"> <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> </template>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
@@ -122,6 +131,7 @@ import DateRangePicker from '@/components/DateRangePicker'
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst' import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
import {download} from "@/api/data"; import {download} from "@/api/data";
import {downloadFile} from "@/utils"; import {downloadFile} from "@/utils";
import Date from '@/utils/datetime'
export default { export default {
name: 'RawUatWcQuery', name: 'RawUatWcQuery',
@@ -159,11 +169,16 @@ export default {
beforeCreate() { beforeCreate() {
}, },
created() { created() {
this.crud.query.createTime = [new Date().daysAgo(30), new Date()]
}, },
methods: { methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据 // 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() { [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 str = this.$route.path
// var material_type_id = str.substring(str.length - 2) // var material_type_id = str.substring(str.length - 2)
// 截取最后一个/之后的内容 // 截取最后一个/之后的内容
@@ -182,6 +197,19 @@ export default {
hand(value) { hand(value) {
this.crud.toQuery() 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() { downdtl() {
if (this.currentRow !== null) { if (this.currentRow !== null) {
crud.downloadLoading = true crud.downloadLoading = true