|
|
@@ -4,15 +4,11 @@
|
|
|
<!-- 顶部导航栏 -->
|
|
|
<dk-app-nav-bar :title="moldingMoldManagementActiveTitle" @click-left="onClickLeft"></dk-app-nav-bar>
|
|
|
<!-- 产品条码-->
|
|
|
- <dk-app-field
|
|
|
- :label="$t('appProductCode')"
|
|
|
- ref="barCode"
|
|
|
- v-model="formData.barCode"
|
|
|
- @changeBarCode="queryBarCode"
|
|
|
+ <dk-app-field :label="$t('appProductCode')" ref="barCode" v-model="formData.barCode" @changeBarCode="queryBarCode"
|
|
|
placeholderType="scan"></dk-app-field>
|
|
|
|
|
|
<div ref="scrollTable" class="main-app-table">
|
|
|
- <div v-if="tableRowData.length>0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
|
|
|
+ <div v-if="tableRowData.length > 0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
|
|
|
<!-- 产品信息-->
|
|
|
<dk-app-table :rows="rows" :tableRowData="tableRowData">
|
|
|
</dk-app-table>
|
|
|
@@ -29,7 +25,7 @@
|
|
|
|
|
|
<script>
|
|
|
|
|
|
-import {appFormMixin} from '@/mixins/appform.js'
|
|
|
+import { appFormMixin } from '@/mixins/appform.js'
|
|
|
|
|
|
export default {
|
|
|
//app-piece-undo(计件) app-finished-product-undo(成品)
|
|
|
@@ -38,17 +34,18 @@ export default {
|
|
|
data() {
|
|
|
let self = this
|
|
|
return {
|
|
|
+ routeFlag:false,
|
|
|
rows: [
|
|
|
- {name: 'uniqueCode', title: self.$t('appProductCodeB')}, //产品编码
|
|
|
- {name: 'modelCode', title: self.$t('modelCode')}, //型号编码
|
|
|
- {name: 'moldingDate', title: self.$t('appFormingDate')}, //成型日期
|
|
|
- {name: 'finishTime', title: self.$t('appFinishTime')}, //完成日期
|
|
|
- {name: 'pdtFlowNodeName', title: self.$t('appCompleteTheProcess')}, //完成工序
|
|
|
- {name: 'moldingUserCode', title: self.$t('appMoldingStationNo')},//成型工号
|
|
|
- {name: 'modelMouldCode', title: self.$t('appMoldNo')}, //模具编号
|
|
|
- {name: 'modelCode', title: self.$t('appProductUniqueCode')}, //产品编码
|
|
|
- {name: 'logoName', title: self.$t('appLogoName')}, //商标名称
|
|
|
- {name: 'colourName', title: self.$t('colourName')}, //釉色名称
|
|
|
+ { name: 'uniqueCode', title: self.$t('appProductCodeB') }, //产品编码
|
|
|
+ { name: 'modelCode', title: self.$t('modelCode') }, //型号编码
|
|
|
+ { name: 'moldingDate', title: self.$t('appFormingDate') }, //成型日期
|
|
|
+ { name: 'finishTime', title: self.$t('appFinishTime') }, //完成日期
|
|
|
+ { name: 'pdtFlowNodeName', title: self.$t('appCompleteTheProcess') }, //完成工序
|
|
|
+ { name: 'moldingUserCode', title: self.$t('appMoldingStationNo') },//成型工号
|
|
|
+ { name: 'modelMouldCode', title: self.$t('appMoldNo') }, //模具编号
|
|
|
+ { name: 'modelCode', title: self.$t('appProductUniqueCode') }, //产品编码
|
|
|
+ { name: 'logoName', title: self.$t('appLogoName') }, //商标名称
|
|
|
+ { name: 'colourName', title: self.$t('colourName') }, //釉色名称
|
|
|
],//每一条的内容
|
|
|
tableRowData: [],
|
|
|
|
|
|
@@ -77,29 +74,35 @@ export default {
|
|
|
* @date : 2023/2/10 9:16
|
|
|
*/
|
|
|
queryBarCode() {
|
|
|
- this.excute(this.$service.collectService, this.$service.collectService.checkBarCodeScrapUndo +'/'+this.formData.barCode,[this.formData.barCode]
|
|
|
+ let api = this.$service.collectService.checkBarCodeScrapUndo
|
|
|
+ if(this.routeFlag){
|
|
|
+ //计件撤销
|
|
|
+ api = this.$service.collectService.checkBarCodeNodeUndo
|
|
|
+ }
|
|
|
+ this.excute(this.$service.collectService, api, { barCode: this.formData.barCode }
|
|
|
, '', true).then(res => {
|
|
|
- if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
- if (res.data) {
|
|
|
- if (this.tableRowData.length > 0) {
|
|
|
- //遍历 数据列表 重复数据提示
|
|
|
- for (let i = 0; i < this.tableRowData.length; i++) {
|
|
|
- //产品ID
|
|
|
- if (this.tableRowData[i].uniqueId === res.data.uniqueId) {
|
|
|
- this.formData.barCode = ""
|
|
|
- this.setFocus('barCode') //焦点产品条码
|
|
|
- //存在重复产品
|
|
|
- this.$appDialog.alert({message: this.$t('W_120')})
|
|
|
- return
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ if (res.data) {
|
|
|
+ if (this.tableRowData.length > 0) {
|
|
|
+ //遍历 数据列表 重复数据提示
|
|
|
+ for (let i = 0; i < this.tableRowData.length; i++) {
|
|
|
+ //产品ID
|
|
|
+ if (this.tableRowData[i].uniqueId === res.data.uniqueId) {
|
|
|
+ this.formData.barCode = ""
|
|
|
+ this.setFocus('barCode') //焦点产品条码
|
|
|
+ //存在重复产品
|
|
|
+ this.$appDialog.alert({ message: this.$t('W_120') })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.tableRowData = this.tableRowData.concat(res.data)
|
|
|
+ this.barCodeList.push(this.formData.barCode)
|
|
|
+ this.formData.barCode = ""
|
|
|
}
|
|
|
- this.tableRowData = this.tableRowData.concat(res.data)
|
|
|
- this.barCodeList.push(this.formData.barCode)
|
|
|
- this.formData.barCode = ""
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -131,7 +134,7 @@ export default {
|
|
|
* @date : 2023/2/10 11:46
|
|
|
*/
|
|
|
setParams() {
|
|
|
- this.params = {...this.formData}
|
|
|
+ this.params = { ...this.formData }
|
|
|
delete this.params.barCode
|
|
|
this.params.barCodeList = this.barCodeList
|
|
|
},
|
|
|
@@ -155,7 +158,13 @@ export default {
|
|
|
* @date : 2023/2/10 11:46
|
|
|
*/
|
|
|
saveData() {
|
|
|
- return this.excute(this.$service.appCollectService, this.$service.appCollectService.scrapUndo, this.params);
|
|
|
+ if(this.routeFlag){
|
|
|
+ //计件撤销
|
|
|
+ return this.excute(this.$service.collectService, this.$service.collectService.nodeUndo, this.params);
|
|
|
+ }else{
|
|
|
+ return this.excute(this.$service.appCollectService, this.$service.appCollectService.scrapUndo, this.params);
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
// endregion
|
|
|
|
|
|
@@ -167,10 +176,12 @@ export default {
|
|
|
created(e) {
|
|
|
//接收参数
|
|
|
this.focusItem = "barCode"
|
|
|
+ if (this.$route.meta.menuUuid != this.$t('appRepealMenuUuid')) {
|
|
|
+ this.routeFlag = true
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-</style>
|
|
|
+<style scoped></style>
|