更新装配工艺过程卡

This commit is contained in:
liushuai
2019-01-04 17:01:26 +08:00
parent b2ac054a7b
commit af7a5b116b
3 changed files with 69 additions and 58 deletions

View File

@@ -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.0.2:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.212:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间

View File

@@ -18,7 +18,7 @@
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchTable">查询</el-button>
<el-button type="primary" icon="el-icon-download" size="small" @click="exportTable('cjn')">导出</el-button>
<el-button type="primary" icon="el-icon-download" size="small" @click="exportTable()">导出</el-button>
</el-card>
<el-card>
<el-table
@@ -64,54 +64,57 @@
</div>
</el-card>
<el-card>
<table id="cjn" cellspacing="0px" border align="center" width="100%" style="">
<thead id="20">
<tr>
<td colspan="1" style="text-align: center;font-size: 30px;font-weight: bold;width: 10.25%;">GAOJING</td>
<td colspan="15" style="text-align:center;font-size: 30px;font-weight: bold">专机装配工艺过程卡</td>
</tr>
<tr class="tbodyHead">
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床编号:</td>
<td colspan="4" width="15%" align="center">{{ MachineNum }}</td>
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床名称:</td>
<td colspan="5" width="35%" align="center">{{ MachineName }}</td>
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">客户名称:</td>
<td colspan="4" width="31.25%" align="center">{{ CustomerName }}</td>
</tr>
<tr id="tableHead">
<th class="tg-0pky">序号</th>
<th class="tg-0lax" colspan="4">工序名称</th>
<th class="tg-0lax" colspan="6">艺内容及装配具体要求</th>
<th class="tg-0lax">质检</th>
<th class="tg-0lax">工时/</th>
<th class="tg-0lax">完成情况/装配工</th>
<th class="tg-0lax">检验情况/检验员</th>
<th class="tg-0lax" width="100px">备注</th>
</tr>
</thead>
<tbody v-for="(item, index) in dataAll" :key="index">
<tr>
<td colspan="16" style="font-weight: bold">{{ item.table1 }}</td>
</tr>
<tr v-for="(list, index) in item.table2" :key="index">
<td align="center"> {{ list.序号 }}</td>
<td colspan="4">{{ list.工序名称 }}</td>
<td colspan="6">{{ list.艺内容及装配具体要求 }}</td>
<td align="center">{{ list.质检 }}</td>
<td>{{ list.工时 }}</td>
<td/>
<td/>
<td width="100px"/>
</tr>
</tbody>
</table>
<div id="cjn">
<table cellspacing="0px" border align="center" width="100%" style="">
<thead id="20">
<tr class="trHeight2">
<td colspan="3" style="text-align: center;font-size: 30px;font-weight: bold;width: 10.25%;">GAOJING</td>
<td colspan="13" style="text-align:center;font-size: 30px;font-weight: bold">专机装配工艺过程卡</td>
</tr>
<tr class="tbodyHead">
<td colspan="2" style="font-weight: bold" width="7.25%" align="center">机床编号:</td>
<td colspan="3" width="16%" align="center">{{ MachineNum }}</td>
<td colspan="1" style="font-weight: bold" width="8.25%" align="center">机床名称:</td>
<td colspan="5" width="35%" align="center">{{ MachineName }}</td>
<td colspan="1" style="font-weight: bold" width="7.25%" align="center">客户名称:</td>
<td colspan="4" width="26.25%" align="center">{{ CustomerName }}</td>
</tr>
<tr id="tableHead" class="trHeight">
<th class="tg-0pky" width="4%">序号</th>
<th class="tg-0lax" colspan="4">序名称</th>
<th class="tg-0lax" colspan="6">工艺内容及装配具体要求</th>
<th class="tg-0lax">质检</th>
<th class="tg-0lax" width="4%">工时/</th>
<th class="tg-0lax">完成情况/装配工</th>
<th class="tg-0lax">检验情况/检验员</th>
<th class="tg-0lax" width="100px">备注</th>
</tr>
</thead>
<tbody v-for="(item, index) in dataAll" :key="index">
<tr class="trHeight">
<td colspan="16" style="font-weight: bold">{{ item.table1 }}</td>
</tr>
<tr v-for="(list, index) in item.table2" :key="index" class="trHeight1">
<td align="center"> {{ list.序号 }}</td>
<td colspan="4">{{ list.序名称 }}</td>
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
<td align="center">{{ list.质检 }}</td>
<td>{{ list.工时 }}</td>
<td/>
<td/>
<td width="100px"/>
</tr>
</tbody>
</table>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, searchMachine, searchDetail, searchProcess, searchTable } from '@/api/Assembly/PrintingAssemblyProcessCard'
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
import $ from 'jquery'
// import QRCode from 'qrcode'
export default {
data() {
@@ -178,14 +181,15 @@ export default {
})
}
},
exportTable(tableid) {
if (this.dataAll.length === 0) {
this.$message.warning('暂无数据')
} else {
getExplorer()
method5(tableid)
Cleanup()
}
exportTable() {
const htmlNode = $('#cjn').html()
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().not('script').show()
printNode.remove()
},
handleSizeChange(val) {
this.pageSize = val
@@ -207,11 +211,18 @@ export default {
span{
margin: 10px 0 10px 10px;
}
.trHeight{
height: 45px;
}
.trHeight1{
height: 30px;
}
.trHeight2{
height: 100px;
}
.tbodyHead{
height: 50px;
}
</style>
<style>
.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-0pky{border-color:inherit;text-align:left;vertical-align:top}
.tg .tg-0lax{text-align:left;vertical-align:top}
</style>

View File

@@ -546,7 +546,7 @@ export default {
const data = this.tableDataAll[i]
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
console.log(data.前id, data.前图号或者型号)
const resp = await transferMX1(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id, data.前id, data.前图号或者型号)
const resp = await transferMX1(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.id, data.前id, data.前图号或者型号)
await sleep(10)
if (resp.data[0].result === '0') {
this.err++