| | |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="document-basic"> |
| | | <div class="document-basic" style="height: 28%;"> |
| | | <el-form |
| | | :model="dataForm" |
| | | :rules="dataRule" |
| | |
| | | label-width="110px" |
| | | > |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="name" label="文件名称"> |
| | | <el-input |
| | | v-model="dataForm.name" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="number" label="文件编号"> |
| | | <el-input v-model="dataForm.number" placeholder="文件编号"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <!-- <el-col :span="4"> |
| | | <el-form-item prop="docType" label="类型"> |
| | | <el-select |
| | | v-model="dataForm.docType" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item prop="version" label="版本号"> |
| | | <el-input |
| | | v-model="dataForm.version" |
| | | placeholder="版本号" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | </el-col> --> |
| | | <!-- <el-col :span="3"> |
| | | <el-form-item prop="sheathColor" label="护套颜色"> |
| | | <el-input |
| | | v-model="dataForm.sheathColor" |
| | |
| | | placeholder="绝缘颜色" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <!-- <el-col :span="4"> |
| | | <el-form-item label="项目号" prop="projectNo"> |
| | | <el-input |
| | |
| | | <countrySelector v-model="dataForm.country"></countrySelector> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产品零件号" prop="partNo"> |
| | | <el-input v-model="dataForm.partNo" placeholder="请选择零件"> |
| | | <el-button |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产品零件描述" prop="partName"> |
| | | <el-input v-model="dataForm.partName" disabled> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="备注" prop="remark"> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="version" label="版本号"> |
| | | <el-input |
| | | v-model="dataForm.version" |
| | | placeholder="版本号" |
| | | ></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="" |
| | | style="width: 100%;" |
| | | filterable> |
| | | <el-option |
| | | v-for="item in bomList" |
| | | :key="item.id" |
| | | :label="item.number" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="工艺路线编号" prop="routingList"> |
| | | <el-select |
| | | :disabled="dataForm.id != null" |
| | | v-model="dataForm.routingId" |
| | | placeholder="" |
| | | style="width: 100%;" |
| | | filterable> |
| | | <el-option |
| | | v-for="item in routingList" |
| | | :key="item.id" |
| | | :label="item.routing_no" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目号" prop="projectNo"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="dataForm.remark" |
| | | placeholder="备注" |
| | | style="width:360px" |
| | | v-model="dataForm.projectNo" |
| | | placeholder="项目号" |
| | | style="width:100%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="dataForm.remark" |
| | | placeholder="备注" |
| | | style="width:100%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | |
| | | <div class="document-detail"> |
| | | <el-tabs type="card" style="width: 100%;height: 100%"> |
| | | <el-tab-pane |
| | | label="原材用量" |
| | | label="原材料用量" |
| | | style="height: 100%" |
| | | class="orimaterial-quantity" |
| | | > |
| | |
| | | prop="operationName" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column label="物料编号" prop="partNo" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="物料" prop="partName" align="center"> |
| | | </el-table-column> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-card class="document-bom" header="BOM-工序参数"> |
| | | <div slot="header"> |
| | | <el-card class="document-bom" header=""> |
| | | <!-- <div slot="header"> |
| | | <span>BOM-工序参数</span> |
| | | <el-tooltip |
| | | class="item" |
| | |
| | | >添加 |
| | | </el-button> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> --> |
| | | <el-collapse |
| | | v-model="currTechnologyBomPartName" |
| | | accordion |
| | |
| | | </el-checkbox> |
| | | </template> |
| | | <div style="display:flex;"> |
| | | <div |
| | | <!-- <div |
| | | style="font-size:13px;font-weight:bold;cursor: pointer;border-radius:2px 2px 0px 0px;width:80px;text-align:center;" |
| | | :class="[ |
| | | item.showBom |
| | |
| | | @click="item.showBom = true" |
| | | > |
| | | BOM结构 |
| | | </div> |
| | | </div> --> |
| | | <div |
| | | style="font-size:13px;font-weight:bold;cursor: pointer;margin-left: 10px;border-radius:2px 2px 0px 0px;width:80px;text-align:center;" |
| | | :class="[ |
| | | !item.showBom |
| | | ? 'highlight-tab-class' |
| | | : 'unhighlight-tab-class' |
| | | ]" |
| | | @click="item.showBom = false" |
| | | :class="['highlight-tab-class']" |
| | | > |
| | | 工序参数 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="document-bom-div" v-show="item.showBom"> |
| | | |
| | | <!-- <div class="document-bom-div" v-show="item.showBom"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | |
| | | <el-table-column prop="unit" label="单位"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="document-technology-div" v-show="!item.showBom"> |
| | | </div> --> |
| | | |
| | | <div class="document-technology-div" v-show="item.showBom"> |
| | | <div |
| | | style="border: 1px solid #ebeef5;height: 440px;overflow: auto;" |
| | | > |
| | |
| | | ></el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="备注" style="height: 100%"> |
| | | <!-- <el-tab-pane label="备注" style="height: 100%"> |
| | | <rich-text |
| | | :editorId=" |
| | | 'fwb' + item.id + '-' + ele.id + '-' + j |
| | | " |
| | | :richContent="ele.remark" |
| | | ></rich-text> |
| | | </el-tab-pane> |
| | | </el-tab-pane> --> |
| | | <el-tab-pane label="检测标准"> |
| | | <checkStandardTable |
| | | ref="documentTestStandardTable" |
| | |
| | | " |
| | | ></checkStandardTable> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="抽检规则"> |
| | | <!-- <el-tab-pane label="抽检规则"> |
| | | <div> |
| | | <div style="padding: 0px 20px;"> |
| | | <el-button |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tab-pane> --> |
| | | </el-tabs> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | |
| | | </el-select> |
| | | <div id="demo" style="margin:5px auto;"></div> |
| | | </div> |
| | | <!--<el-upload |
| | | <el-upload |
| | | class="upload-demo" |
| | | action="/mes/document/uploadLct" |
| | | :headers="headers" |
| | |
| | | <div slot="tip" class="el-upload__tip"> |
| | | 只能上传jpg图片,且不超过2MB |
| | | </div> |
| | | </el-upload>--> |
| | | </el-upload> |
| | | <el-dialog :visible.sync="dialogFlowVisible"> |
| | | <img width="100%" :src="dialogFlowImageUrl" alt="" /> |
| | | </el-dialog> |
| | |
| | | import { delDocumentSamplingRule } from '@/api/quality/documentsamplingrule' |
| | | import { getObj as getTechnologyDetail } from '@/api/technology/routing' |
| | | import { getObj as getStructureDetail } from '@/api/technology/completeproductstructure' |
| | | import { fetchList as getBomList } from '@/api/technology/completeproductstructure' |
| | | import { getRouting } from '@/api/technology/document' |
| | | import { getTestStandardParams } from '@/api/quality/teststandard' |
| | | import { remote } from '@/api/admin/dict' |
| | | import { fetchList as getStandard } from '@/api/quality/standardbind' |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | bomList: [], |
| | | routingList: [], |
| | | operationPart: {}, |
| | | showCompleteproductstructure: false, |
| | | showTechnology: false, |
| | |
| | | ], |
| | | dataForm: { |
| | | id: null, |
| | | bomId: null, |
| | | routingId: null, |
| | | number: null, |
| | | name: null, |
| | | version: null, |
| | |
| | | { required: true, message: '版本号不能为空', trigger: 'blur' } |
| | | ], |
| | | projectNo: [ |
| | | { required: true, message: '项目号不能为空', trigger: 'blur' } |
| | | // { required: true, message: '项目号不能为空', trigger: 'blur' } |
| | | ], |
| | | projectType: [ |
| | | { required: true, message: '项目类别不能为空', trigger: 'change' } |
| | |
| | | window.winDbClick = this.getDbClick |
| | | // 初始化流程图实例 |
| | | this.initFlowDesign() |
| | | }, |
| | | watch: { |
| | | 'dataForm.partId'(newValue, oldValue) { |
| | | if (oldValue) { |
| | | this.dataForm.bomId = null |
| | | } |
| | | if (newValue) { |
| | | getBomList( |
| | | Object.assign({ |
| | | current: 1, |
| | | size: 999, |
| | | partId: this.dataForm.partId, |
| | | }) |
| | | ).then((response) => { |
| | | this.bomList = response.data.data.records |
| | | }) |
| | | } else { |
| | | this.bomList = [] |
| | | } |
| | | }, |
| | | 'dataForm.bomId'(newValue, oldValue) { |
| | | if (oldValue) { |
| | | this.dataForm.routingId = null |
| | | } |
| | | if (newValue) { |
| | | getRouting( |
| | | Object.assign({ |
| | | bomId: this.dataForm.bomId, |
| | | }) |
| | | ).then((response) => { |
| | | this.routingList = response.data.data |
| | | }) |
| | | } else { |
| | | this.routingList = [] |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 查询类型字典 |
| | |
| | | if (this.currTechnologyName != null && this.currTechnologyName !== '') { |
| | | // 当用户删除工艺文件中关联的工艺路线时,若该文件对应BOM中所需半成品的工艺路线也已与当前工艺文件关联 |
| | | routingChildCheck(this.currTechnologyBomPartName).then((res) => { |
| | | console.log('res', res.data) |
| | | const resData = res.data |
| | | let num = 0 |
| | | if (resData.code === 0) { |
| | |
| | | if (this.dataForm.id) { |
| | | this.getDocumentInfo(this.dataForm.id) |
| | | } |
| | | console.log('上传成功') |
| | | }, |
| | | handleStructureExceed(files, fileList) { |
| | | // this.$message.warning( |
| | |
| | | this.dialogFlowVisible = true |
| | | }, |
| | | handleFlowSuccess(response, file, fileList) { |
| | | console.log('上传成功') |
| | | }, |
| | | handleFlowExceed(files, fileList) { |
| | | this.$message.warning( |
| | |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | console.log(columns, 'A') |
| | | console.log(data, 'B') |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |