|
|
@@ -14,7 +14,7 @@
|
|
|
@modalCancel="modalCancel"
|
|
|
@on-cancel="modalCancel"
|
|
|
:valid-form-ref-list="['formInLine-tab1','formInLine-tab2','formInLine-tab3','formInLine-tab4']">
|
|
|
- <DkTabs :options="tabsOptions" v-model="currentTab" @on-click="changeTabs" style="margin: 0 0 10px;"/>
|
|
|
+ <DkTabs :options="tabsOptions" v-model="currentTab" @on-click="changeTabs" style="margin: 10px 0;"/>
|
|
|
|
|
|
<!-- <!– 返回工序 –>-->
|
|
|
<!-- <DkFormItem prop="backNodeId" v-if="nodeControl?.backNodeId?.visible">-->
|
|
|
@@ -28,6 +28,7 @@
|
|
|
<!-- :multiple="false" :options="packKindList"/>-->
|
|
|
<!-- </DkFormItem>-->
|
|
|
|
|
|
+ {{ nodeData }}<br/>
|
|
|
|
|
|
<!-- tab1 - 基本信息 -->
|
|
|
<DkForm ref="formInline-tab1" v-if="currentTab =='tab1'" v-model="nodeData" :label-max-words="6" :colCount="2">
|
|
|
@@ -189,93 +190,92 @@
|
|
|
:multiple="true" :options="moldingSysTagsList"/>
|
|
|
</DkFormItem>
|
|
|
</DkForm>
|
|
|
+ <Divider></Divider>
|
|
|
<!-- 表格 -->
|
|
|
- <div v-if="currentTab =='tab1'">
|
|
|
- <!-- 生产工号 -->
|
|
|
- <EditTable ref="productUserTable" :title='"生产工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以作为此工序生产工号"'
|
|
|
- :data="nodeData.userList"
|
|
|
- v-if="nodeControl?.userTable?.visible&&productUserTableFlag"
|
|
|
- :columns="userColumns_noKind"
|
|
|
- enabledRepeatId="userId"
|
|
|
- :height="200"
|
|
|
- controlId="userId"
|
|
|
- :enabledRepeat="false"
|
|
|
- :show-setting-flag="false"/>
|
|
|
- <!-- @chooseData="chooseUser"/>-->
|
|
|
- <!-- 操作工号 -->
|
|
|
- <EditTable ref="operateUserTable" :title='"操作工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以操作此工序"'
|
|
|
- :data="nodeData.userList"
|
|
|
- v-if="nodeControl?.userTable?.visible&&operateUserTableFlag&&nodeData.userKind==$config.userKind.operate"
|
|
|
- :columns="userColumns_noKind"
|
|
|
- enabledRepeatId="userId"
|
|
|
- :height="200"
|
|
|
- controlId="userId"
|
|
|
- :enabledRepeat="false"
|
|
|
- :show-setting-flag="false"/>
|
|
|
- <!-- @chooseData="chooseUser"/>-->
|
|
|
+ <div style="margin-bottom: 8px">
|
|
|
+ <div v-if="currentTab =='tab1'">
|
|
|
+ <!-- 生产工号 -->
|
|
|
+ <EditTable ref="productUserTable" :title='"生产工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以作为此工序生产工号"'
|
|
|
+ :data="nodeData.userList.filter(it=>it.userKind==$config.userKind.product)"
|
|
|
+ v-if="nodeControl?.userTable?.visible&&productUserTableFlag"
|
|
|
+ :columns="userColumns_noKind"
|
|
|
+ enabledRepeatId="userId"
|
|
|
+ :height="200"
|
|
|
+ controlId="userId"
|
|
|
+ :enabledRepeat="false"
|
|
|
+ :show-setting-flag="false"/>
|
|
|
+ <!-- 操作工号 -->
|
|
|
+ <EditTable ref="operateUserTable" :title='"操作工号"' :titleInfo='"未设置代表有数据采集权限的用户都可以操作此工序"'
|
|
|
+ :data="nodeData.userList.filter(it=>it.userKind==$config.userKind.operate)"
|
|
|
+ v-if="nodeControl?.userTable?.visible&&operateUserTableFlag&&nodeData.userKind==$config.userKind.operate"
|
|
|
+ :columns="userColumns_noKind"
|
|
|
+ enabledRepeatId="userId"
|
|
|
+ :height="200"
|
|
|
+ controlId="userId"
|
|
|
+ :enabledRepeat="false"
|
|
|
+ :show-setting-flag="false"/>
|
|
|
+ </div>
|
|
|
+ <div v-if="currentTab =='tab2'">
|
|
|
+ <!-- 工序可检缺陷 -->
|
|
|
+ <EditTable ref="defectTable" :title='"工序可检缺陷"' :data="nodeData.defectList"
|
|
|
+ v-if="nodeControl?.defectTable?.visible&&defectTableFlag"
|
|
|
+ :columns="defectColumns"
|
|
|
+ enabledRepeatId="defectId"
|
|
|
+ :height="200"
|
|
|
+ controlId="pdtDefectId"
|
|
|
+ :enabledRepeat="false"
|
|
|
+ :show-setting-flag="false"/>
|
|
|
+ <!-- 工序工种缺陷 -->
|
|
|
+ <EditTable ref="jobDefectTable" :title='"工序工种缺陷"' :data="nodeData.jobDefectList"
|
|
|
+ v-if="nodeControl?.jobDefectTable?.visible&&jobDefectTableFlag&&nodeData.flgJobDefect"
|
|
|
+ :columns="jobDefectColumns"
|
|
|
+ enabledRepeatId="defectId"
|
|
|
+ :height="200"
|
|
|
+ controlId="pdtDefectId"
|
|
|
+ :enabledRepeat="false"
|
|
|
+ :show-setting-flag="false"/>
|
|
|
+ </div>
|
|
|
+ <div v-if="currentTab =='tab3'">
|
|
|
+ <!-- 回收/检验设置 -->
|
|
|
+ <EditTable ref="checkRecoverTable" :title='nodeData.nodeKind===$config.nodeKind.recover?"回收设置":"检验设置"'
|
|
|
+ :data="nodeData.routerList"
|
|
|
+ v-if="[$config.nodeKind.recover,$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)"
|
|
|
+ :columns="routerColumns"
|
|
|
+ :controlId="'node1Id'"
|
|
|
+ :height="200"
|
|
|
+ :enabledRepeatId="['node1Id','backNodeId']"
|
|
|
+ :enabledRepeat="false"
|
|
|
+ :show-setting-flag="false"/>
|
|
|
+ </div>
|
|
|
+ <div v-if="currentTab =='tab4'">
|
|
|
+ <!-- 工序在制品 -->
|
|
|
+ <EditTable ref="pdtTable" :title='"工序在制品"' :data="nodeData.pdtList"
|
|
|
+ v-if="nodeControl?.pdtTable?.visible&&pdtTableFlag"
|
|
|
+ :columns="pdtColumns"
|
|
|
+ enabledRepeatId="modelId"
|
|
|
+ controlId="pdtModelId"
|
|
|
+ :height="200"
|
|
|
+ :enabledRepeat="false"
|
|
|
+ :show-setting-flag="false"/>
|
|
|
+ <!-- 跨流程工序 -->
|
|
|
+ <!-- {{nodeData.routerType}}-->
|
|
|
+ <EditTable ref="routerTable" :title='"跨流程工序"' :data="nodeData.routerList"
|
|
|
+ v-if="nodeControl?.routerTable?.visible&&routerTableFlag&&nodeData.recycledKind!==$config.recycledKind.before"
|
|
|
+ :columns="routerColumns_noNode1AndBack"
|
|
|
+ :controlId="'node2Id'"
|
|
|
+ :height="200"
|
|
|
+ :enabledRepeatId="'nodeId'"
|
|
|
+ :enabledRepeat="false"
|
|
|
+ :show-setting-flag="false"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div v-if="currentTab =='tab2'">
|
|
|
- <!-- 工序可检缺陷 -->
|
|
|
- <EditTable ref="defectTable" :title='"工序可检缺陷"' :data="nodeData.defectList"
|
|
|
- v-if="nodeControl?.defectTable?.visible&&defectTableFlag"
|
|
|
- :columns="defectColumns"
|
|
|
- enabledRepeatId="defectId"
|
|
|
- :height="200"
|
|
|
- controlId="pdtDefectId"
|
|
|
- :enabledRepeat="false"
|
|
|
- :show-setting-flag="false"/>
|
|
|
- <!-- 工序工种缺陷 -->
|
|
|
- <EditTable ref="jobDefectTable" :title='"工序工种缺陷"' :data="nodeData.jobDefectList"
|
|
|
- v-if="nodeControl?.jobDefectTable?.visible&&jobDefectTableFlag&&nodeData.flgJobDefect"
|
|
|
- :columns="jobDefectColumns"
|
|
|
- enabledRepeatId="defectId"
|
|
|
- :height="200"
|
|
|
- controlId="pdtDefectId"
|
|
|
- :enabledRepeat="false"
|
|
|
- :show-setting-flag="false"/>
|
|
|
- </div>
|
|
|
- <div v-if="currentTab =='tab3'">
|
|
|
- <!-- 回收/检验设置 -->
|
|
|
- <EditTable ref="checkRecoverTable" :title='nodeData.nodeKind===$config.nodeKind.recover?"回收设置":"检验设置"'
|
|
|
- :data="nodeData.routerList"
|
|
|
- v-if="[$config.nodeKind.recover,$config.nodeKind.halfCheck,$config.nodeKind.finishCheck].includes(nodeData.nodeKind)"
|
|
|
- :columns="routerColumns"
|
|
|
- :controlId="'node1Id'"
|
|
|
- :height="200"
|
|
|
- :enabledRepeatId="['node1Id','backNodeId']"
|
|
|
- :enabledRepeat="false"
|
|
|
- :show-setting-flag="false"/>
|
|
|
- </div>
|
|
|
- <div v-if="currentTab =='tab4'">
|
|
|
- <!-- 工序在制品 -->
|
|
|
- <EditTable ref="pdtTable" :title='"工序在制品"' :data="nodeData.pdtList"
|
|
|
- v-if="nodeControl?.pdtTable?.visible&&pdtTableFlag"
|
|
|
- :columns="pdtColumns"
|
|
|
- enabledRepeatId="modelId"
|
|
|
- controlId="pdtModelId"
|
|
|
- :height="200"
|
|
|
- :enabledRepeat="false"
|
|
|
- :show-setting-flag="false"/>
|
|
|
- <!-- 跨流程工序 -->
|
|
|
- <!-- {{nodeData.routerType}}-->
|
|
|
- <EditTable ref="routerTable" :title='"跨流程工序"' :data="nodeData.routerList"
|
|
|
- v-if="nodeControl?.routerTable?.visible&&routerTableFlag&&nodeData.recycledKind!==$config.recycledKind.before"
|
|
|
- :columns="routerColumns_noNode1AndBack"
|
|
|
- :controlId="'node2Id'"
|
|
|
- :height="200"
|
|
|
- :enabledRepeatId="'nodeId'"
|
|
|
- :enabledRepeat="false"
|
|
|
- :show-setting-flag="false"/>
|
|
|
- </div>
|
|
|
- <!-- {{ nodeData }}<br/>-->
|
|
|
<!-- {{ nodeControl }}<br/>-->
|
|
|
<!-- {{ allNodes }}<br/>-->
|
|
|
<!-- {{nodeData.routerList}}<br/>-->
|
|
|
<!-- todo 切换tab保存各list -->
|
|
|
<!-- todo 2个userList数据问题 -->
|
|
|
<!-- todo 2个routerList数据问题 -->
|
|
|
-<!-- todo 2个routerType切换的问题 -->
|
|
|
-<!-- todo 2个routerType切换的问题 -->
|
|
|
+<!-- todo routerType切换的问题 -->
|
|
|
<!-- todo 返回分级不为null时有返回工序列,null时,隐藏并清空 -->
|
|
|
<!-- todo 返回工序(回收后处理方式为 后续流程 时,此列隐藏并清空) -->
|
|
|
<!-- todo 产品分级表【t_product_grade】增加了分级类型字段【grade_types】,半检时数据源为分级类型为null或【工艺节点-半检】,成检时数据源为分级类型为null或【工艺节点-成检】) -->
|
|
|
@@ -644,7 +644,8 @@ export default {
|
|
|
* @date : 2023/5/29 14:50
|
|
|
*/
|
|
|
changeTabs(e) {
|
|
|
- //重新渲染各table
|
|
|
+
|
|
|
+ // region重新渲染各table
|
|
|
this.productUserTableFlag = !this.productUserTableFlag
|
|
|
this.operateUserTableFlag = !this.operateUserTableFlag
|
|
|
this.$nextTick(() => {
|
|
|
@@ -677,8 +678,10 @@ export default {
|
|
|
}
|
|
|
this.checkRecoverTable = !this.checkRecoverTable
|
|
|
})
|
|
|
+ //endregion
|
|
|
|
|
|
-
|
|
|
+ //设置表单数据
|
|
|
+ this.setFormData()
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 改变操作模式
|
|
|
@@ -774,38 +777,10 @@ export default {
|
|
|
changeUserKind(e) {
|
|
|
//当切换到生产工号时,删除userTable中设置的操作工号
|
|
|
if (e == this.$config.userKind.product) {
|
|
|
- this.$refs?.userTable?.getTableDataFilter().forEach((it) => {
|
|
|
- if ((it.userKind === this.$config.userKind.operate)) {
|
|
|
- this.$refs?.userTable?.del(this.$refs?.userTable?.getTableDataFilter().findIndex(item => item._X_ID == it._X_ID))
|
|
|
- }
|
|
|
- })
|
|
|
+ this.nodeData.userList =this.nodeData.userList.filter(it=>it.userKind==this.$config.userKind.product)
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 选择用户
|
|
|
- * @author : 周兴
|
|
|
- * @date : 2023/3/13 17:50
|
|
|
- */
|
|
|
- chooseUser() {
|
|
|
- this.$nextTick(() => {
|
|
|
- let userKind = this.nodeData.userKind
|
|
|
- let userList = this.$refs['userTable'].tableData
|
|
|
- if (userKind && userList != null && userList.length > 0) {
|
|
|
- let userKindName = this.$refs['userKind']?.getDisplayText()
|
|
|
- userList.forEach(it => {
|
|
|
- if (!it.userKind && it.userId) {
|
|
|
- // 判断用户是否已经存在
|
|
|
- let filters = userList.filter(item => item.userId === it.userId && item['_X_ID'] !== it['_X_ID'])
|
|
|
- if (!filters || filters.length === 0) {
|
|
|
- this.$set(it, 'userKind', userKind)
|
|
|
- this.$set(it, 'userKind_Name', userKindName)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
* @desc : 确定
|
|
|
* @author : 张潇木
|
|
|
* @date : 2023/1/5 10:38
|
|
|
@@ -841,121 +816,8 @@ export default {
|
|
|
* @date : 2023/2/16 16:21
|
|
|
*/
|
|
|
setParams() {
|
|
|
- // console.log('this.$refs?.defectTable?.getTableDataFilter()',this.$refs?.jobDefectTable?.getTableDataFilter())
|
|
|
- // console.log("routerTable?.getTableDataFilter()",this.$refs?.routerTable?.getTableDataFilter())
|
|
|
- // region 设置表单数据
|
|
|
- // 半检、成检、成型 直接指定为生产工号类型
|
|
|
- let userKindProduct = ''
|
|
|
- if (this.nodeData.nodeKind === this.$config.nodeKind.halfCheck ||
|
|
|
- this.nodeData.nodeKind === this.$config.nodeKind.finishCheck ||
|
|
|
- this.nodeData.nodeKind === this.$config.nodeKind.shaping) {
|
|
|
- userKindProduct = this.$config.userKind.product
|
|
|
- this.nodeData.userKind = userKindProduct
|
|
|
- }
|
|
|
- //工序工号
|
|
|
- this.nodeData.userList = this.$refs?.userTable?.getTableDataFilter().map((it, index) => {
|
|
|
- return {
|
|
|
- flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
- nodeId: this.process.currentNodeId,
|
|
|
- userId: it.userId,
|
|
|
- userCode: it.userCode,
|
|
|
- userName: it.userName,
|
|
|
- // 生产工号
|
|
|
- //userKind:it.userKind,
|
|
|
- userKind: userKindProduct ? userKindProduct : it.userKind,
|
|
|
- displayNo: index + 1,
|
|
|
- remarks: it.remarks,
|
|
|
- ftyId: this.$store.state.user.ftyId
|
|
|
- }
|
|
|
- })
|
|
|
- //工序在制品
|
|
|
- this.nodeData.pdtList = this.$refs?.pdtTable?.getTableDataFilter().map((it) => {
|
|
|
- return {
|
|
|
- flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
- nodeId: this.process.currentNodeId,
|
|
|
- pdtModelId: it.pdtModelId,
|
|
|
- pdtModelCode: it.pdtModelCode,
|
|
|
- pdtModelName: it.pdtModelName,
|
|
|
- categoryName: it.categoryName,
|
|
|
- remarks: it.remarks,
|
|
|
- ftyId: this.$store.state.user.ftyId
|
|
|
- }
|
|
|
- })
|
|
|
- //载具
|
|
|
- this.nodeData.carList = this.$refs?.carTable?.getTableDataFilter().map((it) => {
|
|
|
- return {
|
|
|
- flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
- nodeId: this.process.currentNodeId,
|
|
|
- carModelId: it.carModelId,
|
|
|
- carModelCode: it.carModelCode,
|
|
|
- carModelName: it.carModelName,
|
|
|
- remarks: it.remarks,
|
|
|
- ftyId: this.$store.state.user.ftyId
|
|
|
- }
|
|
|
- })
|
|
|
- //缺陷
|
|
|
- this.nodeData.defectList = this.$refs?.defectTable?.getTableDataFilter().map((it) => {
|
|
|
- return {
|
|
|
- flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
- nodeId: this.process.currentNodeId,
|
|
|
- pdtDefectId: it.pdtDefectId,
|
|
|
- defectCode: it.defectCode,
|
|
|
- defectName: it.defectName,
|
|
|
- defectTypesName: it.defectTypesName,
|
|
|
- remarks: it.remarks,
|
|
|
- ftyId: this.$store.state.user.ftyId
|
|
|
- }
|
|
|
- })
|
|
|
- //工种缺陷
|
|
|
- this.nodeData.jobDefectList = this.$refs?.jobDefectTable?.getTableDataFilter().map((it) => {
|
|
|
- return {
|
|
|
- flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
- nodeId: this.process.currentNodeId,
|
|
|
- jobId: it.jobId,
|
|
|
- pdtDefectId: it.pdtDefectId,
|
|
|
- defectCode: it.defectCode,
|
|
|
- defectName: it.defectName,
|
|
|
- defectTypesName: it.defectTypesName,
|
|
|
- remarks: it.remarks,
|
|
|
- ftyId: this.$store.state.user.ftyId
|
|
|
- }
|
|
|
- })
|
|
|
- //跨流程工序
|
|
|
- this.nodeData.routerList = this.$refs?.routerTable?.getTableDataFilter().map((it) => {
|
|
|
- if (this.nodeData.routerType === 4) {
|
|
|
- return {
|
|
|
- routeType: this.nodeData.routerType,
|
|
|
- flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
- nodeId: this.process.currentNodeId,
|
|
|
- node1Id: this.process.currentNodeId,
|
|
|
- node2Id: it.node2Id,
|
|
|
- node2IdName: it.node2IdName,
|
|
|
- productGrade: it.productGrade,
|
|
|
- moldingSysTags: it.moldingSysTags,
|
|
|
- remarks: it.remarks,
|
|
|
- ftyId: this.$store.state.user.ftyId
|
|
|
- }
|
|
|
- } else {
|
|
|
- return {
|
|
|
- routeType: this.nodeData.routerType,
|
|
|
- flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
- nodeId: this.process.currentNodeId,
|
|
|
- node1Id: it.node1Id,
|
|
|
- node2Id: this.process.currentNodeId,
|
|
|
- backNodeId: it.backNodeId,
|
|
|
- productGrade: it.productGrade,
|
|
|
- moldingSysTags: it.moldingSysTags,
|
|
|
- remarks: it.remarks,
|
|
|
- ftyId: this.$store.state.user.ftyId
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- //数量
|
|
|
- this.nodeData.cntPdtModel = this.nodeData.pdtList?.length // 在制品型号数量
|
|
|
- this.nodeData.cntCarModel = this.nodeData.carList?.length // 可用载具数量
|
|
|
- this.nodeData.cntQuyDefect = this.nodeData.defectList?.length // 可检缺陷数量
|
|
|
- this.nodeData.cntJobDefect = this.nodeData.flgJobDefect ? this.nodeData.jobDefectList?.length : -1 // 工种缺陷数量,产生缺陷为true时设置成 -1
|
|
|
- // endregion
|
|
|
+ // 设置表单数据
|
|
|
+ this.setFormData()
|
|
|
|
|
|
// region 设置图形业务数据
|
|
|
//根据工序id获取工序数据
|
|
|
@@ -986,7 +848,154 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- //end
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 设置表单数据
|
|
|
+ * @author : 张潇木
|
|
|
+ * @date : 2023/5/30 17:19
|
|
|
+ */
|
|
|
+ setFormData(){
|
|
|
+ //判断当前哪些table存在,不存在的table 不需要重新设置数据
|
|
|
+ //操作工号
|
|
|
+ if(this.$refs.operateUserTable){
|
|
|
+ //将原操作工号删除
|
|
|
+ this.nodeData.userList =this.nodeData.userList.filter(it=>it.userKind!==this.$config.userKind.operate)
|
|
|
+ //取新的操作工号
|
|
|
+ let operateUserList = this.$refs?.operateUserTable?.getTableDataFilter().map((it, index) => {
|
|
|
+ return {
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ userId: it.userId,
|
|
|
+ userCode: it.userCode,
|
|
|
+ userName: it.userName,
|
|
|
+ userKind :this.$config.userKind.operate,
|
|
|
+ displayNo: index + 1,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //增加到userList中
|
|
|
+ this.nodeData.userList=[...this.nodeData.userList,...operateUserList]
|
|
|
+ }
|
|
|
+ //生产工号
|
|
|
+ if(this.$refs.productUserTable){
|
|
|
+ //将原操作工号删除
|
|
|
+ this.nodeData.userList =this.nodeData.userList.filter(it=>it.userKind!==this.$config.userKind.product)
|
|
|
+ //取新的生产工号
|
|
|
+ let productUserList = this.$refs?.productUserTable?.getTableDataFilter().map((it, index) => {
|
|
|
+ return {
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ userId: it.userId,
|
|
|
+ userCode: it.userCode,
|
|
|
+ userName: it.userName,
|
|
|
+ userKind :this.$config.userKind.product,
|
|
|
+ displayNo: index + 1,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //增加到userList中
|
|
|
+ this.nodeData.userList=[...this.nodeData.userList,...productUserList]
|
|
|
+ }
|
|
|
+ //工序在制品
|
|
|
+ if(this.$refs.pdtTable){
|
|
|
+ this.nodeData.pdtList = this.$refs?.pdtTable?.getTableDataFilter().map((it) => {
|
|
|
+ return {
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ pdtModelId: it.pdtModelId,
|
|
|
+ pdtModelCode: it.pdtModelCode,
|
|
|
+ pdtModelName: it.pdtModelName,
|
|
|
+ categoryName: it.categoryName,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.nodeData.cntPdtModel = this.nodeData.pdtList?.length // 在制品型号数量
|
|
|
+ }
|
|
|
+ //载具
|
|
|
+ if(this.$refs.carTable){
|
|
|
+ this.nodeData.carList = this.$refs?.carTable?.getTableDataFilter().map((it) => {
|
|
|
+ return {
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ carModelId: it.carModelId,
|
|
|
+ carModelCode: it.carModelCode,
|
|
|
+ carModelName: it.carModelName,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.nodeData.cntCarModel = this.nodeData.carList?.length // 可用载具数量
|
|
|
+ }
|
|
|
+ //缺陷
|
|
|
+ if(this.$refs.defectTable){
|
|
|
+ this.nodeData.defectList = this.$refs?.defectTable?.getTableDataFilter().map((it) => {
|
|
|
+ return {
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ pdtDefectId: it.pdtDefectId,
|
|
|
+ defectCode: it.defectCode,
|
|
|
+ defectName: it.defectName,
|
|
|
+ defectTypesName: it.defectTypesName,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.nodeData.cntQuyDefect = this.nodeData.defectList?.length // 可检缺陷数量
|
|
|
+ }
|
|
|
+ //工种缺陷
|
|
|
+ if(this.$refs.jobDefectTable) {
|
|
|
+ this.nodeData.jobDefectList = this.$refs?.jobDefectTable?.getTableDataFilter().map((it) => {
|
|
|
+ return {
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ jobId: it.jobId,
|
|
|
+ pdtDefectId: it.pdtDefectId,
|
|
|
+ defectCode: it.defectCode,
|
|
|
+ defectName: it.defectName,
|
|
|
+ defectTypesName: it.defectTypesName,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.nodeData.cntJobDefect = this.nodeData.flgJobDefect ? this.nodeData.jobDefectList?.length : -1 // 工种缺陷数量,产生缺陷为true时设置成 -1
|
|
|
+ }
|
|
|
+ //跨流程工序
|
|
|
+ if(this.$refs.routerTable) {
|
|
|
+ this.nodeData.routerList = this.$refs?.routerTable?.getTableDataFilter().map((it) => {
|
|
|
+ if (this.nodeData.routerType === 4) {
|
|
|
+ return {
|
|
|
+ routeType: this.nodeData.routerType,
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ node1Id: this.process.currentNodeId,
|
|
|
+ node2Id: it.node2Id,
|
|
|
+ node2IdName: it.node2IdName,
|
|
|
+ productGrade: it.productGrade,
|
|
|
+ moldingSysTags: it.moldingSysTags,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ routeType: this.nodeData.routerType,
|
|
|
+ flowId: this.isFromIndex ? this.flowFormData.flowId : parseInt(this.$route.params.id),
|
|
|
+ nodeId: this.process.currentNodeId,
|
|
|
+ node1Id: it.node1Id,
|
|
|
+ node2Id: this.process.currentNodeId,
|
|
|
+ backNodeId: it.backNodeId,
|
|
|
+ productGrade: it.productGrade,
|
|
|
+ moldingSysTags: it.moldingSysTags,
|
|
|
+ remarks: it.remarks,
|
|
|
+ ftyId: this.$store.state.user.ftyId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 校验数据
|
|
|
@@ -1138,7 +1147,7 @@ export default {
|
|
|
<style scoped>
|
|
|
|
|
|
.ivu-divider-horizontal {
|
|
|
- margin: 12px 0 !important;
|
|
|
+ margin: 10px 0 2px !important;
|
|
|
}
|
|
|
|
|
|
.switch {
|
|
|
@@ -1150,5 +1159,4 @@ export default {
|
|
|
/deep/ .vxe-select-slots {
|
|
|
z-index: 5100 !important;
|
|
|
}
|
|
|
-
|
|
|
</style>
|