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_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 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_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 VITE_API_URL = https://maxcess.gatedge.cn:91

View File

@ -19,6 +19,46 @@
</head> </head>
<body> <body>
<div id="app"></div> <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> </body>
</html> </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-gl": "^2.0.9",
"echarts-wordcloud": "^2.1.0", "echarts-wordcloud": "^2.1.0",
"element-plus": "^2.6.1", "element-plus": "^2.6.1",
"html-to-pdfmake": "^2.5.26",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"js-table2excel": "^1.1.2", "js-table2excel": "^1.1.2",
@ -30,6 +31,7 @@
"jsplumb": "^2.15.6", "jsplumb": "^2.15.6",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pdfmake": "^0.2.20",
"pinia": "^2.1.7", "pinia": "^2.1.7",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcodejs2-fixes": "^0.0.2", "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?', scqd:'Please confirm the deletion of the delivery note?',
receiver:'Receiver', receiver:'Receiver',
sltzddh:'Delivery Note Number', sltzddh:'Delivery Note Number',
qtxfph:'请填写发票号', qtxfph:'Input invoice #',
qxzfprq:'请选择发票日期', fprq:'Invoice date#',
qxzfprq:'Select Invoice date#',
}, },
tiaoma:{ tiaoma:{
pno:'P/NO', pno:'P/NO',
@ -102,5 +103,6 @@ export default {
qdyzddym:'Confirm to print out all', qdyzddym:'Confirm to print out all',
jcdwdypz:'Downloading printer driver', jcdwdypz:'Downloading printer driver',
noMac:"Don't support Apple Mac computer", noMac:"Don't support Apple Mac computer",
gysjc:'Supplier Name'
} }
}; };

View File

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

View File

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

Binary file not shown.

View File

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

View File

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

View File

