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 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="需求日期" prop="requestDate">
<el-form-item label="需求日期">
<el-date-picker
clearable
v-model="queryParams.requestDate"
type="date"
v-model="daterangePurchaseDate"
value-format="yyyy-MM-dd"
placeholder="请选择需求日期"
>
</el-date-picker>
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
......@@ -893,7 +893,7 @@ import CombinationInfos from "@/views/mes/pro/combination/infos.vue";
import {batchAddArrange} from "@/api/mes/pro/arrange";
import ArrangeInfo from "@/views/mes/pro/arrange/info.vue";
import CommandList from "./commandList.vue";
import dayjs from 'dayjs';
export default {
name: "Workorder",
dicts: [
......@@ -944,6 +944,8 @@ export default {
// 生产工单树选项
workorderOptions: [],
selectedRows: [],
daterangePurchaseDate: [],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -1027,9 +1029,17 @@ export default {
this.getList();
},
created() {
this.setDate();
this.getList();
},
methods: {
//筛选日期设置默认值
setDate(){
this.daterangePurchaseDate = [dayjs().add(-3,'day').format('YYYY-MM-DD'), dayjs().add(3, 'day').format('YYYY-MM-DD')]
},
handleCommandClick() {
this.currentData = this.selectedRows[0]
if (this.selectedRows[0].workorderType == 'prototype'&&this.selectedRows[0].status === "PREPARE") {
......@@ -1133,6 +1143,11 @@ export default {
/** 查询生产工单列表 */
getList() {
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) => {
this.workorderList = this.handleTree(
response.rows,
......@@ -1255,6 +1270,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.daterangePurchaseDate= [];
this.resetForm("queryForm");
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