Merge remote-tracking branch 'origin/dev2.5_scan' into dev2.5_scan

dev2.5_scan
yewj 2 days ago
commit 748ea0c382

@ -26,11 +26,7 @@
<el-table-column label="应扫码数量" prop="scanActCount">
<template v-slot="scope">
<div :style="getCellStyle(scope.row)" style="display: flex; align-items: center; height: 100%; min-height: 40px;">
{{
scope.row.shouldCount === 0
? '无需扫码'
: `${scope.row.scanCount}/${scope.row.shouldCount}`
}}
{{ scope.row.scanCount }}/{{ scope.row.shouldCount }}
</div>
</template>
</el-table-column>

@ -533,7 +533,6 @@ export default {
item => /^YPCFTF/.test(item.documentTypeCode || "") //
);
this.formData.busType = this.formDataVisible.documentTypeCode
console.log("djdjjdj",this.formData.busType)
//scanType
// 1.
// 2.
@ -932,7 +931,9 @@ export default {
this.curRow = this.formData
this.$refs.inputRef.focus()
this.refreshCodesPanel(this)
}else {
}else if(res.code == 502){
return this.$message.error("非此单追溯码")
} else{
return this.$message.error(res.message)
}
}).catch(() => {
@ -1000,6 +1001,7 @@ export default {
const audio = new Audio(require('@/assets/audioFiles/order.mp3'))
audio.play()
this.reset()
return this.$message.success("退货成功")
if (this.formDataVisible.scanType != 1) {
this.findCurOrder()
}
@ -1112,6 +1114,7 @@ export default {
this.formData = row
this.formData.workPlaceCode = this.workplaceId
this.startDeal()
this.selectPrescriptionVisible = false
// this.generateBarcode()
},

@ -137,12 +137,11 @@
</el-table-column>
<el-table-column label="应扫码数量" prop="scanActCount">
<template v-slot="scope">
<div :style="getCellStyle(scope.row)" style="display: flex; align-items: center; height: 100%; min-height: 40px;">
{{
scope.row.shouldCount === 0
? '无需扫码'
: `${scope.row.scanCount}/${scope.row.shouldCount}`
}}
<div v-if="scope.row.autoTagStatus == 2" :style="getCellStyle1(scope.row)" style="display: flex; align-items: center; height: 100%; min-height: 40px;">
无需扫码
</div>
<div :style="getCellStyle(scope.row)" style="display: flex; align-items: center; height: 100%; min-height: 40px;" v-else>
{{ scope.row.scanCount }}/{{ scope.row.shouldCount }}
</div>
</template>
</el-table-column>
@ -384,6 +383,14 @@ export default {
return rowBackground
},
getCellStyle1(row) {
let cellStyle = {}
if (row.autoTagStatus == 2) {
cellStyle.fontSize = '30px'
cellStyle.color = '#E6A23C'
return cellStyle
}
},
getCellStyle(row) {
let cellStyle = {
fontSize: '50px'
@ -404,13 +411,14 @@ export default {
// return { height: '60px' };
// },
getTagColor(row) {
if (row.autoTagStatus == 2) {
this.codingStatus = '预赋码'
return 'warning' //
}
if (row.scanActCount < row.count) {
this.codingStatus = '未赋码'
return 'danger' //
} else if (row.autoTagStatus == 2) {
this.codingStatus = '预赋码'
return 'warning' //
} else if (row.scanActCount >= row.count) {
} else if (row.scanActCount >= row.count) {
this.codingStatus = '已赋码'
return 'success' // 绿
}

@ -394,7 +394,7 @@
<!-- v-if="(curAction.checkWebNew !== 2 || viewType !== 1) && orderFormData.billNo"-->
</el-button
>
<el-button size="mini" type="primary" @click="triggerFileUpload" icon="el-icon-upload2"
<el-button size="mini" type="primary" @click="triggerFileUpload" icon="el-icon-upload2" :loading="this.loading"
v-if="curAction.checkWebNew != 2 || viewType !=1"
>
导入阳采追溯码
@ -848,14 +848,26 @@ export default {
this.$refs.fileInput.click();
},
triggerFileUpload2() {
this.$refs.fileInput2.click();
},
handleFileUpload(event) {
//
const loading = this.$loading({
lock: true,
text: '数据提交中,请稍候',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const file = event.target.files[0];
const billNo = this.orderFormData.billNo;
const uploadUrl = process.env.VUE_APP_BASE_API + '/udiwms/inout/order/yc/fileUpload';
if (this.$isBlank(this.orderFormData.billNo)) {
//
loading.close();
this.$message.error("单据编号不可以为空!");
return;
}
@ -876,12 +888,16 @@ export default {
})
.then(response => {
if (!response.ok) {
//
loading.close();
throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json();
})
.then(data => {
if (data.code === 20000) {
//
loading.close();
//
if (data.data && data.data.billNo) {
this.orderFormData.billNo = data.data.billNo;
@ -895,6 +911,8 @@ export default {
}
})
.catch(error => {
//
loading.close();
console.error('File upload failed:', error);
this.$message.error('文件上传失败:' + error.message);
});
@ -902,8 +920,19 @@ export default {
//
event.target.value = '';
//
loading.close();
},
handleFileUpload2(event) {
//
const loading = this.$loading({
lock: true,
text: '数据提交中,请稍候',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const file = event.target.files[0];
const uploadUrl = process.env.VUE_APP_BASE_API + '/udiwms/inout/order/yc/orderFileUpload';
@ -925,12 +954,16 @@ export default {
})
.then(response => {
if (!response.ok) {
//
loading.close();
throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json();
})
.then(data => {
if (data.code === 20000) {
//
loading.close();
//
if (data.data && data.data.billNo) {
this.orderFormData.billNo = data.data.billNo;
@ -954,15 +987,21 @@ export default {
}
})
.catch(error => {
//
loading.close();
console.error('File upload failed:', error);
this.$message.error('文件上传失败:' + error.message);
});
} else {
//
loading.close();
this.$message.warning('请选择要上传的文件');
}
//
event.target.value = '';
//
loading.close();
},
//
findInvListByUser() {
@ -2034,6 +2073,7 @@ export default {
<style scoped>
</style>

Loading…
Cancel
Save