更新打印
This commit is contained in:
parent
bebcd47310
commit
e3b4329138
|
|
@ -23,9 +23,6 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<vxe-toolbar ref="xToolbar" custom>
|
<vxe-toolbar ref="xToolbar" custom>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<a-button type="primary" icon="delete" @click="pageDelete()">批量删除</a-button>
|
<a-button type="primary" icon="delete" @click="pageDelete()">批量删除</a-button>
|
||||||
|
|
@ -36,7 +33,6 @@
|
||||||
<vxe-grid ref='xGrid' v-bind="gridOptions">
|
<vxe-grid ref='xGrid' v-bind="gridOptions">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<template #role="{ row }">
|
<template #role="{ row }">
|
||||||
<div v-if="row && row.user_role" class="roles">
|
<div v-if="row && row.user_role" class="roles">
|
||||||
<a-tag v-for="item in row.user_role" :key="row.id + '_' + item.id">{{ item.name }}</a-tag>
|
<a-tag v-for="item in row.user_role" :key="row.id + '_' + item.id">{{ item.name }}</a-tag>
|
||||||
|
|
@ -44,8 +40,12 @@
|
||||||
</template>
|
</template>
|
||||||
<template #op="{ row }">
|
<template #op="{ row }">
|
||||||
<div class="oplinks">
|
<div class="oplinks">
|
||||||
<a @click.stop="pageEdit(row)" title="编辑"><a-icon type="edit" /></a>
|
<a @click.stop="pageEdit(row)" title="编辑">
|
||||||
<a @click.stop="pageDelete(row)" title="删除"><a-icon type="delete" /></a>
|
<a-icon type="edit"/>
|
||||||
|
</a>
|
||||||
|
<a @click.stop="pageDelete(row)" title="删除">
|
||||||
|
<a-icon type="delete"/>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #op2="{ row }">
|
<template #op2="{ row }">
|
||||||
|
|
@ -133,6 +133,7 @@ export default {
|
||||||
start_time: 0,
|
start_time: 0,
|
||||||
end_time: 0,
|
end_time: 0,
|
||||||
|
|
||||||
|
|
||||||
//搜索区
|
//搜索区
|
||||||
searchFormData: {
|
searchFormData: {
|
||||||
name: '',
|
name: '',
|
||||||
|
|
@ -144,7 +145,6 @@ export default {
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
searchFormItems: [
|
searchFormItems: [
|
||||||
{field: 'name', title: '名称', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入名称'}}},
|
{field: 'name', title: '名称', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入名称'}}},
|
||||||
{field: 'nick_name', title: '昵称', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入昵称'}}},
|
{field: 'nick_name', title: '昵称', span: 5, itemRender: {name: '$input', props: {placeholder: '请输入昵称'}}},
|
||||||
|
|
@ -158,7 +158,6 @@ export default {
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//数据区
|
//数据区
|
||||||
gridOptions: {
|
gridOptions: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
|
@ -271,7 +270,9 @@ export default {
|
||||||
let row = this.$refs.xGrid.getCurrentRecord();
|
let row = this.$refs.xGrid.getCurrentRecord();
|
||||||
if (!row) {
|
if (!row) {
|
||||||
let rows = this.$refs.xGrid.getCheckboxRecords();
|
let rows = this.$refs.xGrid.getCheckboxRecords();
|
||||||
if (rows && rows.length) { row = rows[0]; }
|
if (rows && rows.length) {
|
||||||
|
row = rows[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
},
|
},
|
||||||
|
|
@ -418,8 +419,7 @@ export default {
|
||||||
roleDataInit() { // 角色数据初始化
|
roleDataInit() { // 角色数据初始化
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: this.actions.roleList,
|
url: this.actions.roleList,
|
||||||
data: {
|
data: {}
|
||||||
}
|
|
||||||
}).then(a => {
|
}).then(a => {
|
||||||
this.roleData = a.data.Role;
|
this.roleData = a.data.Role;
|
||||||
|
|
||||||
|
|
@ -431,8 +431,7 @@ export default {
|
||||||
|
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: this.actions.permissionList,
|
url: this.actions.permissionList,
|
||||||
data: {
|
data: {}
|
||||||
}
|
|
||||||
}).then(a => {
|
}).then(a => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
a.data.BasePermission.forEach(item => {
|
a.data.BasePermission.forEach(item => {
|
||||||
|
|
@ -562,15 +561,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 监听属性
|
// 监听属性
|
||||||
watch: {
|
watch: {}
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.page-body {
|
.page-body {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="page-body">
|
<div class="page-body">
|
||||||
|
|
||||||
<a-button type="primary" icon="eye" @click="preView">
|
<a-button type="primary" icon="eye" @click="preView">
|
||||||
预览
|
打印预览
|
||||||
</a-button>
|
</a-button>
|
||||||
<h2> {{ title }}</h2>
|
<h2> {{ title }}</h2>
|
||||||
<!-- <vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"-->
|
<!-- <vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"-->
|
||||||
|
|
@ -213,6 +213,7 @@ import BASE_URL from '@/services/mes/api.js';
|
||||||
import XEUtils from 'xe-utils' // 加载xe-utils
|
import XEUtils from 'xe-utils' // 加载xe-utils
|
||||||
import printPreview from './preview'
|
import printPreview from './preview'
|
||||||
import providers from './providers'
|
import providers from './providers'
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
let hiprintTemplate;
|
let hiprintTemplate;
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -233,6 +234,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState('account', ['project', 'company']), // 获取项目信息,公司信息
|
||||||
desc() {
|
desc() {
|
||||||
return this.$t('editPageDesc')
|
return this.$t('editPageDesc')
|
||||||
},
|
},
|
||||||
|
|
@ -573,7 +575,23 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
let {width} = this.curPaper
|
let {width} = this.curPaper
|
||||||
this.$refs.preView.show(hiprintTemplate, {}, width)
|
|
||||||
|
this.formOptions.data.table = [
|
||||||
|
{
|
||||||
|
|
||||||
|
"code": this.formOptions.data.product_detail.code,
|
||||||
|
"name": this.formOptions.data.product_detail.name,
|
||||||
|
"spec": this.formOptions.data.product_detail.spec,
|
||||||
|
"unit": this.formOptions.data.product_detail.unit,
|
||||||
|
"out_stock": this.formOptions.data.out_stock,
|
||||||
|
"price": this.formOptions.data.price,
|
||||||
|
"total_price": this.formOptions.data.total_price,
|
||||||
|
"remark": this.formOptions.data.remark,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
this.formOptions.data.companyTitle = this.company.company_info.name + "送货单"
|
||||||
|
console.log("this.formOptions.data", this.formOptions.data)
|
||||||
|
this.$refs.preView.show(hiprintTemplate, this.formOptions.data, width)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,7 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "edit"
|
default: "edit"
|
||||||
},
|
},
|
||||||
dataId: {
|
dataId: {}
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -74,10 +73,31 @@ export default {
|
||||||
// 表单项
|
// 表单项
|
||||||
items: [
|
items: [
|
||||||
|
|
||||||
{ field: 'stock', dataRule: { type: 'number' }, title: '出库数量', span: 12, itemRender: { name: '$input' , props: { type: "number" }} },
|
{
|
||||||
|
field: 'stock',
|
||||||
|
dataRule: {type: 'number'},
|
||||||
|
title: '出库数量',
|
||||||
|
span: 12,
|
||||||
|
itemRender: {name: '$input', props: {type: "number"}}
|
||||||
|
},
|
||||||
{field: 'out_type', title: '出库类型', span: 12, itemRender: {name: '$input'}},
|
{field: 'out_type', title: '出库类型', span: 12, itemRender: {name: '$input'}},
|
||||||
{ field: 'out_time', dataRule: { type: 'timestamp' }, title: '出库时间', span: 12, itemRender: { name: '$input' , props: { type: "date" }} },
|
{
|
||||||
{ field: 'bill_date', dataRule: { type: 'timestamp' }, title: '单据日期', span: 12, itemRender: { name: '$input', props: { type: "date" } } },
|
field: 'out_time',
|
||||||
|
dataRule: {type: 'timestamp'},
|
||||||
|
title: '出库时间',
|
||||||
|
span: 12,
|
||||||
|
itemRender: {name: '$input', props: {type: "date"}}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'bill_date',
|
||||||
|
dataRule: {type: 'timestamp'},
|
||||||
|
title: '单据日期',
|
||||||
|
span: 12,
|
||||||
|
itemRender: {name: '$input', props: {type: "date"}}
|
||||||
|
},
|
||||||
|
{field: 'customer_name', title: '客户名称', span: 12, itemRender: {name: '$input'}},
|
||||||
|
{field: 'customer_phone', title: '客户电话', span: 12, itemRender: {name: '$input'}},
|
||||||
|
{field: 'customer_address', title: '客户地址', span: 12, itemRender: {name: '$input'}},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '出库人', span: 12,
|
title: '出库人', span: 12,
|
||||||
|
|
@ -128,8 +148,13 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
{ field: 'check_time', dataRule: { type: 'timestamp' }, title: '验货时间', span: 12, itemRender: { name: '$input', props: { type: "date" } } },
|
field: 'check_time',
|
||||||
|
dataRule: {type: 'timestamp'},
|
||||||
|
title: '验货时间',
|
||||||
|
span: 12,
|
||||||
|
itemRender: {name: '$input', props: {type: "date"}}
|
||||||
|
},
|
||||||
|
|
||||||
{field: 'delivery_no', title: '发货单号', span: 12, itemRender: {name: '$input'}},
|
{field: 'delivery_no', title: '发货单号', span: 12, itemRender: {name: '$input'}},
|
||||||
|
|
||||||
|
|
@ -139,11 +164,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 新增模式表单项
|
// 新增模式表单项
|
||||||
addModeItems: [
|
addModeItems: [],
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -197,14 +218,11 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 函数
|
// 函数
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取路由的id参数
|
// 获取路由的id参数
|
||||||
getDataId() {
|
getDataId() {
|
||||||
let dataId = this.dataId;
|
let dataId = this.dataId;
|
||||||
|
|
@ -230,13 +248,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
ok() {
|
ok() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let save = () => {
|
let save = () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -249,7 +264,6 @@ export default {
|
||||||
postdata.stock_pos_id = this.getDataId_BigInt();
|
postdata.stock_pos_id = this.getDataId_BigInt();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 提交数据
|
// 提交数据
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: this.actions.save,
|
url: this.actions.save,
|
||||||
|
|
@ -266,7 +280,6 @@ export default {
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$mk.error(a.msg || a.message);
|
this.$mk.error(a.msg || a.message);
|
||||||
}
|
}
|
||||||
|
|
@ -278,7 +291,6 @@ export default {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 验证表单
|
// 验证表单
|
||||||
this.$mk.validateForm({form: this.$refs.xForm}).then(() => { // 验证表单
|
this.$mk.validateForm({form: this.$refs.xForm}).then(() => { // 验证表单
|
||||||
|
|
||||||
|
|
@ -300,9 +312,7 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
// 监听属性
|
// 监听属性
|
||||||
watch: {
|
watch: {}
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
"fontWeight": "700",
|
"fontWeight": "700",
|
||||||
"textAlign": "center",
|
"textAlign": "center",
|
||||||
"hideTitle": true,
|
"hideTitle": true,
|
||||||
"title": "凤翔模具厂送货单",
|
"title": "送货单",
|
||||||
|
"field": "companyTitle",
|
||||||
"right": 420.75,
|
"right": 420.75,
|
||||||
"bottom": 48.74609375,
|
"bottom": 48.74609375,
|
||||||
"vCenter": 292.5,
|
"vCenter": 292.5,
|
||||||
|
|
@ -53,7 +54,8 @@
|
||||||
"top": 67.5,
|
"top": 67.5,
|
||||||
"height": 9.75,
|
"height": 9.75,
|
||||||
"width": 120,
|
"width": 120,
|
||||||
"title": "客户名称:"
|
"title": "客户名称:",
|
||||||
|
"field": "customer_name"
|
||||||
},
|
},
|
||||||
"printElementType": {
|
"printElementType": {
|
||||||
"title": "文本",
|
"title": "文本",
|
||||||
|
|
@ -67,6 +69,7 @@
|
||||||
"height": 9.75,
|
"height": 9.75,
|
||||||
"width": 120,
|
"width": 120,
|
||||||
"title": "联系方式:",
|
"title": "联系方式:",
|
||||||
|
"field": "customer_phone",
|
||||||
"right": 285.4921875,
|
"right": 285.4921875,
|
||||||
"bottom": 82.5,
|
"bottom": 82.5,
|
||||||
"vCenter": 225.4921875,
|
"vCenter": 225.4921875,
|
||||||
|
|
@ -82,8 +85,9 @@
|
||||||
"left": 287.5,
|
"left": 287.5,
|
||||||
"top": 67.5,
|
"top": 67.5,
|
||||||
"height": 9.75,
|
"height": 9.75,
|
||||||
"width": 120,
|
"width": 320,
|
||||||
"title": "客户地址:",
|
"title": "客户地址:",
|
||||||
|
"field": "customer_address",
|
||||||
"right": 408.24609375,
|
"right": 408.24609375,
|
||||||
"bottom": 83.25,
|
"bottom": 83.25,
|
||||||
"vCenter": 348.24609375,
|
"vCenter": 348.24609375,
|
||||||
|
|
@ -148,7 +152,7 @@
|
||||||
{
|
{
|
||||||
"width": 86.76923076923077,
|
"width": 86.76923076923077,
|
||||||
"title": "商品编号",
|
"title": "商品编号",
|
||||||
"field": "data.product_stock_log.product_detail.code",
|
"field": "code",
|
||||||
"checked": true,
|
"checked": true,
|
||||||
"columnId": "code",
|
"columnId": "code",
|
||||||
"fixed": false,
|
"fixed": false,
|
||||||
|
|
@ -159,7 +163,7 @@
|
||||||
{
|
{
|
||||||
"width": 111.19956476421586,
|
"width": 111.19956476421586,
|
||||||
"title": "商品名称",
|
"title": "商品名称",
|
||||||
"field": "data.product_stock_log.product_detail.name",
|
"field": "name",
|
||||||
"checked": true,
|
"checked": true,
|
||||||
"columnId": "name",
|
"columnId": "name",
|
||||||
"fixed": false,
|
"fixed": false,
|
||||||
|
|
@ -299,15 +303,16 @@
|
||||||
"left": 25,
|
"left": 25,
|
||||||
"top": 197.5,
|
"top": 197.5,
|
||||||
"height": 9.75,
|
"height": 9.75,
|
||||||
"width": 120,
|
"width": 320,
|
||||||
"title": "制单人:吴淑银",
|
"title": "制单人",
|
||||||
|
"field": "create_name",
|
||||||
"right": 145.2421875,
|
"right": 145.2421875,
|
||||||
"bottom": 207.24609375,
|
"bottom": 207.24609375,
|
||||||
"vCenter": 85.2421875,
|
"vCenter": 85.2421875,
|
||||||
"hCenter": 202.37109375,
|
"hCenter": 202.37109375,
|
||||||
"coordinateSync": false,
|
"coordinateSync": false,
|
||||||
"widthHeightSync": false,
|
"widthHeightSync": false,
|
||||||
"fontSize": 18,
|
"fontSize": 14,
|
||||||
"qrCodeLevel": 0
|
"qrCodeLevel": 0
|
||||||
},
|
},
|
||||||
"printElementType": {
|
"printElementType": {
|
||||||
|
|
@ -317,7 +322,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"options": {
|
"options": {
|
||||||
"left": 395,
|
"left": 450,
|
||||||
"top": 197.5,
|
"top": 197.5,
|
||||||
"height": 9.75,
|
"height": 9.75,
|
||||||
"width": 120,
|
"width": 120,
|
||||||
|
|
@ -328,7 +333,7 @@
|
||||||
"hCenter": 200.12109375,
|
"hCenter": 200.12109375,
|
||||||
"coordinateSync": false,
|
"coordinateSync": false,
|
||||||
"widthHeightSync": false,
|
"widthHeightSync": false,
|
||||||
"fontSize": 18,
|
"fontSize": 14,
|
||||||
"qrCodeLevel": 0
|
"qrCodeLevel": 0
|
||||||
},
|
},
|
||||||
"printElementType": {
|
"printElementType": {
|
||||||
|
|
@ -338,7 +343,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"options": {
|
"options": {
|
||||||
"left": 192.5,
|
"left": 320,
|
||||||
"top": 197.5,
|
"top": 197.5,
|
||||||
"height": 9.75,
|
"height": 9.75,
|
||||||
"width": 120,
|
"width": 120,
|
||||||
|
|
@ -349,7 +354,7 @@
|
||||||
"hCenter": 202.125,
|
"hCenter": 202.125,
|
||||||
"coordinateSync": false,
|
"coordinateSync": false,
|
||||||
"widthHeightSync": false,
|
"widthHeightSync": false,
|
||||||
"fontSize": 18,
|
"fontSize": 14,
|
||||||
"qrCodeLevel": 0
|
"qrCodeLevel": 0
|
||||||
},
|
},
|
||||||
"printElementType": {
|
"printElementType": {
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,6 @@ export default {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
show(hiprintTemplate, printData, width = '210') {
|
show(hiprintTemplate, printData, width = '210') {
|
||||||
console.log("hiprintTemplate:", hiprintTemplate)
|
|
||||||
console.log("hiprintTemplate.getHtml(printData):", hiprintTemplate.getHtml())
|
|
||||||
console.log("printData:", printData)
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.spinning = true
|
this.spinning = true
|
||||||
this.width = hiprintTemplate.editingPanel ? hiprintTemplate.editingPanel.width : width;
|
this.width = hiprintTemplate.editingPanel ? hiprintTemplate.editingPanel.width : width;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue