|
|
@@ -30,8 +30,24 @@
|
|
|
:placeholderFlag="false" />
|
|
|
<!-- 产品分级-->
|
|
|
<dk-app-field v-model="formData.gradeKindName" :label="$t('appProductClassification')" :readonly="true"
|
|
|
- @click="openDropdown({ key: 'productClassification' })" placeholderType="choose" is-link
|
|
|
- arrow-direction="down" />
|
|
|
+ placeholderType="choose" />
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 产品分级标签-->
|
|
|
+ <div
|
|
|
+ style="display: flex; display: flex;padding-left: 8px; flex-wrap: wrap;align-content: stretch;width: 100%;flex-direction: row; justify-content: flex-start;background: white; align-items: center;">
|
|
|
+ <div v-for="(item, index) in gradeKindList" :key="index">
|
|
|
+ <div style="padding-left: 5px;margin-top: 2px;">
|
|
|
+ <van-button v-if="item.infotype === 'default'" plain type="info" color="#95A8CB"
|
|
|
+ @click="buttonClick(item, index)" size="small">{{ item.gradeName }}</van-button>
|
|
|
+
|
|
|
+ <van-button v-else type="info" color="#606EB2" size="small">{{
|
|
|
+ item.gradeName }}</van-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
<!-- 缺陷号-->
|
|
|
<dk-app-field v-if="defectFlag" v-model="formData.defectNo" ref="defectNo" :label="$t('appDefectCode')"
|
|
|
:readonly="readonlyFlag" @changeBarCode="getCheckNodeDefectCode" />
|
|
|
@@ -40,16 +56,21 @@
|
|
|
:placeholderFlag="false" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="tableRowData.length > 0" style="margin: 10px">{{ $t('appDefectInformation') }}</div>
|
|
|
- <!-- 缺陷信息 list-->
|
|
|
- <dk-app-table :rows="rows" v-if="tableRowData.length > 0" :tableRowData="tableRowData" :disabledSwipe="false"
|
|
|
- @onItemRowDelClick="onItemRowDelClick" @openDropdown="openDropdown">
|
|
|
- </dk-app-table>
|
|
|
- <div v-if="productionDefectList.length > 0" style="margin: 10px">{{ $t('appDefectInformationDetail') }}</div>
|
|
|
- <!-- 历史缺陷明细-->
|
|
|
- <dk-app-table :rows="productionDefectListRows" v-if="productionDefectList.length > 0"
|
|
|
- :tableRowData="productionDefectList" :disabledSwipe="false" @onItemRowDelClick="onItemRowDelClickDefectList">
|
|
|
- </dk-app-table>
|
|
|
+
|
|
|
+ <div class="main-app-table" ref="scrollTable">
|
|
|
+
|
|
|
+ <div v-if="tableRowData.length > 0" style="margin: 10px">{{ $t('appDefectInformation') }}</div>
|
|
|
+ <!-- 缺陷信息 list-->
|
|
|
+ <dk-app-table :rows="rows" v-if="tableRowData.length > 0" :tableRowData="tableRowData" :disabledSwipe="false"
|
|
|
+ @onItemRowDelClick="onItemRowDelClick" @openDropdown="openDropdown">
|
|
|
+ </dk-app-table>
|
|
|
+ <div v-if="productionDefectList.length > 0" style="margin: 10px">{{ $t('appDefectInformationDetail') }}</div>
|
|
|
+ <!-- 历史缺陷明细-->
|
|
|
+ <dk-app-table :rows="productionDefectListRows" v-if="productionDefectList.length > 0"
|
|
|
+ :tableRowData="productionDefectList" :disabledSwipe="false" @onItemRowDelClick="onItemRowDelClickDefectList">
|
|
|
+ </dk-app-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 保存按钮-->
|
|
|
<div class="app_save_bottom-class" style="display: flex">
|
|
|
<dk-app-button v-if="defectFlag" :disabled="loading" @click="onRouterRecordProcess" style="margin: 1px">
|
|
|
@@ -69,6 +90,9 @@
|
|
|
@mutiCommit="mutiCommit($event, 'register')"></dk-app-single-dropdown>
|
|
|
<!-- 加载页面 -->
|
|
|
<dk-app-loading :loading="loading"></dk-app-loading>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -82,6 +106,12 @@ export default {
|
|
|
data() {
|
|
|
let self = this
|
|
|
return {
|
|
|
+ selectedOption: null,
|
|
|
+ options: [
|
|
|
+ { label: '选项1', value: 'option1' },
|
|
|
+ { label: '选项2', value: 'option2' },
|
|
|
+ { label: '选项3', value: 'option3' },
|
|
|
+ ],
|
|
|
gradeFlag: null,
|
|
|
stationList: [], //工位list数据源
|
|
|
showStation: false,
|
|
|
@@ -134,10 +164,35 @@ export default {
|
|
|
flowNodeId: this.$route.meta.exMenuUuid,//节点
|
|
|
},
|
|
|
appActiveTitle: this.$route.meta.title,
|
|
|
+ gradeKindList: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
/**
|
|
|
+ * @desc : 产品等级数据源加载
|
|
|
+ * @author : 于继渤
|
|
|
+ * @date : 2023/2/7 17:26
|
|
|
+ */
|
|
|
+ getGradeData() {
|
|
|
+ let param = {
|
|
|
+ ftyId: this.$store.state.user.ftyId,
|
|
|
+ nodeId: this.formData.flowNodeId
|
|
|
+ }
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getProductGrade, param).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ if (item.gradeId === this.formData.gradeKindId) {
|
|
|
+ item.infotype = 'info'
|
|
|
+ } else {
|
|
|
+ item.infotype = 'default'
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ this.gradeKindList = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
* @desc : 各个画面最后执行结果
|
|
|
* @author : 姜永辉
|
|
|
* @date : 2023/5/8 16:25
|
|
|
@@ -179,6 +234,7 @@ export default {
|
|
|
this.setFocus("prodUser") //焦点给到生产工号
|
|
|
//校验打卡
|
|
|
this.queryUser()
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
@@ -247,6 +303,7 @@ export default {
|
|
|
this.readonlyFlag = false
|
|
|
this.productionDefectList = res.data.productionDefectList
|
|
|
this.productionDefectListTemp = []
|
|
|
+ this.getGradeData()
|
|
|
if (res.data.opnGradeKind && ((res.data.opnGradeKind.indexOf(this.$t('appExcellent')) === -1))) {
|
|
|
this.defectFlag = true
|
|
|
} else {
|
|
|
@@ -270,7 +327,7 @@ export default {
|
|
|
if (res.data.userKind == null) { // 验证 此工序无此用户
|
|
|
this.$appDialog.alert({ message: this.$t('W_117'), }).then(() => {
|
|
|
// 弹出alert后的逻辑处理
|
|
|
- if (this.handleExcuteAlert) {}
|
|
|
+ if (this.handleExcuteAlert) { }
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
@@ -386,6 +443,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 产品分级按钮选择事件
|
|
|
+ * @author : 于继渤
|
|
|
+ * @date : 2023/2/7 17:26
|
|
|
+ */
|
|
|
+ buttonClick(item, index_z) {
|
|
|
+ this.gradeKindList.forEach((it, index) => {
|
|
|
+ if (index_z === index) {
|
|
|
+ it.infotype = 'info'
|
|
|
+ } else {
|
|
|
+ it.infotype = 'default'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.formData.gradeKindId = item.gradeId
|
|
|
+ this.formData.gradeKindName = item.gradeName
|
|
|
+ this.formData.opnGradeKind = item.gradeKind
|
|
|
+ if (item.gradeKind && ((item.gradeKind.indexOf(this.$t('appExcellent')) === -1))) {
|
|
|
+ this.productionDefectList = this.productionDefectListTemp
|
|
|
+ this.defectFlag = true
|
|
|
+ } else {
|
|
|
+ this.productionDefectListTemp = this.productionDefectList
|
|
|
+ this.productionDefectList = []
|
|
|
+ this.defectFlag = false
|
|
|
+ this.formData.defectNo = ''
|
|
|
+ this.formData.defectNoName = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* @desc : 设置焦点
|
|
|
* @author : 姜永辉
|
|
|
@@ -609,7 +695,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
// 设置滚动的位置和高度
|
|
|
- // this.setAppTableHeight(0)
|
|
|
+ // this.setAppTableHeight(0)
|
|
|
},
|
|
|
activated() {
|
|
|
//改判权限
|
|
|
@@ -640,7 +726,7 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style scoped>
|
|
|
app-form {
|
|
|
background: rgb(255, 255, 255);
|
|
|
margin: 10px;
|