|
|
@ -1,7 +1,7 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
<el-form-item label="工作中心" prop="workCenterCode" >
|
|
|
|
<el-form-item label="工作中心" prop="workCenterCode">
|
|
|
|
<el-select v-model="queryParams.workCenterCode" placeholder="请选择工作中心" clearable>
|
|
|
|
<el-select v-model="queryParams.workCenterCode" placeholder="请选择工作中心" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in productLineList"
|
|
|
|
v-for="item in productLineList"
|
|
|
@ -37,16 +37,16 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item label="工单状态" prop="orderStatus">-->
|
|
|
|
<!-- <el-form-item label="工单状态" prop="orderStatus">-->
|
|
|
|
<!-- <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>-->
|
|
|
|
<!-- <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>-->
|
|
|
|
<!-- <el-option-->
|
|
|
|
<!-- <el-option-->
|
|
|
|
<!-- v-for="dict in dict.type.order_status"-->
|
|
|
|
<!-- v-for="dict in dict.type.order_status"-->
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
<!-- :label="dict.label"-->
|
|
|
|
<!-- :label="dict.label"-->
|
|
|
|
<!-- :value="dict.value"-->
|
|
|
|
<!-- :value="dict.value"-->
|
|
|
|
<!-- />-->
|
|
|
|
<!-- />-->
|
|
|
|
<!-- </el-select>-->
|
|
|
|
<!-- </el-select>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="是否已下达" prop="isRelease">
|
|
|
|
<el-form-item label="是否已下达" prop="isRelease">
|
|
|
|
<el-select v-model="queryParams.isRelease" placeholder="是否已下达到生产计划" clearable>
|
|
|
|
<el-select v-model="queryParams.isRelease" placeholder="是否已下达到生产计划" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
@ -72,7 +72,8 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleAdd"
|
|
|
|
@click="handleAdd"
|
|
|
|
v-hasPermi="['base:orderInfo:add']"
|
|
|
|
v-hasPermi="['base:orderInfo:add']"
|
|
|
|
>新增</el-button>
|
|
|
|
>新增
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -83,7 +84,8 @@
|
|
|
|
:disabled="single"
|
|
|
|
:disabled="single"
|
|
|
|
@click="handleUpdate"
|
|
|
|
@click="handleUpdate"
|
|
|
|
v-hasPermi="['base:orderInfo:edit']"
|
|
|
|
v-hasPermi="['base:orderInfo:edit']"
|
|
|
|
>修改</el-button>
|
|
|
|
>修改
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -94,7 +96,8 @@
|
|
|
|
:disabled="multiple"
|
|
|
|
:disabled="multiple"
|
|
|
|
@click="handleDelete"
|
|
|
|
@click="handleDelete"
|
|
|
|
v-hasPermi="['base:orderInfo:remove']"
|
|
|
|
v-hasPermi="['base:orderInfo:remove']"
|
|
|
|
>删除</el-button>
|
|
|
|
>删除
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
@ -104,13 +107,24 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleExport"
|
|
|
|
@click="handleExport"
|
|
|
|
v-hasPermi="['base:orderInfo:export']"
|
|
|
|
v-hasPermi="['base:orderInfo:export']"
|
|
|
|
>导出</el-button>
|
|
|
|
>导出
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click="sapForm"
|
|
|
|
|
|
|
|
>同步SAP周计划
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="orderInfoList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table v-loading="loading" :data="orderInfoList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="SAP计划编号" align="center" prop="orderCode" width="100px" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="SAP计划编号" align="center" prop="orderCode" width="100px" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="销售订单编号" align="center" prop="saleOrderCode" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="销售订单编号" align="center" prop="saleOrderCode" v-if="columns[2].visible"/>
|
|
|
@ -123,7 +137,9 @@
|
|
|
|
<dict-tag :options="dict.type.order_type" :value="scope.row.orderType"/>
|
|
|
|
<dict-tag :options="dict.type.order_type" :value="scope.row.orderType"/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="工单状态" align="center" prop="orderStatus" v-if="columns[10].visible" :show-overflow-tooltip="true">
|
|
|
|
<el-table-column label="工单状态" align="center" prop="orderStatus" v-if="columns[10].visible"
|
|
|
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
|
|
|
|
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -177,21 +193,23 @@
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-bottom"
|
|
|
|
icon="el-icon-bottom"
|
|
|
|
@click="handleReleasePlan(scope.row)"
|
|
|
|
@click="handleReleasePlan(scope.row)"
|
|
|
|
>下达计划</el-button>
|
|
|
|
>下达计划
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
type="text"
|
|
|
|
type="text"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
v-hasPermi="['base:orderInfo:edit']"
|
|
|
|
v-hasPermi="['base:orderInfo:edit']"
|
|
|
|
>修改工单</el-button>
|
|
|
|
>修改工单
|
|
|
|
<!-- <el-button-->
|
|
|
|
</el-button>
|
|
|
|
<!-- size="mini"-->
|
|
|
|
<!-- <el-button-->
|
|
|
|
<!-- type="text"-->
|
|
|
|
<!-- size="mini"-->
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
<!-- type="text"-->
|
|
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
|
|
<!-- icon="el-icon-delete"-->
|
|
|
|
<!-- v-hasPermi="['base:orderInfo:remove']"-->
|
|
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
|
|
<!-- >删除</el-button>-->
|
|
|
|
<!-- v-hasPermi="['base:orderInfo:remove']"-->
|
|
|
|
|
|
|
|
<!-- >删除</el-button>-->
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
@ -208,28 +226,28 @@
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
|
<el-form-item label="SAP计划编号" prop="orderCode">
|
|
|
|
<el-form-item label="SAP计划编号" prop="orderCode">
|
|
|
|
<el-input v-model="form.orderCode" placeholder="请输入SAP计划编号" />
|
|
|
|
<el-input v-model="form.orderCode" placeholder="请输入SAP计划编号"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="销售订单编号" prop="saleOrderCode">
|
|
|
|
<el-form-item label="销售订单编号" prop="saleOrderCode">
|
|
|
|
<el-input v-model="form.saleOrderCode" placeholder="请输入销售订单编号" />
|
|
|
|
<el-input v-model="form.saleOrderCode" placeholder="请输入销售订单编号"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="销售订单行号" prop="saleOrderLineNumber">
|
|
|
|
<el-form-item label="销售订单行号" prop="saleOrderLineNumber">
|
|
|
|
<el-input v-model="form.saleOrderLineNumber" placeholder="请输入销售订单行号" />
|
|
|
|
<el-input v-model="form.saleOrderLineNumber" placeholder="请输入销售订单行号"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料编码" prop="materialCode">
|
|
|
|
<el-form-item label="物料编码" prop="materialCode">
|
|
|
|
<el-input v-model="form.materialCode" placeholder="请输入物料编码" />
|
|
|
|
<el-input v-model="form.materialCode" placeholder="请输入物料编码"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input v-model="form.materialName" placeholder="请输入物料名称" />
|
|
|
|
<el-input v-model="form.materialName" placeholder="请输入物料名称"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料组" prop="matkl">
|
|
|
|
<el-form-item label="物料组" prop="matkl">
|
|
|
|
<el-input v-model="form.matkl" placeholder="请输入物料组" />
|
|
|
|
<el-input v-model="form.matkl" placeholder="请输入物料组"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="订单计划数量" prop="orderAmount">
|
|
|
|
<el-form-item label="订单计划数量" prop="orderAmount">
|
|
|
|
<el-input v-model="form.orderAmount" placeholder="请输入订单计划数量" />
|
|
|
|
<el-input v-model="form.orderAmount" placeholder="请输入订单计划数量"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="完成数量" prop="completeAmount">
|
|
|
|
<el-form-item label="完成数量" prop="completeAmount">
|
|
|
|
<el-input v-model="form.completeAmount" placeholder="请输入完成数量" />
|
|
|
|
<el-input v-model="form.completeAmount" placeholder="请输入完成数量"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="工单类型" prop="orderType">
|
|
|
|
<el-form-item label="工单类型" prop="orderType">
|
|
|
|
<el-select v-model="form.orderType" placeholder="请选择工单类型">
|
|
|
|
<el-select v-model="form.orderType" placeholder="请选择工单类型">
|
|
|
@ -242,33 +260,36 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="工单状态" prop="orderStatus">
|
|
|
|
<el-form-item label="工单状态" prop="orderStatus">
|
|
|
|
<el-input v-model="form.orderStatus" placeholder="请输入工单状态" />
|
|
|
|
<el-input v-model="form.orderStatus" placeholder="请输入工单状态"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="计划开始日期" prop="beginDate">
|
|
|
|
<el-form-item label="计划开始日期" prop="beginDate">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker clearable
|
|
|
|
v-model="form.beginDate"
|
|
|
|
v-model="form.beginDate"
|
|
|
|
type="date"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="请选择计划开始日期">
|
|
|
|
placeholder="请选择计划开始日期"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="计划结束日期" prop="endDate">
|
|
|
|
<el-form-item label="计划结束日期" prop="endDate">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker clearable
|
|
|
|
v-model="form.endDate"
|
|
|
|
v-model="form.endDate"
|
|
|
|
type="date"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="请选择计划结束日期">
|
|
|
|
placeholder="请选择计划结束日期"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="工厂编码" prop="factoryCode">
|
|
|
|
<el-form-item label="工厂编码" prop="factoryCode">
|
|
|
|
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
|
|
|
|
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="完成日期" prop="completeDate">
|
|
|
|
<el-form-item label="完成日期" prop="completeDate">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker clearable
|
|
|
|
v-model="form.completeDate"
|
|
|
|
v-model="form.completeDate"
|
|
|
|
type="date"
|
|
|
|
type="date"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
placeholder="请选择完成日期">
|
|
|
|
placeholder="请选择完成日期"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
@ -290,9 +311,10 @@ import {
|
|
|
|
releaseOrderPlan
|
|
|
|
releaseOrderPlan
|
|
|
|
} from '@/api/base/orderInfo'
|
|
|
|
} from '@/api/base/orderInfo'
|
|
|
|
import { findProductLineList } from '@//api/base/productLine'
|
|
|
|
import { findProductLineList } from '@//api/base/productLine'
|
|
|
|
|
|
|
|
import { addSAPCalendar } from '@//api/production/calendarInfo'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "OrderInfo",
|
|
|
|
name: 'OrderInfo',
|
|
|
|
dicts: ['order_status', 'order_type', 'is_flag', 'is_release'],
|
|
|
|
dicts: ['order_status', 'order_type', 'is_flag', 'is_release'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -311,7 +333,7 @@ export default {
|
|
|
|
// 工单信息表格数据
|
|
|
|
// 工单信息表格数据
|
|
|
|
orderInfoList: [],
|
|
|
|
orderInfoList: [],
|
|
|
|
// 弹出层标题
|
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
title: '',
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
@ -342,56 +364,55 @@ export default {
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
|
|
|
rules: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
{ key: 0, label: `主键标识`, visible: false },
|
|
|
|
{ key: 0, label: `主键标识`, visible: false },
|
|
|
|
{ key: 1, label: `SAP计划编号`, visible: true },
|
|
|
|
{ key: 1, label: `SAP计划编号`, visible: true },
|
|
|
|
{ key: 2, label: `销售订单编号`, visible: false },
|
|
|
|
{ key: 2, label: `销售订单编号`, visible: false },
|
|
|
|
{ key: 3, label: `销售订单行号`, visible: false },
|
|
|
|
{ key: 3, label: `销售订单行号`, visible: false },
|
|
|
|
{ key: 4, label: `物料编码`, visible: true },
|
|
|
|
{ key: 4, label: `物料编码`, visible: true },
|
|
|
|
{ key: 5, label: `物料名称`, visible: true },
|
|
|
|
{ key: 5, label: `物料名称`, visible: true },
|
|
|
|
{ key: 6, label: `物料组`, visible: false },
|
|
|
|
{ key: 6, label: `物料组`, visible: false },
|
|
|
|
{ key: 7, label: `订单计划数量`, visible: true },
|
|
|
|
{ key: 7, label: `订单计划数量`, visible: true },
|
|
|
|
{ key: 8, label: `完成数量`, visible: true },
|
|
|
|
{ key: 8, label: `完成数量`, visible: true },
|
|
|
|
{ key: 9, label: `工单类型`, visible: true },
|
|
|
|
{ key: 9, label: `工单类型`, visible: true },
|
|
|
|
{ key: 10, label: `工单状态`, visible: true },
|
|
|
|
{ key: 10, label: `工单状态`, visible: true },
|
|
|
|
{ key: 11, label: `计划开始日期`, visible: true },
|
|
|
|
{ key: 11, label: `计划开始日期`, visible: true },
|
|
|
|
{ key: 12, label: `计划结束日期`, visible: true },
|
|
|
|
{ key: 12, label: `计划结束日期`, visible: true },
|
|
|
|
{ key: 13, label: `工厂编码`, visible: false },
|
|
|
|
{ key: 13, label: `工厂编码`, visible: false },
|
|
|
|
{ key: 14, label: `启用标识`, visible: false },
|
|
|
|
{ key: 14, label: `启用标识`, visible: false },
|
|
|
|
{ key: 15, label: `创建人`, visible: false },
|
|
|
|
{ key: 15, label: `创建人`, visible: false },
|
|
|
|
{ key: 16, label: `创建时间`, visible: false },
|
|
|
|
{ key: 16, label: `创建时间`, visible: false },
|
|
|
|
{ key: 17, label: `更新人`, visible: false },
|
|
|
|
{ key: 17, label: `更新人`, visible: false },
|
|
|
|
{ key: 18, label: `更新时间`, visible: false },
|
|
|
|
{ key: 18, label: `更新时间`, visible: false },
|
|
|
|
{ key: 19, label: `完成日期`, visible: true },
|
|
|
|
{ key: 19, label: `完成日期`, visible: true },
|
|
|
|
{ key: 20, label: `是否已下达生产计划`, visible: true },
|
|
|
|
{ key: 20, label: `是否已下达生产计划`, visible: true },
|
|
|
|
{ key: 21, label: `工作中心编号`, visible: true },
|
|
|
|
{ key: 21, label: `工作中心编号`, visible: true }
|
|
|
|
],
|
|
|
|
],
|
|
|
|
// 产线选项
|
|
|
|
// 产线选项
|
|
|
|
productLineList: [],
|
|
|
|
productLineList: []
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
/** 查询工单信息列表 */
|
|
|
|
/** 查询工单信息列表 */
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true
|
|
|
|
listOrderInfo(this.queryParams).then(response => {
|
|
|
|
listOrderInfo(this.queryParams).then(response => {
|
|
|
|
this.orderInfoList = response.rows;
|
|
|
|
this.orderInfoList = response.rows
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false
|
|
|
|
});
|
|
|
|
})
|
|
|
|
findProductLineList({productLineType: 1}).then(response => {
|
|
|
|
findProductLineList({ productLineType: 1 }).then(response => {
|
|
|
|
this.productLineList = response.data;
|
|
|
|
this.productLineList = response.data
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 取消按钮
|
|
|
|
// 取消按钮
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.open = false;
|
|
|
|
this.open = false
|
|
|
|
this.reset();
|
|
|
|
this.reset()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单重置
|
|
|
|
// 表单重置
|
|
|
|
reset() {
|
|
|
|
reset() {
|
|
|
@ -417,86 +438,100 @@ export default {
|
|
|
|
updatedBy: null,
|
|
|
|
updatedBy: null,
|
|
|
|
updatedTime: null,
|
|
|
|
updatedTime: null,
|
|
|
|
completeDate: null
|
|
|
|
completeDate: null
|
|
|
|
};
|
|
|
|
}
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm('form')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
handleQuery() {
|
|
|
|
handleQuery() {
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
this.queryParams.pageNum = 1
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
resetQuery() {
|
|
|
|
resetQuery() {
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
this.resetForm('queryForm')
|
|
|
|
this.handleQuery();
|
|
|
|
this.handleQuery()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 多选框选中数据
|
|
|
|
// 多选框选中数据
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
this.ids = selection.map(item => item.objId)
|
|
|
|
this.ids = selection.map(item => item.objId)
|
|
|
|
this.single = selection.length!==1
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
this.multiple = !selection.length
|
|
|
|
this.multiple = !selection.length
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
handleAdd() {
|
|
|
|
this.reset();
|
|
|
|
this.reset()
|
|
|
|
this.open = true;
|
|
|
|
this.open = true
|
|
|
|
this.title = "添加工单信息";
|
|
|
|
this.title = '添加工单信息'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset()
|
|
|
|
const objId = row.objId || this.ids
|
|
|
|
const objId = row.objId || this.ids
|
|
|
|
getOrderInfo(objId).then(response => {
|
|
|
|
getOrderInfo(objId).then(response => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data
|
|
|
|
this.open = true;
|
|
|
|
this.open = true
|
|
|
|
this.title = "修改工单信息";
|
|
|
|
this.title = '修改工单信息'
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 下达计划 */
|
|
|
|
/** 下达计划 */
|
|
|
|
handleReleasePlan(row){
|
|
|
|
handleReleasePlan(row) {
|
|
|
|
if (row.isRelease === 0){
|
|
|
|
if (row.isRelease === 0) {
|
|
|
|
this.$modal.msgWarning("该工单已下达计划!");
|
|
|
|
this.$modal.msgWarning('该工单已下达计划!')
|
|
|
|
return;
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$modal.confirm('是否下达SAP计划编号为:"' + row.orderCode + '"的计划?').then(function() {
|
|
|
|
this.$modal.confirm('是否下达SAP计划编号为:"' + row.orderCode + '"的计划?').then(function() {
|
|
|
|
return releaseOrderPlan(row);
|
|
|
|
return releaseOrderPlan(row)
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
this.$modal.msgSuccess("下达工单计划成功");
|
|
|
|
this.$modal.msgSuccess('下达工单计划成功')
|
|
|
|
}).catch((e) => {
|
|
|
|
}).catch((e) => {
|
|
|
|
console.log("下达计划错误信息:",e);
|
|
|
|
console.log('下达计划错误信息:', e)
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
sapForm() {
|
|
|
|
|
|
|
|
let planStartDate = null
|
|
|
|
|
|
|
|
let planEndDate = null
|
|
|
|
|
|
|
|
let currentDate = new Date()
|
|
|
|
|
|
|
|
currentDate.setMonth(currentDate.getMonth() - 1)
|
|
|
|
|
|
|
|
planStartDate = currentDate.toISOString().slice(0, 10)
|
|
|
|
|
|
|
|
currentDate.setMonth(currentDate.getMonth() + 2)
|
|
|
|
|
|
|
|
planEndDate = currentDate.toISOString().slice(0, 10)
|
|
|
|
|
|
|
|
addSAPCalendar({ planStartDate: planStartDate, planEndDate: planEndDate }).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess('同步成功')
|
|
|
|
|
|
|
|
this.sapOpen = false
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs['form'].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.objId != null) {
|
|
|
|
if (this.form.objId != null) {
|
|
|
|
updateOrderInfo(this.form).then(response => {
|
|
|
|
updateOrderInfo(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess('修改成功')
|
|
|
|
this.open = false;
|
|
|
|
this.open = false
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
});
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addOrderInfo(this.form).then(response => {
|
|
|
|
addOrderInfo(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess('新增成功')
|
|
|
|
this.open = false;
|
|
|
|
this.open = false
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
handleDelete(row) {
|
|
|
|
const objIds = row.objId || this.ids;
|
|
|
|
const objIds = row.objId || this.ids
|
|
|
|
this.$modal.confirm('是否确认删除工单信息编号为"' + objIds + '"的数据项?').then(function() {
|
|
|
|
this.$modal.confirm('是否确认删除工单信息编号为"' + objIds + '"的数据项?').then(function() {
|
|
|
|
return delOrderInfo(objIds);
|
|
|
|
return delOrderInfo(objIds)
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.getList()
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
this.$modal.msgSuccess('删除成功')
|
|
|
|
}).catch(() => {});
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
@ -505,5 +540,5 @@ export default {
|
|
|
|
}, `orderInfo_${new Date().getTime()}.xlsx`)
|
|
|
|
}, `orderInfo_${new Date().getTime()}.xlsx`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|