7 changed files with 2399 additions and 6 deletions
-
7src/api/base/productProcessRoute.js
-
7src/api/knifemold/receive.js
-
58src/api/knifemold/tool-info.js
-
10src/api/userFavorite.js
-
51src/api/utils/LodopFuncs.js
-
544src/views/modules/knifemold/tool-info-list.vue
-
1728src/views/modules/knifemold/tool-info.vue
@ -0,0 +1,7 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
// ------------查询-产品工艺路线----------------
|
|||
|
|||
export const searchProductProcessRoute = data => createAPI(`/productProcessRoute/searchProductProcessRoute`, 'post', data) |
|||
// ------------查询-工艺路线工具----------------
|
|||
export const searchProcessRouteTool = data => createAPI(`/productProcessRoute/searchProcessRouteTool`, 'post', data) |
|||
|
|||
@ -0,0 +1,7 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 获取打印数据
|
|||
export const printToolData = data => createAPI(`toolMan/printToolData`, 'POST', data) |
|||
|
|||
|
|||
|
|||
@ -0,0 +1,58 @@ |
|||
import {createAPI} from '@/utils/httpRequest.js' |
|||
|
|||
// 获取工具主信息信息
|
|||
export const getToolHeaderData = data => createAPI(`toolInfo/getToolHeaderData`, 'POST', data) |
|||
|
|||
// 获取工具明细信息信息
|
|||
export const getToolDetailList = data => createAPI(`toolInfo/getToolDetailList`, 'POST', data) |
|||
|
|||
// 获取工具维护记录
|
|||
export const getToolInstanceIdUseHist = data => createAPI(`toolInfo/getToolInstanceIdUseHist`, 'POST', data) |
|||
|
|||
// 获取工具使用记录
|
|||
export const getSfdcToolingHistList = data => createAPI(`toolInfo/getSfdcToolingHistList`, 'POST', data) |
|||
|
|||
// 获取工具使用记录
|
|||
export const getToolHeaderList = data => createAPI(`toolInfo/getToolHeaderList`, 'POST', data) |
|||
|
|||
// 编辑 工具主表信息
|
|||
export const editToolHeader = data => createAPI(`toolInfo/editToolHeader`, 'POST', data) |
|||
|
|||
// 保存 工具主表信息
|
|||
export const saveToolHeader = data => createAPI(`toolInfo/saveToolHeader`, 'POST', data) |
|||
|
|||
// deleteToolHeader
|
|||
export const deleteToolHeader = data => createAPI(`toolInfo/deleteToolHeader`, 'POST', data) |
|||
|
|||
// 获取工具使用记录
|
|||
export const updateToolDetail = data => createAPI(`toolInfo/updateToolDetail`, 'POST', data) |
|||
|
|||
// 添加工具实例
|
|||
export const saveToolInfoDetail = data => createAPI(`toolInfo/saveToolInfoDetail`, 'POST', data) |
|||
|
|||
// 获取工具打印
|
|||
export const printTool = data => createAPI(`toolMan/printTool`, 'POST', data) |
|||
|
|||
// 获取工具信息
|
|||
export const getToolInfoList = data => createAPI(`toolInfo/getToolInfoList`, 'POST', data) |
|||
|
|||
// 获取出入库信息
|
|||
export const getToolTransInfoList = data => createAPI(`toolInfo/getToolTransInfoList`, 'POST', data) |
|||
|
|||
// 工具接收信息
|
|||
export const getPoReceiptList = data => createAPI(`toolInfo/getPoReceiptList`, 'POST', data) |
|||
|
|||
// 接收对账
|
|||
export const updatePoReceiptList = data => createAPI(`toolInfo/updatePoReceiptList`, 'POST', data) |
|||
|
|||
// 取消对账
|
|||
export const updatePoReceiptListR = data => createAPI(`toolInfo/updatePoReceiptListR`, 'POST', data) |
|||
|
|||
export const updateToolDetailInfo = data => createAPI(`toolInfo/updateToolDetailInfo`, 'POST', data) |
|||
|
|||
// 修改工具接收编码
|
|||
export const updateReceiveToolDetail = data => createAPI(`PRHeader/updateReceiveToolDetail`, 'POST', data) |
|||
|
|||
|
|||
|
|||
|
|||
@ -1,12 +1,10 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 收藏列表
|
|||
export const userFavoriteList = data => createAPI('userFavorite/userFavoriteList/'+data.userId+'/'+data.languageCode,"GET",data) |
|||
export const userFavoriteList = data => createAPI('userFavorite/userFavoriteList/' + data.userId + '/' + data.languageCode, 'GET', data) |
|||
|
|||
// 收藏
|
|||
export const saveUserFavorite = data => createAPI('userFavorite/save',"POST",data) |
|||
export const saveUserFavorite = data => createAPI('userFavorite/save', 'POST', data) |
|||
|
|||
// 取消收藏
|
|||
export const removeUserFavorite = data => createAPI('userFavorite/remove',"POST",data) |
|||
|
|||
export const removeUserFavorite = data => createAPI('userFavorite/remove', 'POST', data) |
|||
@ -0,0 +1,51 @@ |
|||
import { MessageBox } from 'element-ui' |
|||
|
|||
// ====页面动态加载C-Lodop云打印必须的文件CLodopfuncs.js====
|
|||
var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement |
|||
var oscript = document.createElement('script') |
|||
// 让本机的浏览器打印(更优先一点):
|
|||
oscript = document.createElement('script') |
|||
oscript.src = 'http://localhost:8000/CLodopfuncs.js?priority=2' |
|||
head.insertBefore(oscript, head.firstChild) |
|||
// 加载双端口(8000和18000)避免其中某个端口被占用:
|
|||
oscript = document.createElement('script') |
|||
oscript.src = 'http://localhost:18000/CLodopfuncs.js?priority=1' |
|||
head.insertBefore(oscript, head.firstChild) |
|||
|
|||
// 下载loadLodop
|
|||
function loadLodop () { |
|||
window.open('../../static/Lodop/CLodop_Setup_for_Win32NT.exe') |
|||
} |
|||
|
|||
// ====获取LODOP对象的主过程:====
|
|||
function getLodop () { |
|||
var LODOP |
|||
try { |
|||
LODOP = getCLodop() |
|||
// LODOP.SET_LICENSES("","13F0BE83846277CB60918577C6281375", "", ""); // 重庆的Clodop授权
|
|||
// LODOP.SET_LICENSES("","15F0BE661E9473DF7491843CB334EB3D","",""); // 苏州的Clodop授权
|
|||
// LODOP.SET_LICENSES("","7B5624CC84EF99D6B17F27DF4AF4310C", "", ""); // 越南的Clodop授权
|
|||
let lodopCode = JSON.parse(localStorage.getItem('configParams')).lodopCode |
|||
LODOP.SET_LICENSES('', lodopCode, '', '') |
|||
LODOP.SET_SHOW_MODE('LANGUAGE', 1) |
|||
if (!LODOP && document.readyState !== 'complete') { |
|||
MessageBox.alert('C-Lodop打印控件还没准备好,请稍后再试!') |
|||
return |
|||
} |
|||
return LODOP |
|||
} catch (err) { |
|||
MessageBox({ |
|||
title: '温馨提示', |
|||
type: 'warning', |
|||
showCancelButton: true, |
|||
message: '您还未安装打印控件,点击确定下载打印控件,安装成功后刷新页面即可进行打印', |
|||
callback: res => { |
|||
if (res === 'confirm') { |
|||
loadLodop() |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
|
|||
export default getLodop |
|||
@ -0,0 +1,544 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-button @click="getDataList()" type="primary">查询</el-button> |
|||
<download-excel |
|||
:fields="fields()" |
|||
:data="exportData" |
|||
type="xls" |
|||
:name="exportName" |
|||
:header="exportHeader" |
|||
:footer="exportFooter" |
|||
:defaultValue="exportDefaultValue" |
|||
:fetch="createExportData" |
|||
:before-generate="startDownload" |
|||
:before-finish="finishDownload" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
导出 |
|||
</download-excel> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form :inline="true" label-position="top"> |
|||
<el-form-item :label="'工具编码'"> |
|||
<el-input style="width: 100px" v-model="queryTool.toolId" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'工具实例编码'"> |
|||
<el-input style="width: 100px" v-model="queryTool.toolInstanceId" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'工具名称'"> |
|||
<el-input style="width: 100px" v-model="queryTool.toolDescription"></el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<span slot="label" @click="getBaseList(3,1)"><el-link>供应商编码</el-link> </span> |
|||
<el-input style="width: 100px" v-model="queryTool.supplierId"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'接收日期'"> |
|||
<el-date-picker style="width: 120px" v-model="queryTool.startDate" value-format='yyyy-MM-dd 00:00:00' format = 'yyyy-MM-dd' |
|||
></el-date-picker> - |
|||
<el-date-picker style="width: 120px" v-model="queryTool.endDate" value-format='yyyy-MM-dd 23:59:59' format = 'yyyy-MM-dd' |
|||
></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item :label="'使用比例'"> |
|||
<el-input type="number" style="width: 50px" v-model="queryTool.startProp"></el-input> - |
|||
<el-input type="number" style="width: 50px" v-model="queryTool.endProp"></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-table |
|||
:height="height" |
|||
:data="dataList" |
|||
border |
|||
v-loading="dataListLoading" |
|||
highlight-current-row> |
|||
<el-table-column |
|||
fixed="left" |
|||
header-align="center" |
|||
align="left" |
|||
width="100" |
|||
:label="'操作'"> |
|||
<template slot-scope="scope"> |
|||
<el-link @click="printMethod(scope.row,'Y')">工具标签</el-link> |
|||
<el-link @click="printMethod(scope.row,'N')">| 网版</el-link> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[100, 200, 500]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</el-col> |
|||
</el-row> |
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import getLodop from '@/utils/LodopFuncs.js' |
|||
import column from '../common/column' |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
import {getToolInfoList} from '@/api/knifemold/tool-info.js' |
|||
import {printToolData} from '@/api/knifemold/receive.js' |
|||
var functionId = '106001005' |
|||
export default { |
|||
components: {column, Chooselist}, |
|||
data () { |
|||
return { |
|||
buttons: { |
|||
search: '查询', |
|||
download: '导出' |
|||
}, |
|||
queryButton: { |
|||
functionId: functionId, |
|||
table_id: '*', |
|||
languageCode: this.$i18n.locale, |
|||
objectType: 'button' |
|||
}, |
|||
queryLabel: { |
|||
functionId: functionId, |
|||
table_id: '*', |
|||
languageCode: this.$i18n.locale, |
|||
objectType: 'label' |
|||
}, |
|||
height: 0, |
|||
// 组件显示控制 |
|||
visible: false, |
|||
showDefault: this.$store.state.user.userDev, |
|||
// 数据查询属性 |
|||
tagNo: '', |
|||
dataListLoading: false, |
|||
queryTool: { |
|||
limit: 500, |
|||
page: 1, |
|||
supplierId: '', |
|||
toolId: '', |
|||
toolInstanceId: '', |
|||
locationId: '', |
|||
toolDescription: '', |
|||
startDate: '', |
|||
endDate: '', |
|||
startProp: null, |
|||
endProp: null |
|||
}, |
|||
pageIndex: 1, |
|||
pageSize: 100, |
|||
totalPage: 0, |
|||
// 数据集 |
|||
dataList: [], |
|||
// ------------ 页面属性 ---------- |
|||
// 默认table 查询参数 |
|||
queryTable: { |
|||
functionId: this.$route.meta.menuId, |
|||
tableId: 'toolInfo', |
|||
languageCode: this.$i18n.locale |
|||
}, |
|||
// 用户table 查询参数 |
|||
queryTableUser: { |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.$route.meta.menuId, |
|||
tableId: 'toolInfo', |
|||
status: true, |
|||
languageCode: this.$i18n.locale |
|||
}, |
|||
// 展示列集 |
|||
columnList: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolDetail1101ToolId', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'toolId', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '工具编码', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: 'left', |
|||
columnWidth: 140 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolDetail1101ToolInstanceId', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'toolInstanceId', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '工具实例编码', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 140 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordtype', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'toolDescription', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '工具名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 200 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordCreateDate', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'createDate', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '接收日期', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordStatus', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'status', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '状态', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordCurrLocationId', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'currLocationId', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '库位编码', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordCurrLocationId', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'locationName', |
|||
headerAlign: 'center', |
|||
align: 'left', |
|||
columnLabel: '库位名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 160 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordActualuseQty', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'actualuseQty', |
|||
headerAlign: 'center', |
|||
align: 'right', |
|||
columnLabel: '已使用寿命', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordEstuseQty', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'estuseQty', |
|||
headerAlign: 'center', |
|||
align: 'right', |
|||
columnLabel: '预计使用寿命', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
serialNumber: 'toolOIRecordProp', |
|||
tableId: 'toolOIRecord', |
|||
tableName: 'common', |
|||
columnProp: 'prop', |
|||
headerAlign: 'center', |
|||
align: 'right', |
|||
columnLabel: '使用比例', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
} |
|||
], |
|||
// 用户table 配置集合 |
|||
userColumnList: [], |
|||
// ------------ 页面属性 end ---------- |
|||
// 导出 start |
|||
exportData: [], |
|||
exportName: this.$route.meta.title, |
|||
exportHeader: [this.$route.meta.title], |
|||
exportFooter: [], |
|||
exportDefaultValue: '' |
|||
} |
|||
}, |
|||
activated () { |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 220 |
|||
}) |
|||
}, |
|||
methods: { |
|||
printMethod (row, printType) { |
|||
let dto = { |
|||
site: this.$store.state.user.site, |
|||
toolInstanceId: row.toolInstanceId |
|||
} |
|||
printToolData(dto).then(({data}) => { |
|||
if (data.code === 0) { |
|||
let printDataList = [] |
|||
let printData = { |
|||
SupplierName: data.data.SupplierName, |
|||
createDate: data.data.createDate, |
|||
createdBy: data.data.createdBy, |
|||
estUseQty: data.data.estUseQty, |
|||
locationId: data.data.locationId, |
|||
phaseInDate: data.data.phaseInDate, |
|||
site: data.data.site, |
|||
spec: data.data.spec, |
|||
status: data.data.status, |
|||
supplierId: data.data.supplierId, |
|||
toolDescription: data.data.toolDescription, |
|||
toolId: data.data.toolId, |
|||
toolInstanceId: row.toolInstanceId |
|||
} |
|||
printDataList.push(printData) |
|||
if (printType === 'Y') { |
|||
this.labelPrintGJ(printDataList) |
|||
} else { |
|||
this.labelPrintWB(printDataList) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
labelPrintWB (printDataList) { |
|||
const LODOP = getLodop() |
|||
if (LODOP) { |
|||
// 循环调用打印机 |
|||
for (let i = 0; i < printDataList.length; i++) { |
|||
let printData = printDataList[i] |
|||
LODOP.NewPage() |
|||
LODOP.SET_PRINT_PAGESIZE(0, 700, 180, '') |
|||
LODOP.SET_PRINT_MODE('PRINT_NOCOLLATE', 1) |
|||
LODOP.ADD_PRINT_RECT(2, 5, 250, 67, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(19, 5, 18, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(36, 5, 35, 205, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(54, 5, 53, 205, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(2, 65, 69, 66, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(68, 205, 18, 206, 0, 1) |
|||
LODOP.ADD_PRINT_BARCODE(21, 208, 90, 60, 'QRCode', printData.toolInstanceId) |
|||
LODOP.ADD_PRINT_TEXT(5, 9, 60, 14, '工具名称') |
|||
LODOP.ADD_PRINT_TEXT(21, 9, 60, 15, '工具编号') |
|||
LODOP.ADD_PRINT_TEXT(38, 9, 60, 15, '实例编号') |
|||
LODOP.ADD_PRINT_TEXT(55, 9, 60, 15, '经办人') |
|||
LODOP.ADD_PRINT_TEXT(4, 70, 180, 14, printData.toolDescription) |
|||
LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2) |
|||
LODOP.ADD_PRINT_TEXT(21, 71, 133, 14, printData.toolId) |
|||
LODOP.ADD_PRINT_TEXT(39, 71, 133, 14, printData.toolInstanceId) |
|||
LODOP.ADD_PRINT_TEXT(55, 71, 133, 14, printData.createdBy) |
|||
} |
|||
LODOP.PREVIEW() |
|||
} |
|||
}, |
|||
labelPrintGJ (printDataList) { |
|||
const LODOP = getLodop() |
|||
if (LODOP) { |
|||
// 循环调用打印机 |
|||
for (let i = 0; i < printDataList.length; i++) { |
|||
let printData = printDataList[i] |
|||
LODOP.NewPage() |
|||
LODOP.SET_PRINT_PAGESIZE(0, 700, 540, '') |
|||
LODOP.ADD_PRINT_RECT(6, 5, 250, 190, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(24, 5, 23, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(41, 5, 40, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(58, 5, 57, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(75, 5, 74, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(92, 5, 91, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(109, 5, 108, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(126, 5, 125, 178, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(144, 5, 143, 178, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(162, 5, 161, 178, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(179, 5, 178, 255, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(23, 65, 195, 66, 0, 1) |
|||
LODOP.ADD_PRINT_LINE(178, 177, 108, 178, 0, 1) |
|||
LODOP.ADD_PRINT_BARCODE(110, 183, 110, 85, 'QRCode', printData.toolInstanceId) |
|||
LODOP.ADD_PRINT_TEXT(9, 94, 100, 14, '工具标签') |
|||
LODOP.SET_PRINT_STYLEA(0, 'Bold', 1) |
|||
LODOP.ADD_PRINT_TEXT(26, 9, 60, 14, '工具名称') |
|||
LODOP.ADD_PRINT_TEXT(43, 9, 60, 15, '规格型号') |
|||
LODOP.ADD_PRINT_TEXT(60, 9, 60, 15, '工具编号') |
|||
LODOP.ADD_PRINT_TEXT(77, 9, 60, 15, '实例编号') |
|||
LODOP.ADD_PRINT_TEXT(94, 9, 60, 15, '厂商') |
|||
LODOP.ADD_PRINT_TEXT(111, 9, 60, 15, '入库日期') |
|||
LODOP.ADD_PRINT_TEXT(129, 9, 60, 15, '库位') |
|||
LODOP.ADD_PRINT_TEXT(147, 9, 60, 15, '经办人') |
|||
LODOP.ADD_PRINT_TEXT(181, 9, 60, 15, '检验签章') |
|||
LODOP.ADD_PRINT_TEXT(25, 72, 180, 14, printData.toolDescription) |
|||
LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2) |
|||
LODOP.ADD_PRINT_TEXT(42, 72, 180, 14, printData.spec) // 规格 |
|||
LODOP.ADD_PRINT_TEXT(60, 72, 180, 14, printData.toolId) |
|||
LODOP.ADD_PRINT_TEXT(78, 71, 180, 14, printData.toolInstanceId) |
|||
LODOP.ADD_PRINT_TEXT(94, 71, 180, 14, printData.SupplierName) |
|||
LODOP.ADD_PRINT_TEXT(111, 71, 95, 14, this.dayjs(printData.createDate).format('YYYY-MM-DD')) |
|||
LODOP.ADD_PRINT_TEXT(130, 71, 95, 14, printData.locationId) |
|||
LODOP.ADD_PRINT_TEXT(148, 71, 95, 14, printData.createdBy) |
|||
} |
|||
LODOP.PREVIEW() |
|||
} |
|||
}, |
|||
// --------------- 业务 ------------------- |
|||
getDataList () { |
|||
this.dataListLoading = true |
|||
this.queryTool.limit = this.pageSize |
|||
this.queryTool.page = this.pageIndex |
|||
getToolInfoList(this.queryTool).then(({data}) => { |
|||
if (data.code === 0) { |
|||
this.dataList = data.data.list |
|||
this.pageIndex = data.data.currPage |
|||
this.pageSize = data.data.pageSize |
|||
this.totalPage = data.data.totalCount |
|||
} |
|||
this.dataListLoading = false |
|||
}) |
|||
}, |
|||
getBaseData (val) { |
|||
if (this.tagNo === 3) { |
|||
this.queryTool.supplierId = val.SupplierID |
|||
} |
|||
}, |
|||
// 获取基础数据列表 |
|||
getBaseList (val, number) { |
|||
this.tagNo = val |
|||
this.$nextTick(() => { |
|||
let strVal = '' |
|||
if (val === 3) { |
|||
strVal = this.queryTool.supplierId |
|||
} |
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
|
|||
// --------- 分页 ---------- |
|||
// 每页数 |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
// 当前页 |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.getDataList() |
|||
}, |
|||
// --------- 分页 end ---------- |
|||
// --------- 导出 ---------- |
|||
fields () { |
|||
let json = "{" |
|||
this.columnList.forEach((item, index) => { |
|||
if (index == this.columnList.length - 1) { |
|||
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
|||
} else { |
|||
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
|||
} |
|||
}) |
|||
json += "}" |
|||
let s = eval("(" + json + ")") |
|||
return s |
|||
}, |
|||
createExportData () { |
|||
// 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据 |
|||
return this.dataList |
|||
}, |
|||
startDownload () { |
|||
}, |
|||
finishDownload () { |
|||
} |
|||
// --------- 导出 end ---------- |
|||
}, |
|||
created () { |
|||
this.getTableUserColumn() |
|||
} |
|||
} |
|||
</script> |
|||
<style> |
|||
|
|||
</style> |
|||
1728
src/views/modules/knifemold/tool-info.vue
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue