Commit 5c9e4c57 authored by 盖献康's avatar 盖献康

新增 包裝追溯页面主机追溯号表单导出按钮

修改 装配追溯页面装配线别号信息表单生产数量可点击
parent 3921def6
......@@ -506,7 +506,15 @@
<div class="labelName">生产数量</div>
<div class="labelName">Qty</div>
</div>
<el-input v-model="deviceAndPackingForm.revisedQtyDue" :disabled="true" />
<!-- <el-input v-model="deviceAndPackingForm.revisedQtyDue" :disabled="true" /> -->
<el-button
v-for="(item,index) in numList"
:key="index"
type="text"
@click="clickQty(index)"
>
{{ item }}
</el-button>
</el-form-item>
<el-form-item v-if="open.kitsDialog" class="labelHeight" label="生产数量" prop="revisedQtyDue">
<div slot="label" class="labelClass">
......@@ -1251,6 +1259,8 @@ export default {
orderform: {},
// 包装追溯和装配追溯表单数据
deviceAndPackingForm: {},
// 生产数量数组
numList: [],
// tabs默认选中
tabsName: 'bom',
// 表格分页总数2
......@@ -1359,6 +1369,19 @@ export default {
this.qtyParams.materSn = ''
this.getSNTable()
},
/**
* 装配线别号信息生产数量点击
*/
clickQty(index) {
this.QtyDialog = true
this.qtyParams.page = 1
this.qtyParams.materSn = ''
this.qtyParams.orderId = this.form.orderId
this.qtyParams.lineId = this.form.lineId
this.qtyParams.lineCode = this.form.lineNo
this.qtyParams.type = 'package'
this.getSNTable()
},
showSNInfo(item) {
this.QtyDialog = true
this.qtyParams.page = 1
......@@ -1537,6 +1560,7 @@ export default {
this.bomList = []
this.testInfoTable = []
this.deviceAndPackingForm = {}
this.numList = []
this.repairDetailsData = []
this.batchTableData = []
this.tabsName = 'bom'
......@@ -1618,6 +1642,9 @@ export default {
}
queryDeviceAss(params).then(res => {
this.deviceAndPackingForm = res.data
if (this.deviceAndPackingForm.revisedQtyDue) {
this.numList = this.deviceAndPackingForm.revisedQtyDue.split(',')
}
this.batchTableData = res.data.recordList
})
},
......
......@@ -89,7 +89,7 @@
<div>No.</div>
</template>
</el-table-column>
<el-table-column width="200" :show-overflow-tooltip="true" align="center" prop="project">
<el-table-column width="70" :show-overflow-tooltip="true" align="center" prop="project">
<template slot="header">
<div>项目</div>
<div>Project</div>
......@@ -98,7 +98,7 @@
<span>{{ scope.row.project || '-' }}</span>
</template>
</el-table-column>
<el-table-column width="200" :show-overflow-tooltip="true" align="center" prop="product">
<el-table-column width="170" :show-overflow-tooltip="true" align="center" prop="product">
<template slot="header">
<div>产品名称</div>
<div>Product</div>
......@@ -153,7 +153,7 @@
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" prop="color">
<template slot="header">
<div>包装工单单号</div>
<div>工单单号</div>
<div>OrderNo</div>
</template>
<template slot-scope="scope">
......@@ -162,13 +162,22 @@
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" prop="color">
<template slot="header">
<div>包装工单数量</div>
<div>工单数量</div>
<div>orderQty</div>
</template>
<template slot-scope="scope">
<span>{{ scope.row.orderQty || '-' }}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" prop="revisedQtyDue">
<template slot="header">
<div>批次数量</div>
<div>Qty</div>
</template>
<template slot-scope="scope">
<span>{{ scope.row.revisedQtyDue || '-' }}</span>
</template>
</el-table-column>
<el-table-column width="200" :show-overflow-tooltip="true" align="center" prop="lineCode">
<template slot="header">
<div>包装追溯号</div>
......@@ -196,15 +205,6 @@
<span>{{ scope.row.createDate || '-' }}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" prop="revisedQtyDue">
<template slot="header">
<div>批次数量</div>
<div>Qty</div>
</template>
<template slot-scope="scope">
<span>{{ scope.row.revisedQtyDue || '-' }}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog
......@@ -262,6 +262,14 @@
</el-col>
</el-row>
</el-form>
<div v-if="dialogTitle === '主机追溯号'" style="float: right;margin: 0 10px 10px 10px">
<el-button
type="danger"
size="small"
class="redBtn"
@click="handleExportLine"
>导出 Export</el-button>
</div>
<el-table
v-loading="false"
:data="deviceAndPackingData.slice((currentPage1-1)*pageSize1,currentPage1*pageSize1)"
......@@ -913,7 +921,7 @@
<script>
import moment from 'moment'
import { exportPacking, listPacking, queryDetailDevice } from '@/api/packing'
import {formAssembling, getSnsVague, queryBatch, queryDeviceAss, queryTestInfo} from '@/api/assembling'
import {exportLineNo, formAssembling, getSnsVague, queryBatch, queryDeviceAss, queryTestInfo} from '@/api/assembling'
import { listRepairRecordDetails } from '@/api/repairRecord'
import { getDicts } from '@/api/system/dict/data'
export default {
......@@ -974,6 +982,7 @@ export default {
repairDetailsData: [],
numList: [], // 生产数量数组
orderIDList: [], // orderID数组
lineIDList: [], // lineID数组
lineCode: '', // 主机追溯号
qtyTotal: 0,
qtyParams: {
......@@ -1116,6 +1125,7 @@ export default {
this.qtyParams.page = 1
this.qtyParams.materSn = ''
this.qtyParams.orderId = this.orderIDList[index]
this.qtyParams.lineId = this.lineIDList[index]
this.qtyParams.lineCode = this.lineCode
this.getSNTable()
},
......@@ -1227,6 +1237,34 @@ export default {
})
})
},
/**
* 装配线别号信息导出
*/
handleExportLine() {
const nowDate = moment(new Date().getTime()).format('YYYYMMDD')
const queryParams = {
lineId: this.deviceAndPackingForm.lineId,
orderId: this.deviceAndPackingForm.orderId
}
this.$confirm('是否确认导出装配线别号信息?', '提示', {
confirmButtonText: '确定 Confirm',
cancelButtonText: '取消 Cancel',
cancelButtonClass: 'btn-custom-cancel',
type: 'warning'
}).then(function() {
return exportLineNo(queryParams).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '装配线别号信息' + nowDate + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
})
})
},
/**
* 获取表格数据
*/
......@@ -1266,6 +1304,7 @@ export default {
this.dialogTitle = '主机追溯号'
this.numList.length = 0
this.orderIDList.length = 0
this.lineIDList.length = 0
this.lineCode = row.packageCode
const params = {
beginDate: this.queryParams.beginDate + ' 00:00:00',
......@@ -1280,6 +1319,9 @@ export default {
if (this.deviceAndPackingForm.orderId) {
this.orderIDList = this.deviceAndPackingForm.orderId.split(',')
}
if (this.deviceAndPackingForm.lineId) {
this.lineIDList = this.deviceAndPackingForm.lineId.split(',')
}
console.log('aaaaaaa', this.numList)
this.deviceAndPackingData = res.data.recordList
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment