|
|
@@ -2,7 +2,8 @@
|
|
|
<!-- 半检 功能(functionCode) index : -->
|
|
|
<div class="main-app">
|
|
|
<!-- 顶部导航栏 -->
|
|
|
- <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft"></dk-app-nav-bar>
|
|
|
+ <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" :rightIconBook="rightIconBook" :sopPath="sopPath">
|
|
|
+ </dk-app-nav-bar>
|
|
|
<!-- 选择工位 -->
|
|
|
<dk-app-field v-if="stationList.length > 0" v-model="formData.stationName" :label="$t('stationName')" :readonly="true"
|
|
|
@click="showStation = true" placeholderType="choose" is-link arrow-direction="down" />
|
|
|
@@ -114,6 +115,7 @@ export default {
|
|
|
{ label: '选项2', value: 'option2' },
|
|
|
{ label: '选项3', value: 'option3' },
|
|
|
],
|
|
|
+ rightIconBook: false,
|
|
|
gradeFlag: null,
|
|
|
stationList: [], //工位list数据源
|
|
|
showStation: false,
|
|
|
@@ -311,6 +313,11 @@ export default {
|
|
|
} else {
|
|
|
this.gradeFlag = this.$libaray.checkButtonHasRight('half-check-recharge')
|
|
|
}
|
|
|
+
|
|
|
+ this.getByModel(res.data.modelId)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (res.data.opnGradeKind && ((res.data.opnGradeKind.indexOf(this.$t('appExcellent')) === -1))) {
|
|
|
this.defectFlag = true
|
|
|
} else {
|
|
|
@@ -641,6 +648,7 @@ export default {
|
|
|
this.setParams()
|
|
|
return this.excute(this.$service.appCollectService, this.$service.appCollectService.add, this.params).then(res => {
|
|
|
if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+
|
|
|
this.formData.barCode = ''//产品条码
|
|
|
this.formData.ftyId = this.$store.state.user.ftyId//工厂ID
|
|
|
this.formData.gradeKindName = ''//产品等级
|
|
|
@@ -658,6 +666,17 @@ export default {
|
|
|
this.defectFlag = false
|
|
|
this.getProcessNode()
|
|
|
this.appToastSuccess(this.$t('I_002'))
|
|
|
+
|
|
|
+
|
|
|
+ //成功返回打印机数据
|
|
|
+ if (res.data && res.data.length > 0) {
|
|
|
+ let printList = res.data
|
|
|
+ for (let i of printList) {
|
|
|
+ for (let item of i.printLayout) {
|
|
|
+ this.$printUtil.print(item.layoutData, i.printData, item.printerCode)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -699,6 +718,29 @@ export default {
|
|
|
this.productionDefectDelIdList.push(this.productionDefectList[e.index].prodDefectId)
|
|
|
this.productionDefectList.splice(e.index, 1)
|
|
|
},
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 显示作业指导书
|
|
|
+ * @author : 于继渤
|
|
|
+ * @date : 2023/8/3 10:34
|
|
|
+ */
|
|
|
+ getByModel(modelId) {
|
|
|
+ let params = {}
|
|
|
+ params.ftyId = this.$store.state.user.ftyId
|
|
|
+ params.modelId = modelId
|
|
|
+ this.excute(this.$service.workSopService, this.$service.workSopService.getByModel, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ if (res.data && res.data.sopPath) {
|
|
|
+ this.rightIconBook = true
|
|
|
+ this.sopPath = res.data.sopPath
|
|
|
+ } else {
|
|
|
+ this.rightIconBook = false
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
// 设置滚动的位置和高度
|