Browse Source
Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/views/main-sidebar.vuejava8
9 changed files with 1712 additions and 10 deletions
-
5src/api/ecss/ecss.js
-
29src/views/modules/eam/eamWorkOrderForDefect.vue
-
751src/views/modules/ecss/codelnotify.vue
-
751src/views/modules/ecss/codelnotify_old.vue
-
174src/views/modules/ecss/del_upload_excel.vue
-
2src/views/modules/partspare/repairtransdetail.vue
-
4src/views/modules/quote/detail/quoteDetail.vue
-
4src/views/modules/quote/detail/quoteGroupDetail.vue
@ -0,0 +1,5 @@ |
|||
|
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
|
|||
export const saveEcssCoDelNotifyByExcel = data => createAPI(`/ecss/coDel/saveEcssCoDelNotifyByExcel`,'post',data) |
|||
@ -0,0 +1,751 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|||
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 33px">{{'查询'}}</el-button> |
|||
<el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 33px">{{'导入'}}</el-button> |
|||
</el-form> |
|||
|
|||
<el-table |
|||
:height="height" |
|||
:data="dataList" |
|||
border |
|||
v-loading="dataListLoading" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
header-align="center" |
|||
align="center" |
|||
width="150" |
|||
label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</a> |
|||
<a type="text" size="small" @click="deleteHandle(scope.row.id)">删除</a> |
|||
</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="[20, 50, 100, 1000]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
|
|||
<!-- 导入 --> |
|||
<del-upload-excel ref="delUploadExcel" @refreshPageTables="searchTable" v-drag></del-upload-excel> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import delUploadExcel from "./del_upload_excel.vue"; |
|||
import {} from "@/api/sysLanguage.js" |
|||
|
|||
export default { |
|||
name: "null", |
|||
components:{ |
|||
delUploadExcel |
|||
}, |
|||
data() { |
|||
return { |
|||
pageIndex: 1, |
|||
pageSize: 100, |
|||
totalPage: 0, |
|||
height: 200, |
|||
dataList:[], |
|||
dataListLoading: false, |
|||
searchData: { |
|||
page: 1, |
|||
limit: 100, |
|||
site:this.$store.state.user.site, |
|||
|
|||
}, |
|||
buttons:{ |
|||
search:'查询', |
|||
}, |
|||
columnList: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1BuDesc', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "buDesc", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "BU", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CmcInvoice', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "cmcInvoice", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "CMC Invoice", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1DelNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "delNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "发货通知单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ItemNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "itemNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "行号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1NotifyDate', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "notifyDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "发货日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1NotifyStatus', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "notifyStatus", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "通知单状态", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1SalesOrder', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "salesOrder", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "销售订单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Line', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "line", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "销售单行号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ReadyDate', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "readyDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ReadyDate", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CustomerName', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "customerName", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "客户名称", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CustomerPO', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "customerPO", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "客户采购单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Version', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "version", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Version", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Status', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "status", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Status", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Family', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "family", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Family", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1PartNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "partNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "PN", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1PartDescription', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "partDescription", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Description", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Qty', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "qty", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "Qty (pcs)", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Lt', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "lt", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "LT (wks)", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CmcComment', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "cmcComment", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "CMC Comment", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Destination', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "destination", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Destination", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1SaleType', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "saleType", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "内外销方式", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1AwbBl', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "awbBl", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "AWB/ BL#", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ShippingNumber', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "shippingNumber", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "ShippingNumber", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ShippingMode', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "shippingMode", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "ShippingMode", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ForwarderInfo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "forwarderInfo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Forwarder Info", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Currency', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "currency", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Currency", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Tp', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "tp", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "TP", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1TtlAmount', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "ttlAmount", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "TTL Amount", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1SumPrice', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "sumPrice", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "价税合计", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1So', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "so", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "SO", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Upc', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "upc", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "UPC", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ErpDelNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "erpDelNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "ERP发货单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ErpDelItemNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "erpDelItemNo", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "行号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Remark', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "remark", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Remark", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 300 |
|||
}, |
|||
], |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.height = (window.innerHeight - 240)/2; |
|||
}) |
|||
}, |
|||
methods: { |
|||
// 每页数 |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.searchTable() |
|||
}, |
|||
// 当前页 |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.searchTable() |
|||
}, |
|||
searchTable(){ |
|||
this.searchData.limit = this.pageSize |
|||
this.searchData.page = this.pageIndex |
|||
searchNotifyHeader(this.searchData).then(({data}) => { |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.dataList = data.page.list |
|||
this.pageIndex = data.page.currPage |
|||
this.pageSize = data.page.pageSize |
|||
this.totalPage = data.page.totalCount |
|||
if(this.dataList.length>0){ |
|||
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
|||
this.changeData(this.dataList[0]) |
|||
}else { |
|||
this.changeData(null) |
|||
} |
|||
} else { |
|||
this.dataList = []; |
|||
} |
|||
}); |
|||
}, |
|||
importModel(){ |
|||
this.$nextTick(() => { |
|||
this.$refs.delUploadExcel.init() |
|||
}) |
|||
}, |
|||
}, |
|||
created() { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,751 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|||
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 33px">{{'查询'}}</el-button> |
|||
<el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 33px">{{'导入'}}</el-button> |
|||
</el-form> |
|||
|
|||
<el-table |
|||
:height="height" |
|||
:data="dataList" |
|||
border |
|||
v-loading="dataListLoading" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
header-align="center" |
|||
align="center" |
|||
width="150" |
|||
label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</a> |
|||
<a type="text" size="small" @click="deleteHandle(scope.row.id)">删除</a> |
|||
</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="[20, 50, 100, 1000]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
|
|||
<!-- 导入 --> |
|||
<del-upload-excel ref="delUploadExcel" @refreshPageTables="searchTable" v-drag></del-upload-excel> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import delUploadExcel from "./del_upload_excel.vue"; |
|||
import {} from "@/api/sysLanguage.js" |
|||
|
|||
export default { |
|||
name: "null", |
|||
components:{ |
|||
delUploadExcel |
|||
}, |
|||
data() { |
|||
return { |
|||
pageIndex: 1, |
|||
pageSize: 100, |
|||
totalPage: 0, |
|||
height: 200, |
|||
dataList:[], |
|||
dataListLoading: false, |
|||
searchData: { |
|||
page: 1, |
|||
limit: 100, |
|||
site:this.$store.state.user.site, |
|||
|
|||
}, |
|||
buttons:{ |
|||
search:'查询', |
|||
}, |
|||
columnList: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1BuDesc', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "buDesc", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "BU", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CmcInvoice', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "cmcInvoice", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "CMC Invoice", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1DelNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "delNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "发货通知单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ItemNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "itemNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "行号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1NotifyDate', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "notifyDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "发货日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1NotifyStatus', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "notifyStatus", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "通知单状态", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1SalesOrder', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "salesOrder", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "销售订单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Line', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "line", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "销售单行号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ReadyDate', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "readyDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ReadyDate", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CustomerName', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "customerName", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "客户名称", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CustomerPO', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "customerPO", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "客户采购单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Version', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "version", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Version", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Status', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "status", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Status", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Family', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "family", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Family", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1PartNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "partNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "PN", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1PartDescription', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "partDescription", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Description", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Qty', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "qty", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "Qty (pcs)", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Lt', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "lt", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "LT (wks)", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1CmcComment', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "cmcComment", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "CMC Comment", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Destination', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "destination", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Destination", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1SaleType', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "saleType", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "内外销方式", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1AwbBl', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "awbBl", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "AWB/ BL#", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ShippingNumber', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "shippingNumber", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "ShippingNumber", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ShippingMode', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "shippingMode", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "ShippingMode", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ForwarderInfo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "forwarderInfo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Forwarder Info", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Currency', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "currency", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Currency", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Tp', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "tp", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "TP", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1TtlAmount', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "ttlAmount", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "TTL Amount", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1SumPrice', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "sumPrice", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "价税合计", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1So', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "so", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "SO", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Upc', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "upc", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "UPC", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ErpDelNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "erpDelNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "ERP发货单号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1ErpDelItemNo', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "erpDelItemNo", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "行号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 801001, |
|||
serialNumber: '801001Table1Remark', |
|||
tableId: "801001Table1", |
|||
tableName: "关务系统发货通知单", |
|||
columnProp: "remark", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Remark", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 300 |
|||
}, |
|||
], |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 240; |
|||
}) |
|||
}, |
|||
methods: { |
|||
// 每页数 |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.searchTable() |
|||
}, |
|||
// 当前页 |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.searchTable() |
|||
}, |
|||
searchTable(){ |
|||
this.searchData.limit = this.pageSize |
|||
this.searchData.page = this.pageIndex |
|||
searchNotifyHeader(this.searchData).then(({data}) => { |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.dataList = data.page.list |
|||
this.pageIndex = data.page.currPage |
|||
this.pageSize = data.page.pageSize |
|||
this.totalPage = data.page.totalCount |
|||
if(this.dataList.length>0){ |
|||
this.$refs.mainTable.setCurrentRow(this.dataList[0]); |
|||
this.changeData(this.dataList[0]) |
|||
}else { |
|||
this.changeData(null) |
|||
} |
|||
} else { |
|||
this.dataList = []; |
|||
} |
|||
}); |
|||
}, |
|||
importModel(){ |
|||
this.$nextTick(() => { |
|||
this.$refs.delUploadExcel.init() |
|||
}) |
|||
}, |
|||
}, |
|||
created() { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,174 @@ |
|||
<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" @close="deleteFile"> |
|||
<el-form :inline="true" label-position="top" label-width="80px"> |
|||
<el-row> |
|||
<el-form-item label="BU"> |
|||
<el-select v-model="pageData.buNo" placeholder="请选择" style="width: 120px"> |
|||
<el-option |
|||
v-for = "i in buList" |
|||
:key = "i.buNo" |
|||
:label = "i.buDesc" |
|||
:value = "i.buNo"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" @click="downloadFile()">下载文件模板</el-button> |
|||
</el-form-item> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-upload class="customer-upload" drag action="javascript:void(0);" ref="uploadFile" :limit="1" accept=".xlsx,.xls" |
|||
:before-upload="beforeUploadHandle" :on-change="onChange" :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-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 {queryFileId} from "@/api/qc/qc.js" |
|||
import {saveEcssCoDelNotifyByExcel} from '@/api/ecss/ecss.js' |
|||
import {downLoadObjectFile} from '@/api/eam/eam_object_list.js' |
|||
import {getAllBuList}from '@/api/factory/site.js' |
|||
export default { |
|||
name: 'bomComponentUpload', |
|||
data() { |
|||
return { |
|||
buList: [], |
|||
titleCon: '文件导入', |
|||
visible: false, |
|||
fileList: [], |
|||
pageData: { |
|||
site: '', |
|||
buNo: '', |
|||
createBy: this.$store.state.user.name, |
|||
|
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
// 初始化组件的参数 |
|||
init () { |
|||
this.fileList = [] |
|||
let tempData = { |
|||
username: this.$store.state.user.name, |
|||
} |
|||
getAllBuList(tempData).then(({data}) => { |
|||
if (data.code === 0) { |
|||
this.buList = data.rows |
|||
if(data.rows.length>0){ |
|||
this.pageData.buNo=data.rows[0].buNo |
|||
} |
|||
} |
|||
}) |
|||
// 打开页面 |
|||
this.visible = true |
|||
}, |
|||
|
|||
// 上传之前 |
|||
beforeUploadHandle (file) { |
|||
let extName = file[0].name.substring(file[0].name.lastIndexOf('.')).toLowerCase() |
|||
if (!(extName === '.xlsx' || extName === '.xls')) { |
|||
this.$message.error('数据导入失败,请选择正确的xlsx模板文件') |
|||
return false |
|||
} |
|||
}, |
|||
|
|||
// 选择上传文件时 |
|||
onChange (file) { |
|||
this.fileList.push(file) |
|||
}, |
|||
|
|||
// 关闭modal |
|||
closeDialog () { |
|||
this.deleteFile() |
|||
// 关闭当前的页面 |
|||
this.visible = false |
|||
}, |
|||
deleteFile(){ |
|||
this.fileList = [] |
|||
// 清空文件上传记录 |
|||
this.$refs.uploadFile.clearFiles() |
|||
// 刷新报工的页面 |
|||
this.$emit('refreshTable') |
|||
|
|||
}, |
|||
|
|||
// 保修当前的数据 |
|||
saveUploadFile () { |
|||
// 判断文件是否上传 |
|||
if (null == this.fileList || 0 === this.fileList.length) { |
|||
this.$message.error("请先上传文件!") |
|||
return false |
|||
} |
|||
const formData = new FormData() |
|||
formData.append("buNo",this.pageData.buNo) |
|||
formData.append("username",this.$store.state.user.name) |
|||
formData.append("file", this.fileList[0].raw) |
|||
// formData.append("createBy", this.pageData.createBy) |
|||
saveEcssCoDelNotifyByExcel(formData).then(({data}) => { |
|||
if (data.code === 0) { |
|||
this.$message.success(data.msg) |
|||
// 关闭窗口并刷新页面 |
|||
this.closeDialog() |
|||
} else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 下载 |
|||
async downloadFile () { |
|||
let file = { |
|||
id: 0, |
|||
fileName: '' |
|||
} |
|||
let tempData = { |
|||
orderRef1: 'ecss', |
|||
orderRef2: 'upLoadDel' |
|||
} |
|||
await queryFileId(tempData).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
file.id = data.data.id |
|||
file.fileName = data.data.fileName |
|||
} else { |
|||
this.$alert(data.msg, '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
} |
|||
}) |
|||
|
|||
await downLoadObjectFile(file).then(({data}) => { |
|||
// 不限制文件下载类型 |
|||
const blob = new Blob([data], {type: "application/octet-stream"}) |
|||
// 下载文件名称 |
|||
const fileName = file.fileName |
|||
// a标签下载 |
|||
const linkNode = document.createElement('a') |
|||
// a标签的download属性规定下载文件的名称 |
|||
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) |
|||
}) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue