This commit is contained in:
刘晓鹏 2025-05-22 16:08:45 +08:00
parent 3d3de77fa1
commit 7a69ba7cbf
21 changed files with 1219 additions and 296 deletions

View File

@ -3,4 +3,9 @@ ENV = development
# 本地环境接口地址
VITE_API_URL1 = http://58.252.252.77:90
VITE_API_URL2 = https://maxcessth.gatedge.cn:91
VITE_API_File1 = https://maxcessth.gatedge.cn
VITE_API_File = https://maxcess.gatedge.cn
VITE_API_URL = https://maxcess.gatedge.cn:91

View File

@ -3,4 +3,8 @@ ENV = production
# 线上环境接口地址
VITE_API_URL1 = http://58.252.252.77:90
VITE_API_URL2 = https://maxcessth.gatedge.cn:91
VITE_API_File1 = https://maxcessth.gatedge.cn
VITE_API_File = https://maxcess.gatedge.cn
VITE_API_URL = https://maxcess.gatedge.cn:91

View File

@ -19,6 +19,46 @@
</head>
<body>
<div id="app"></div>
<script>
/**
* 从金蝶添加订单的GET请求挂载到window可在控制台直接调用
* @param {string} token 认证token
*/
window.addOrderFromKingDee = function() {
const apiUrl = 'https://maxcessth.gatedge.cn:91/api/Test2/AddOrderFromKingDee';
const token = document.cookie.split('; ').find(row => row.startsWith(`token=`))?.split('=')[1];
console.log(`正在请求 ${apiUrl}...`); // 提示请求开始
const xhr = new XMLHttpRequest();
xhr.open('GET', apiUrl, true);
xhr.setRequestHeader('Authorization', token); // 设置 token 请求头
xhr.onload = function() {
if (xhr.status >= 200 && xhr.status < 300) {
try {
const response = xhr.responseText ? JSON.parse(xhr.responseText) : null;
console.log('✅ 请求成功:', response);
} catch (e) {
console.error('❌ 解析响应数据失败:', e);
console.log('原始响应:', xhr.responseText);
}
} else {
console.error(`❌ 请求失败,状态码: ${xhr.status}`, xhr.statusText);
}
};
xhr.onerror = function() {
console.error('❌ 网络请求失败,请检查:');
console.log('- 是否跨域?');
console.log('- 接口地址是否正确?');
console.log('- 网络是否正常?');
};
xhr.send();
};
// 示例(在控制台调用):
// addOrderFromKingDee("你的token");
</script>
</body>
</html>

851
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@
"echarts-gl": "^2.0.9",
"echarts-wordcloud": "^2.1.0",
"element-plus": "^2.6.1",
"html-to-pdfmake": "^2.5.26",
"html2canvas": "^1.4.1",
"js-cookie": "^3.0.5",
"js-table2excel": "^1.1.2",
@ -30,6 +31,7 @@
"jsplumb": "^2.15.6",
"mitt": "^3.0.1",
"nprogress": "^0.2.0",
"pdfmake": "^0.2.20",
"pinia": "^2.1.7",
"print-js": "^1.6.0",
"qrcodejs2-fixes": "^0.0.2",

BIN
public/fonts/SimHei.ttf Normal file

Binary file not shown.

BIN
src/assets/fonts/SimHei.ttf Normal file

Binary file not shown.

View File

@ -80,8 +80,9 @@ export default {
scqd:'Please confirm the deletion of the delivery note?',
receiver:'Receiver',
sltzddh:'Delivery Note Number',
qtxfph:'请填写发票号',
qxzfprq:'请选择发票日期',
qtxfph:'Input invoice #',
fprq:'Invoice date#',
qxzfprq:'Select Invoice date#',
},
tiaoma:{
pno:'P/NO',
@ -102,5 +103,6 @@ export default {
qdyzddym:'Confirm to print out all',
jcdwdypz:'Downloading printer driver',
noMac:"Don't support Apple Mac computer",
gysjc:'Supplier Name'
}
};

View File

@ -82,6 +82,7 @@ export default {
receiver:'接收人',
sltzddh:'收料通知单单号',
qtxfph:'请填写发票号',
fprq:'发票日期',
qxzfprq:'请选择发票日期',
},
tiaoma:{
@ -103,5 +104,6 @@ export default {
qdyzddym:'确定要打印整单吗',
jcdwdypz:'检测到无打印插件,正在下载',
noMac:'MAC无打印配置',
gysjc:'供应商简称'
}
};

