|
|
@@ -213,7 +213,7 @@
|
|
|
<!-- </el-main> -->
|
|
|
</layout-content>
|
|
|
</layout>
|
|
|
-
|
|
|
+
|
|
|
<!-- PDF预览页面 -->
|
|
|
<SubOrderPage ref="SubOrderPageRef" />
|
|
|
<!-- <PrintPage ref="printPageRef" /> -->
|
|
|
@@ -277,8 +277,9 @@ import $ from 'jquery';
|
|
|
import LuckyExcel from 'luckyexcel';
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
import {hiprint} from "vue-plugin-hiprint";
|
|
|
-import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
|
|
|
-import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh,spotcheckdel } from '@/api/mes/job'
|
|
|
+import {ref, reactive,nextTick,watch, setBlockTracking,computed } from 'vue';
|
|
|
+import { Search } from '@element-plus/icons-vue';
|
|
|
+import {getSpotList,search,getTab,OrderAttachments,getTabByGdbh,spotcheckdel,order_Patchwork,Patchwork} from '@/api/mes/job'
|
|
|
import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
|
import {getMac} from '@/api/jixiaoguanli/baogong'
|
|
|
import PrintPage from '../yunyin/shengchanguanli/components/print.vue';
|
|
|
@@ -294,10 +295,11 @@ console.log(path)
|
|
|
const SubOrderPageRef = ref()
|
|
|
// const printPageRef = ref()
|
|
|
|
|
|
+
|
|
|
//子订单详情页
|
|
|
const gd_yulan = async () => {
|
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === null){
|
|
|
- ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
|
|
|
+ warningres('请扫描子订单(条码)后再查看')
|
|
|
return false;
|
|
|
}
|
|
|
console.log(add_searchInfo.value.split(',')[0])
|
|
|
@@ -344,6 +346,8 @@ const add_formData = reactive({
|
|
|
是否订单尾包: '',
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+
|
|
|
//物理地址获取机台编号
|
|
|
const getMachineMacdata = async () => {
|
|
|
console.log(_code,"机台获取物理地址",Machine.value)
|
|
|
@@ -424,7 +428,7 @@ const ddtableData = reactive([])
|
|
|
// 查询按钮
|
|
|
const add_onSubmit = async ()=>{
|
|
|
if(add_formData['机台号'] === ''){
|
|
|
- ElMessage({type: 'warning',message: '未获取到机台'})
|
|
|
+ warningres('未获取到机台')
|
|
|
return false;
|
|
|
}
|
|
|
sizeDatas.length = 0;
|
|
|
@@ -432,7 +436,7 @@ const add_onSubmit = async ()=>{
|
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
|
|
|
const WorkListdata = [];
|
|
|
add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
|
- ElMessage({type: 'warning',message: '请扫描小票二维码' })
|
|
|
+ warningres('请扫描小票二维码')
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -450,7 +454,7 @@ const add_onSubmit = async ()=>{
|
|
|
//获取尺码
|
|
|
sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers); //型号数据
|
|
|
if(getSpotLists.data.result.ci_num === 0 || getSpotLists.data.result.ci_num === '0'){
|
|
|
- ElMessage({type: 'error',message: '已上报,无需再次报工' })
|
|
|
+ errorres('已上报,无需再次报工')
|
|
|
add_searchInfo.value = ''
|
|
|
}
|
|
|
console.log(getSpotLists)
|
|
|
@@ -552,7 +556,7 @@ function baogongslpd() {
|
|
|
const totalQuantity = parseInt(add_formData['剩余数量'], 10) || 0;
|
|
|
|
|
|
if (reportedQuantity > totalQuantity) {
|
|
|
- ElMessage({ type: 'warning', message: '上报数量不能大于剩余数量' });
|
|
|
+ warningres('上报数量不能大于剩余数量')
|
|
|
add_Dialogonclick.value = false;
|
|
|
}else if(reportedQuantity === ''){
|
|
|
add_Dialogonclick.value = false;
|
|
|
@@ -580,16 +584,17 @@ const add_Dialog = async () => {
|
|
|
}, 2000);
|
|
|
|
|
|
if(add_formData['机台号'] === '测试机台'){
|
|
|
- ElMessage({ type: 'warning', message: '测试机台禁止报工' });
|
|
|
+ warningres('测试机台禁止报工')
|
|
|
return;
|
|
|
}
|
|
|
if(add_formData['上报数量'] === ''){
|
|
|
- ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
|
|
|
+ warningres('上报数量为空,请填写上报数量')
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if(_order.value === ''){
|
|
|
ElMessage({type: 'warning',message: '请重新扫描小票二维码'})
|
|
|
+ warningres('请重新扫描小票二维码')
|
|
|
return;
|
|
|
}else{
|
|
|
let params ={}
|
|
|
@@ -623,7 +628,7 @@ const add_Dialog = async () => {
|
|
|
add_formData['上报数量']=''
|
|
|
add_formData['剩余数量']=''
|
|
|
add_searchInfo.value = ''
|
|
|
- ElMessage({type: 'success', message: '报工成功'});
|
|
|
+ successres('报工成功')
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -666,7 +671,7 @@ const add_xpSelectionChange = async (selection) => {
|
|
|
console.log(selection.length)
|
|
|
selectedRows.value = selection;
|
|
|
if (selection.length === 0) {
|
|
|
- ElMessage({type: 'warning', message: '请勾选打印的数据' });
|
|
|
+ warningres('请勾选打印的数据')
|
|
|
return false;
|
|
|
}else if(selection.length>0){
|
|
|
allPrintData.value = selection.map((row) => {
|
|
|
@@ -697,7 +702,7 @@ const add_xpSelectionChange = async (selection) => {
|
|
|
const bgSelection = ref(null)
|
|
|
const baogong_del = () => {
|
|
|
if(bgSelection.value === null || bgSelection.value === ''){
|
|
|
- ElMessage({type: 'warning',message: '请选择删除的数据' })
|
|
|
+ warningres('请选择删除的数据')
|
|
|
}else{
|
|
|
console.log(bgSelection.value)
|
|
|
}
|
|
|
@@ -780,6 +785,40 @@ page.value = 10;//默认显示
|
|
|
pageSize.value = val;
|
|
|
_getStaffList();
|
|
|
};
|
|
|
+
|
|
|
+
|
|
|
+// 成功
|
|
|
+const successres = (arr) => {
|
|
|
+ ElMessage({
|
|
|
+ type: '',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ // duration: 0, // 不自动关闭
|
|
|
+ message: `<strong style="font-size: 60px; color: black; background-color: #80FA80; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
|
|
|
+ customClass: 'custom-warning-message'
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+// 失败
|
|
|
+const errorres = (arr) => {
|
|
|
+ ElMessage({
|
|
|
+ type: '',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ // duration: 0, // 不自动关闭
|
|
|
+ message: `<strong style="font-size: 60px; color: white; background-color: red; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
|
|
|
+ customClass: 'custom-warning-message'
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+// 警告
|
|
|
+const warningres = (arr) => {
|
|
|
+ ElMessage({
|
|
|
+ type: '',
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ // duration: 0, // 不自动关闭
|
|
|
+ message: `<strong style="font-size: 60px; color: black; background-color: #f5ff2f; padding: 30px 280px; width: 482px; line-height: 60px; text-align: center; display: block;">${arr}</strong>`,
|
|
|
+ customClass: 'custom-warning-message'
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.form-container {
|