lx
This commit is contained in:
@@ -162,6 +162,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="exportCard(scope.row)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -198,6 +199,16 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料品种" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料品种 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料类别" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
|
||||
@@ -210,12 +221,69 @@
|
||||
</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: 73px">
|
||||
<col style="width: 78px">
|
||||
<col style="width: 84px">
|
||||
<col style="width: 88px">
|
||||
<col style="width: 94px">
|
||||
<col style="width: 80px">
|
||||
</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 style="margin-top: 10px">
|
||||
<table class="tg" style="table-layout: fixed; width: 820px; margin: auto">
|
||||
<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 tableData3" :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>
|
||||
</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 { searchRequestCard, initWarehouse, addRequestCard, searchInventoryNum, SeeDetail, addRequestCardDetail, deleteRequest, deleteRequestDetail, alterNumber, setSafeValue } from '@/api/Inventory/OfflinePurchase'
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -285,7 +353,9 @@ export default {
|
||||
disable4: true,
|
||||
disable: false, // 其他的禁用
|
||||
House: [],
|
||||
HouseNumber: ''
|
||||
HouseNumber: '',
|
||||
dialogVisibleExport: false, // 导出表单
|
||||
inbondCard: [] // 导出表格表头
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -348,6 +418,14 @@ export default {
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) { // 离线请购单列表分页
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) { // 离线请购单列表分页
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleSizeChange2(val) { // 离线请购单列表分页
|
||||
this.pageSize2 = val
|
||||
this.searchTable2()
|
||||
@@ -455,6 +533,27 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
exportCard(row) {
|
||||
this.dialogVisibleExport = true
|
||||
this.inbondCard[0] = row.请购单编号
|
||||
this.inbondCard[1] = row.姓名
|
||||
this.inbondCard[2] = row.仓库名称
|
||||
this.inbondCard[3] = row.请购时间.split(' ')[0]
|
||||
SeeDetail(this.purchasecardnumber).then(response => {
|
||||
this.tableData3 = 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()
|
||||
},
|
||||
// 传递请购单
|
||||
doneRequestCard() {
|
||||
this.$confirm('确定传递请购单?', '提示', {
|
||||
@@ -518,4 +617,8 @@ export default {
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
}
|
||||
.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