Commit 12ccc137 authored by 沈翠玲's avatar 沈翠玲

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents 780bde52 5a99db5c
...@@ -98,15 +98,15 @@ ...@@ -98,15 +98,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> --> </el-form-item> -->
<el-form-item label="需求日期" prop="requestDate"> <el-form-item label="需求日期">
<el-date-picker <el-date-picker
clearable v-model="daterangePurchaseDate"
v-model="queryParams.requestDate"
type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="请选择需求日期" type="daterange"
> range-separator="-"
</el-date-picker> start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
...@@ -893,7 +893,7 @@ import CombinationInfos from "@/views/mes/pro/combination/infos.vue"; ...@@ -893,7 +893,7 @@ import CombinationInfos from "@/views/mes/pro/combination/infos.vue";
import {batchAddArrange} from "@/api/mes/pro/arrange"; import {batchAddArrange} from "@/api/mes/pro/arrange";
import ArrangeInfo from "@/views/mes/pro/arrange/info.vue"; import ArrangeInfo from "@/views/mes/pro/arrange/info.vue";
import CommandList from "./commandList.vue"; import CommandList from "./commandList.vue";
import dayjs from 'dayjs';
export default { export default {
name: "Workorder", name: "Workorder",
dicts: [ dicts: [
...@@ -944,6 +944,8 @@ export default { ...@@ -944,6 +944,8 @@ export default {
// 生产工单树选项 // 生产工单树选项
workorderOptions: [], workorderOptions: [],
selectedRows: [], selectedRows: [],
daterangePurchaseDate: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
...@@ -1027,9 +1029,17 @@ export default { ...@@ -1027,9 +1029,17 @@ export default {
this.getList(); this.getList();
}, },
created() { created() {
this.setDate();
this.getList(); this.getList();
}, },
methods: { methods: {
//筛选日期设置默认值
setDate(){
this.daterangePurchaseDate = [dayjs().add(-3,'day').format('YYYY-MM-DD'), dayjs().add(3, 'day').format('YYYY-MM-DD')]
},
handleCommandClick() { handleCommandClick() {
this.currentData = this.selectedRows[0] this.currentData = this.selectedRows[0]
if (this.selectedRows[0].workorderType == 'prototype'&&this.selectedRows[0].status === "PREPARE") { if (this.selectedRows[0].workorderType == 'prototype'&&this.selectedRows[0].status === "PREPARE") {
...@@ -1133,6 +1143,11 @@ export default { ...@@ -1133,6 +1143,11 @@ export default {
/** 查询生产工单列表 */ /** 查询生产工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.queryParams.params = {};
if (null != this.daterangePurchaseDate && '' != this.daterangePurchaseDate) {
this.queryParams.params["beginPurchaseDate"] = this.daterangePurchaseDate[0];
this.queryParams.params["endPurchaseDate"] = this.daterangePurchaseDate[1];
}
listWorkorder(this.queryParams).then((response) => { listWorkorder(this.queryParams).then((response) => {
this.workorderList = this.handleTree( this.workorderList = this.handleTree(
response.rows, response.rows,
...@@ -1255,6 +1270,7 @@ export default { ...@@ -1255,6 +1270,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.daterangePurchaseDate= [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment