| | |
| | | <h2 v-if="!editable">查看-工艺路线</h2> |
| | | </div> |
| | | <div class="btn-group header-right" v-if="editable"> |
| | | <el-button :disabled="isSubmit" v-thinclick="`allSave`">保存</el-button> |
| | | <el-button :disabled="isSubmit" type="primary" v-thinclick="`allSave`">保存</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="routing-basic"> |
| | | <el-form |
| | | :inline="true" |
| | | :model="dataForm" |
| | | :rules="dataRule" |
| | | ref="dataForm" |
| | | style="width: 100%" |
| | | class="l-mes" |
| | | :disabled="!editable" |
| | | > |
| | | <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px" style="width: 100%" |
| | | class="l-mes" :disabled="!editable"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item prop="routingNo" label="工艺编号"> |
| | | <el-input |
| | | v-model="dataForm.routingNo" |
| | | placeholder="工艺编号" |
| | | disabled |
| | | ></el-input> |
| | | <el-col :span="6"> |
| | | <el-form-item style="width:100%" prop="routingNo" label="工艺编号"> |
| | | <el-input style="width:100%" v-model="dataForm.routingNo" placeholder="工艺编号" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="partNo" label="零件号"> |
| | | <el-input |
| | | v-model="dataForm.partNo" |
| | | placeholder="零件号" |
| | | disabled |
| | | > |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openSelectPart" |
| | | ></el-button> |
| | | <el-input style="width:100%" v-model="dataForm.partNo" placeholder="零件号" disabled> |
| | | <el-button slot="append" icon="el-icon-search" @click="openSelectPart"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="partName" label="零件名称"> |
| | | <el-input |
| | | v-model="dataForm.partName" |
| | | placeholder="零件名称" |
| | | readonly |
| | | style="width: 300px" |
| | | ></el-input> |
| | | <el-tooltip class="item" effect="dark" :content="dataForm.partName"> |
| | | <el-input v-model="dataForm.partName" placeholder="零件名称" readonly style="width: 100%"></el-input> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <el-form-item prop="description" label="描述"> |
| | | <el-input |
| | | v-model="dataForm.description" |
| | | placeholder="描述" |
| | | style="width: 280px" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="wireCore" label="线芯"> |
| | | <el-input |
| | | v-model="dataForm.wireCore" |
| | | placeholder="线芯" |
| | | style="width: 60px" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="BOM" prop="bomId"> |
| | | <el-select :disabled="dataForm.id != null" v-model="dataForm.bomId" placeholder="" filterable> |
| | | <el-option |
| | | v-for="item in bomList" |
| | | :key="item.id" |
| | | :label="item.number" |
| | | :value="item.id" |
| | | /> |
| | | <el-select style="width:100%" v-model="dataForm.bomId" placeholder="" filterable> |
| | | <el-option v-for="item in bomList" :key="item.id" :label="item.number" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item prop="version" label="工艺版本"> |
| | | <el-input |
| | | v-model="dataForm.version" |
| | | placeholder="工艺版本" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="工艺类型" prop="bomTypeDb"> |
| | | <el-select |
| | | v-model="dataForm.bomTypeDb" |
| | | placeholder="请选择工艺类型" |
| | | style="width:100%" |
| | | @change="bomTypeDbChange" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in bomTypeDbOptions" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :key="index" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="逐步采用日期" prop="phaseInDate"> |
| | | <el-date-picker |
| | | v-model="dataForm.phaseInDate" |
| | | style="width: 100%" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | > |
| | | <el-date-picker v-model="dataForm.phaseInDate" style="width: 100%" type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="逐步淘汰日期" prop="phaseOutDate"> |
| | | <el-date-picker |
| | | v-model="dataForm.phaseOutDate" |
| | | style="width: 100%" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | > |
| | | <el-date-picker v-model="dataForm.phaseOutDate" style="width: 100%" type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <!-- <el-form-item prop="alternativeNo" label="替代"> |
| | | <el-input |
| | | v-model="dataForm.alternativeNo" |
| | | placeholder="替代" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item prop="alternativeDesc" label="替代描述"> |
| | | <el-input |
| | | v-model="dataForm.alternativeDesc" |
| | | placeholder="替代描述" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="已同步至IFS" prop="ifsSync"> |
| | | <span |
| | | style="width: 146px;display: inline-block;font-size:12px;font-weight:bold;" |
| | | >{{ dataForm.ifsSync ? '是' : '否' }}</span |
| | | > |
| | | </el-form-item> --> |
| | | <el-form-item label="主工艺" prop="master"> |
| | | <el-switch v-model="dataForm.master"> </el-switch> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="description" label="描述"> |
| | | <el-input v-model="dataForm.description" placeholder="描述" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | <div slot="header"> |
| | | <span> |
| | | 工序 |
| | | <i |
| | | class="el-icon-sort" |
| | | @click="showTable = !showTable" |
| | | style="cursor: pointer;" |
| | | ></i> |
| | | <i class="el-icon-sort" @click="showTable = !showTable" style="cursor: pointer;"></i> |
| | | </span> |
| | | <el-button |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | @click=";(showOperation = true), (last = true)" |
| | | v-if="editable" |
| | | >添加</el-button |
| | | > |
| | | <el-button style="float: right; padding: 3px 0" type="text" |
| | | @click="; (showOperation = true), (last = true), (multiSelect = true)" v-if="editable">添加</el-button> |
| | | </div> |
| | | <div |
| | | v-show="!showTable" |
| | | class="dragWrap" |
| | | :style="{ |
| | | '--dragitemwidth': '250px' |
| | | }" |
| | | > |
| | | <div |
| | | :style="{ |
| | | width: 265 * dataForm.operations.length - 15 + 'px' |
| | | }" |
| | | > |
| | | <div |
| | | class="dragHead" |
| | | v-for="x in dataForm.operations.length" |
| | | :key="x" |
| | | > |
| | | <div v-show="!showTable" class="dragWrap" :style="{ |
| | | '--dragitemwidth': '250px' |
| | | }"> |
| | | <div :style="{ width: 265 * dataForm.operations.length - 15 + 'px' }"> |
| | | <div class="dragHead" v-for="x in dataForm.operations.length" :key="x"> |
| | | <div class="idx">{{ x }}</div> |
| | | </div> |
| | | <zttdraggable |
| | | :forceFallback="true" |
| | | :list="dataForm.operations" |
| | | :animation="200" |
| | | fallbackClass="fallbackStyle" |
| | | ghostClass="item_ghost" |
| | | @end="dragEnd" |
| | | > |
| | | <div |
| | | :class="{ dragItem: true, active: x.active }" |
| | | v-for="(x, i) in dataForm.operations" |
| | | :key="i" |
| | | <zttdraggable :forceFallback="true" :list="dataForm.operations" :animation="200" |
| | | fallbackClass="fallbackStyle" ghostClass="item_ghost" @end="dragEnd"> |
| | | <div :class="{ dragItem: true, active: x.active }" v-for="(x, i) in dataForm.operations" :key="i" |
| | | @click=" |
| | | rowClick(x) |
| | | rowSelected(x) |
| | | " |
| | | > |
| | | rowSelected(x) |
| | | "> |
| | | <div class="dragBody"> |
| | | <div class="info">{{ x.operationNo }}</div> |
| | | <div class="info">{{ x.operationName }}</div> |
| | | <div class="info">{{ x.partName }}</div> |
| | | </div> |
| | | <div class="dragFoot"> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click.stop="openTechnologyOperation(x)" |
| | | >编辑 |
| | | <el-button type="text" size="mini" @click.stop="openTechnologyOperation(x)">编辑 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click.stop="insertTechnologyOperation(x)" |
| | | >插入 |
| | | <el-button type="text" size="mini" @click.stop="insertTechnologyOperation(x)">插入 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click.stop="handleDelete(x)" |
| | | > |
| | | <el-button type="text" size="mini" @click.stop="handleDelete(x)"> |
| | | 删除 |
| | | </el-button> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table |
| | | v-show="showTable" |
| | | id="routingOpTable" |
| | | ref="operationTable" |
| | | :default-sort="{ prop: 'index' }" |
| | | row-key="id" |
| | | highlight-current-row |
| | | :data="dataForm.operations" |
| | | @current-change="rowSelected" |
| | | @row-click="rowClick" |
| | | height="350" |
| | | style="width: 100%" |
| | | class="routing-operate-table" |
| | | :row-class-name="tableRowClassName" |
| | | > |
| | | <el-table v-show="showTable" id="routingOpTable" ref="operationTable" :default-sort="{ prop: 'index' }" |
| | | row-key="id" highlight-current-row :data="dataForm.operations" @current-change="rowSelected" |
| | | @row-click="rowClick" height="350" style="width: 100%" class="routing-operate-table" |
| | | :row-class-name="tableRowClassName"> |
| | | <!-- <el-table-column width="15" align="center"> |
| | | <template slot-scope="scope"> |
| | | <i class="icon aufontAll h-icon-all-drag"></i> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column |
| | | prop="index" |
| | | label="序号" |
| | | width="45" |
| | | align="center" |
| | | > |
| | | </el-table-column> --> |
| | | <el-table-column prop="index" label="序号" width="45" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="operationNo" |
| | | label="工序编号" |
| | | width="80" |
| | | align="center" |
| | | > |
| | | <el-table-column prop="operationNo" label="工序编号" width="80" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="operationName" |
| | | label="工序名" |
| | | width="120" |
| | | align="center" |
| | | > |
| | | <el-table-column prop="operationName" label="工序名" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-link |
| | | v-if="editable" |
| | | type="primary" |
| | | @click.stop="openTechnologyOperation(scope.row)" |
| | | >{{ scope.row.operationName }}</el-link |
| | | > |
| | | <el-link v-if="editable" type="primary" @click.stop="openTechnologyOperation(scope.row)">{{ |
| | | scope.row.operationName }}</el-link> |
| | | <span v-if="!editable">{{ scope.row.operationName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | prop="outsideOpItem" |
| | | label="外部工序项目" |
| | | align="center" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="partName" |
| | | label="零件" |
| | | align="center" |
| | | width="120" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> --> |
| | | <el-table-column prop="partName" label="零件" align="center" width="120" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="workCenter" label="工作中心" align="center"> |
| | | <template slot-scope="scope"> |
| | |
| | | return scope.row.workCenter === item.value |
| | | }) |
| | | ? '[' + |
| | | workCenterOptions.find((item) => { |
| | | return scope.row.workCenter === item.value |
| | | }).value + |
| | | '] ' + |
| | | workCenterOptions.find((item) => { |
| | | return scope.row.workCenter === item.value |
| | | }).label |
| | | workCenterOptions.find((item) => { |
| | | return scope.row.workCenter === item.value |
| | | }).value + |
| | | '] ' + |
| | | workCenterOptions.find((item) => { |
| | | return scope.row.workCenter === item.value |
| | | }).label |
| | | : '' |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | prop="runTimeCodeDb" |
| | | label="因素单位" |
| | | align="center" |
| | |
| | | label="劳力设置时间" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="laborClassNo" |
| | | label="人工类别" |
| | | align="center" |
| | | > |
| | | </el-table-column> --> |
| | | <el-table-column prop="laborClassNo" label="人工类别" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | laborClassNoOptions.find((item) => { |
| | | return scope.row.laborClassNo === item.value |
| | | }) |
| | | ? '[' + |
| | | laborClassNoOptions.find((item) => { |
| | | return scope.row.laborClassNo === item.value |
| | | }).value + |
| | | '] ' + |
| | | laborClassNoOptions.find((item) => { |
| | | return scope.row.laborClassNo === item.value |
| | | }).label |
| | | laborClassNoOptions.find((item) => { |
| | | return scope.row.laborClassNo === item.value |
| | | }).value + |
| | | '] ' + |
| | | laborClassNoOptions.find((item) => { |
| | | return scope.row.laborClassNo === item.value |
| | | }).label |
| | | : '' |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="crewSize" |
| | | label="班组人员" |
| | | align="center" |
| | | width="70" |
| | | > |
| | | <el-table-column prop="crewSize" label="班组人员" align="center" width="70"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="editable" |
| | | label="操作" |
| | | align="center" |
| | | width="135" |
| | | > |
| | | <el-table-column v-if="editable" label="操作" align="center" width="135"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click.stop="openTechnologyOperation(scope.row)" |
| | | >编辑 |
| | | <el-button type="text" size="mini" @click.stop="openTechnologyOperation(scope.row)">编辑 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click.stop="insertTechnologyOperation(scope.row)" |
| | | >插入 |
| | | <el-button type="text" size="mini" @click.stop="insertTechnologyOperation(scope.row)">插入 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click.stop="handleDelete(scope.row)" |
| | | >删除 |
| | | <el-button type="text" size="mini" @click.stop="handleDelete(scope.row)">删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-tab-pane label="工序配置" style="height: 100%"> |
| | | <el-divider content-position="left">零件</el-divider> |
| | | <div class="node-content-part"> |
| | | <el-input |
| | | v-model="operationPart.partName" |
| | | placeholder="零件" |
| | | readonly |
| | | style="width:30%;" |
| | | > |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openSelectOperationPart" |
| | | ></el-button> |
| | | <el-input v-model="operationPart.partName" placeholder="零件" readonly style="width:30%;"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openSelectOperationPart"></el-button> |
| | | </el-input> |
| | | </div> |
| | | |
| | | <el-divider content-position="left">配置项</el-divider> |
| | | <!-- <el-divider content-position="left">配置项</el-divider> |
| | | |
| | | <div class="node-content-config"> |
| | | <el-checkbox-group |
| | |
| | | >工单预留</el-checkbox-button |
| | | > |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <!-- <el-divider content-position="left">能力</el-divider> |
| | | <div class="node-content"> |
| | |
| | | effect="dark" |
| | | > |
| | | {{ item.label }} |
| | | </el-tag> |
| | | </el-tag> |
| | | </div> --> |
| | | <el-divider content-position="left">备注</el-divider> |
| | | <div class="node-content-remark"> |
| | | <rich-text |
| | | :richContent="operationPart.remark" |
| | | @contentChange="setOperateRemark" |
| | | ></rich-text> |
| | | <rich-text :richContent="operationPart.remark" @contentChange="setOperateRemark"></rich-text> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="工序参数" style="height: 100%" v-if="dataForm.routingNo!=null"> |
| | | <el-tab-pane label="工序参数" style="height: 100%" v-if="dataForm.routingNo != null"> |
| | | <el-card class="params-template"> |
| | | <div slot="header"> |
| | | <span>参数集</span> |
| | | <el-button |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | size="medium" |
| | | v-if="editable && dataForm.operations.length > 0" |
| | | @click="openTempalteDialog" |
| | | >添加 |
| | | <el-button style="float: right; padding: 3px 0" type="text" size="medium" |
| | | v-if="editable && dataForm.operations.length > 0" @click="openTempalteDialog">添加 |
| | | </el-button> |
| | | </div> |
| | | <el-table |
| | | ref="templateTable" |
| | | :data="operationTemplateList" |
| | | class="l-mes" |
| | | height="600" |
| | | highlight-current-row |
| | | @row-click="templateRowClick" |
| | | > |
| | | <el-table-column |
| | | label="名称" |
| | | prop="operationTemplateName" |
| | | align="center" |
| | | > |
| | | <el-table ref="templateTable" :data="operationTemplateList" class="l-mes" height="600" |
| | | highlight-current-row @row-click="templateRowClick"> |
| | | <el-table-column label="名称" prop="operationTemplateName" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="类型" |
| | | prop="operationTemplateType" |
| | | align="center" |
| | | > |
| | | <el-table-column label="类型" prop="operationTemplateType" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | v-if="editable && dataForm.operations.length > 0" |
| | | @click.stop=" |
| | | handleTemplateDelete(scope.row, scope.$index) |
| | | " |
| | | >删除 |
| | | <el-button type="text" size="mini" v-if="editable && dataForm.operations.length > 0" @click.stop=" |
| | | handleTemplateDelete(scope.row, scope.$index) |
| | | ">删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <div slot="header"> |
| | | <span>参数</span> |
| | | <div style="float: right;"> |
| | | <el-button |
| | | style="padding: 3px 0" |
| | | type="text" |
| | | size="medium" |
| | | v-if="editable && routingTemplateId != null" |
| | | @click="saveAllParamChange" |
| | | >保存 |
| | | <el-button style="padding: 3px 0" type="text" size="medium" |
| | | v-if="editable && routingTemplateId != null" @click="saveAllParamChange">保存 |
| | | </el-button> |
| | | <el-button |
| | | style="padding: 3px 0" |
| | | type="text" |
| | | size="medium" |
| | | v-if="editable && routingTemplateId != null" |
| | | @click="openTempalteParamDialog" |
| | | >添加 |
| | | <el-button style="padding: 3px 0" type="text" size="medium" |
| | | v-if="editable && routingTemplateId != null" @click="openTempalteParamDialog">添加 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="paramData" class="l-mes" height="600"> |
| | | <el-table-column |
| | | label="参数项" |
| | | prop="parameterItem" |
| | | align="center" |
| | | > |
| | | <el-table-column label="参数项" prop="parameterItem" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span |
| | | >{{ scope.row.parameterItem }}({{ |
| | | scope.row.unit |
| | | }})</span |
| | | > |
| | | <span>{{ scope.row.parameterItem }}({{ |
| | | scope.row.unit |
| | | }})</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="参数类型" |
| | | prop="type" |
| | | align="center" |
| | | :formatter="getParam" |
| | | > |
| | | <el-table-column label="参数类型" prop="type" align="center" :formatter="getParam"> |
| | | </el-table-column> |
| | | <el-table-column label="值" prop="paramValue" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.paramValue" |
| | | placeholder="值" |
| | | :disabled="!editable" |
| | | ></el-input> |
| | | <el-input v-model="scope.row.paramValue" placeholder="值" :disabled="!editable"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | v-if="editable && routingTemplateId != null" |
| | | @click.stop="handleParamDelete(scope.row, scope.$index)" |
| | | >删除 |
| | | <el-button type="text" size="mini" v-if="editable && routingTemplateId != null" |
| | | @click.stop="handleParamDelete(scope.row, scope.$index)">删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <operationDialog |
| | | :currshowlist.sync="showOperation" |
| | | @listenToOperationEvent="insertOperation" |
| | | /> |
| | | <operationDialog :currshowlist.sync="showOperation" :multiSelect="multiSelect" |
| | | @handleSelectionChange="insertOperation" @listenToOperationEvent="insertOperation" /> |
| | | <partDialog :currshowlist.sync="showPart" @listenToPartEvent="selectPart" /> |
| | | <operationPartDialog |
| | | :currshowlist.sync="showOperationPart" |
| | | :paramObj="paramObj" |
| | | @listenToPartEvent="selectOperationPart" |
| | | /> |
| | | <ParamTemplateDialog |
| | | :currshowlist.sync="showOperationTemplate" |
| | | @handleSelectionParamTemplateChange="selectOperationTemplate" |
| | | :paramTemplateObj="templateDefaultObj" |
| | | :paramTemplateSelArr="paramTemplateSelArr" |
| | | :paramTemplateSelCol="paramTemplateSelCol" |
| | | /> |
| | | <ParamDialog |
| | | :currshowlist.sync="showTemplateParam" |
| | | @handleSelectionChange="selectTemplateParam" |
| | | :paramSelArr="paramSelArr" |
| | | :paramSelCol="paramSelCol" |
| | | /> |
| | | <editRoutingOperation |
| | | :currshowlist.sync="showTechnologyOperation" |
| | | :currRoutingOperation="currTechnologyOperation" |
| | | /> |
| | | <operationPartDialog :currshowlist.sync="showOperationPart" :paramObj="paramObj" |
| | | @listenToPartEvent="selectOperationPart" /> |
| | | <ParamTemplateDialog :currshowlist.sync="showOperationTemplate" |
| | | @handleSelectionParamTemplateChange="selectOperationTemplate" :paramTemplateObj="templateDefaultObj" |
| | | :paramTemplateSelArr="paramTemplateSelArr" :paramTemplateSelCol="paramTemplateSelCol" /> |
| | | <ParamDialog :currshowlist.sync="showTemplateParam" @handleSelectionChange="selectTemplateParam" |
| | | :paramSelArr="paramSelArr" :paramSelCol="paramSelCol" /> |
| | | <editRoutingOperation :currshowlist.sync="showTechnologyOperation" |
| | | :currRoutingOperation="currTechnologyOperation" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | multiSelect: true, |
| | | itemKey: '', |
| | | typeOptions: [], |
| | | paramTemplateSelArr: [], |
| | |
| | | routingNo: null, |
| | | name: null, |
| | | partId: null, |
| | | partNo: null, |
| | | partName: null, |
| | | description: null, |
| | | state: null, |
| | |
| | | wireCore: null |
| | | }, |
| | | dataRule: { |
| | | partName: [ |
| | | { required: true, message: '零件不能为空', trigger: 'change' } |
| | | partNo: [ |
| | | { required: true, message: '零件不能为空', trigger: 'blur' } |
| | | ], |
| | | bomTypeDb: [ |
| | | { required: true, message: '工艺类型不能为空', trigger: 'change' } |
| | | ], |
| | | bomId: [{ required: true, message: 'BOM不能为空', trigger: 'change' }], |
| | | phaseInDate: [ |
| | | { required: true, message: '逐步采用日期不能为空', trigger: 'blur' } |
| | | { required: true, message: '逐步采用日期不能为空', trigger: 'change' } |
| | | ], |
| | | alternativeNo: [ |
| | | { required: true, message: '替代不能为空', trigger: 'blur' } |
| | |
| | | }, |
| | | false |
| | | ) |
| | | |
| | | // this.rowDrop() |
| | | }, |
| | | |
| | | computed: { |
| | | editable: function() { |
| | | if (!this.dataForm.id) { |
| | | editable() { |
| | | if (!this.dataForm.id && this.itemKey) { |
| | | return true |
| | | } |
| | | if (this.dataForm.id && this.dataForm.state == '01draft') { |
| | |
| | | }, |
| | | watch: { |
| | | 'dataForm.partId'(newValue, oldValue) { |
| | | if (oldValue) { |
| | | this.dataForm.bomId = null |
| | | } |
| | | // if (oldValue) { |
| | | // this.dataForm.bomId = null |
| | | // } |
| | | if (newValue) { |
| | | getBomList( |
| | | Object.assign({ |
| | |
| | | } else { |
| | | this.bomList = [] |
| | | } |
| | | } |
| | | }, |
| | | '$route.query.id': { |
| | | immediate: true, |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.dataForm.id = this.$route.query.id |
| | | this.getParamType() |
| | | this.init() |
| | | this.itemKey = Math.random() |
| | | this.getBomTypeDbOptions() |
| | | this.getWorkCenterOptions() |
| | | this.getRunTimeCodeDbOptions() |
| | | this.getLaborClassNo() |
| | | } else { |
| | | this.dataForm.id = null |
| | | this.getParamType() |
| | | this.init() |
| | | this.dataForm = { |
| | | id: null, |
| | | routingNo: null, |
| | | name: null, |
| | | partId: null, |
| | | partNo: null, |
| | | partName: null, |
| | | description: null, |
| | | state: null, |
| | | master: false, |
| | | bomId: null, |
| | | operations: [], |
| | | refs: [], |
| | | bomTypeDb: 'M', |
| | | alternativeNo: '*', |
| | | alternativeDesc: null, |
| | | ifsSync: false, |
| | | phaseInDate: null, |
| | | phaseOutDate: null, |
| | | version: null, |
| | | wireCore: null |
| | | } |
| | | this.operationPart = {} |
| | | this.itemKey = Math.random() |
| | | this.getBomTypeDbOptions() |
| | | this.getWorkCenterOptions() |
| | | this.getRunTimeCodeDbOptions() |
| | | this.getLaborClassNo() |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | created() { |
| | | // this.dataForm.id = this.$route.query.id |
| | | // this.getParamType() |
| | | // this.init() |
| | | // this.itemKey = Math.random() |
| | | // this.getBomTypeDbOptions() |
| | | // this.getWorkCenterOptions() |
| | | // this.getRunTimeCodeDbOptions() |
| | | // this.getLaborClassNo() |
| | | }, |
| | | activated() { |
| | | this.dataForm.id = this.$route.query.id |
| | | this.getParamType() |
| | | this.init() |
| | |
| | | this.getRunTimeCodeDbOptions() |
| | | this.getLaborClassNo() |
| | | }, |
| | | |
| | | methods: { |
| | | // 查询结构类型字典 |
| | | getBomTypeDbOptions() { |
| | |
| | | operationsFlag = false |
| | | } |
| | | }) |
| | | if (!operationsFlag) { |
| | | this.$message.error('每个工序都需添加对应零件') |
| | | this.isSubmit = false |
| | | return |
| | | } |
| | | /* if (!operationsFlag) { |
| | | this.$message.error('每个工序都需添加对应零件') |
| | | this.isSubmit = false |
| | | return |
| | | } */ |
| | | if (this.dataForm.id) { |
| | | putObj(this.dataForm) |
| | | .then((response) => { |
| | |
| | | this.operationPart.remark = val |
| | | }, |
| | | insertTechnologyOperation(row) { |
| | | this.multiSelect = false |
| | | this.showOperation = true |
| | | this.last = false |
| | | this.operationIndex = row.index |
| | |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | operation.operationName = operation.name |
| | | operation.operationId = operation.id |
| | | operation.id = null |
| | | if (this.last) { |
| | | // 行最后添加 |
| | | operation.index = this.dataForm.operations.length + 1 |
| | | this.dataForm.operations.push(operation) |
| | | if (this.multiSelect) { |
| | | operation.forEach(item => { |
| | | let obj = {}; |
| | | obj.operationName = item.name; |
| | | obj.operationId = item.id; |
| | | if (this.last) { |
| | | // 行最后添加 |
| | | obj.index = this.dataForm.operations.length + 1 |
| | | this.dataForm.operations.push(obj) |
| | | } else { |
| | | // 插入前一行 |
| | | obj.index = this.operationIndex |
| | | this.dataForm.operations = [ |
| | | ...this.dataForm.operations.slice(0, obj.index - 1), |
| | | obj, |
| | | ...this.dataForm.operations.slice(obj.index - 1) |
| | | ] |
| | | } |
| | | }) |
| | | this.dataForm.operations.forEach((e, idx) => { |
| | | e.index = idx + 1 |
| | | }) |
| | | this.$forceUpdate() |
| | | this.$refs.operationTable.sort('index') |
| | | Promise.all([this.save()]).then((res) => { |
| | | this.selectByIndex(obj.index) |
| | | }) |
| | | } else { |
| | | // 插入前一行 |
| | | operation.index = this.operationIndex |
| | | this.dataForm.operations = [ |
| | | ...this.dataForm.operations.slice(0, operation.index - 1), |
| | | operation, |
| | | ...this.dataForm.operations.slice(operation.index - 1) |
| | | ] |
| | | operation.operationName = operation.name |
| | | operation.operationId = operation.id |
| | | operation.id = null |
| | | if (this.last) { |
| | | // 行最后添加 |
| | | operation.index = this.dataForm.operations.length + 1 |
| | | this.dataForm.operations.push(operation) |
| | | } else { |
| | | // 插入前一行 |
| | | operation.index = this.operationIndex |
| | | this.dataForm.operations = [ |
| | | ...this.dataForm.operations.slice(0, operation.index - 1), |
| | | operation, |
| | | ...this.dataForm.operations.slice(operation.index - 1) |
| | | ] |
| | | } |
| | | this.dataForm.operations.forEach((e, idx) => { |
| | | e.index = idx + 1 |
| | | }) |
| | | this.$forceUpdate() |
| | | this.$refs.operationTable.sort('index') |
| | | Promise.all([this.save()]).then((res) => { |
| | | this.selectByIndex(operation.index) |
| | | }) |
| | | } |
| | | this.dataForm.operations.forEach((e, idx) => { |
| | | e.index = idx + 1 |
| | | }) |
| | | this.$forceUpdate() |
| | | this.$refs.operationTable.sort('index') |
| | | Promise.all([this.save()]).then((res) => { |
| | | this.selectByIndex(operation.index) |
| | | }) |
| | | }, |
| | | |
| | | handleDelete(row) { |
| | |
| | | type: 'warning' |
| | | } |
| | | ) |
| | | .then(function() { |
| | | .then(function () { |
| | | return deleteRoutingTemplate(row.id) |
| | | }) |
| | | .then((response) => { |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(function() { |
| | | .then(function () { |
| | | return deleteRoutingTemplateParam(row.id) |
| | | }) |
| | | .then((response) => { |
| | |
| | | }, |
| | | // 保存所有参数的修改 |
| | | saveAllParamChange() { |
| | | this.paramData.forEach(e => { |
| | | if (e.paramValue != null) { |
| | | e.paramValue = e.paramValue.replace(',', ',').replace('(', '(').replace(')', ')') |
| | | if (!isNaN(e.paramValue)) { |
| | | e.paramValue = '=' + e.paramValue |
| | | } |
| | | } |
| | | }) |
| | | const paramJson = { routingOperationParam: this.paramData } |
| | | putRoutingTemplateParam(paramJson).then((response) => { |
| | | const data = response.data |
| | |
| | | .fallbackStyle { |
| | | opacity: 1 !important; |
| | | } |
| | | |
| | | .item_ghost { |
| | | opacity: 0 !important; |
| | | } |
| | | |
| | | .dragWrap { |
| | | overflow-x: auto; |
| | | padding: 10px; |
| | | margin: 0 -10px; |
| | | |
| | | .dragHead { |
| | | display: inline-block; |
| | | width: var(--dragitemwidth); |
| | | + .dragHead { |
| | | |
| | | .dragHead { |
| | | margin-left: 15px; |
| | | |
| | | .idx::after { |
| | | content: ''; |
| | | position: absolute; |
| | |
| | | background: #288fe8; |
| | | } |
| | | } |
| | | |
| | | .idx { |
| | | border-radius: 100%; |
| | | width: 25px; |
| | |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .dragItem { |
| | | display: inline-block; |
| | | width: var(--dragitemwidth); |
| | |
| | | border: 1px solid #ebeef5; |
| | | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1); |
| | | box-sizing: border-box; |
| | | + .dragItem { |
| | | |
| | | +.dragItem { |
| | | margin-left: 15px; |
| | | } |
| | | |
| | | &.active { |
| | | box-shadow: 0 2px 10px 0 rgba(40, 143, 232, 0.3); |
| | | } |
| | | |
| | | .dragBody { |
| | | cursor: grab; |
| | | |
| | | &:active { |
| | | cursor: grabbing; |
| | | } |
| | | |
| | | height: 100px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | padding: 10px 5px; |
| | | justify-content: space-around; |
| | | |
| | | .info { |
| | | font-size: 14px; |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | |
| | | .dragFoot { |
| | | height: 30px; |
| | | display: flex; |
| | |
| | | .avue-main { |
| | | height: calc(100% - 60px); |
| | | } |
| | | |
| | | .routing-detail { |
| | | width: 100%; |
| | | padding-top: 10px; |
| | |
| | | background-size: cover; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .h-icon-all-drag:before { |
| | | content: '\E63E'; |
| | | font-size: 14px; |