|
|
@ -0,0 +1,127 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<SearchTemplate> |
|
|
|
<el-form :inline="true" class="clearfix search-content"> |
|
|
|
<el-form-item :label="getColumnName('PrintHead-PrintHeadId')"> |
|
|
|
<el-input |
|
|
|
v-model.trim="queryParams.printheadid" |
|
|
|
placeholder="请输入查询内容" |
|
|
|
clearable |
|
|
|
style="width: 240px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button icon="el-icon-search" size="mini" class="search-button-style" @click="handleQuery">搜索</el-button> |
|
|
|
<el-button icon="el-icon-refresh" size="mini" class="reset-button-style" @click="resetQuery">重置</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</SearchTemplate> |
|
|
|
<ContentContainer> |
|
|
|
<el-table :data="tableData" v-loading="loading" size="small" style="width: 100%" border> |
|
|
|
<el-table-column v-for="(item, index) in headers" :key="index" :label="getColumnName(item)" :show-overflow-tooltip="true" width="200"> |
|
|
|
<template #default="scope"> |
|
|
|
<span v-if="item === 'PrintHead-PlantNr'">{{ getValue(scope.row['PrintHead-PlantNr']) }}</span> |
|
|
|
<span v-else-if="item === 'PrintHead-LastModify'"> {{ parseTime(scope.row[item]) }} </span> |
|
|
|
<span v-else-if="item === 'PrintHead-CreateTime'"> {{ parseTime(scope.row[item]) }} </span> |
|
|
|
<span v-else>{{ scope.row[item] }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="300" fixed="right"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button class="edit-button-style" @click="handleAgain(scope.row)" icon="el-icon-edit" size="small">重打</el-button> |
|
|
|
<el-button class="edit-button-style" @click="handleDelete(scope.row)" icon="el-icon-delete" size="small">删除</el-button> |
|
|
|
<el-button class="edit-button-style" @click="handleDetail(scope.row)" icon="el-icon-ice-cream-square" size="small">明细</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!-- 分页 --> |
|
|
|
<Pagination v-show="pagination.total>0" v-model:pagination="pagination" @change="getList" /> |
|
|
|
</ContentContainer> |
|
|
|
<AddOrEdit v-if="isShowDialog === 'edit' ? true : false" :item="item" v-model:isShowDialog="isShowDialog" @editCallBack="completeCallBack" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { ListMixin } from "@/mixins/ListMixin"; |
|
|
|
import { put } from "@/server/api.js"; |
|
|
|
import AddOrEdit from "./addOrEdit.vue"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
AddOrEdit |
|
|
|
}, |
|
|
|
mixins: [ListMixin], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
pagination: { |
|
|
|
// 分页参数 |
|
|
|
pageNumber: 1, |
|
|
|
_pageSize: 10, |
|
|
|
total: 0, |
|
|
|
}, |
|
|
|
queryTableDataUrl: "/admin/base/printhead/query", |
|
|
|
headers: [ |
|
|
|
'PrintHead-PlantNr', |
|
|
|
'PrintHead-PrintHeadId', |
|
|
|
'PrintHead-PrinterId', |
|
|
|
'PrintHead-PrintFileType', |
|
|
|
'PrintHead-PrintEventType', |
|
|
|
'PrintHead-PrintObjId', |
|
|
|
'PrintHead-PrintObjType', |
|
|
|
'PrintHead-Status', |
|
|
|
'PrintHead-TemplateFile', |
|
|
|
'PrintHead-TermId', |
|
|
|
'PrintHead-WebAddress', |
|
|
|
'PrintHead-PrintCopies', |
|
|
|
'PrintHead-PrintedTime', |
|
|
|
'PrintHead-PrintedCopies', |
|
|
|
'PrintHead-ival1', |
|
|
|
'PrintHead-ival2', |
|
|
|
'PrintHead-cval1', |
|
|
|
'PrintHead-cval2', |
|
|
|
'PrintHead-LastModify', |
|
|
|
'PrintHead-LastUser', |
|
|
|
'PrintHead-CreateTime' |
|
|
|
] |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索按钮操作 |
|
|
|
handleQuery() { |
|
|
|
this.pagination.pageNumber = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 重置按钮操作 |
|
|
|
resetQuery() { |
|
|
|
this.queryParams.printheadid = undefined |
|
|
|
this.handleQuery() |
|
|
|
}, |
|
|
|
/** 重新打印按钮操作 */ |
|
|
|
handleAgain(row) { |
|
|
|
this.$confirm('是否确认重新打印"' + row['PrintHead-PrintHeadId'] + '"的数据项?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
put('/admin/base/printhead/updateone',{ |
|
|
|
'PrintHead-PlantNr': row['PrintHead-PlantNr'], |
|
|
|
'PrintHead-PrintHeadId': row['PrintHead-PrintHeadId'], |
|
|
|
'PrintHead-Status': 'R' |
|
|
|
}).then(response => { |
|
|
|
this.getList() |
|
|
|
this.msgSuccess('提交成功') |
|
|
|
}) |
|
|
|
}).catch(function() {}) |
|
|
|
}, |
|
|
|
// 删除按钮操作 |
|
|
|
handleDelete(row) { |
|
|
|
let keyName = row['PrintHead-PrintHeadId'] |
|
|
|
let deteleUrl = `/admin/base/printhead/deleteone/${row['PrintHead-PrintHeadId']}` |
|
|
|
// 参数1:删除数据的标志,参数2:删除的接口拼接参数 |
|
|
|
this.delHanle(keyName, deteleUrl) |
|
|
|
}, |
|
|
|
handleDetail(row) { |
|
|
|
this.isShowDialog = "edit" |
|
|
|
this.item = row |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |