lx
This commit is contained in:
@@ -237,7 +237,7 @@
|
||||
<el-table-column label="操作" align="center" width="280" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态) === 1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">导出</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard(scope.row)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -300,12 +300,77 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogVisibleExport" center style="min-height: 300px" width="60%">
|
||||
<el-card>
|
||||
<div id="print">
|
||||
<div style="text-align: center">
|
||||
<h2>仓 库 补 投 单</h2>
|
||||
<hr>
|
||||
<table class="tgClass" style="table-layout: fixed; width: 820px;margin: auto">
|
||||
<colgroup>
|
||||
<col style="width: 120px">
|
||||
<col style="width: 250px">
|
||||
<col style="width: 110px">
|
||||
<col style="width: 100px">
|
||||
<col style="width: 120px">
|
||||
<col style="width: 120px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class="tg-s268">补投单编号:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[0] }}</td>
|
||||
<td class="tg-0lax">姓名:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[1] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-0lax">补投时间:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[2] }}</td>
|
||||
<td class="tg-0lax">仓库名称:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[3] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<table class="tg" style="table-layout: fixed; width: 820px; margin: auto">
|
||||
<colgroup>
|
||||
<col style="width: 74px">
|
||||
<col style="width: 78px">
|
||||
<col style="width: 84px">
|
||||
<col style="width: 88px">
|
||||
<col style="width: 94px">
|
||||
<col style="width: 80px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th class="tg-c3ow">项目名称</th>
|
||||
<th class="tg-c3ow">机床图号</th>
|
||||
<th class="tg-c3ow">组号</th>
|
||||
<th class="tg-c3ow">名称</th>
|
||||
<th class="tg-c3ow">数量</th>
|
||||
<th class="tg-c3ow">类型</th>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in tableData4" :key="index">
|
||||
<td class="tg-c3ow">{{ list.项目名称 }}</td>
|
||||
<td class="tg-c3ow">{{ list.机床图号 }}</td>
|
||||
<td class="tg-c3ow">{{ list.组号 }}</td>
|
||||
<td class="tg-c3ow">{{ list.名称 }}</td>
|
||||
<td class="tg-c3ow">{{ list.数量 }}</td>
|
||||
<td class="tg-c3ow">{{ list.类型名称 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisibleExport=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="printCard">打印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard, initWarehouse, addCardDetail, searchCardDetail, deleteReplacementCard, deleteCardDetail } from '@/api/Inventory/PartsReplacement'
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -351,7 +416,9 @@ export default {
|
||||
locateGroup: [],
|
||||
partType: [],
|
||||
reasonGroup: [],
|
||||
cardNumber: ''
|
||||
cardNumber: '',
|
||||
inbondCard: [], // 补投单
|
||||
dialogVisibleExport: false // 导出表单
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -473,8 +540,6 @@ export default {
|
||||
}
|
||||
searchAlterRecord(this.pageCurrent, this.pageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
console.log(response.data.rows)
|
||||
console.log(this.tableData1, 112233)
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
@@ -639,11 +704,36 @@ export default {
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
doneRequestCard(row) {
|
||||
this.dialogVisibleExport = true
|
||||
this.cardNumber = row.补投单流水号
|
||||
this.inbondCard[0] = row.补投单编号
|
||||
this.inbondCard[1] = row.姓名
|
||||
this.inbondCard[2] = row.补投时间.split(' ')[0]
|
||||
this.inbondCard[3] = row.仓库名称
|
||||
searchCardDetail(this.cardNumber).then(response => {
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
// 打印请购单
|
||||
printCard() {
|
||||
const htmlNode = $('#print').html() // #print为需要打印的dom节点id
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.children().show()
|
||||
printNode.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.tg {border-collapse:collapse;border-spacing:0;}
|
||||
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg .tg-c3ow{border-color:inherit;text-align:center;vertical-align:top}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user