From e155da2aeb9c44698e3a0d59ab3f32e5ad9bad5f Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 26 十二月 2023 11:23:41 +0800
Subject: [PATCH] 工艺路线-bug修改
---
src/views/plan/operationtask/operationtask-form.vue | 526 +++++++++++++++++++---------------------------------------
1 files changed, 172 insertions(+), 354 deletions(-)
diff --git a/src/views/plan/operationtask/operationtask-form.vue b/src/views/plan/operationtask/operationtask-form.vue
index 1b441e0..35c8694 100644
--- a/src/views/plan/operationtask/operationtask-form.vue
+++ b/src/views/plan/operationtask/operationtask-form.vue
@@ -1,223 +1,125 @@
<template>
- <el-dialog
- :title="!dataForm.id ? '鏂板' : '淇敼'"
- :fullscreen="isFullScreen"
- :close-on-click-modal="false"
- :visible.sync="visible"
- >
+ <el-dialog :title="!dataForm.id ? '鏂板' : '淇敼'" :fullscreen="isFullScreen" :close-on-click-modal="false"
+ :visible.sync="visible">
<el-tabs type="border-card" ref="resource">
<el-tab-pane label="宸ュ崟">
<el-row>
<el-col :span="12">
<div class="mod-config">
<basic-container>
- <el-form
- :model="dataForm"
- :rules="dataRule"
- ref="dataForm"
- label-width="100px"
- class="l-mes"
- :disabled="!editable"
- >
+ <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px" class="l-mes"
+ :disabled="!editable">
<el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="宸ュ崟缂栧彿" prop="optaskNo">
- <el-input
- v-model="dataForm.optaskNo"
- placeholder="宸ュ崟缂栧彿"
- disabled
- ></el-input>
+ <el-input v-model="dataForm.optaskNo" placeholder="宸ュ崟缂栧彿" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="宸ヨ壓" prop="routingNo">
- <el-input
- v-model="dataForm.routingNo"
- placeholder="宸ヨ壓"
- disabled
- >
- <el-button
- disabled
- slot="append"
- icon="el-icon-search"
- @click="openRoutingDialog()"
- ></el-button>
+ <el-input v-model="dataForm.routingNo" placeholder="宸ヨ壓" disabled>
+ <!-- <el-button slot="append" icon="el-icon-search" disabled @click="openRoutingDialog"></el-button> -->
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="绫诲瀷" prop="operationTaskType">
- <el-select
- v-model="dataForm.operationTaskType"
- placeholder="璇烽�夋嫨绫诲瀷"
- style="width:100%"
- >
- <el-option
- v-for="(item, index) in workshopTypeOptions"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.operationTaskType" placeholder="璇烽�夋嫨绫诲瀷" style="width:100%">
+ <el-option v-for="(item, index) in workshopTypeOptions" :label="item.label"
+ :value="item.value" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="搴撲綅" prop="locationId">
- <el-select
- v-model="dataForm.locationId"
- filterable
- placeholder="璇烽�夋嫨搴撲綅"
- style="width:100%"
- clearable
- >
- <el-option
- v-for="(item, index) in locationOptions"
- :label="item.locName"
- :value="item.id"
- :key="index"
- >
+ <el-select v-model="dataForm.locationId" filterable placeholder="璇烽�夋嫨搴撲綅" style="width:100%"
+ clearable>
+ <el-option v-for="(item, index) in locationOptions" :label="item.locName" :value="item.id"
+ :key="index">
</el-option>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="8">
<el-form-item label="瀹屾垚鏁伴噺" prop="completedQuantity">
- <el-input
- v-model="dataForm.completedQuantity"
- placeholder="瀹屾垚鏁伴噺"
- ></el-input>
+ <el-input v-model="dataForm.completedQuantity" placeholder="瀹屾垚鏁伴噺"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item
- label="瀹為檯寮�濮嬫椂闂�"
- prop="actualStartDate"
- >
- <el-date-picker
- v-model="dataForm.actualStartDate"
- style="width: 100%; color: red"
- type="datetime"
- placeholder="瀹為檯寮�濮嬫椂闂�"
- value-format="yyyy-MM-dd HH:mm:ss"
- >
+ <el-form-item label="瀹為檯寮�濮嬫椂闂�" prop="actualStartDate">
+ <el-date-picker v-model="dataForm.actualStartDate" style="width: 100%; color: red"
+ type="datetime" placeholder="瀹為檯寮�濮嬫椂闂�" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
- <el-form-item
- label="瀹為檯瀹屾垚鏃堕棿"
- prop="actualFinishDate"
- >
- <el-date-picker
- v-model="dataForm.actualFinishDate"
- style="width: 100%"
- type="datetime"
- placeholder="瀹為檯瀹屾垚鏃堕棿"
- value-format="yyyy-MM-dd HH:mm:ss"
- >
+ <el-form-item label="瀹為檯瀹屾垚鏃堕棿" prop="actualFinishDate">
+ <el-date-picker v-model="dataForm.actualFinishDate" style="width: 100%" type="datetime"
+ placeholder="瀹為檯瀹屾垚鏃堕棿" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="宸ュ崟绫诲瀷" prop="combineState">
- <el-select
- v-model="dataForm.combineState"
- filterable
- placeholder="璇烽�夋嫨宸ュ崟绫诲瀷"
- style="width:100%"
- clearable
- >
- <el-option
- v-for="(item, index) in combineStateOptions"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.combineState" filterable placeholder="璇烽�夋嫨宸ュ崟绫诲瀷" style="width:100%"
+ clearable>
+ <el-option v-for="(item, index) in combineStateOptions" :label="item.label"
+ :value="item.value" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="浼樺厛绾�" prop="priority">
- <el-input
- v-model="dataForm.priority"
- placeholder="浼樺厛绾�"
- ></el-input>
+ <el-input v-model="dataForm.priority" placeholder="浼樺厛绾�"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="璁″垝鏁伴噺2" prop="splannedQuantity">
- <el-input
- v-model="dataForm.splannedQuantity"
- placeholder="璁″垝鏁伴噺2"
- style="width:calc(100% - 20px)"
- ></el-input>
+ <el-input v-model="dataForm.splannedQuantity" placeholder="璁″垝鏁伴噺2"
+ style="width:calc(100% - 20px)"></el-input>
<span>{{ dataForm.sunit }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="鐩樻暟" prop="discNum">
- <el-input
- v-model="dataForm.discNum"
- placeholder="鐩樻暟"
- disabled
- ></el-input>
+ <el-input v-model="dataForm.discNum" placeholder="鐩樻暟"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="鐢熶骇宸ユ椂瀹氶" prop="hourQuota">
- <el-input
- v-model="dataForm.hourQuota"
- placeholder="鐢熶骇宸ユ椂瀹氶"
- ></el-input>
+ <el-input v-model="dataForm.hourQuota" placeholder="鐢熶骇宸ユ椂瀹氶"></el-input>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
<el-row :gutter="10">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="杞藉叿瑙勬牸" prop="reelSpec">
- <el-input
- v-model="dataForm.reelSpec"
- placeholder="杞藉叿瑙勬牸"
- ></el-input>
+ <el-input v-model="dataForm.reelSpec" placeholder="杞藉叿瑙勬牸"></el-input>
</el-form-item>
- </el-col>
- <el-col :span="8">
+ </el-col> -->
+ <!-- <el-col :span="8">
<el-form-item label="鍒堕�犲睘鎬�" prop="manufactureAttr">
- <el-select
- v-model="dataForm.manufactureAttr"
- filterable
- placeholder="璇烽�夋嫨鍒堕�犲睘鎬�"
- style="width:100%"
- disabled
- >
- <el-option
- v-for="(item, index) in manufactureAttrs"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.manufactureAttr" filterable placeholder="璇烽�夋嫨鍒堕�犲睘鎬�"
+ style="width:100%">
+ <el-option v-for="(item, index) in manufactureAttrs" :label="item.label" :value="item.value"
+ :key="index">
</el-option>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="8">
<el-form-item label="澶囨敞" prop="remark">
- <el-input
- type="textarea"
- :rows="2"
- autosize
- v-model="dataForm.remark"
- placeholder="澶囨敞"
- ></el-input>
+ <el-input type="textarea" :rows="2" autosize v-model="dataForm.remark"
+ placeholder="澶囨敞"></el-input>
</el-form-item>
</el-col>
</el-row>
@@ -229,156 +131,87 @@
<el-col :span="12">
<div class="mod-config">
<basic-container>
- <el-form
- :model="dataForm"
- :rules="dataRule"
- ref="dataForm"
- label-width="100px"
- class="l-mes"
- >
+ <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px" class="l-mes">
<el-row>
<el-row :gutter="10">
<el-col :span="11">
<el-form-item label="宸ュ簭" prop="moRoutingOperationId">
- <el-select
- v-model="dataForm.moRoutingOperationId"
- :disabled="!editable"
- filterable
- placeholder="璇烽�夋嫨宸ュ簭"
- style="width:100%"
- @change="selectChangedRoutingOperation"
- >
- <el-option
- v-for="(item, index) in routingOptions"
- :label="
- item.operationName +
- (item.partName ? ' + ' + item.partName : '')
- "
- :value="item.id"
- :key="index"
- >
+ <el-select v-model="dataForm.moRoutingOperationId" :disabled="!editable" filterable
+ placeholder="璇烽�夋嫨宸ュ簭" style="width:100%" @change="selectChangedRoutingOperation">
+ <el-option v-for="(item, index) in routingOptions" :label="item.operationName +
+ (item.partName ? ' + ' + item.partName : '')
+ " :value="item.id" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
- <el-col :span="7">
+ <el-col :span="10">
<el-form-item label="宸ヤ綔涓績" prop="workCenter">
- <el-select
- v-model="dataForm.workCenter"
- :disabled="!editable"
- filterable
- placeholder="璇烽�夋嫨宸ヤ綔涓績"
- style="width:100%"
- @change="changeWorkCenter"
- >
- <el-option
- v-for="(item, index) in workCenterOptions"
- :label="item.label"
- :value="item.value"
- :key="index"
- >
+ <el-select v-model="dataForm.workCenter" :disabled="!editable" filterable placeholder="璇烽�夋嫨宸ヤ綔涓績"
+ style="width:100%" @change="changeWorkCenter">
+ <el-option v-for="(item, index) in workCenterOptions" :label="item.label" :value="item.value"
+ :key="index">
</el-option>
</el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="10">
+ <el-col :span="15">
+ <el-form-item label="璁″垝鏃堕棿" prop="localDateTimes">
+ <el-date-picker :class="tattimest ? 'sed' : ''" v-model="dataForm.localDateTimes"
+ type="datetimerange" range-separator="鑷�" start-placeholder="寮�濮�" end-placeholder="缁撴潫"
+ value-format="yyyy-MM-dd HH:mm:ss" @change="selectChangedplannedDate">
+ </el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="宸ヤ綔绔�" prop="workstationId">
- <el-select
- v-model="dataForm.workstationId"
- :disabled="!editable"
- filterable
- placeholder="璇烽�夋嫨宸ヤ綔绔�"
- style="width:100%"
- clearable
- @change="selectLocationByWorkstation"
- >
- <el-option
- v-for="(item, index) in workstations"
- :label="item.name"
- :value="item.id"
- :key="index"
- >
+ <el-select v-model="dataForm.workstationId" :disabled="!editable" filterable
+ placeholder="璇烽�夋嫨宸ヤ綔绔�" style="width:100%" clearable @change="selectLocationByWorkstation">
+ <el-option v-for="(item, index) in workstations" :label="item.name" :value="item.id"
+ :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
- <el-col :span="14">
- <el-form-item label="璁″垝鏃堕棿" prop="localDateTimes">
- <el-date-picker
- :class="tattimest ? 'sed' : ''"
- v-model="dataForm.localDateTimes"
- readonly
- type="datetimerange"
- range-separator="鑷�"
- start-placeholder="寮�濮�"
- end-placeholder="缁撴潫"
- value-format="yyyy-MM-dd HH:mm:ss"
- @change="selectChangedplannedDate"
- >
- </el-date-picker>
+ <el-col :span="10">
+ <el-form-item label="璁″垝鏁伴噺" prop="plannedQuantity">
+ <el-input v-model="dataForm.plannedQuantity" :disabled="!editable" placeholder="璁″垝鏁伴噺"
+ style="width:calc(100% - 30px)"></el-input>
+ <span>{{ dataForm.unit }}</span>
</el-form-item>
</el-col>
<el-col :span="10">
- <el-form-item label="璁″垝鏁伴噺" prop="plannedQuantity">
- <el-input
- v-model="dataForm.plannedQuantity"
- :disabled="!editable"
- placeholder="璁″垝鏁伴噺"
- style="width:calc(100% - 30px)"
- @change="automaticScheduling()"
- ></el-input>
- <span>{{ dataForm.unit }}</span>
+ <el-form-item label="宸ュ崟鎵�闇�鏃堕棿" prop="taskTheoreticalTime">
+ <el-input v-model="dataForm.taskTheoreticalTime" placeholder="宸ュ崟鎵�闇�鏃堕棿"
+ style="width:calc(100% - 30px)"></el-input>
+ <span>min</span>
</el-form-item>
- </el-col></el-row
- >
+ </el-col>
+ </el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="闆朵欢" prop="partName">
- <el-input
- v-model="dataForm.partName"
- placeholder="闆朵欢"
- disabled
- ></el-input>
+ <el-tooltip class="item" effect="dark" :content="dataForm.partName" >
+ <el-input v-model="dataForm.partName" placeholder="闆朵欢" disabled></el-input>
+ </el-tooltip>
</el-form-item>
</el-col>
- <el-col :span="6">
+ <el-col :span="10">
<el-form-item label="闆朵欢鍙�" prop="partNo">
- <el-input
- v-model="dataForm.partNo"
- placeholder="闆朵欢鍙�"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item
- label="宸ュ崟鎵�闇�鏃堕棿"
- prop="taskTheoreticalTime"
- >
- <el-input
- v-model="dataForm.taskTheoreticalTime"
- placeholder="宸ュ崟鎵�闇�鏃堕棿"
- style="width:calc(100% - 30px)"
- disabled
- ></el-input>
- <span>min</span>
+ <el-tooltip class="item" effect="dark" :content="dataForm.partNo" >
+ <el-input v-model="dataForm.partNo" placeholder="闆朵欢鍙�" disabled></el-input>
+ </el-tooltip>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
- <span
- style="float:right; margin-right:30px; margin-top: 55px"
- >
- <el-button
- type="primary"
- :disabled="!editable"
- style="margin-left: 12px; margin-bottom:10px"
- @click="automaticScheduling"
- >鑷姩鎺掔▼</el-button
- ></span
- >
+ <span style="float:right; margin-right:30px; margin-top: 55px">
+ <el-button type="primary" :disabled="!editable" style="margin-left: 12px; margin-bottom:10px"
+ @click="automaticScheduling">鑷姩鎺掔▼</el-button></span>
</el-row>
</el-row>
</el-form>
@@ -415,11 +248,7 @@
</div>
</div>
<div style="margin-top:40px">
- <gantt-index
- v-if="isshow"
- ref="ganttIndex"
- :dataForm="dataForm"
- ></gantt-index>
+ <gantt-index v-if="isshow" ref="ganttIndex" :dataForm="dataForm"></gantt-index>
</div>
</basic-container>
</div>
@@ -569,29 +398,18 @@
<!-- </el-table>-->
<!-- </el-card>-->
<!-- </el-tab-pane>-->
- <el-tab-pane label="宸ュ崟渚涘簲琛�" v-if="this.dataForm.id">
- <manufacturing-order
- :operationId="this.dataForm.id"
- ref="manufacturing"
- ></manufacturing-order>
- </el-tab-pane>
- <el-tab-pane label="宸ュ崟鎵�闇�鐗╂枡" v-if="this.dataForm.id">
- <operation-supply
- :operationId="this.dataForm.id"
- :routingOperationId="this.dataForm.moRoutingOperationId"
- ref="manufacturing"
- ></operation-supply>
- </el-tab-pane>
+ <!-- <el-tab-pane label="宸ュ崟渚涘簲琛�" v-if="this.dataForm.id">
+ <manufacturing-order :operationId="this.dataForm.id" ref="manufacturing"></manufacturing-order>
+ </el-tab-pane> -->
+ <!-- <el-tab-pane label="宸ュ崟鎵�闇�鐗╂枡" v-if="this.dataForm.id">
+ <operation-supply :operationId="this.dataForm.id" :routingOperationId="this.dataForm.moRoutingOperationId"
+ ref="manufacturing"></operation-supply>
+ </el-tab-pane> -->
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">鍙栨秷</el-button>
- <el-button
- type="primary"
- :disabled="isSubmit"
- v-thinclick="`dataFormSubmit`"
- >纭畾</el-button
- >
+ <el-button type="primary" :disabled="isSubmit" v-thinclick="`dataFormSubmit`">纭畾</el-button>
<!--<el-button
type="primary"
:disabled="isSubmit"
@@ -600,33 +418,16 @@
>纭畾骞剁墿鏂欓鐣�</el-button
>-->
</span>
- <routingDialog
- :currshowlist.sync="showRouting"
- :mutiSelect="false"
- :queryParam="queryParam"
- @listenToRoutingEvent="selectRouting"
- />
- <workstationDialog
- :currshowlist.sync="showWorkstation"
- @listenToWorkStationEvent="selectWorkstation"
- />
- <locationDialog
- :currshowlist.sync="showLocation"
- @listenToLocationEvent="selectLocation"
- :queryParam="queryParamLocation"
- />
+ <routingDialog :currshowlist.sync="showRouting" :mutiSelect="false" :queryParam="queryParam"
+ @listenToRoutingEvent="selectRouting" />
+ <workstationDialog :currshowlist.sync="showWorkstation" @listenToWorkStationEvent="selectWorkstation" />
+ <locationDialog :currshowlist.sync="showLocation" @listenToLocationEvent="selectLocation"
+ :queryParam="queryParamLocation" />
- <ParamTemplateDialog
- :currshowlist.sync="showOperationTemplate"
- @handleSelectionParamTemplateChange="selectOperationTemplate"
- :paramTemplateObj="templateDefaultObj"
- />
- <ParamDialog
- :currshowlist.sync="showTemplateParam"
- @handleSelectionChange="selectTemplateParam"
- :paramSelArr="paramSelArr"
- :paramSelCol="paramSelCol"
- />
+ <ParamTemplateDialog :currshowlist.sync="showOperationTemplate"
+ @handleSelectionParamTemplateChange="selectOperationTemplate" :paramTemplateObj="templateDefaultObj" />
+ <ParamDialog :currshowlist.sync="showTemplateParam" @handleSelectionChange="selectTemplateParam"
+ :paramSelArr="paramSelArr" :paramSelCol="paramSelCol" />
</el-dialog>
</template>
@@ -635,9 +436,11 @@
border: none;
border-bottom: 1px solid gainsboro;
}
+
/deep/ .sed .el-range-input {
color: red !important;
}
+
.no-padding-top .el-card__body {
padding: 0px 0px 5px;
}
@@ -650,6 +453,7 @@
justify-content: space-between;
align-items: center;
}
+
.status label {
font-size: 12px;
font-weight: 500;
@@ -677,7 +481,7 @@
</style>
<script>
import { fetchListExt } from '@/api/warehouse/location'
-import { addObj, getObj, putObj } from '@/api/plan/operationtask'
+import { addObj, getObj, putObj, getTechnologyRouting } from '@/api/plan/operationtask'
import { getAllWorkstationList, loadWorkstation } from '@/api/basic/workstation'
import { getOperationParam } from '@/api/basic/template'
import { getQpaNumber } from '@/api/plan/manufacturingorder'
@@ -691,7 +495,7 @@
validateSixDecimalNotNull,
validateSixDecimal
} from '../../../util/validate'
-import { getObj as getRout } from '@/api/technology/routing'
+import { getObjCopy as getRout } from '@/api/technology/routing'
import ManufacturingOrder from './manufacturingorder'
import ganttIndex from './gantt-index'
import OperationSupply from './operationMaterial'
@@ -734,9 +538,11 @@
tattimest: false,
tableData: [],
dataForm: {
+ ifsOrderNo: '',
id: 0,
optaskNo: '',
routingId: '',
+ moRoutingId: '',
priority: '',
routingOperationId: null,
state: '',
@@ -812,11 +618,11 @@
}
},
computed: {
- editable: function() {
+ editable: function () {
if (!this.dataForm.id) {
return true
}
- if (this.dataForm.id && this.dataForm.state == '01pending') {
+ if (this.dataForm.id && this.dataForm.state == '07unsubmit') {
return true
}
return false
@@ -828,11 +634,12 @@
this.getWrkshopTypeOptions()
this.getWorkCenterOptions()
this.getManufactureAttrs('manufacture_attr_type')
+
},
mounted() {
window.addEventListener(
'popstate',
- function(e) {
+ function (e) {
this.visible = false
}.bind(this),
false
@@ -844,7 +651,6 @@
if (newValue) {
getMoRouting(this.dataForm.moId).then((response) => {
this.routingList = response.data.data
- this.routingOptions = this.routingList.moRoutingOperationDTOList
})
}
}
@@ -855,6 +661,7 @@
// fullscreen() {
// this.isFullScreen = !this.isFullScreen
// },
+ // 鏍规嵁杞﹂棿璁㈠崟鐨処d鏌ヨ宸ヨ壓璺嚎鍙傛暟
getManufactureAttrs(type) {
remote(type).then((response) => {
const code = response.data.code
@@ -894,7 +701,6 @@
remote('work_center_type').then((response) => {
if (response.data.code === 0) {
this.workCenterOptions = response.data.data
- console.log(this.workCenterOptions)
this.workCenterOptions.forEach((item) => {
item.label = '(' + item.value + ') ' + item.label
})
@@ -927,9 +733,9 @@
this.dataForm.routingId = routing.id
this.dataForm.routingNo = routing.routingNo
this.dataForm.moRoutingOperationId = null
- // this.dataForm.partName = routing.partName
- // this.dataForm.partId = routing.partId
- this.$refs.dataForm.validateField('routingNo', (valid) => {})
+ this.routingOptions = routing.operations
+
+ this.$refs.dataForm.validateField('routingNo', (valid) => { })
},
openWorkstationDialog() {
this.showWorkstation = true
@@ -948,7 +754,6 @@
// this.showLocation = true
// },
selectWorkstation(workstation) {
- console.log(workstation)
if (workstation) {
this.dataForm.workstationId = workstation.id
this.dataForm.workstationName = workstation.name
@@ -965,7 +770,7 @@
init(id, param, outPutBatchList, qtyPlaned) {
if (param) {
- console.log(param)
+ this.dataForm.ifsOrderNo = param.ifsOrderNo
this.qtyRequired = param.qtyRequired
this.dataForm.moId = param.id
this.dataForm.moNo = param.moNo
@@ -974,9 +779,9 @@
if (param.technologyRoutingId) {
getMoRouting(this.dataForm.moId).then((response) => {
this.routingList = response.data.data
- this.routingOptions = this.routingList.moRoutingOperationDTOList
- this.dataForm.routingId = this.routingList.technologyRoutingId
+ this.dataForm.routingId = this.routingList.moRoutingId
this.dataForm.routingNo = this.routingList.routingNo
+ this.routingOptions = this.routingList.moRoutingOperationDTOList
// this.dataForm.partName = this.routingList.partName
// this.dataForm.partId = this.routingList.partId
// 鍒堕�犺鍗昮orm鍒涘缓鐨勶紝鑷姩甯﹀嚭宸ュ簭
@@ -1011,6 +816,10 @@
this.$nextTick(() => {
this.$refs.ganttIndex.init(this.dataForm.workCenter)
})
+ getTechnologyRouting(id).then(res => {
+ this.routingOptions = res.data.data.operations
+ this.dataForm.routingNo = res.data.data.routing_no
+ })
})
} else {
this.dataForm.plannedQuantity = qtyPlaned
@@ -1028,7 +837,7 @@
this.$refs.ganttIndex.init(this.dataForm.workCenter, 1)
})
}
- })
+ })
},
// 琛ㄥ崟鎻愪氦
dataFormSubmit() {
@@ -1036,33 +845,43 @@
this.dataForm.plannedStartDate = this.dataForm.localDateTimes[0]
this.dataForm.plannedFinishDate = this.dataForm.localDateTimes[1]
this.$refs.dataForm.validate((valid) => {
- if (valid) {
- if (this.dataForm.id) {
- putObj(this.dataForm)
- .then((data) => {
- this.$message.success('淇敼鎴愬姛')
- this.visible = false
- this.isSubmit = false
- this.$emit('refreshDataList')
- })
- .catch(() => {
- this.isSubmit = false
- })
- } else {
- addObj(this.dataForm)
- .then((data) => {
- this.$message.success('娣诲姞鎴愬姛')
- this.visible = false
- this.isSubmit = false
- this.$emit('refreshDataList')
- })
- .catch(() => {
- this.isSubmit = false
- })
- }
+ // if (valid) {
+ if (this.dataForm.id) {
+ if(this.dataForm.plannedQuantity==0){
+ this.$message.error('璁″垝鏁伴噺涓嶈兘涓�0')
+ this.isSubmit = false
+ return
+ }
+ putObj(this.dataForm)
+ .then((data) => {
+ this.$message.success('淇敼鎴愬姛')
+ this.visible = false
+ this.isSubmit = false
+ this.$emit('refreshDataList')
+ })
+ .catch(() => {
+ this.isSubmit = false
+ })
} else {
- this.isSubmit = false
+ if(this.dataForm.plannedQuantity==0){
+ this.$message.error('璁″垝鏁伴噺涓嶈兘涓�0')
+ this.isSubmit = false
+ return
+ }
+ addObj(this.dataForm)
+ .then((data) => {
+ this.$message.success('娣诲姞鎴愬姛')
+ this.visible = false
+ this.isSubmit = false
+ this.$emit('refreshDataList')
+ })
+ .catch(() => {
+ this.isSubmit = false
+ })
}
+ // } else {
+ // this.isSubmit = false
+ // }
})
},
// 纭畾骞剁墿鏂欓鐣�
@@ -1075,7 +894,6 @@
if (this.dataForm.id) {
putObj(this.dataForm)
.then((data) => {
- console.log(data)
this.$message.success('淇敼鎴愬姛')
this.$router.push({
path: '../operationtaskreserved/index',
@@ -1091,7 +909,6 @@
} else {
addObj(this.dataForm)
.then((data) => {
- console.log(data)
this.$message.success('娣诲姞鎴愬姛')
this.$router.push({
path: '../operationtaskreserved/index',
@@ -1115,9 +932,12 @@
const routingOperation = this.routingOptions.find(
(item) => item.id == moRoutingOperationId
)
- console.log(routingOperation)
this.dataForm.partName = routingOperation.partName
this.dataForm.partNo = routingOperation.partNo
+ // getRout(routingOperation.partId).then(res => {
+ // this.dataForm.partNo = res.data.data.partNo
+ // })
+
this.dataForm.partId = routingOperation.partId
this.dataForm.unit = routingOperation.unit
this.dataForm.sunit = routingOperation.sunit
@@ -1193,7 +1013,6 @@
this.$nextTick(() => {
this.$refs.ganttIndex.show(this.operationTasks)
- console.log(this.operationTasks)
})
})
},
@@ -1215,7 +1034,6 @@
this.dataForm.workCenter,
this.dataForm.plannedQuantity
).then((res) => {
- console.log(res)
this.dataForm.localDateTimes = [
res.data.data.plannedStartDate,
res.data.data.plannedFinishDate
@@ -1334,7 +1152,7 @@
)
})
- Promise.all(promiseList).then((res) => {})
+ Promise.all(promiseList).then((res) => { })
}
},
// 寮瑰嚭鍩虹鍙傛暟闆嗘ā鏉垮璇濇
--
Gitblit v1.9.3