|
|
@@ -104,7 +104,7 @@
|
|
|
:maskClosable="false"
|
|
|
>
|
|
|
<DkForm ref="labelFormInline" v-model="labelFormData" :col-count="1">
|
|
|
- <DkFormItem required :data-type="$config.dataType.str"
|
|
|
+ <DkFormItem required :data-type="$config.dataType.str"
|
|
|
v-for="(item,index) in pdtLabelKinds" :key="index" :label="item.labelName">
|
|
|
<InputPop v-model="item.labelCode" ref="item.labelCode"/>
|
|
|
</DkFormItem>
|
|
|
@@ -137,7 +137,7 @@
|
|
|
kilnId: null,
|
|
|
perCarCode: null,//原载具
|
|
|
},
|
|
|
- dressKilnCarFlag:false,//装载具校验标识
|
|
|
+ dressKilnCarFlag: false,//装载具校验标识
|
|
|
flowNodeId: self.$route.meta.menuUuid,
|
|
|
tableData: [],
|
|
|
workStationList: [],//工位数据
|
|
|
@@ -148,11 +148,12 @@
|
|
|
stationFlag: false,//默认工位标识
|
|
|
labelFlag: false,//默认验证标签
|
|
|
pdtLabelKinds: [],//开的验证标签
|
|
|
- checkModelPdtLabelJson:{},//校验验证标签
|
|
|
- modelPdtLabelJson:{},//验证标签集合
|
|
|
+ checkModelPdtLabelJson: {},//校验验证标签
|
|
|
+ modelPdtLabelJson: {},//验证标签集合
|
|
|
labelModal: false,//验证标签modal
|
|
|
- modalTitle:null,
|
|
|
- labelFormData: {}
|
|
|
+ modalTitle: null,
|
|
|
+ labelFormData: {},
|
|
|
+ getBarCodeMessage: null//产品条码信息
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -214,52 +215,53 @@
|
|
|
*/
|
|
|
onBarCode() {
|
|
|
if (this.formData.barCode) {
|
|
|
- //验证标签开启并且工序类型为产品码
|
|
|
- if (this.$config.processType.productCode == this.opnKind && this.labelFlag) {
|
|
|
- this.modalTitle =this.$t('label') // 给modal标题赋值
|
|
|
- this.labelModal = true
|
|
|
- } else {
|
|
|
- //查询产品条码
|
|
|
- this.getBarCode()
|
|
|
+ let params = {
|
|
|
+ ftyId: this.formData.ftyId,
|
|
|
+ barCode: this.formData.barCode,
|
|
|
+ prodUserCode: this.formData.prodUserCode,
|
|
|
+ flowNodeId: this.flowNodeId,
|
|
|
}
|
|
|
+ this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.getBarCodeMessage = res
|
|
|
+ //验证标签开启并且工序类型为产品码
|
|
|
+ if (this.$config.processType.productCode == this.opnKind && this.labelFlag) {
|
|
|
+ this.modalTitle = this.$t('label') // 给modal标题赋值
|
|
|
+ this.labelModal = true
|
|
|
+ } else {
|
|
|
+ //验证产品条码后赋值
|
|
|
+ this.setBarCode(this.getBarCodeMessage)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
- * @desc : 查询产品条码
|
|
|
- * @date : 2023/3/30 8:51
|
|
|
+ * @desc : 验证产品条码后赋值
|
|
|
+ * @date : 2023/4/4 14:38
|
|
|
* @author : 寇珊珊
|
|
|
*/
|
|
|
- getBarCode() {
|
|
|
- let params = {
|
|
|
- ftyId: this.formData.ftyId,
|
|
|
- barCode: this.formData.barCode,
|
|
|
- prodUserCode: this.formData.prodUserCode,
|
|
|
- flowNodeId: this.flowNodeId,
|
|
|
- }
|
|
|
- this.excute(this.$service.collectService, this.$service.collectService.checkBarCode, params).then(res => {
|
|
|
- if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
- if (this.tableData.filter(it => it.uniqueId == [res.data.uniqueId]).length == 0) {
|
|
|
- //页面table赋值载具条码
|
|
|
- if (this.formData.carCode) {
|
|
|
- res.data.vehicleBarcode = this.formData.carCode
|
|
|
- }
|
|
|
- this.tableData = this.tableData.concat(res.data)
|
|
|
- this.barCodeList.push(this.formData.barCode)
|
|
|
- this.$refs['table-select'].reloadData(this.tableData)
|
|
|
- if (this.$config.registerType.singleProduct == this.pieceKind) {
|
|
|
- this.barCodeList = []
|
|
|
- this.barCodeList.push(this.formData.barCode)
|
|
|
- this.save()
|
|
|
- }
|
|
|
- //装载具下 产品条码每次查出来都要清空
|
|
|
- if (this.$config.processType.dressKilnCar == this.opnKind) {
|
|
|
- this.formData.barCode = null
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$Message.error(res.message)
|
|
|
+ setBarCode(res) {
|
|
|
+ if (this.tableData.filter(it => it.uniqueId == [res.data.uniqueId]).length == 0) {
|
|
|
+ //页面table赋值载具条码
|
|
|
+ if (this.formData.carCode) {
|
|
|
+ res.data.vehicleBarcode = this.formData.carCode
|
|
|
}
|
|
|
- })
|
|
|
+ this.tableData = this.tableData.concat(res.data)
|
|
|
+ this.barCodeList.push(this.formData.barCode)
|
|
|
+ this.$refs['table-select'].reloadData(this.tableData)
|
|
|
+ if (this.$config.registerType.singleProduct == this.pieceKind) {
|
|
|
+ this.barCodeList = []
|
|
|
+ this.barCodeList.push(this.formData.barCode)
|
|
|
+ this.save()
|
|
|
+ }
|
|
|
+ //装载具下 产品条码每次查出来都要清空
|
|
|
+ if (this.$config.processType.dressKilnCar == this.opnKind) {
|
|
|
+ this.formData.barCode = null
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 保存验证标签
|
|
|
@@ -269,7 +271,7 @@
|
|
|
saveLabel() {
|
|
|
this.$refs['labelFormInline'].validate().then(valid => {
|
|
|
if (valid) {
|
|
|
- this.checkModelPdtLabelJson[this.formData.barCode]=this.pdtLabelKinds
|
|
|
+ this.checkModelPdtLabelJson[this.formData.barCode] = this.pdtLabelKinds
|
|
|
let params = {
|
|
|
flowNodeId: this.flowNodeId,
|
|
|
ftyId: this.formData.ftyId,
|
|
|
@@ -278,14 +280,14 @@
|
|
|
}
|
|
|
this.excute(this.$service.collectService, this.$service.collectService.checkLabel, params).then(res => {
|
|
|
if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
- this.checkModelPdtLabelJson={}
|
|
|
+ this.checkModelPdtLabelJson = {}
|
|
|
this.labelModal = false
|
|
|
- this.modelPdtLabelJson[this.formData.barCode]=this.pdtLabelKinds.copy()
|
|
|
+ this.modelPdtLabelJson[this.formData.barCode] = this.pdtLabelKinds.copy()
|
|
|
for (let i of this.pdtLabelKinds) {
|
|
|
i['labelCode'] = ''
|
|
|
}
|
|
|
- //查询产品条码
|
|
|
- this.getBarCode()
|
|
|
+ //验证产品条码后赋值
|
|
|
+ this.setBarCode(this.getBarCodeMessage)
|
|
|
} else {
|
|
|
this.$Message.error(res.message)
|
|
|
}
|
|
|
@@ -321,7 +323,7 @@
|
|
|
this.excute(this.$service.collectService, this.$service.collectService.checkCarrierCode, params).then(res => {
|
|
|
if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
//如果是装载具
|
|
|
- if(this.opnKind == this.$config.processType.dressKilnCar){
|
|
|
+ if (this.opnKind == this.$config.processType.dressKilnCar) {
|
|
|
this.dressKilnCarFlag = true
|
|
|
}
|
|
|
if (this.opnKind == this.$config.processType.unloadKilnCar ||
|
|
|
@@ -449,7 +451,7 @@
|
|
|
})
|
|
|
},
|
|
|
},
|
|
|
- created() {
|
|
|
+ activated() {
|
|
|
//默认给新建为了保存不关页面
|
|
|
this.typeData = this.$config.formMode.add
|
|
|
//获取工位
|