View File

@ -115,11 +115,10 @@ const onSignIn = () => {
}).then( async (res:any) => {
state.loading.signIn = false;
if(res.data !== null){
await accGetUserInfo()
accGetUserInfo()
// token
Session.set('token', res.data);
Cookies.set('userName', state.ruleForm.userName);
// `/src/stores/userInfo.ts`
if (!themeConfig.value.isRequestRoutes) {
// 2
const isNoPower = await initFrontEndControlRoutes();
@ -141,22 +140,18 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
ElMessage.warning('抱歉,您没有登录权限');
Session.clear();
} else {
//
let currentTimeInfo = currentTime.value;
//
// /
if (route.query?.redirect) {
router.push({
path: <string>route.query?.redirect,
query: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '',
});
} else {
router.push('/');
}
//
router.push('/home');
// if (route.query?.redirect) {
// router.push({
// path: <string>route.query?.redirect,
// query: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '',
// });
// } else {
// router.push('/home');
// }
const signInText = t('message.signInText');
ElMessage.success(`${currentTimeInfo}${signInText}`);
// loading
NextLoading.start();
}
state.loading.signIn = false;

Binary file not shown.

View File

@ -170,7 +170,7 @@ const printCheckAllFun = () => {
closeOnClickModal: false,
closeOnPressEscape: false,
title: t('message.index.prompt'),
message: t('message.index.qdyzddym'),
message: t('message.tiaoma.qdyzddym'),
confirmButtonText: t('message.index.confirm'),
cancelButtonText: t('message.user.logOutCancel'),
showCancelButton: true,
@ -255,25 +255,36 @@ const dataExtractFun = (list: any = []) => {
};
//
const AddPrintContentZhuhai = (row: any, mainState: boolean = false) => {
LODOP.ADD_PRINT_BARCODE(25, 15, 150, 150, 'QRCode', row.fBarCode);
mainState ? LODOP.ADD_PRINT_TEXT(150, 55, 300, 20, '主标签') : null
LODOP.ADD_PRINT_TEXT(10, 160, 300, 20, `供应商简称:${row.supplierName}`);
LODOP.ADD_PRINT_TEXT(30, 160, 300, 20, `物料编码:${row.materialCode}`);
LODOP.ADD_PRINT_TEXT(50, 160, 300, 20, `包装数量:${row.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(70, 160, 300, 20, `美塞斯批号:${row.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(90, 160, 300, 20, `供应商批号:${row.fSupplierLot}`);
LODOP.ADD_PRINT_TEXT(110, 160, 300, 20, `采购订单号:${row.purchaseOrderFBillNo}`);
LODOP.ADD_PRINT_TEXT(130, 160, 300, 20, `送货日期:${state.indexRow.deliveryDate}`);
LODOP.ADD_PRINT_TEXT(150, 160, 300, 20, `收料通知单单号:${state.indexRow.fBillNo}`);
LODOP.ADD_PRINT_BARCODE(25, -5, 150, 150, 'QRCode', row.fBarCode);
LODOP.ADD_PRINT_TEXT(140, 45, 300, 20, `${row.quantityPerPackage}`);
mainState ? LODOP.ADD_PRINT_TEXT(10, 35, 300, 20, '主标签') : null
LODOP.ADD_PRINT_TEXT(10, 120, 300, 20, `供应商简称:${row.supplierName}`);
LODOP.ADD_PRINT_TEXT(30, 120, 300, 20, `物料编码:${row.materialCode}`);
LODOP.ADD_PRINT_TEXT(50, 120, 300, 20, `包装数量:${row.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(70, 120, 300, 20, `美塞斯批号:${row.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(90, 120, 300, 20, `供应商批号:${row.fSupplierLot}`);
LODOP.ADD_PRINT_TEXT(110, 120, 300, 20, `采购订单号:${row.purchaseOrderFBillNo}`);
LODOP.ADD_PRINT_TEXT(130, 120, 300, 20, `送货日期:${state.indexRow.deliveryDate}`);
LODOP.ADD_PRINT_TEXT(150, 120, 300, 20, `收料通知单单号:${state.indexRow.fBillNo}`);
};
//
const AddPrintContentTaiguo = (row: any, mainState: boolean = false) => {
LODOP.ADD_PRINT_BARCODE(25, 15, 150, 150, 'QRCode', row.fBarCode);
mainState ? LODOP.ADD_PRINT_TEXT(150, 55, 300, 20, 'Main Label') : null
LODOP.ADD_PRINT_TEXT(28, 160, 300, 20, `${t('message.tiaoma.pno')}${row.materialCode}`);
LODOP.ADD_PRINT_TEXT(58, 160, 300, 20, `${t('message.tiaoma.qty')}${row.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(88, 160, 300, 20, `${t('message.tiaoma.bn')}${row.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(118, 160, 300, 20, `${t('message.tiaoma.po')}${row.purchaseBillNo}`);
LODOP.ADD_PRINT_BARCODE(25, -5, 150, 150, 'QRCode', row.fBarCode);
LODOP.ADD_PRINT_TEXT(140, 45, 300, 20, `${row.quantityPerPackage}`);
mainState ? LODOP.ADD_PRINT_TEXT(10, 35, 300, 20, 'Main Label') : null
// LODOP.ADD_PRINT_TEXT(28, 120, 300, 20, `${t('message.tiaoma.pno')}${row.materialCode}`);
// LODOP.ADD_PRINT_TEXT(58, 120, 300, 20, `${t('message.tiaoma.qty')}${row.packagingQuantity}`);
// LODOP.ADD_PRINT_TEXT(88, 120, 300, 20, `${t('message.tiaoma.bn')}${row.mssSupplierLot}`);
// LODOP.ADD_PRINT_TEXT(118, 120, 300, 20, `${t('message.tiaoma.po')}${row.purchaseBillNo}`);
LODOP.ADD_PRINT_TEXT(10, 120, 300, 20, `${t('message.tiaoma.gysjc')}${row.supplierName}`);
LODOP.ADD_PRINT_TEXT(30, 120, 300, 20, `${t('message.index.partNumber')}${row.materialCode}`);
LODOP.ADD_PRINT_TEXT(50, 120, 300, 20, `${t('message.tiaoma.qty')}${row.packagingQuantity}`);
LODOP.ADD_PRINT_TEXT(70, 120, 300, 20, `${t('message.tiaoma.bn')}${row.mssSupplierLot}`);
LODOP.ADD_PRINT_TEXT(90, 120, 300, 20, `${t('message.index.supplierLot')}${row.fSupplierLot}`);
LODOP.ADD_PRINT_TEXT(110, 120, 300, 20, `${t('message.index.PO1')}${row.purchaseOrderFBillNo}`);
LODOP.ADD_PRINT_TEXT(130, 120, 300, 20, `${t('message.index.deliveryDate')}${state.indexRow.deliveryDate}`);
LODOP.ADD_PRINT_TEXT(150, 120, 300, 20, `${t('message.index.sltzddh')}${state.indexRow.fBillNo}`);
};
//
const inputNumberFun = (e: any, row: any) => {
@ -329,7 +340,7 @@ const openShowDataFun = (row: any) => {
});
const userAgent = window.navigator.userAgent.toLowerCase();
if (userAgent.includes('windows')) {
window.location.href = 'http://58.252.252.77:8085/CLodop_Setup_for_Win64NT_6.623EN.exe';
window.location.href = import.meta.env.import.meta.env.VITE_API_URL + '/CLodop_Setup_for_Win64NT_6.623EN.exe';
} else if (userAgent.includes('mac')) {
ElNotification({
title: t('message.index.prompt'),

View File

@ -48,7 +48,7 @@
</div>
<el-button type="primary" size="default" @click="selectFun">{{ t('message.index.search') }}</el-button>
<el-button size="default" @click="resetFun">{{ t('message.index.reset') }}</el-button>
<el-button type="primary" size="default" @click="state.selectedDataShow = true">
<el-button type="primary" size="default" @click="openComponentPrintingFun">
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }}{{ t('message.index.print') }}</span>
</el-button>
</div>
@ -69,31 +69,23 @@
</template>
</avue-crud>
</el-card>
<selectedData
:listData="state.selectedData"
:showes="state.selectedDataShow"
@close="
() => {
state.selectedDataShow = false;
}
"
/>
<selectedData ref="selectedDataRef"/>
<componentPrinting ref="componentPrintingRef" />
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, computed, ref } from 'vue';
import { reactive, onMounted, computed, ref,nextTick } from 'vue';
import { listApi } from '/@/api/list';
import { useI18n } from 'vue-i18n';
import SelectedData from '/@/views/materialReceiptNotice/selectedData.vue';
import componentPrinting from './componentPrinting.vue';
import { ElMessage, ElMessageBox } from 'element-plus';
const componentPrintingRef = ref();
const selectedDataRef = ref();
const LODOP = window.LODOP;
const { t } = useI18n();
const crudRef = ref();
const componentPrintingRef = ref();
const state = reactive({
page: {
total: 0,
@ -101,7 +93,6 @@ const state = reactive({
pageSize: 30,
},
option: {
height: computed(() => window.innerHeight - window.innerHeight * 0.25 + ''),
tip: false,
rowSort: false,
index: false,
@ -185,8 +176,7 @@ const selectionChange = (row: any) => {
item.checkboxBox = '0';
}
});
listApi()
.invoiceOrderGetPageList({
listApi().invoiceOrderGetPageList({
condition: {
sheet: row.sheet,
fDateBegin: '',
@ -209,6 +199,12 @@ const selectionChange = (row: any) => {
const componentPrintingFunDataRow = (row: any) => {
componentPrintingRef.value.openShowDataFun(row);
};
const openComponentPrintingFun = () => {
if(state.selectedData.length){
console.log(state.selectedData)
selectedDataRef.value.showFun(state.selectedData)
}
}
//
const selectFun = () => {
state.page.currentPage = 1;
@ -252,7 +248,7 @@ const getList = () => {
});
};
//
onMounted(() => {console.log( window.LODOP)});
onMounted(() => {});
</script>
<style lang="scss" scoped>
@ -349,7 +345,11 @@ onMounted(() => {console.log( window.LODOP)});
}
:deep(.el-form) {
flex: 1;
flex: 1;
overflow: hidden;
}
:deep(.el-table--default){
height: 100%;
}
.system-user-container {

View File

@ -1,180 +1,282 @@
<template>
<el-dialog :model-value="props.showes" @close="closeFun" width="70%">
<div ref="ceshiRef">
<ceshi id="ceshi" :data="props.listData"></ceshi>
<el-dialog :model-value="state.show" @close="closeFun" width="90%">
<div class="printInitBox" ref="printInitBoxRef">
<div v-for="(itemMain,indexMain) of state.dataList" :key="indexMain">
<div
class="title"
style="width: 100%; text-align: center; font-size: 30px; letter-spacing: 14px; font-weight: 500; padding: 8px 0; color: black !important"
>
{{ t('message.index.deliveryNote1') }}
</div>
<table
style="width: 100%; border-collapse: collapse; border-right: 2px solid black; border-top: 2px solid black; border-left: 2px solid black"
>
<tbody style="border-collapse: collapse">
<tr style="border-collapse: collapse; border-bottom: 2px solid black">
<td style="text-align: center; vertical-align: middle" colspan="10">
<div>{{ t('message.index.deliveryNoteNumber1') }}</div>
<VueQr style="width: 130px; height: 130px" :text="itemMain[0].fBillNo" :size="130" />
</td>
<td
colspan="12"
style="min-height: 200px; text-align: center; vertical-align: middle; border-left: 2px solid black; border-right: 2px solid black"
>
<div style="text-align: left; padding: 16px">
<div style="font-size: 16px; margin-bottom: 8px; color: #000000">
<span class="span1">{{ t('message.index.deliveryNoteNumber') }}</span>
<span class="span2">{{ itemMain[0].fBillNo }}</span>
</div>
<div style="font-size: 16px; margin-bottom: 8px; color: #000000">
<span class="span1">{{ t('message.index.supplierName') }}</span>
<span class="span2">{{ itemMain[0].supplierName }}</span>
</div>
<div style="font-size: 16px; margin-bottom: 8px; color: #000000">
<span class="span1">{{ t('message.index.khmc') }}</span>
<span class="span2">{{ itemMain[0].fPurchaseOrgName }}</span>
</div>
<div style="font-size: 16px; margin-bottom: 8px; color: #000000">
<span class="span1">{{ t('message.index.deliveryDate') }}</span>
<span class="span2">{{ itemMain[0].deliveryDate }}</span>
</div>
<div style="font-size: 16px; margin-bottom: 8px; color: #000000">
<span class="span1">{{ t('message.index.invoiceNumber') }}</span>
<span class="span2">{{ itemMain[0].f_VHUB_Text }}</span>
</div>
</div>
</td>
<td style="text-align: center; vertical-align: middle" colspan="10">
<div>{{ t('message.index.invoiceNumber1') }}</div>
<VueQr style="width: 130px; height: 130px" :text="itemMain[0].f_VHUB_Text" :size="130" />
</td>
</tr>
<tr style="border-collapse: collapse; border-bottom: 2px solid black">
<td style="text-align: center; font-size: 18px; padding: 4px; color: black" colspan="2">#</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="5">
{{ t('message.index.PO') }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="5">
{{ t('message.index.partNumber') }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="5">
{{ t('message.index.materialName') }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="2">
{{ t('message.index.unit1') }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="3">
{{ t('message.index.deliveryQTY') }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="4">
{{ t('message.index.maxcessLot') }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="6">
{{ t('message.index.supplierLot') }}
</td>
</tr>
<tr style="border-collapse: collapse; border-bottom: 2px solid black" v-for="(item, index) of itemMain" :key="index">
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; width: 3%" colspan="2">
{{ index + 1 }}
</td>
<td width="3%" style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="5">
{{ item.purchaseOrderFBillNo }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="5">
{{ item.materialCode }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="5">
{{ item.materialName }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="2">
{{ item.unitName }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="3">
{{ item.qty }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="4">
{{ item.mssSupplierLot }}
</td>
<td style="text-align: center; font-size: 18px; padding: 4px; color: black; border-left: 2px solid black" colspan="6">
{{ item.fSupplierLot }}
</td>
</tr>
</tbody>
</table>
<table style="width: 100%; border-collapse: collapse; margin-top: 18px; border: none">
<tbody style="width: 100%; border: none">
<tr style="font-size: 18px; color: black; width: 100%; border: none">
<td style="font-size: 18px; width: 10%; color: black; border: none">{{ t('message.index.shipper') }}</td>
<td style="font-size: 18px; width: 10%; color: black; border: none"></td>
<td style="font-size: 18px; width: 10%; color: black; border: none"></td>
<td style="font-size: 18px; width: 10%; color: black; border: none"></td>
<td style="font-size: 18px; width: 10%; color: black; border: none"></td>
<td style="font-size: 18px; width: 10%; color: black; border: none"></td>
<td style="font-size: 18px; width: 10%; color: black; border: none"></td>
<td style="font-size: 18px; width: 10%; color: black; border: none"></td>
<td style="font-size: 18px; width: 10%; color: black; border: none">{{ t('message.index.receiver') }}</td>
<td style="font-size: 18px; color: black; width: 8.3%; border: none"></td>
</tr>
</tbody>
</table>
<table style="width: 100%; border-collapse: collapse; margin-top: 8px; border: none">
<tbody style="width: 100%; border: none">
<tr style="width: 100%; border: none">
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none">
{{ t('message.index.year') }}
</td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none">
{{ t('message.index.month') }}
</td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none">
{{ t('message.index.day') }}
</td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none"></td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none">
{{ t('message.index.year') }}
</td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none">
{{ t('message.index.month') }}
</td>
<td style="text-align: right; font-size: 18px; color: black; width: 6.67%; border: none">
{{ t('message.index.day') }}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="btnList">
<el-button type="primary" @click="printElement">{{ t('message.index.print') }}</el-button>
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { defineProps, reactive, ref, defineEmits } from 'vue';
import ceshi from './ceshi.vue';
import printJS from 'print-js';
import html2canvas from 'html2canvas';
import { reactive, defineExpose, ref } from 'vue';
import { useI18n } from 'vue-i18n';
const { t } = useI18n()
const ceshiRef = ref();
const emits = defineEmits(['close']);
const props = defineProps({
listData: {
type: Array,
default: () => [],
import VueQr from 'vue-qr/src/packages/vue-qr.vue';
import pdfMake from 'pdfmake/build/pdfmake';
import pdfFonts from 'pdfmake/build/vfs_fonts';
import htmlToPdfmake from 'html-to-pdfmake';
pdfMake.vfs = pdfFonts.vfs;
pdfMake.fonts = {
AlibabaPuHuiTi: {
normal: import.meta.env.import.meta.env.VITE_API_URL + '/SimHei.ttf',
bold: import.meta.env.import.meta.env.VITE_API_URL + '/SimHei.ttf',
italics: import.meta.env.import.meta.env.VITE_API_URL + '/SimHei.ttf',
bolditalics: import.meta.env.import.meta.env.VITE_API_URL + '/SimHei.ttf',
},
showes: {
type: Boolean,
default: true,
},
});
};
const printInitBoxRef = ref();
const { t } = useI18n();
const state = reactive({
snapshotUrl: '',
show: false,
dataList: [],
});
const closeFun = () => {
emits('close');
state.show = false;
};
const splitArrayInto10Parts = (arr:any) => {
let result:any = [];
let resultMin:any = []
if(arr.length > 10){
arr.forEach((item:any) => {
resultMin.push(item)
if(resultMin.length === 10){
result.push(resultMin)
resultMin = []
}
})
} else {
result.push(arr)
}
return result;
}
const showFun = (list: any) => {
state.dataList = splitArrayInto10Parts(list);
state.show = true;
};
const printElement = () => {
captureSnapshot();
// DOM HTML
};
//
const captureSnapshot = async () => {
const canvas = await html2canvas(ceshiRef.value, {
allowTaint: true, //
useCORS: true, // 使 CORS
scale: 2, //
width: ceshiRef.value.clientWidth,
height: ceshiRef.value.clientHeight,
});
state.snapshotUrl = canvas.toDataURL('image/png');
printJS({
printable: state.snapshotUrl,
type: 'image',
style: `
@page {
size: auto;
margin: 0mm;
const html = printInitBoxRef.value.innerHTML;
const options = {
tableAutoSize: true,
defaultStyles: {
title: { fontSize: 14 },
},
};
const content = htmlToPdfmake(html, options);
var i = 0
const docDefinition = {
content: content,
pageSize: 'A4', //
pageOrientation: 'landscape', //
pageMargins: [40, 10, 40, 40], // [, , , ]
footer: function (currentPage: any, pageCount: any) {
return { text: `${pageCount}-${currentPage}`, alignment: 'center' };
},
defaultStyle: {
font: 'AlibabaPuHuiTi',
},
pageBreakBefore: (node:any) =>{
if(node.style && node.style.indexOf('title') !== -1 ){
i++
console.log(i)
if(i > 1){
return true
}
body {
margin: 0;
padding: 36px;
}
`,
});
}
}
};
pdfMake.createPdf(docDefinition).print();
};
defineExpose({
closeFun,
showFun,
});
</script>
<style scoped lang="scss">
.printInitBox {
.title {
width: 100%;
text-align: center;
font-size: 30px;
letter-spacing: 14px;
font-weight: 500;
padding: 8px 0;
color: black !important;
}
.mainBox {
width: 100%;
border: 2px solid black;
.codeBox {
width: 100%;
display: flex;
.codeBoxItem {
width: calc(100% / 3);
min-height: 200px;
}
.codeBoxItem:nth-child(2) {
border-left: 2px solid black;
border-right: 2px solid black;
}
}
}
}
.btnList {
margin-top: 26px;
display: flex;
justify-content: center;
}
:deep(.el-form){
border-right: 0 !important;
}
.shuming {
width: 100%;
display: flex;
justify-content: space-between;
//text-align: left;
}
.nameText {
margin-right: 120px;
margin-top: 80px;
}
.dateTime {
margin-right: 50px;
margin-top: 16px;
}
.dateTime > span {
margin-left: 42px;
}
:deep(.el-table__inner-wrapper) {
box-sizing: border-box;
//border: 1px solid black;
}
:deep(.is-leaf) {
border-color: black;
}
:deep(.el-table__cell) {
border-color: black;
}
:deep(.el-table__cell) {
border-color: black !important;
}
:deep(.el-card) {
border: 1px solid black !important;
}
:deep(.avue-crud__header) {
display: none;
}
:deep(.avue-crud__body) {
padding: 0 !important;
}
.orderPrinting {
width: 100%;
.title {
width: 100%;
height: 50px;
background-color: #deeaf6;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
letter-spacing: 10px;
}
.orderPrintingTop {
height: 161px;
border: 1px solid #000000;
box-sizing: border-box;
display: flex;
.item1 {
width: 33.33%;
height: 160px;
border-right: 1px solid #000000;
display: flex;
justify-content: center;
align-items: center;
}
.item2 {
width: 33.33%;
height: 160px;
border-right: 1px solid #000000;
box-sizing: border-box;
padding: 16px;
.dataText {
font-size: 16px;
margin-bottom: 16px;
color: #000000;
}
}
.item2 {
width: 33.33%;
height: 160px;
//border-right: 1px solid black;
}
.item3 {
width: 33.33%;
height: 160px;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

View File

@ -55,17 +55,20 @@
<template #menu-left>
<div class="selectBoxes">
<div class="selectItem">
<el-input v-model="state.formData.fBillNo" style="width: 12vw" :placeholder="t('message.index.DocNumber')" size="default" />
<el-input v-model="state.formData.fBillNo" style="width: 8vw" :placeholder="t('message.index.DocNumber')" size="default" />
</div>
<div class="selectItem">
<el-select :placeholder="t('message.index.DocStatus')" size="default" style="width: 12vw" v-model="state.formData.fmrpCloseStatus">
<el-input v-model="state.formData.materialCode" style="width: 8vw" :placeholder="t('message.tiaoma.pno')" size="default" />
</div>
<div class="selectItem">
<el-select :placeholder="t('message.index.DocStatus')" size="default" style="width: 8vw" v-model="state.formData.fmrpCloseStatus">
<el-option v-for="item in state.option.column[11].dicData" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div class="selectItem">
<el-date-picker
v-model="state.elDatePicker"
style="width: 25vw"
style="width: 22vw"
type="daterange"
range-separator="-"
:start-placeholder="t('message.index.StartDate')"
@ -128,7 +131,7 @@
<script lang="ts" setup>
import { reactive, onMounted, computed, nextTick, ref } from 'vue';
import { useRouter } from 'vue-router';
import { listApi } from '../../api/list/index';
import { listApi } from '/@/api/list';
import { useI18n } from 'vue-i18n';
import SelectedData from '/@/views/mssPurchaseOrder/selectedData.vue';
import { ElMessage, ElMessageBox } from 'element-plus';
@ -143,7 +146,6 @@ const state = reactive({
pageSize: 30,
},
option: {
height: computed(() => window.innerHeight - window.innerHeight * 0.23 + ''),
tip: false,
index: false,
menu: true,
@ -152,7 +154,6 @@ const state = reactive({
delBtn: false,
editBtn: false,
align: 'center',
// searchLabelWidth:100,
selection: true,
reserveSelection: true,
searchMenuSpan: 3,
@ -202,6 +203,7 @@ const state = reactive({
fDateBegin: '',
fDateEmd: '',
fmrpCloseStatus: '',
materialCode:''
},
selectedData: [],
chengNuoJiaoQiP: '',
@ -522,8 +524,11 @@ onMounted(() => {
:deep(.el-form) {
flex: 1;
overflow: hidden;
}
:deep(.el-table--default){
height: 100%;
}
.system-user-container {
:deep(.el-card__body) {
display: flex;

View File

@ -96,7 +96,6 @@ const state = reactive({
pageSize: 25,
},
option: {
height: computed(() => window.innerHeight - window.innerHeight * 0.23 + ''),
tip: false,
index: true,
menuWidth: 120,
@ -143,7 +142,7 @@ const state = reactive({
],
width: '90',
},
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty', width: '180' },
{ label: computed(() => t('message.index.receivedQTY')), prop: 'mssReceiveQty', width: '180' },
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQty', width: '110' },
{ label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '160' },
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '160' },
@ -445,7 +444,11 @@ onMounted(() => {
}
:deep(.el-form) {
flex: 1;
flex: 1;
overflow: hidden;
}
:deep(.el-table--default){
height: 100%;
}
.system-user-container {

View File

@ -22,7 +22,7 @@
<el-input style="width: 300px" v-model="state.f_VHUB_Text" :placeholder="t('message.index.invoiceNumber')" size="default" />
</div>
<div style="display: flex; align-items: center; margin-bottom: 16px;margin-left: 32px">
<div>发票日期</div>
<div>{{ t('message.index.fprq') }}</div>
<el-date-picker
v-model="state.f_URXD_Date"
type="date"
@ -33,6 +33,18 @@
value-format="YYYY-MM-DD"
/>
</div>
<div style="display: flex; align-items: center; margin-bottom: 16px;margin-left: 32px">
<div>{{ t('message.index.deliveryDate') }}</div>
<el-date-picker
v-model="state.faHuoDate"
type="date"
:placeholder="t('message.index.date')"
size="default"
style="width: 300px"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
/>
</div>
</div>
</template>
</avue-crud>
@ -66,6 +78,7 @@ const state = reactive({
loading: false,
f_VHUB_Text: '',
f_URXD_Date: '',
faHuoDate:'',
fSupplierLot: '',
dialogVisible: true,
data: [],
@ -90,7 +103,7 @@ const state = reactive({
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '180' },
{ label: computed(() => t('message.index.unit')), prop: 'unitName' },
{ label: computed(() => t('message.index.qty')), prop: 'qty' },
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty' },
{ label: computed(() => t('message.index.receivedQTY')), prop: 'mssReceiveQty' },
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQtyText' },
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'notSendQty', width: '180' },
@ -114,17 +127,20 @@ watch(
const batchAddInvoiceOrderFun = () => {
if(Local.get('setUserInfo').ifForeign === 1){
if(state.f_VHUB_Text === ''){
ElMessage.error('请填写发票号')
ElMessage.error(t('message.index.qtxfph'))
return
}
if(state.f_URXD_Date === ''){
ElMessage.error('请选择发票日期')
ElMessage.error(t('message.index.qtxfph'))
return
}
if(state.faHuoDate === ''){
ElMessage.error(t('message.index.deliveryDate'))
return
}
}
if (props.listData.length != 0) {
state.loading = true;
console.log(props.listData);
let arr: any = [];
props.listData.forEach((item: any) => {
arr.push({
@ -134,7 +150,7 @@ const batchAddInvoiceOrderFun = () => {
});
});
listApi()
.batchAddInvoiceOrder({ f_VHUB_Text: state.f_VHUB_Text,f_URXD_Date:state.f_URXD_Date, upDateList: arr })
.batchAddInvoiceOrder({ f_VHUB_Text: state.f_VHUB_Text,f_URXD_Date:state.f_URXD_Date,faHuoDate:state.faHuoDate, upDateList: arr })
.then((res: any) => {
state.loading = false;
if (res.resultCode === 0) {

View File

@ -114,6 +114,8 @@ const state = reactive({
//
const openDialog = (type: string, row: any) => {
getMenuData();
getFPurchaseOrgListFun()
if (type === 'edit') {
state.ruleForm.ifForeign = row.ifForeign
state.ruleForm.systemType = row.systemType
@ -123,7 +125,7 @@ const openDialog = (type: string, row: any) => {
state.ruleForm.supplierId = row.supplierId
state.ruleForm.supplierName = row.supplierName
state.ruleForm.fPurchaseOrgId = row.fPurchaseOrgId
state.ruleForm.password = ''
state.ruleForm.password = '000000'
state.dialog.title = '修改用户';
state.dialog.submitTxt = '修 改';
} else {
@ -131,8 +133,6 @@ const openDialog = (type: string, row: any) => {
state.dialog.submitTxt = '新 增';
}
state.dialog.isShowDialog = true;
getMenuData();
getFPurchaseOrgListFun()
};
//
const closeDialog = () => {

View File

@ -112,6 +112,11 @@ const state = reactive({
const getTableData = (item: any) => {
let data1 = { ...item };
let data2 = { ...item, id: state.itemId };
if(state.itemId !== '') {
if (data2.password === '000000'){
data2.password = ''
}
}
listApi()
.loginSave(state.itemId === '' ? data1 : data2)
.then((res: any) => {

View File

@ -7,7 +7,7 @@
</div>
<div class="pageBox-item item-right">
<div class="item-right-content">
<img class="logo" :src="logoMini" alt=""/>
<!-- <img class="logo" :src="logoMini" alt=""/>-->
<div class="tagBox">
<div>1. 此功能模块只供开发人员使用若非开发人员请勿修改任何表单内容以免发生事故造成不必要的损失</div>
<div>2. 该项升级目标为两个分别为泰国和珠海区分为两个版本号请注意不要混淆</div>
@ -42,12 +42,22 @@
<el-input v-model="state.ruleForm.version" placeholder="请输入珠海版本号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="珠海URL" prop="name">
<el-input v-model="state.ruleForm.url" placeholder="请输入珠海URL" clearable></el-input>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="泰国版本:" prop="name">
<el-input v-model="state.ruleForm.taiGuoVersion" placeholder="请输入泰国版本号"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="泰国URL" prop="name">
<el-input v-model="state.ruleForm.taiGuoUrl" placeholder="请输入泰国URL" clearable></el-input>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="发布密码:" prop="name">
<el-input v-model="state.password" placeholder="请输入发布密码" clearable
@ -93,6 +103,8 @@ const state = reactive({
version: '', //
taiGuoVersion: '', //
note: '', //
taiGuoUrl:'https://maxcess.gatedge.cn/ThailandPDA.apk',
url:'https://maxcess.gatedge.cn/ZhuhaiPDA.apk'
},
lastModificationTime:'',
configId:'',
@ -176,8 +188,6 @@ onMounted(() => {
width: 100%;
.item-right-content {
height: 80%;
.logo {
height: 50px;
}

View File

@ -29,7 +29,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
hmr: true,
proxy: {
'/api': {
target: 'https://maxcess.gatedge.cn:91',
target: 'https://maxcessth.gatedge.cn:91',
ws: true,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),