|
@@ -297,7 +297,7 @@ const SubOrderPageRef = ref()
|
|
|
//子订单详情页
|
|
//子订单详情页
|
|
|
const gd_yulan = async () => {
|
|
const gd_yulan = async () => {
|
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === null){
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === null){
|
|
|
- ElMessage({ type: 'warning', message: '请扫描子订单(条码)后再查看' });
|
|
|
|
|
|
|
+ warningres('请扫描子订单(条码)后再查看');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
console.log(add_searchInfo.value.split(',')[0])
|
|
console.log(add_searchInfo.value.split(',')[0])
|
|
@@ -424,7 +424,7 @@ const ddtableData = reactive([])
|
|
|
// 查询按钮
|
|
// 查询按钮
|
|
|
const add_onSubmit = async ()=>{
|
|
const add_onSubmit = async ()=>{
|
|
|
if(add_formData['机台号'] === ''){
|
|
if(add_formData['机台号'] === ''){
|
|
|
- ElMessage({type: 'warning',message: '未获取到机台'})
|
|
|
|
|
|
|
+ warningres('未获取到机台');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
sizeDatas.length = 0;
|
|
sizeDatas.length = 0;
|
|
@@ -432,7 +432,7 @@ const add_onSubmit = async ()=>{
|
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
|
|
if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
|
|
|
const WorkListdata = [];
|
|
const WorkListdata = [];
|
|
|
add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
add_tableData.splice(0,add_tableData.length,...WorkListdata);
|
|
|
- ElMessage({type: 'warning',message: '请扫描小票二维码' })
|
|
|
|
|
|
|
+ warningres('请扫描小票二维码');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -447,10 +447,14 @@ const add_onSubmit = async ()=>{
|
|
|
_order.value = add_searchInfo.value;
|
|
_order.value = add_searchInfo.value;
|
|
|
//获取下面报工历史记录
|
|
//获取下面报工历史记录
|
|
|
const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
|
|
const getSpotLists = await getSpotList({order:add_searchInfo.value,code:_code,sys_sbID:add_formData['机台号']});
|
|
|
|
|
+ if(getSpotLists.data.code === 1){
|
|
|
|
|
+ warningres(getSpotLists.msg);
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
//获取尺码
|
|
//获取尺码
|
|
|
sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers); //型号数据
|
|
sizeDatas.splice(0, getSpotLists.data.headers.length, ...getSpotLists.data.headers); //型号数据
|
|
|
if(getSpotLists.data.result.ci_num === 0 || getSpotLists.data.result.ci_num === '0'){
|
|
if(getSpotLists.data.result.ci_num === 0 || getSpotLists.data.result.ci_num === '0'){
|
|
|
- ElMessage({type: 'error',message: '已上报,无需再次报工' })
|
|
|
|
|
|
|
+ errorres('已上报,无需再次报工')
|
|
|
add_searchInfo.value = ''
|
|
add_searchInfo.value = ''
|
|
|
}
|
|
}
|
|
|
console.log(getSpotLists)
|
|
console.log(getSpotLists)
|
|
@@ -552,7 +556,7 @@ function baogongslpd() {
|
|
|
const totalQuantity = parseInt(add_formData['剩余数量'], 10) || 0;
|
|
const totalQuantity = parseInt(add_formData['剩余数量'], 10) || 0;
|
|
|
|
|
|
|
|
if (reportedQuantity > totalQuantity) {
|
|
if (reportedQuantity > totalQuantity) {
|
|
|
- ElMessage({ type: 'warning', message: '上报数量不能大于剩余数量' });
|
|
|
|
|
|
|
+ warningres('上报数量不能大于剩余数量');
|
|
|
add_Dialogonclick.value = false;
|
|
add_Dialogonclick.value = false;
|
|
|
}else if(reportedQuantity === ''){
|
|
}else if(reportedQuantity === ''){
|
|
|
add_Dialogonclick.value = false;
|
|
add_Dialogonclick.value = false;
|
|
@@ -565,16 +569,16 @@ const currentSlValue=ref('')
|
|
|
//报工
|
|
//报工
|
|
|
const add_Dialog = async ()=>{
|
|
const add_Dialog = async ()=>{
|
|
|
if(add_formData['机台号'] === '测试机台'){
|
|
if(add_formData['机台号'] === '测试机台'){
|
|
|
- ElMessage({ type: 'warning', message: '测试机台禁止报工' });
|
|
|
|
|
|
|
+ warningres('测试机台禁止报工');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if(add_formData['上报数量'] === ''){
|
|
if(add_formData['上报数量'] === ''){
|
|
|
- ElMessage({type: 'warning',message: '上报数量为空,请填写上报数量'})
|
|
|
|
|
|
|
+ warningres('上报数量为空,请填写上报数量');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(_order.value === ''){
|
|
if(_order.value === ''){
|
|
|
- ElMessage({type: 'warning',message: '请重新扫描小票二维码'})
|
|
|
|
|
|
|
+ warningres('请重新扫描小票二维码');
|
|
|
return;
|
|
return;
|
|
|
}else{
|
|
}else{
|
|
|
let params ={}
|
|
let params ={}
|
|
@@ -608,7 +612,7 @@ const add_Dialog = async ()=>{
|
|
|
add_formData['上报数量']=''
|
|
add_formData['上报数量']=''
|
|
|
add_formData['剩余数量']=''
|
|
add_formData['剩余数量']=''
|
|
|
add_searchInfo.value = ''
|
|
add_searchInfo.value = ''
|
|
|
- ElMessage({type: 'success', message: '报工成功'});
|
|
|
|
|
|
|
+ successres('报工成功');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -650,7 +654,7 @@ const add_xpSelectionChange = async (selection) => {
|
|
|
console.log(selection.length)
|
|
console.log(selection.length)
|
|
|
selectedRows.value = selection;
|
|
selectedRows.value = selection;
|
|
|
if (selection.length === 0) {
|
|
if (selection.length === 0) {
|
|
|
- ElMessage({type: 'warning', message: '请勾选打印的数据' });
|
|
|
|
|
|
|
+ warningres('请勾选打印的数据');
|
|
|
return false;
|
|
return false;
|
|
|
}else if(selection.length>0){
|
|
}else if(selection.length>0){
|
|
|
allPrintData.value = selection.map((row) => {
|
|
allPrintData.value = selection.map((row) => {
|
|
@@ -681,7 +685,7 @@ const add_xpSelectionChange = async (selection) => {
|
|
|
const bgSelection = ref(null)
|
|
const bgSelection = ref(null)
|
|
|
const baogong_del = () => {
|
|
const baogong_del = () => {
|
|
|
if(bgSelection.value === null || bgSelection.value === ''){
|
|
if(bgSelection.value === null || bgSelection.value === ''){
|
|
|
- ElMessage({type: 'warning',message: '请选择删除的数据' })
|
|
|
|
|
|
|
+ warningres('请选择删除的数据');
|
|
|
}else{
|
|
}else{
|
|
|
console.log(bgSelection.value)
|
|
console.log(bgSelection.value)
|
|
|
}
|
|
}
|
|
@@ -709,7 +713,7 @@ const del_delclick = async () => {
|
|
|
console.log(Selection.value)
|
|
console.log(Selection.value)
|
|
|
console.log(add_formData['组别'])
|
|
console.log(add_formData['组别'])
|
|
|
const res1 = await spotcheckdel({UniqId:Selection.value,sys_id:add_formData['组别']})
|
|
const res1 = await spotcheckdel({UniqId:Selection.value,sys_id:add_formData['组别']})
|
|
|
- res1.code === 0 && ElMessage.success('删除成功')
|
|
|
|
|
|
|
+ res1.code === 0 && successres('删除成功');
|
|
|
add_onSubmit()
|
|
add_onSubmit()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -731,6 +735,40 @@ page.value = 10;//默认显示
|
|
|
pageSize.value = val;
|
|
pageSize.value = val;
|
|
|
_getStaffList();
|
|
_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>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.form-container {
|
|
.form-container {
|