Browse Source

2023-07-27 异常反馈图片上传

master
杨奉源 3 years ago
parent
commit
7c95c7f123
  1. 3
      src/api/production/abnormal.js
  2. 7
      src/api/schedule/com_feed_back_upload_file.js
  3. 39
      src/utils/httpRequest.js
  4. 331
      src/views/modules/knifemold/tool-info.vue
  5. 43
      src/views/modules/knifemold/toolOperatorRecord.vue
  6. 108
      src/views/modules/print/label/print_tool_label_preview.js
  7. 202
      src/views/modules/schedule/abnormalFeedBack.vue
  8. 141
      src/views/modules/schedule/feed_back_upload_file.vue

3
src/api/production/abnormal.js

@ -7,3 +7,6 @@ export const saveAbnormalData=data => createAPI(`abnormal/saveAbnormalData`, 'po
export const saveAbnormalDetail=data => createAPI(`abnormal/saveAbnormalDetail`, 'post', data);
export const openFeedBack=data => createAPI(`abnormal/openFeedBack`, 'post', data);
export const closeFeedBack=data => createAPI(`abnormal/closeFeedBack`, 'post', data);
export const deleteObjectFile= data => createAPI(`abnormal/deleteObjectFile`,'post',data)
export const downLoadObjectFile = data => createAPI(`abnormal/downLoadObjectFile?id=`+data.id,'post',777)

7
src/api/schedule/com_feed_back_upload_file.js

@ -0,0 +1,7 @@
import { createAPI } from "@/utils/httpRequest.js";
/*图片上传*/
export const uploadFeedBackFile = data => createAPI('/sys/file/upload','post',data)
/*查询设备的文件内容*/
export const getFileContentList = data => createAPI('sys/file/getSysFileByOrderRef2','post',data)

39
src/utils/httpRequest.js

@ -111,7 +111,39 @@ instance.interceptors.response.use(response => {
return Promise.reject(error)
})
// ============================= 下载功能的请求 =============================
const instance2 = axios.create({
baseURL: (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl),
timeout: 10000 * 30,
withCredentials: true,
responseType: 'blob',
headers: {
'Content-Type': 'application/json; charset=utf-8'
}
})
/**
* 请求拦截
*/
instance2.interceptors.request.use(config => {
config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
return config
}, error => {
return Promise.reject(error)
})
/**
* 响应拦截
*/
instance2.interceptors.response.use(response => {
if (response.data && response.data.code === 401) { // 401, token失效
clearLoginInfo()
router.push({name: 'login'})
}
return response
}, error => {
return Promise.reject(error)
})
export const createAPI = (url, method, data) => {
@ -121,6 +153,13 @@ export const createAPI = (url, method, data) => {
} else {
config.data = data
}
if (data === 777){ // 下载功能的请求
return instance2({
url,
method,
...config
})
}
return instance({
url,
method,

331
src/views/modules/knifemold/tool-info.vue

@ -80,7 +80,7 @@
<el-button @click="initToolModel('copy')" type="primary">复制</el-button>
<el-button @click="initToolModel('N')" type="primary">编辑</el-button>
<el-button @click="printMethod('Y')" type="primary">工具标签</el-button>
<el-button @click="printMethod('N')" type="primary">网版</el-button>
<!-- <el-button @click="printMethod('N')" type="primary">网版</el-button>-->
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="95px">
@ -300,11 +300,12 @@
</el-form>
<el-table
width="100%"
:height="height+50"
:height="height-40"
:data="toolOperatorDataList"
border
v-loading="dataListLoading"
style="width: 100%;">
style="width: 100%;"
:key="myTable">
<el-table-column
v-for="(item,index) in toolColumnList" :key="index"
:sortable="item.columnSortable"
@ -326,7 +327,7 @@
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[100, 200, 500]"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
@ -472,6 +473,9 @@ import {
} from '@/api/knifemold/tool-info.js'
import {printToolData} from '@/api/knifemold/receive.js'
import {searchProcessRouteTool} from '@/api/base/productProcessRoute.js'
import {
printToolLabelPreview,
} from "@/views/modules/print/label/print_tool_label_preview.js"
var functionId = '106001003'
export default {
components: {
@ -508,36 +512,36 @@ export default {
actualUseQty: 0,
createDate: '',
createdBy: this.$store.state.user.name,
description: null,
description: '',
estUseQty: 0,
inspectDuration: null,
lastUpdateBy: null,
latestInspectDate: null,
latestUseDate: null,
locationId: null,
inspectDuration: '',
lastUpdateBy: '',
latestInspectDate: '',
latestUseDate: '',
locationId: '',
phaseInDate: '',
phaseOutDate: '',
purchaseDate: '',
remark: '',
site: this.$store.state.user.site,
status: '',
statusRef: null,
steelSeal: null,
statusRef: '',
steelSeal: '',
strCreateDate: '',
strLatestInspectDate: null,
strLatestUseDate: null,
strLatestInspectDate: '',
strLatestUseDate: '',
strPhaseInDate: '',
strPhaseOutDate: '',
strPurchaseDate: '',
supplierId: '',
supplierName: '',
toolDescription: null,
toolDescription: '',
toolId: '',
toolIndex: null,
toolIndex: '',
toolInstanceId: '',
torNumacc: null,
torNumdown: null,
workCenterNo: null
torNumacc: '',
torNumdown: '',
workCenterNo: ''
},
setUp: {
toolEditFlag: false,
@ -610,49 +614,49 @@ export default {
detailList: [],
headerData: {
active: '',
codeNo: null,
codeNo: '',
createDate: '',
createdBy: '',
defaultLocationId: null,
defaultWarehouseId: null,
familyId: null,
familyName: null,
lastUpdateBy: null,
partCreatedFlag: null,
partNo: null,
remark: null,
defaultLocationId: '',
defaultWarehouseId: '',
familyId: '',
familyName: '',
lastUpdateBy: '',
partCreatedFlag: '',
partNo: '',
remark: '',
site: this.$store.state.user.site,
spec: null,
standardCost: null,
spec: '',
standardCost: '',
strActive: '',
strCreateDate: '',
strPartCreated: '',
toolDescription: '',
toolId: '',
umid: null
umid: ''
},
editHeaderData: {
active: '',
codeNo: null,
codeNo: '',
createDate: '',
createdBy: '',
defaultLocationId: null,
defaultWarehouseId: null,
familyId: null,
familyName: null,
lastUpdateBy: null,
partCreatedFlag: null,
partNo: null,
remark: null,
defaultLocationId: '',
defaultWarehouseId: '',
familyId: '',
familyName: '',
lastUpdateBy: '',
partCreatedFlag: '',
partNo: '',
remark: '',
site: this.$store.state.user.site,
spec: null,
standardCost: null,
spec: '',
standardCost: '',
strActive: '',
strCreateDate: '',
strPartCreated: '',
toolDescription: '',
toolId: '',
umid: null
umid: ''
},
site: this.$store.state.user.site,
// table
@ -1075,7 +1079,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -1120,6 +1124,18 @@ export default {
status: true,
fixed: false
},
{
columnProp: 'supplierName',
headerAlign: 'center',
align: 'center',
columnLabel: '供应商名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
@ -1185,7 +1201,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -1233,7 +1249,7 @@ export default {
{
columnProp: 'transPrice',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '维修金额',
columnHidden: false,
columnImage: false,
@ -1307,7 +1323,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -1344,7 +1360,19 @@ export default {
columnProp: 'supplierId',
headerAlign: 'center',
align: 'center',
columnLabel: '借用部门',
columnLabel: '借用部门编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierName',
headerAlign: 'center',
align: 'center',
columnLabel: '借用部门名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1417,7 +1445,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -1515,7 +1543,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -1560,6 +1588,18 @@ export default {
status: true,
fixed: false
},
{
columnProp: 'supplierName',
headerAlign: 'center',
align: 'center',
columnLabel: '机台名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'remark',
headerAlign: 'center',
@ -1625,7 +1665,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -1706,7 +1746,8 @@ export default {
status: true,
fixed: false
}
]
],
myTable: 0
}
},
watch: {
@ -1755,7 +1796,7 @@ export default {
/**
* 工具实例操作记录内容改变事件
*/
toolOperatorChange() {
async toolOperatorChange() {
let queryData = {
limit: this.pageSize,
page: this.pageIndex,
@ -1763,22 +1804,26 @@ export default {
site: this.site,
toolInstanceId: this.currentDetailData.toolInstanceId
}
queryToolOperatorRecord(queryData).then(({data}) => {
await queryToolOperatorRecord(queryData).then(({data}) => {
if (data.code === 0) {
if (queryData.typeFlag === 'TR' || queryData.typeFlag === 'TJF' || queryData.typeFlag === 'TB' || queryData.typeFlag === 'TLF') {
this.toolColumnList = this.toolBorrowingReturnList;
this.toolColumnList = this.toolBorrowingReturnList
} else if (queryData.typeFlag === 'TW') {
this.toolColumnList = this.toolRepairList;
this.toolColumnList = this.toolRepairList
} else if (queryData.typeFlag === 'TWF') {
this.toolColumnList = this.toolRepairReturnList;
this.toolColumnList = this.toolRepairReturnList
} else if (queryData.typeFlag === 'TJ') {
this.toolColumnList = this.toolBorrowingList;
this.toolColumnList = this.toolBorrowingList
} else if (queryData.typeFlag === 'TC') {
this.toolColumnList = this.toolOutOfLibraryList;
this.toolColumnList = this.toolOutOfLibraryList
} else if (queryData.typeFlag === 'TL') {
this.toolColumnList = this.toolRequisitionList;
this.toolColumnList = this.toolRequisitionList
}
this.toolOperatorDataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.myTable++
}
})
},
@ -1859,89 +1904,97 @@ export default {
toolInstanceId: this.currentDetailData.toolInstanceId
}
printDataList.push(printData)
if (val === 'Y') {
this.labelPrintGJ(printDataList)
} else {
this.labelPrintWB(printDataList)
}
this.labelPrintGJ(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()
labelPrintGJ(row) {
let array = [];
let data = {
toolId: row[0].toolId,
toolInstanceId: row[0].toolInstanceId,
spec: row[0].spec,
locationId: row[0].locationId
}
array.push(data)
console.log(array)
printToolLabelPreview(array);
},
// 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()
// }
// },
getBaseData(val) {
if (this.tagNo === 70) {
this.headerData.toolId = val.ToolID
@ -1977,6 +2030,7 @@ export default {
if (val === 7) {
strVal = this.editHeaderData.umid
}
console.log(this.editHeaderData.familyId)
this.$refs.baseList.init(val, strVal)
})
},
@ -2059,7 +2113,6 @@ export default {
}
},
saveAndUpdateToolHeader() {
console.log(this.$store.state.user.site)
if (!this.editHeaderData.toolId) {
this.$message.warning('工具编号不能为空,请选择')
return

43
src/views/modules/knifemold/toolOperatorRecord.vue

@ -53,7 +53,8 @@
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
style="width: 100%;"
:key="myTable">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
@ -65,7 +66,7 @@
: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.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>
@ -75,7 +76,7 @@
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[100, 200, 500]"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
@ -105,7 +106,7 @@ export default {
typeFlag: 'TR'
},
pageIndex: 1,
pageSize: 100,
pageSize: 20,
totalPage: 0,
//
dataList: [],
@ -146,7 +147,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -268,7 +269,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -316,7 +317,7 @@ export default {
{
columnProp: 'transPrice',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '维修金额',
columnHidden: false,
columnImage: false,
@ -390,7 +391,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -427,7 +428,19 @@ export default {
columnProp: 'supplierId',
headerAlign: 'center',
align: 'center',
columnLabel: '借用部门',
columnLabel: '借用部门编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'supplierName',
headerAlign: 'center',
align: 'center',
columnLabel: '借用部门名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -500,7 +513,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -598,7 +611,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -720,7 +733,7 @@ export default {
{
columnProp: 'transQty',
headerAlign: 'center',
align: 'center',
align: 'right',
columnLabel: '出入库数量',
columnHidden: false,
columnImage: false,
@ -801,7 +814,8 @@ export default {
status: true,
fixed: false
}
]
],
myTable: 0
}
},
created () {
@ -826,7 +840,6 @@ export default {
* 查询基础数据
*/
getDataList () {
this.dataListLoading = true
this.queryTool.limit = this.pageSize
this.queryTool.page = this.pageIndex
queryToolOperatorRecord (this.queryTool).then(({data}) => {
@ -848,8 +861,8 @@ export default {
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.myTable++
}
this.dataListLoading = false
})
},
// --------- ----------

108
src/views/modules/print/label/print_tool_label_preview.js

@ -0,0 +1,108 @@
/*调用js打印标签*/
import getLodop from '@/utils/LodopFuncs.js'
/*打印材料卷标签*/
export function printToolLabelPreview(printList) {
const LODOP = getLodop()
if (LODOP) {
//LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
LODOP.SET_LICENSES("", "AF8A5800B823CC8E18BCF67B925E7BF0", "", "");
// LODOP.SET_PRINTER_INDEXA("小标签打印机");
//循环调用打印机
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.PRINT_INIT("");
LODOP.SET_PRINT_PAGESIZE(0,750,200,"");
LODOP.SET_PRINT_MODE("PRINT_NOCOLLATE",1);
LODOP.ADD_PRINT_BARCODE(6,205,189,88,"QRCode",printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(0,3,76,28,"工具编码");
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(0,80,119,28,printData.toolId);
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(20,3,76,28,"实例编码");
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(20,80,119,28,printData.toolInstanceId);
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(39,3,76,28,"工具规格");
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(40,80,119,28,printData.spec);
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(58,3,76,28,"仓库/库位");
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(58,80,119,28,printData.locationId);
LODOP.SET_PRINT_STYLEA(0,"FontName","微软雅黑");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_RECT(0,0,198,75,0,1);
LODOP.ADD_PRINT_LINE(18,1,19,198,0,1);
LODOP.ADD_PRINT_LINE(38,1,39,198,0,1);
LODOP.ADD_PRINT_LINE(57,0,58,197,0,1);
LODOP.ADD_PRINT_LINE(79,72,2,73,0,1);
}
LODOP.PRINT_DESIGN();
// LODOP.PREVIEW();
// LODOP.PRINT();
console.log(printList)
}
}
// LODOP.SET_PRINT_PAGESIZE(0,1000,700,"");
// LODOP.ADD_PRINT_BARCODE(11,244,208,140,"QRCode",printData.seqNo);
// LODOP.ADD_PRINT_TEXT(58,8,108,25,"WareHouseId:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(58,110,140,25,printData.wareHouseId);
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(111,8,77,24,"BatchNo:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(111,110,140,20,printData.batchNo);
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(84,8,98,25,"LocationId:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(84,110,139,25,printData.locationId);
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(9,8,72,25,"PartNo:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(9,110,136,25,printData.partNo);
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(136,8,82,25,"OrderNo:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(136,110,141,25,printData.orderNo);
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(34,8,56,25,"Qty:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(34,110,138,24,printData.qty);
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(162,8,92,25,"TransDate:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(162,110,170,25,printData.transDate);
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.SET_PRINT_STYLEA(0,"Bold",1);
// LODOP.ADD_PRINT_TEXT(192,5,256,24,"Manufactured by A&M Polymer");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.ADD_PRINT_TEXT(192,259,109,25,"vender Code:");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.ADD_PRINT_TEXT(210,5,257,35,"No.188 Taigu Road,Lili lndustrial Park,Wujiang District,Suzhou,China");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.ADD_PRINT_TEXT(246,5,407,35,"Phone: 086-0512-63678826 Email: service@husenrubber.com");
// LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
// LODOP.ADD_PRINT_LINE(186,2,187,374,0,1);

202
src/views/modules/schedule/abnormalFeedBack.vue

@ -210,15 +210,21 @@
<el-form-item :label="'生产线:'">
<el-input v-model="abnormalFeedBackData.productionLineDesc" disabled style="width: 100px"></el-input>
</el-form-item>
<el-form-item v-if="disableFlag4" :label="' '">
<el-button type="primary" @click="addUploadFileModal()">上传文件</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getFileContentData()">文件清单</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;">
<el-form-item label="异常情况描述">
<el-input v-model="abnormalFeedBackData.abnormalRemark" type="textarea" :disabled="disableFlag1" :rows="3" resize='none' style="width: 562px"></el-input>
<el-input v-model="abnormalFeedBackData.abnormalRemark" type="textarea" :disabled="disableFlag1" :rows="3" resize='none' style="width: 595px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 40px;">
<el-form-item label="处理结果">
<el-input v-model="abnormalFeedBackData.processingResult" type="textarea" :disabled="disableFlag2" :rows="3" resize='none' style="width: 562px"></el-input>
<el-input v-model="abnormalFeedBackData.processingResult" type="textarea" :disabled="disableFlag2" :rows="3" resize='none' style="width: 595px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:30px;margin-top: 50px;text-align:center">
@ -227,6 +233,46 @@
</el-footer>
</el-dialog>
<!-- 文件清单 -->
<el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="700px">
<el-table
:height="300"
:data="fileContentList"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in fileColumnList" :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-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a v-if="disableFlag2" @click="downloadFile(scope.row)">下载</a>
<a v-if="abnormalFeedBackData.status !== '已完结'" type="text" size="small" @click="deleteFile(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 上传文件的modal -->
<feedBackUploadFile ref="feedBackUploadFile" @refreshPageTables="search()" v-drag></feedBackUploadFile>
</div>
</template>
@ -239,13 +285,18 @@
saveAbnormalDetail,
openFeedBack,
closeFeedBack,
deleteObjectFile,
downLoadObjectFile
} from "@/api/production/abnormal.js"
import {getFileContentList} from '@/api/schedule/com_feed_back_upload_file.js'
import feedBackUploadFile from "./feed_back_upload_file"
export default {
components: {
feedBackUploadFile
},
name: 'AbnormalFeedBack',
data () {
return {
searchData:{
userId:this.$store.state.user.name,
startDate:'',
@ -289,16 +340,65 @@
abnormalCode:'',
abnormalRemark:'',
},
addModalFlag:false,
modalFlag:false,
disableFlag4:false,
disableFlag1:false,
disableFlag2:false,
abnormalList:[],
abnormalFeedBackData:{
},
abnormalFeedBackData:{},
fileContentList: [],
fileFlag: false,
fileColumnList: [
{
columnProp: 'fileName',
headerAlign: "center",
align: "center",
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'createdBy',
headerAlign: "center",
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'createDate',
headerAlign: "center",
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: false
},
{
columnProp: 'orderRef2',
headerAlign: "center",
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: false
},
],
}
},
mounted() {
@ -403,6 +503,92 @@
this.disableFlag4=true;
this.modalFlag=true;
},
/**
* 新增文件的modal
*/
addUploadFileModal(){
let currentData = {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
id: this.abnormalFeedBackData.id,
orderNo: this.abnormalFeedBackData.orderNo,
seqNo: this.abnormalFeedBackData.seqNo,
folder: 'abnormalFeedBack',
fileRemark: ''
};
//
this.$nextTick(() => {
this.$refs.feedBackUploadFile.init(currentData);
})
},
/**
* 刷新派设备文档的列表
*/
getFileContentData() {
let currentData = {
orderRef1: this.abnormalFeedBackData.id,
};
getFileContentList(currentData).then(({data}) => {
//
if (data && data.code === 200) {
this.fileContentList = data.rows;
} else {
this.fileContentList = [];
}
})
this.fileFlag = true;
},
/**
* 删除文件
* @param row
*/
deleteFile(row){
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteObjectFile(row).then(({data}) => {
if (data && data.code === 0) {
this.getFileContentData(row);
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
downloadFile(row){
downLoadObjectFile(row)
.then(({data}) => {
//
const blob = new Blob([data], {type: "application/octet-stream"})
//
const fileName = row.fileName
// a
const linkNode = document.createElement('a')
// adownload
linkNode.download = fileName
linkNode.style.display = 'none'
// Blob URL
linkNode.href = URL.createObjectURL(blob)
document.body.appendChild(linkNode)
//
linkNode.click()
// URL
URL.revokeObjectURL(linkNode.href)
document.body.removeChild(linkNode)
})
},
saveAbnormalDetail(){
if( this.abnormalFeedBackData.processingResult==''&&this.abnormalFeedBackData.processingResult==null){
this.$alert("请填写处理结果", '错误', {

141
src/views/modules/schedule/feed_back_upload_file.vue

@ -0,0 +1,141 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="生产订单:" >
<el-input v-model="pageData.orderNo" style="width: 120px;" disabled ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" label="派工单号:" >
<el-input v-model="pageData.seqNo" style="width: 120px;" disabled ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-upload class="customer-upload" drag
action="javascript:void(0);" ref="uploadFile" :limit="1"
:before-upload="beforeUploadHandle" :on-change="onChange"
accept="*" :auto-upload="false"
style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="margin-bottom: 30px;">
<el-form-item class="customer-item" label="备注:" >
<el-input type="textarea" style="width: 360px;" placeholder="请输入内容" v-model="pageData.fileRemark"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveUploadFile()">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
uploadFeedBackFile,
} from '@/api/schedule/com_feed_back_upload_file.js';
/* 引入组件 */
var functionId = 'C10000002';
export default {
data() {
return {
titleCon: '异常反馈文件上传',
visible: false,
folder: '',
fileList: [],
pageData: {
site: '',
username: '',
id: '',
orderNo: '',
seqNo: '',
fileRemark: '',
folder: '',
},
dataListLoading: false,
}
},
methods: {
//
init(currentRow) {
//
this.pageData = JSON.parse(JSON.stringify(currentRow));
this.folder = this.pageData.folder
//
this.visible = true
},
//
beforeUploadHandle(file) {
// if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif' && file.type !== 'application/pdf') {
// this.$message.error('PDF')
// return false
// }
// this.num++
},
/*选择上传文件时*/
onChange(file){
this.fileList.push(file);
},
/*关闭modal*/
closeDialog(){
this.fileList = [];
//
this.$emit('refreshPageTables');
//
this.visible = false;
},
/*保修当前的数据*/
saveUploadFile(){
let remark = this.pageData.fileRemark;
if(null == remark || remark == undefined){
remark = ''
}
/*判断文件是否上传*/
if(null == this.fileList || 0 === this.fileList.length){
this.$message.error("请先上传文件!");
return false;
}
const formData = new FormData();
//
formData.append("file", this.fileList[0].raw);
formData.append("folder", this.folder);
formData.append("site", this.pageData.site);
formData.append("id", this.pageData.id);
formData.append("remark", remark);
uploadFeedBackFile(formData).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg);
//
this.$refs.uploadFile.clearFiles();
this.pageData.fileRemark = '';
this.fileList = [];
}else {
this.$message.warning(data.msg);
}
})
}
},
created() {
}
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save