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