创建备料单
This commit is contained in:
@@ -19,7 +19,7 @@ const service = axios.create({
|
||||
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://192.168.1.212:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
|
||||
<el-checkbox v-model="all" size="mini">查询全部</el-checkbox>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="downLoad('BL')">导出备料单</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="exportTable('BL')">导出备料单</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-success" style="margin-left:10px" @click="edit()">导出完成</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -52,27 +52,29 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<table id="BL" border cellspacing="0px" style="table-layout: fixed; width: 600px;display: none">
|
||||
<colgroup>
|
||||
<col style="width: 100px">
|
||||
<col style="width: 150px">
|
||||
<col style="width: 450px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="60px">GAOJING</th>
|
||||
<th colspan="2" height="60px"><span style="font-weight:bold">备料单</span></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">零件名称</td>
|
||||
<td align="center">零件图号</td>
|
||||
<td align="center">备料</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in tableData2" :key="index">
|
||||
<td align="center">{{ list.零件名称 }}</td>
|
||||
<td align="center">{{ list.零件图号 }}</td>
|
||||
<td>{{ list.工艺要求 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div v-show="false" id="BL">
|
||||
<table border cellspacing="0px" style="table-layout: fixed; width: 600px;">
|
||||
<colgroup>
|
||||
<col style="width: 100px">
|
||||
<col style="width: 150px">
|
||||
<col style="width: 450px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th height="60px">GAOJING</th>
|
||||
<th colspan="2" height="60px"><span style="font-weight:bold">备料单</span></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">零件名称</td>
|
||||
<td align="center">零件图号</td>
|
||||
<td align="center">备料</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in tableData2" :key="index">
|
||||
<td align="center">{{ list.零件名称 }}</td>
|
||||
<td align="center">{{ list.零件图号 }}</td>
|
||||
<td>{{ list.工艺要求 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -80,6 +82,7 @@
|
||||
<script>
|
||||
import { searchtable, searchtable2, edit } from '@/api/ManufacturingCenter/CreatePreparationBill'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -99,6 +102,16 @@ export default {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
exportTable() {
|
||||
const htmlNode = $('#BL').html()
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.children().not('script').show()
|
||||
printNode.remove()
|
||||
},
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
|
||||
Reference in New Issue
Block a user