| | |
| | | <h2>编辑-产品结构</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | | <el-button title="保存" :disabled="isSubmit" v-thinclick="`save`" |
| | | >保存</el-button |
| | | > |
| | | <el-button title="保存" :disabled="isSubmit" v-thinclick="`save`">保存</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="single-structure-basic"> |
| | | <el-form |
| | | :inline="true" |
| | | :model="dataForm" |
| | | :rules="dataRule" |
| | | ref="dataForm" |
| | | label-width="80px" |
| | | class="l-mes" |
| | | > |
| | | <div class="single-structure-basic" style="height: 20%;"> |
| | | <el-form :inline="true" :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="零件号" prop="partNo"> |
| | | <el-input |
| | | v-model="dataForm.partNo" |
| | | placeholder="请选择零件" |
| | | @blur="checkPartNo()" |
| | | > |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openPartDialog()" |
| | | ></el-button> |
| | | <el-input v-model="dataForm.partNo" placeholder="请选择零件" @blur="checkPartNo()"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openPartDialog()"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="零件名称" prop="partName"> |
| | | <el-input |
| | | v-model="dataForm.partName" |
| | | placeholder="零件名称" |
| | | :readonly="true" |
| | | > |
| | | <el-input v-model="dataForm.partName" placeholder="零件名称" :readonly="true"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="结构类型" prop="bomTypeDb"> |
| | | <el-select |
| | | v-model="dataForm.bomTypeDb" |
| | | placeholder="请选择结构类型" |
| | | style="width:100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in bomTypeDbOptions" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :key="index" |
| | | > |
| | | <el-select v-model="dataForm.bomTypeDb" placeholder="请选择结构类型" style="width:100%"> |
| | | <el-option v-for="(item, index) in bomTypeDbOptions" :label="item.label" :value="item.value" |
| | | :key="index"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="版本号" prop="version"> |
| | | <el-input v-model="dataForm.version" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="模具编号" prop="sharpenerNo"> |
| | | <el-input v-model="dataForm.sharpenerNo"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="每模穴数" prop="caveNum"> |
| | | <el-input v-model="dataForm.caveNum"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="克重(kg)" prop="gramWeight"> |
| | | <el-input v-model="dataForm.gramWeight"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="浇口(kg)" prop="gateGramWeight"> |
| | | <el-input v-model="dataForm.gateGramWeight"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="成型周期(h)" prop="moldingCycle"> |
| | | <el-input v-model="dataForm.moldingCycle"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="机台(h)" prop="machine"> |
| | | <el-input v-model="dataForm.machine"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="回料比例(%)" prop="scale"> |
| | | <el-input v-model="dataForm.scale"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="烘料时间(h)" prop="dryingTime"> |
| | | <el-input v-model="dataForm.dryingTime"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="烘料温度(℃)" prop="dryingTemperature"> |
| | | <el-input v-model="dataForm.dryingTemperature"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="包装信息" prop="packingInfo"> |
| | | <el-input v-model="dataForm.packingInfo"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3 }" |
| | | v-model="dataForm.remark" |
| | | ></el-input> |
| | | <el-input type="textarea" :autosize="{ minRows: 1, maxRows: 3 }" v-model="dataForm.remark"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="已同步至IFS" prop="ifsSync"> |
| | | <span |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="single-structure-detail"> |
| | | <div class="single-structure-detail" style="height: 70%;"> |
| | | <el-card class="single-structure-card" shadow="never" style=""> |
| | | <div slot="header" class="clearfix"> |
| | | <div style="float: left; "> |
| | | <span>子节点</span |
| | | ><span style="color:red;" |
| | | >(所有子节点保存之后,才可进行拖拽排序!)</span |
| | | > |
| | | <span>子节点</span><span style="color:red;">(所有子节点保存之后,才可进行拖拽排序!)</span> |
| | | </div> |
| | | <div style="float: right; margin-right: 20px"> |
| | | <el-button |
| | | type="text" |
| | | size="medium" |
| | | class="blue-but" |
| | | @click="addNode()" |
| | | >添加 |
| | | <el-button type="text" size="medium" class="blue-but" @click="addNode()">添加 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | id="structureComponentTable" |
| | | ref="nodeTable" |
| | | :data="nodeList" |
| | | :default-sort="{ prop: 'lineItemNo' }" |
| | | height="650" |
| | | :header-cell-style="{ color: '#999' }" |
| | | :row-class-name="structureComponentRowClass" |
| | | > |
| | | <el-table-column |
| | | prop="lineItemNo" |
| | | label="行项号" |
| | | align="center" |
| | | width="70" |
| | | > |
| | | <el-table id="structureComponentTable" ref="nodeTable" :data="nodeList" :default-sort="{ prop: 'lineItemNo' }" |
| | | height="650" :header-cell-style="{ color: '#999' }" :row-class-name="structureComponentRowClass"> |
| | | <el-table-column prop="lineItemNo" label="行项号" align="center" width="70"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="消耗工序" |
| | | prop="operationName" |
| | | align="center" |
| | | > |
| | | <el-table-column label="消耗工序" prop="operationName" align="center"> |
| | | <template scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.operationName" |
| | | placeholder="请选择消耗工序" |
| | | v-if="scope.row.isUpdate" |
| | | > |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openOperateDialog(scope.row)" |
| | | ></el-button> |
| | | <el-input v-model="scope.row.operationName" placeholder="请选择消耗工序" v-if="scope.row.isUpdate"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openOperateDialog(scope.row)"></el-button> |
| | | </el-input> |
| | | <template v-if="!scope.row.isUpdate">{{ |
| | | scope.row.operationName |
| | |
| | | </el-table-column> |
| | | <el-table-column label="零件号" prop="partNo" align="center"> |
| | | <template scope="scope"> |
| | | <el-input |
| | | :class="customClass[scope.$index]" |
| | | v-model="scope.row.partNo" |
| | | placeholder="请选择零件" |
| | | v-if="scope.row.isUpdate" |
| | | @blur="verifyPartNo(scope.row, scope.$index)" |
| | | @focus="clearClass(scope.$index)" |
| | | > |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="openPartDialog(scope.row, scope.$index)" |
| | | ></el-button> |
| | | <el-input :class="customClass[scope.$index]" v-model="scope.row.partNo" placeholder="请选择零件" |
| | | v-if="scope.row.isUpdate" @blur="verifyPartNo(scope.row, scope.$index)" |
| | | @focus="clearClass(scope.$index)"> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openPartDialog(scope.row, scope.$index)"></el-button> |
| | | </el-input> |
| | | <template v-if="!scope.row.isUpdate">{{ |
| | | scope.row.partNo |
| | | }}</template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="零件名称" |
| | | prop="partName" |
| | | align="center" |
| | | :show-overflow-tooltip="true" |
| | | > |
| | | <el-table-column label="零件名称" prop="partName" align="center" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column label="数量" prop="qpa" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | size="small" |
| | | v-model="scope.row.qpa" |
| | | placeholder="请填写数量" |
| | | v-show="scope.row.isUpdate" |
| | | onkeyup="this.value=this.value.match(/\d+\.?\d{0,8}/);this.dispatchEvent(new Event('input'))" |
| | | ></el-input> |
| | | <el-input size="small" v-model="scope.row.qpa" placeholder="请填写数量" v-show="scope.row.isUpdate" |
| | | onkeyup="this.value=this.value.match(/\d+\.?\d{0,8}/);this.dispatchEvent(new Event('input'))"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ scope.row.qpa }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="单位" prop="unit" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="规格" prop="specs" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="型号" prop="partModel" align="center"> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="磨具编号" prop="sharpenerNo" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.sharpenerNo" placeholder="请填写磨具编号" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.sharpenerNo |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="每模穴数" prop="caveNum" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.caveNum" placeholder="请填写每模穴数" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.caveNum |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="克重(kg)" prop="gramWeight" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.gramWeight" placeholder="请填写克重" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.gramWeight |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="浇口克重(kg)" prop="gateGramWeight" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.gateGramWeight" placeholder="请填写浇口克重" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.gateGramWeight |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="成型周期(h)" prop="moldingCycle" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.moldingCycle" placeholder="请填写成型周期" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.moldingCycle |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="机台(t)" prop="machine" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.machine" placeholder="请填写机台" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.machine |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="回料比例(%)" prop="scale" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.scale" placeholder="请填写回料比例" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.scale |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="烘料时间(h)" prop="dryingTime" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.dryingTime" placeholder="请填写烘料时间" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.dryingTime |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="烘料温度(℃)" prop="dryingTemperature" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.dryingTemperature" placeholder="请填写烘料温度" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.dryingTemperature |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="包装信息" prop="packingInfo" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.packingInfo" placeholder="请填写包装信息" |
| | | v-show="scope.row.isUpdate"></el-input> |
| | | <span v-show="!scope.row.isUpdate">{{ |
| | | scope.row.packingInfo |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> --> |
| | | <!-- <el-table-column label="盘数(盘)" prop="discNum" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | |
| | | </el-table-column> --> |
| | | <el-table-column align="center" label="操作" width="85px"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | class="blue-but" |
| | | v-if="!scope.row.isUpdate" |
| | | @click="editNode(scope.$index, scope.row)" |
| | | >编辑</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | class="blue-but" |
| | | v-if="scope.row.isUpdate" |
| | | :loading="nodeSaveLoading" |
| | | @click="addOrUpdateNode(scope.$index, scope.row)" |
| | | >保存</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | class="red-but" |
| | | @click="delNode(scope.$index, scope.row)" |
| | | >删除</el-button |
| | | > |
| | | <el-button type="text" size="small" class="blue-but" v-if="!scope.row.isUpdate" |
| | | @click="editNode(scope.$index, scope.row)">编辑</el-button> |
| | | <el-button type="text" size="small" class="blue-but" v-if="scope.row.isUpdate" :loading="nodeSaveLoading" |
| | | @click="addOrUpdateNode(scope.$index, scope.row)">保存</el-button> |
| | | <el-button type="text" size="small" class="red-but" |
| | | @click="delNode(scope.$index, scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | <partDialog |
| | | :currshowlist.sync="showPart" |
| | | :parentSelectedObj="editNodePart" |
| | | :parentSelectedIndex="editIndex" |
| | | @listenToPartEvent="selectPart" |
| | | /> |
| | | <operationDialog |
| | | :currshowlist.sync="showOperate" |
| | | @listenToOperationEvent="selectOperate" |
| | | /> |
| | | <partDialog :currshowlist.sync="showPart" :parentSelectedObj="editNodePart" :parentSelectedIndex="editIndex" |
| | | @listenToPartEvent="selectPart" /> |
| | | <operationDialog :currshowlist.sync="showOperate" @listenToOperationEvent="selectOperate" /> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | alternativeDesc: null, |
| | | version: null, |
| | | master: false, |
| | | ifsSync: false |
| | | ifsSync: false, |
| | | sharpenerNo: null, |
| | | caveNum: null, |
| | | gramWeight: null, |
| | | gateGramWeight: null, |
| | | moldingCycle: null, |
| | | machine: null, |
| | | scale: null, |
| | | dryingTime: null, |
| | | dryingTemperature: null, |
| | | packingInfo: null |
| | | }, |
| | | nodeList: [], |
| | | dataRule: { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | editable: function() { |
| | | editable: function () { |
| | | if (!this.dataForm.id) { |
| | | return true |
| | | } |
| | |
| | | this.dataForm.alternativeNo = resData.alternativeNo |
| | | this.dataForm.alternativeDesc = resData.alternativeDesc |
| | | this.dataForm.ifsSync = resData.ifsSync |
| | | this.dataForm.sharpenerNo= resData.sharpenerNo |
| | | this.dataForm.caveNum= resData.caveNum |
| | | this.dataForm.gramWeight= resData.gramWeight |
| | | this.dataForm.gateGramWeight= resData.gateGramWeight |
| | | this.dataForm.moldingCycle= resData.moldingCycle |
| | | this.dataForm.machine= resData.machine |
| | | this.dataForm.scale= resData.scale |
| | | this.dataForm.dryingTime= resData.ndryingTime |
| | | this.dataForm.dryingTemperature= resData.dryingTemperature |
| | | this.dataForm.packingInfo= resData.packingInfo |
| | | const components = resData.components |
| | | if (components != null && components.length > 0) { |
| | | let node |
| | |
| | | node.discNum = components[i].discNum |
| | | node.lineItemNo = components[i].lineItemNo |
| | | node.color = components[i].color |
| | | node.partModel=components[i].partModel |
| | | node.specs=components[i].specs |
| | | // node.sharpenerNo= components[i].sharpenerNo |
| | | // node.caveNum=components[i].caveNum |
| | | // node.gramWeight=components[i].gramWeight |
| | | // node.gateGramWeight=components[i].gateGramWeight |
| | | // node.moldingCycle=components[i].moldingCycle |
| | | // node.machine=components[i].machine |
| | | // node.scale=components[i].scale |
| | | // node.dryingTime=components[i].dryingTime |
| | | // node.dryingTemperature=components[i].dryingTemperature |
| | | // node.packingInfo= components[i].packingInfo |
| | | node.planningMethod = components[i].planningMethod |
| | | node.isUpdate = false |
| | | this.nodeList.push(node) |
| | |
| | | }, |
| | | // 批量更新子节点 |
| | | batchUpdateNodeComponent(componentList) { |
| | | batchComponent(componentList).then((response) => {}) |
| | | batchComponent(componentList).then((response) => { }) |
| | | }, |
| | | // 判断是否禁用行拖拽排序,只有所有行都进行save之后,才能进行排序。 |
| | | structureComponentRowClass() { |
| | |
| | | border: 1px solid #ddd; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .single-structure-detail { |
| | | overflow: hidden; |
| | | width: 100%; |
| | |
| | | margin-top: 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .single-structure-card { |
| | | width: 100%; |
| | | border: 0px; |
| | | } |
| | | |
| | | .single-structure-card .el-card__header { |
| | | border-bottom: 0px; |
| | | } |
| | | |
| | | .single-structure-card .el-card__body { |
| | | padding-top: 0px; |
| | | } |
| | | |
| | | .blue-but.is-disabled { |
| | | color: #aacfff; |
| | | } |
| | |
| | | .blue-but { |
| | | color: #006eff; |
| | | } |
| | | |
| | | .red-but.is-disabled { |
| | | color: #fab6b6; |
| | | } |