-
+
-
+
-
+
-
-
+
+
-
-
查询
重置
- 保存
+ 保存
@@ -44,12 +33,14 @@
-
+
+
+
- 打印标签
+ 打印标签
@@ -95,8 +86,10 @@ const state = reactive({
editOpenAccessTitle:'打印信息',
printData: [] as Array,
queryParams: {
- name: undefined,
- },
+ code: '',
+ name: '',
+ searchKey: '',
+},
tableParams: {
page: 1,
pageSize: 10,
@@ -133,14 +126,8 @@ const queryUnitByGroupId = async (groupId:number) => {
};
-const formInline = reactive({
- user: '',
- region: '',
- date: '',
-})
-
const onSubmit = () => {
- console.log('submit!')
+ MaterialsPage();
}
@@ -152,7 +139,8 @@ const pageVO1 = reactive({
const MaterialsPage = async () => {
- let res = await getAPI(MaterialsApi).apiMaterialsPagePost({ page: 1, pageSize: 10, ...formInline });
+ let params = Object.assign(state.queryParams, state.tableParams);
+ let res = await getAPI(MaterialsApi).apiMaterialsPagePost(params);//{ page: 1, pageSize: 10, ...formInline }
if (res.data.code === 200) {
pageVO1.total = res.data.result?.total!;
tableData.value = res.data.result?.items!;
diff --git a/Web/src/views/labelPrinting/print/component/hiprint/index.vue b/Web/src/views/labelPrinting/print/component/hiprint/index.vue
index f5f3096..1160451 100644
--- a/Web/src/views/labelPrinting/print/component/hiprint/index.vue
+++ b/Web/src/views/labelPrinting/print/component/hiprint/index.vue
@@ -292,7 +292,7 @@ const otherPaper = () => {
// 预览
const preView = () => {
let { width } = state.curPaper;
- preViewRef.value.showDialog(hiprintTemplate.value, printData, width);
+ preViewRef.value.showDialog(hiprintTemplate.value, printData, width);//printData
};
// 直接打印
const print = () => {
diff --git a/Web/src/views/labelPrinting/print/component/hiprint/preview.vue b/Web/src/views/labelPrinting/print/component/hiprint/preview.vue
index e4de982..5cc65da 100644
--- a/Web/src/views/labelPrinting/print/component/hiprint/preview.vue
+++ b/Web/src/views/labelPrinting/print/component/hiprint/preview.vue
@@ -32,6 +32,8 @@ const showDialog = (hiprintTemplate: any, printData: {}, width = 210) => {
previewContentRef.value.removeChild(previewContentRef.value.firstChild);
}
const newHtml = hiprintTemplate.getHtml(printData);
+ // console.log('newHtml')
+ // console.log(newHtml[0])
previewContentRef.value.appendChild(newHtml[0]);
});
};
diff --git a/Web/src/views/labelPrinting/print/component/hiprint/print-data.ts b/Web/src/views/labelPrinting/print/component/hiprint/print-data.ts
index 46900dd..608a8a6 100644
--- a/Web/src/views/labelPrinting/print/component/hiprint/print-data.ts
+++ b/Web/src/views/labelPrinting/print/component/hiprint/print-data.ts
@@ -1,17 +1,17 @@
// 打印数据
import logoImg from '/@/assets/logo.png';
export default {
- barCode: 'Admin.NET',
- qrCode: '二维码',
+ barCode: 'GuanWei',
+ qrCode: '20240516001',
longText: '长文本',
imageUrl: logoImg,
table: [
- { NAME: '测试商品01', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
- { NAME: '测试商品02', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
- { NAME: '测试商品03', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
- { NAME: '测试商品04', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
- { NAME: '测试商品05', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
- { NAME: '测试商品06', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
+ { NAME: '测试商品01', SL: 2, GG: '1*24g', TM: '2O22010100111', DJ: '6.8', JE: '13.6' },
+ { NAME: '测试商品02', SL: 2, GG: '1*24g', TM: '2O22010100112', DJ: '6.8', JE: '13.6' },
+ { NAME: '测试商品03', SL: 2, GG: '1*24g', TM: '2O22010100113', DJ: '6.8', JE: '13.6' },
+ { NAME: '测试商品04', SL: 2, GG: '1*24g', TM: '2O22010100114', DJ: '6.8', JE: '13.6' },
+ { NAME: '测试商品05', SL: 2, GG: '1*24g', TM: '2O22010100115', DJ: '6.8', JE: '13.6' },
+ { NAME: '测试商品06', SL: 2, GG: '1*24g', TM: '2O22010100116', DJ: '6.8', JE: '13.6' },
{ NAME: '测试商品07', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
{ NAME: '测试商品08', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },
{ NAME: '测试商品09', SL: 2, GG: '1*24g', TM: '2O22010100110', DJ: '6.8', JE: '13.6' },