| | |
| | | <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> |
| | |
| | | <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-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-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-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 :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="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> |
| | | <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-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-input v-model="dataForm.partName" placeholder="零件" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="零件号" prop="partNo"> |
| | | <el-input |
| | | v-model="dataForm.partNo" |
| | | placeholder="零件号" |
| | | disabled |
| | | ></el-input> |
| | | <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> |
| | | <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-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> |
| | |
| | | </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> |
| | |
| | | <!-- </el-card>--> |
| | | <!-- </el-tab-pane>--> |
| | | <el-tab-pane label="工单供应表" v-if="this.dataForm.id"> |
| | | <manufacturing-order |
| | | :operationId="this.dataForm.id" |
| | | ref="manufacturing" |
| | | ></manufacturing-order> |
| | | <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> |
| | | <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" |
| | |
| | | >确定并物料预留</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> |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .status label { |
| | | font-size: 12px; |
| | | font-weight: 500; |
| | |
| | | </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' |
| | |
| | | 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' |
| | |
| | | tattimest: false, |
| | | tableData: [], |
| | | dataForm: { |
| | | ifsOrderNo: '', |
| | | id: 0, |
| | | optaskNo: '', |
| | | routingId: '', |
| | | moRoutingId: '', |
| | | priority: '', |
| | | routingOperationId: null, |
| | | state: '', |
| | |
| | | } |
| | | }, |
| | | 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 |
| | |
| | | this.getWrkshopTypeOptions() |
| | | this.getWorkCenterOptions() |
| | | this.getManufactureAttrs('manufacture_attr_type') |
| | | |
| | | }, |
| | | mounted() { |
| | | window.addEventListener( |
| | | 'popstate', |
| | | function(e) { |
| | | function (e) { |
| | | this.visible = false |
| | | }.bind(this), |
| | | false |
| | |
| | | if (newValue) { |
| | | getMoRouting(this.dataForm.moId).then((response) => { |
| | | this.routingList = response.data.data |
| | | this.routingOptions = this.routingList.moRoutingOperationDTOList |
| | | }) |
| | | } |
| | | } |
| | |
| | | // fullscreen() { |
| | | // this.isFullScreen = !this.isFullScreen |
| | | // }, |
| | | // 根据车间订单的Id查询工艺路线参数 |
| | | getManufactureAttrs(type) { |
| | | remote(type).then((response) => { |
| | | const code = response.data.code |
| | |
| | | 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 |
| | | }) |
| | |
| | | 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 |
| | |
| | | // this.showLocation = true |
| | | // }, |
| | | selectWorkstation(workstation) { |
| | | console.log(workstation) |
| | | if (workstation) { |
| | | this.dataForm.workstationId = workstation.id |
| | | this.dataForm.workstationName = workstation.name |
| | |
| | | |
| | | init(id, param, outPutBatchList, qtyPlaned) { |
| | | if (param) { |
| | | console.log(param) |
| | | console.log(param); |
| | | this.dataForm.ifsOrderNo = param.ifsOrderNo |
| | | this.qtyRequired = param.qtyRequired |
| | | this.dataForm.moId = param.id |
| | | this.dataForm.moNo = param.moNo |
| | |
| | | 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 |
| | | // 制造订单form创建的,自动带出工序 |
| | |
| | | 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 |
| | |
| | | this.$refs.ganttIndex.init(this.dataForm.workCenter, 1) |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | // 表单提交 |
| | | dataFormSubmit() { |
| | |
| | | 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 |
| | | // } |
| | | }) |
| | | }, |
| | | // 确定并物料预留 |
| | |
| | | if (this.dataForm.id) { |
| | | putObj(this.dataForm) |
| | | .then((data) => { |
| | | console.log(data) |
| | | this.$message.success('修改成功') |
| | | this.$router.push({ |
| | | path: '../operationtaskreserved/index', |
| | |
| | | } else { |
| | | addObj(this.dataForm) |
| | | .then((data) => { |
| | | console.log(data) |
| | | this.$message.success('添加成功') |
| | | this.$router.push({ |
| | | path: '../operationtaskreserved/index', |
| | |
| | | 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 |
| | |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.ganttIndex.show(this.operationTasks) |
| | | console.log(this.operationTasks) |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | this.dataForm.workCenter, |
| | | this.dataForm.plannedQuantity |
| | | ).then((res) => { |
| | | console.log(res) |
| | | this.dataForm.localDateTimes = [ |
| | | res.data.data.plannedStartDate, |
| | | res.data.data.plannedFinishDate |
| | |
| | | ) |
| | | }) |
| | | |
| | | Promise.all(promiseList).then((res) => {}) |
| | | Promise.all(promiseList).then((res) => { }) |
| | | } |
| | | }, |
| | | // 弹出基础参数集模板对话框 |