@ -1,180 +1,282 @@
<template> <template>
<el-dialog :model-value="props.showes" @close="closeFun" width="70%"> <el-dialog :model-value="state.show" @close="closeFun" width="90%">
<div ref="ceshiRef"> <div class="printInitBox" ref="printInitBoxRef">
<ceshi id="ceshi" :data="props.listData"></ceshi> <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>
<div class="btnList"> <div class="btnList">
<el-button type="primary" @click="printElement">{{ t('message.index.print') }}</el-button> <el-button type="primary" @click="printElement">{{ t('message.index.print') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, reactive, ref, defineEmits } from 'vue'; import { reactive, defineExpose, ref } from 'vue';
import ceshi from './ceshi.vue';
import printJS from 'print-js';
import html2canvas from 'html2canvas';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
const { t } = useI18n() import VueQr from 'vue-qr/src/packages/vue-qr.vue';
const ceshiRef = ref(); import pdfMake from 'pdfmake/build/pdfmake';
const emits = defineEmits(['close']); import pdfFonts from 'pdfmake/build/vfs_fonts';
const props = defineProps({ import htmlToPdfmake from 'html-to-pdfmake';
listData: {
type: Array, pdfMake.vfs = pdfFonts.vfs;
default: () => [], 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, const printInitBoxRef = ref();
default: true, const { t } = useI18n();
},
});
const state = reactive({ const state = reactive({
snapshotUrl: '', show: false,
dataList: [],
}); });
const closeFun = () => { 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 = () => { const printElement = () => {
captureSnapshot(); const html = printInitBoxRef.value.innerHTML;
// DOM HTML const options = {
tableAutoSize: true,
defaultStyles: {
title: { fontSize: 14 },
},
}; };
// const content = htmlToPdfmake(html, options);
const captureSnapshot = async () => { var i = 0
const canvas = await html2canvas(ceshiRef.value, { const docDefinition = {
allowTaint: true, // content: content,
useCORS: true, // 使 CORS pageSize: 'A4', //
scale: 2, // pageOrientation: 'landscape', //
width: ceshiRef.value.clientWidth, pageMargins: [40, 10, 40, 40], // [, , , ]
height: ceshiRef.value.clientHeight, footer: function (currentPage: any, pageCount: any) {
}); return { text: `${pageCount}-${currentPage}`, alignment: 'center' };
state.snapshotUrl = canvas.toDataURL('image/png'); },
printJS({ defaultStyle: {
printable: state.snapshotUrl, font: 'AlibabaPuHuiTi',
type: 'image', },
style: ` pageBreakBefore: (node:any) =>{
@page { if(node.style && node.style.indexOf('title') !== -1 ){
size: auto; i++
margin: 0mm; console.log(i)
if(i > 1){
return true
}
} }
body {
margin: 0;
padding: 36px;
} }
`,
});
}; };
pdfMake.createPdf(docDefinition).print();
};
defineExpose({
closeFun,
showFun,
});
</script> </script>
<style scoped lang="scss"> <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 { .btnList {
margin-top: 26px; margin-top: 26px;
display: flex; display: flex;
justify-content: center; 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> </style>

View File

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

View File

@ -96,7 +96,6 @@ const state = reactive({
pageSize: 25, pageSize: 25,
}, },
option: { option: {
height: computed(() => window.innerHeight - window.innerHeight * 0.23 + ''),
tip: false, tip: false,
index: true, index: true,
menuWidth: 120, menuWidth: 120,
@ -143,7 +142,7 @@ const state = reactive({
], ],
width: '90', 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.unreceivedQTY')), prop: 'notSendQty', width: '110' },
{ label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '160' }, { label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '160' },
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '160' }, { label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '160' },
@ -446,6 +445,10 @@ onMounted(() => {
:deep(.el-form) { :deep(.el-form) {
flex: 1; flex: 1;
overflow: hidden;
}
:deep(.el-table--default){
height: 100%;
} }
.system-user-container { .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" /> <el-input style="width: 300px" v-model="state.f_VHUB_Text" :placeholder="t('message.index.invoiceNumber')" size="default" />
</div> </div>
<div style="display: flex; align-items: center; margin-bottom: 16px;margin-left: 32px"> <div style="display: flex; align-items: center; margin-bottom: 16px;margin-left: 32px">
<div>发票日期</div> <div>{{ t('message.index.fprq') }}</div>
<el-date-picker <el-date-picker
v-model="state.f_URXD_Date" v-model="state.f_URXD_Date"
type="date" type="date"
@ -33,6 +33,18 @@
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
/> />
</div> </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> </div>
</template> </template>
</avue-crud> </avue-crud>
@ -66,6 +78,7 @@ const state = reactive({
loading: false, loading: false,
f_VHUB_Text: '', f_VHUB_Text: '',
f_URXD_Date: '', f_URXD_Date: '',
faHuoDate:'',
fSupplierLot: '', fSupplierLot: '',
dialogVisible: true, dialogVisible: true,
data: [], data: [],
@ -90,7 +103,7 @@ const state = reactive({
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '180' }, { label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '180' },
{ label: computed(() => t('message.index.unit')), prop: 'unitName' }, { label: computed(() => t('message.index.unit')), prop: 'unitName' },
{ label: computed(() => t('message.index.qty')), prop: 'qty' }, { 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.unreceivedQTY')), prop: 'notSendQtyText' },
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' }, { label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'notSendQty', width: '180' }, { label: computed(() => t('message.index.shipmentQTY')), prop: 'notSendQty', width: '180' },
@ -114,17 +127,20 @@ watch(
const batchAddInvoiceOrderFun = () => { const batchAddInvoiceOrderFun = () => {
if(Local.get('setUserInfo').ifForeign === 1){ if(Local.get('setUserInfo').ifForeign === 1){
if(state.f_VHUB_Text === ''){ if(state.f_VHUB_Text === ''){
ElMessage.error('请填写发票号') ElMessage.error(t('message.index.qtxfph'))
return return
} }
if(state.f_URXD_Date === ''){ if(state.f_URXD_Date === ''){
ElMessage.error('请选择发票日期') ElMessage.error(t('message.index.qtxfph'))
return
}
if(state.faHuoDate === ''){
ElMessage.error(t('message.index.deliveryDate'))
return return
} }
} }
if (props.listData.length != 0) { if (props.listData.length != 0) {
state.loading = true; state.loading = true;
console.log(props.listData);
let arr: any = []; let arr: any = [];
props.listData.forEach((item: any) => { props.listData.forEach((item: any) => {
arr.push({ arr.push({
@ -134,7 +150,7 @@ const batchAddInvoiceOrderFun = () => {
}); });
}); });
listApi() 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) => { .then((res: any) => {
state.loading = false; state.loading = false;
if (res.resultCode === 0) { if (res.resultCode === 0) {

View File

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

View File

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

View File

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

View File

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