Commit cb8cff42 authored by 张伯涛's avatar 张伯涛

修改

parent 59ce326c
...@@ -11,6 +11,24 @@ export function formAssembling(query) { ...@@ -11,6 +11,24 @@ export function formAssembling(query) {
}) })
} }
// 装配线别号信息导出
export function exportLineNo(query) {
return request({
url: '/nltorderlinelogic/exportByLine',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 查询Scan SN
export function getSnsVague(params) {
return request({
url: '/datamonitor/getSnsVague',
method: 'get',
params
})
}
// 查询装配追溯详情 // 查询装配追溯详情
export function queryDeviceAss(query) { export function queryDeviceAss(query) {
return request({ return request({
......
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
title="工单信息" title="工单信息"
class="workOrderDialog" class="workOrderDialog"
:visible.sync="open" :visible.sync="open"
width="80%" width="90%"
append-to-body append-to-body
@close="cancel" @close="cancel"
> >
...@@ -508,13 +508,23 @@ ...@@ -508,13 +508,23 @@
<span>{{ scope.row.batchNo || '-' }}</span> <span>{{ scope.row.batchNo || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="form.type === '包装线'" :show-overflow-tooltip="true" align="center"> <el-table-column v-if="form.type === '包装线'" :show-overflow-tooltip="true" align="center" prop="remarks">
<template slot="header">
<div>备注</div>
<!-- <div>Name</div>-->
</template>
<template slot-scope="scope">
<span>{{ scope.row.remarks || '-' }}</span>
</template>
</el-table-column>
<el-table-column v-if="form.type === '包装线'" width="180px" :show-overflow-tooltip="true">
<template slot="header"> <template slot="header">
<div>操作</div> <div>操作</div>
<!-- <div>Name</div>--> <!-- <div>Name</div>-->
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click="changePo(scope.row)">修改配置批号</el-link> <el-link type="primary" @click="changePo(scope.row)">修改配置批号</el-link>
<el-link type="primary" @click="changeRemark(scope.row)">备注</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -589,6 +599,39 @@ ...@@ -589,6 +599,39 @@
<el-button class="redBtn" type="danger" @click="OKPo">确定 Confirm</el-button> <el-button class="redBtn" type="danger" @click="OKPo">确定 Confirm</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
:close-on-click-modal="false"
title="修改备注"
class="workOrderDialogImport"
:visible.sync="remarksDialog"
width="40%"
append-to-body
>
<el-form ref="formRemarks" :model="formRemarks" size="small" label-width="auto">
<el-form-item class="labelHeight" label="批号" prop="batchNo">
<div slot="label" class="labelClassLot">
<div class="labelName">备注</div>
<div class="labelName">Remarks</div>
</div>
<el-input
v-model.trim="formRemarks.remarks"
:maxlength="300"
type="textarea"
:rows="2"
:autosize="{ minRows: 4, maxRows: 6}"
show-word-limit
placeholder="请输入备注"
clearable
style="width: 100%;"
size="small"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="canleBtn" @click="cancelRemarks">关闭 Close</el-button>
<el-button class="redBtn" type="danger" @click="OKReamrks">确定 Confirm</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -621,6 +664,11 @@ export default { ...@@ -621,6 +664,11 @@ export default {
batchNo: '', batchNo: '',
businessId: '' businessId: ''
}, },
// 备注表单
formRemarks: {
remarks: '',
businessId: ''
},
// tabs默认选中 // tabs默认选中
tabsName: 'bom', tabsName: 'bom',
// 搜索框参数 // 搜索框参数
...@@ -632,6 +680,8 @@ export default { ...@@ -632,6 +680,8 @@ export default {
}, },
// po弹窗标志 // po弹窗标志
poDialog: false, poDialog: false,
// 备注弹窗标志
remarksDialog: false,
// 遮罩标志 // 遮罩标志
Loading: true, Loading: true,
Loading1: true, Loading1: true,
...@@ -979,9 +1029,39 @@ export default { ...@@ -979,9 +1029,39 @@ export default {
this.formPo.batchNo = JSON.parse(JSON.stringify(row.batchNo)) this.formPo.batchNo = JSON.parse(JSON.stringify(row.batchNo))
this.poDialog = true this.poDialog = true
}, },
/**
* 修改配置备注点击事件
*/
changeRemark(row) {
this.formRemarks.businessId = row.batchId
this.formRemarks.remarks = JSON.parse(JSON.stringify(row.remarks))
this.remarksDialog = true
},
cancelPo() { cancelPo() {
this.poDialog = false this.poDialog = false
}, },
cancelRemarks() {
this.remarksDialog = false
},
OKReamrks() {
const params = {
businessId: this.formRemarks.businessId,
remarks: this.formRemarks.remarks
}
editPo(params).then(res => {
if (res.code === 200) {
this.$message.success('操作成功')
this.getLineTable()
this.formRemarks.businessId = ''
this.formRemarks.remarks = ''
this.remarksDialog = false
} else {
this.$message.error(res.message)
}
}).catch(err => {
this.$message.error(err.message)
})
},
OKPo() { OKPo() {
this.$refs['formPo'].validate(validPO => { this.$refs['formPo'].validate(validPO => {
if (validPO) { if (validPO) {
......
...@@ -943,16 +943,6 @@ export default { ...@@ -943,16 +943,6 @@ export default {
}, },
getRelationSnTable(row) { getRelationSnTable(row) {
this.openSnModalFlag = true this.openSnModalFlag = true
// const params = {
// orderId: this.orderId,
// materSn: row.materSn,
// lineId: row.lineId
// }
// this.SNModelLoading1 = true
// getSnsDetail(params).then(res => {
// this.SNModelLoading1 = false
// this.SNRelationTableList = res.data
// })
const params = { const params = {
materSn: row.materSn, materSn: row.materSn,
scanType: '1' scanType: '1'
......
...@@ -500,6 +500,14 @@ ...@@ -500,6 +500,14 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div style="float: right;margin: 0 10px 10px 10px">
<el-button
type="danger"
size="small"
class="redBtn"
@click="handleExport"
>导出 Export</el-button>
</div>
<el-table <el-table
v-if="open.beachLineDialog || open.kitsDialog" v-if="open.beachLineDialog || open.kitsDialog"
v-loading="false" v-loading="false"
...@@ -978,8 +986,8 @@ ...@@ -978,8 +986,8 @@
</template> </template>
<script> <script>
import { formAssembling, queryBatch, queryDeviceAss, queryTestInfo } from '@/api/assembling' import { formAssembling, queryBatch, queryDeviceAss, queryTestInfo, exportLineNo } from '@/api/assembling'
import { getOrder, listModelOrder, listOrderLine, listOrderMater, listStation } from '@/api/workOrder' import { getOrder, listOrderLine, listOrderMater, listStation } from '@/api/workOrder'
import { listRepairRecordDetails } from '@/api/repairRecord' import { listRepairRecordDetails } from '@/api/repairRecord'
import { getDicts } from '@/api/system/dict/data' import { getDicts } from '@/api/system/dict/data'
...@@ -1126,6 +1134,34 @@ export default { ...@@ -1126,6 +1134,34 @@ export default {
} }
}, },
methods: { methods: {
/**
* 装配线别号信息导出
*/
handleExport() {
const queryParams = {
lineId: this.form.lineId,
orderId: this.form.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 = '装配线别号信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
// this.download(response.msg);
})
})
},
/** /**
* 查询按钮方法 * 查询按钮方法
*/ */
......
...@@ -229,7 +229,15 @@ ...@@ -229,7 +229,15 @@
<div class="labelName">生产数量</div> <div class="labelName">生产数量</div>
<div class="labelName">Qty</div> <div class="labelName">Qty</div>
</div> </div>
<el-input v-model="deviceAndPackingForm.revisedQtyDue" :title="deviceAndPackingForm.revisedQtyDue" :disabled="true" /> <!-- <el-input v-model="deviceAndPackingForm.revisedQtyDue" :title="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>
</el-col> </el-col>
</el-row> </el-row>
...@@ -434,13 +442,164 @@ ...@@ -434,13 +442,164 @@
>关闭 Close</el-button> >关闭 Close</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :close-on-click-modal="false" class="modelDialog" :title="'SN编码信息'" :visible.sync="QtyDialog" width="60%" :append-to-body="false">
<el-form ref="form1" :model="qtyParams" :inline="true">
<div style="text-align: center">
<el-form-item label="SN编码" prop="materSn">
<div slot="label">
<div class="labelName">SN编码</div>
<div class="labelName">SN</div>
</div>
<el-input
v-model="qtyParams.materSn"
placeholder="请输入SN编码"
clearable
:maxlength="30"
size="small"
style="width: 350px"
/>
</el-form-item>
<el-form-item>
<el-button class="redBtn" type="danger" size="small" @click="queryPosition">查询 Query</el-button>
<el-button class="resetBtn" size="small" @click="resetPosition">重置 Reset</el-button>
</el-form-item>
</div>
<div style="margin-left: 10px; font-size: 16px;">
SN编码信息列表
</div>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-table
ref="SNTable"
v-loading="SNModelLoading"
style="padding-right: 10px;padding-left: 10px;margin-top: 10px"
:data="SNTableList"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" prop="materSn" min-width="45%" :show-overflow-tooltip="true">
<template slot="header">
<div>SN编码</div>
<div>SN</div>
</template>
<template slot-scope="scope">
<span style="cursor: pointer; color: #D20A10;" @click="getRelationSnTable(scope.row)">{{ scope.row.materSn || '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="createDate" min-width="45%" :show-overflow-tooltip="true">
<template slot="header">
<div>扫码时间</div>
<div />
</template>
</el-table-column>
</el-table>
<pagination
v-show="qtyTotal>0"
:total="qtyTotal"
:page.sync="qtyParams.page"
:limit.sync="qtyParams.rows"
@pagination="getSNTable"
/>
</el-col>
</el-row>
</el-form>
</el-dialog>
<el-dialog :close-on-click-modal="false" class="modelDialog" :title="'关联SN编码'" :visible.sync="openSnModalFlag" width="90%" :append-to-body="false">
<div style="margin-left: 10px; font-size: 16px;">
关联SN编码列表
</div>
<el-form ref="form1" :model="queryParams" :inline="true">
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-table
ref="SNTable"
v-loading="SNModelLoading1"
style="padding-right: 10px;padding-left: 10px;margin-top: 10px"
:data="SNRelationTableList"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column :show-overflow-tooltip="true" width="150" align="center" prop="materCode ">
<template slot="header">
<div>料号</div>
</template>
<template slot-scope="scope">
<span>{{ scope.row.materCode || '-' }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="materSn" width="330" :show-overflow-tooltip="true">
<template slot="header">
<div>SN编码</div>
<div>SN</div>
</template>
<template v-slot:default="scope">
{{ scope.row.materSn }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="150" align="center" prop="packageCode">
<template slot="header">
<div>批次号/唯一码</div>
<div>Batch No.</div>
</template>
<template slot-scope="scope">
<el-link v-if="scope.row.packageCode" type="primary" @click="queryBatchDetail(scope.row)">{{ scope.row.packageCode }}</el-link>
<el-button v-else type="text">{{ '-' }}</el-button>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" width="130" align="center" prop="staName">
<template slot="header">
<div>工站名称</div>
</template>
<template slot-scope="scope">
<span>{{ scope.row.staName || '-' }}</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="center" prop="createDate">
<template slot="header">
<div>扫码/测试时间</div>
<div>Scan/Test/Repair Time</div>
</template>
<template slot-scope="scope">
<span>{{ scope.row.createDate || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot="header">
<div>维修记录/测试结果</div>
<div>Operate</div>
</template>
<template slot-scope="scope">
<el-link
v-if="scope.row.maintainId != null"
size="mini"
type="success"
@click="handleGetRecord(scope.row)"
>维修记录</el-link>
<el-link
v-if="scope.row.recordList != null"
size="mini"
type="success"
@click="handleDetail(scope.row)"
>记录详情</el-link>
<el-link
v-if="scope.row.testId != null "
size="mini"
type="danger"
style="margin-left: 10px"
@click="handlePass(scope.row)"
>{{ scope.row.testResult === '1' ? '通过' : '不通过' }}</el-link>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
import { exportPacking, listPacking, queryDetailDevice } from '@/api/packing' import { exportPacking, listPacking, queryDetailDevice } from '@/api/packing'
import { queryBatch, queryDeviceAss } from '@/api/assembling' import { formAssembling, getSnsVague, queryBatch, queryDeviceAss } from '@/api/assembling'
export default { export default {
name: 'Packing', name: 'Packing',
/** 路由离开前存储筛选条件*/ /** 路由离开前存储筛选条件*/
...@@ -456,6 +615,24 @@ export default { ...@@ -456,6 +615,24 @@ export default {
data() { data() {
const date = new Date() const date = new Date()
return { return {
numList: [], // 生产数量数组
orderIDList: [], // orderID数组
lineCode: '', // 主机追溯号
qtyTotal: 0,
qtyParams: {
page: 1,
rows: 10,
materSn: '',
lineCode: '',
orderId: '',
type: 'package'
},
QtyDialog: false, // sn编码模态框
SNTableList: [],
SNModelLoading: false,
openSnModalFlag: false, // 关联sn编码模态框
SNModelLoading1: false,
SNRelationTableList: [],
// 搜索框表单数据 // 搜索框表单数据
queryParams: { queryParams: {
lineCode: undefined, lineCode: undefined,
...@@ -498,6 +675,57 @@ export default { ...@@ -498,6 +675,57 @@ export default {
this.getPackingData() this.getPackingData()
}, },
methods: { methods: {
getRelationSnTable(row) {
this.openSnModalFlag = true
const params = {
materSn: row.materSn,
scanType: '1'
}
this.SNModelLoading1 = true
formAssembling(params).then(res => {
this.SNModelLoading1 = false
this.SNRelationTableList = res.data.retrospectDtoList
})
},
queryPosition() {
this.qtyParams.page = 1
this.getSNTable()
},
resetPosition() {
this.qtyParams.page = 1
this.qtyParams.rows = 10
this.qtyParams.materSn = ''
this.getSNTable()
},
/**
* 装配线别号信息生产数量点击
*/
clickQty(index) {
this.QtyDialog = true
this.qtyParams.page = 1
this.qtyParams.materSn = ''
this.qtyParams.orderId = this.orderIDList[index]
this.qtyParams.lineCode = this.lineCode
this.getSNTable()
},
getSNTable() {
this.SNModelLoading = true
getSnsVague(this.qtyParams).then(res => {
this.SNModelLoading = false
this.SNTableList = res.data.rows
this.qtyTotal = res.data.total
if (this.qtyParams.page !== 1 && this.SNTableList.length === 0) {
this.qtyParams.page = 1
this.SNModelLoading = true
this.qtyParams.orderId = this.orderId
getSnsVague(this.qtyParams).then(res => {
this.SNModelLoading = false
this.SNTableList = res.data.rows
this.qtyTotal = res.data.total
})
}
})
},
/** /**
* 弹窗取消方法 * 弹窗取消方法
*/ */
...@@ -598,6 +826,9 @@ export default { ...@@ -598,6 +826,9 @@ export default {
detailDevice(row) { detailDevice(row) {
this.open.deviceDialog = true this.open.deviceDialog = true
this.dialogTitle = '主机追溯号' this.dialogTitle = '主机追溯号'
this.numList.length = 0
this.orderIDList.length = 0
this.lineCode = row.packageCode
const params = { const params = {
beginDate: this.queryParams.beginDate + ' 00:00:00', beginDate: this.queryParams.beginDate + ' 00:00:00',
endDate: this.queryParams.endDate + ' 23:59:59', endDate: this.queryParams.endDate + ' 23:59:59',
...@@ -605,6 +836,13 @@ export default { ...@@ -605,6 +836,13 @@ export default {
} }
queryDetailDevice(params).then(res => { queryDetailDevice(params).then(res => {
this.deviceAndPackingForm = res.data this.deviceAndPackingForm = res.data
if (this.deviceAndPackingForm.revisedQtyDue) {
this.numList = this.deviceAndPackingForm.revisedQtyDue.split(',')
}
if (this.deviceAndPackingForm.orderId) {
this.orderIDList = this.deviceAndPackingForm.orderId.split(',')
}
console.log('aaaaaaa', this.numList)
this.deviceAndPackingData = res.data.recordList 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