This commit is contained in:
bryan sun
2019-11-02 12:40:38 +08:00
6 changed files with 571 additions and 16 deletions

View File

@@ -0,0 +1,72 @@
import request from '@/utils/request'
export function searchPartNumber(partnumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_基本件入库_零件图号',
param: '工艺计划流水号=' + partnumber
}
})
}
// 机床名称
export function getMachines() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_机床名称_根据机床查询',
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
}
})
}
// 获取组号
export function getGroups(stepNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组',
param: '机床流水号=' + stepNumber + '=int'
}
})
}
export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, k, m, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_横向赋值新建存储过程_新',
param: '项目流水号_check=0=string&机床流水号_check=' + checkbox_Machine + '=string&机床流水号=' + Machine + '=string&组件流水号_check=' + checkbox_Group + '=string&组件流水号=' + Group + '=string&零件图号_check=' + checkbox_number + '=string&零件图号=' + number + '=string&是否查询全部数据=1=string&单件是否外协=1=string&考核状态=6=int&开始时间_check=0&开始时间=' + k + '&结束时间_check=0&结束时间=' + m,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 获取组号
export function gettabledata1(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_加工进度查询_查询_New',
param: '工艺计划流水号=' + num + '=int'
}
})
}
export function submitEdit(Number1, processSerialNumber) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '车间生产管理工艺_零件工序_修改数据_工作者_根据人员编号',
param: '人员编号=' + Number1 + '=string&工序流水号=' + processSerialNumber + '=string'
}
})
}

View File

@@ -37,14 +37,14 @@ export function searchMateriel(num, num1) {
})
}
// 查询到货单
export function searchArriveOrder(num, num1, num8, num9, num2, num3, num5, num6, num7, pageCurrent, pageSize) {
export function searchArriveOrder(num8, num9, num2, num3, num5, num6, num7, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_到货单查询_新',
param: `供应商名称_check=${num}&供应商名称=${num1}&供应商名称_check=${num8}&供应商名称=${num9}&开始日期_check=${num2}&开始日期=${num3}&结束日期=${num5}&是否关联_check=${num6}&是否关联=${num7}`,
param: `供应商流水号_check=${num8}&供应商流水号=${num9}&开始日期_check=${num2}&开始日期=${num3}&结束日期=${num5}&是否关联_check=${num6}&是否关联=${num7}`,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -0,0 +1,362 @@
<template>
<div class="app-container">
<el-card>
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="getGroup">
<el-option
v-for="item in Machines"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin:0px 10px;width: 120px;" @change="getTableData">
<el-option
v-for="item in Groups"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="Partpaint" placeholder="零件号" clearable size="small" style="width: 180px;margin:0px 10px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 50;getTableData()">查询</el-button>
<el-button :disabled="Name===1" type="success" class="el-icon-search" size="small" style="margin-left: 220px;" @click="submit">完成</el-button>
</el-card>
<el-row>
<el-card style="width: 50%; float: left">
<el-table
:data="tableData"
loading="loading"
class="table"
highlight-current-row
border
height="750"
style="width: 100%"
@current-change="getCurrentRow">
<el-table-column align="center" type="index" label="序号" width="50"/>
<el-table-column align="center" label="机床号" show-overflow-tooltip width="120">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" show-overflow-tooltip width="120">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件图号" show-overflow-tooltip min-width="190">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" show-overflow-tooltip width="140">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="数量" width="80">
<template slot-scope="scope">
{{ scope.row.投产数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工完成" width="110">
<template slot-scope="scope">
{{ scope.row.完成日期 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[50, 200, 300, 400]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card style="width: 34.5%; float: left">
<el-table
:data="tableData1"
loading="loading"
class="table"
style="max-height: 830px"
highlight-current-row
empty-text=" "
border
@row-click="getRow">
<el-table-column type="index" label="序号" width="50"/>
<el-table-column align="center" label="工艺名" min-width="100">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作者" show-overflow-tooltip min-width="90">
<template slot-scope="scope">
{{ scope.row.操作者 }}
</template>
</el-table-column>
<el-table-column align="center" label="排产日期" min-width="110">
<template slot-scope="scope">
{{ scope.row.排产日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="完成日期" min-width="110">
<template slot-scope="scope">
{{ scope.row.完成日期 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-row>
</div>
</template>
<script>
import { getMachines, getGroups, getTable, gettabledata1, submitEdit, searchPartNumber } from '@/api/ManufacturingCenter/MaterialArrival'
import Cookie from 'js-cookie'
import { mapGetters } from 'vuex'
import { wsuri, name } from '@/utils/request'
export default {
data() {
return {
Machine: '', // 机床号
Machines: [],
Group: '', // 组号
Groups: [],
number: '', // 零件图号
tableData: [], // 工序表
loading: '',
checkbox_Machine: '', // 机床
checkbox_Group: '', // 分组
checkbox_number: '',
pageCurrent: 1,
pageSize: 50,
total: 0,
Name: 0,
Partpaint: '',
tableData1: [], // 工序表
radio: '',
completeTime: '', // 完成时间
row1: [],
isShow: true,
processSerialNumber: '', // 工序流水号
startTime: '', // 开始时间
endTime: '',
dateOfProduction: '', // 排产时间
title: '',
dialogFormVisible: false,
form: {
人员: '',
人员编号: '',
完成时间: ''
},
rules: {
人员: [{ required: true, message: '请选择操作员', trigger: 'change' }],
人员编号: [{ required: true, message: '人员编号', trigger: 'change' }],
完成时间: [{ required: true, message: '请选择实际完成时间', trigger: 'change' }]
},
dialogFormVisible1: false,
data2: [],
List1: [],
ssks: '',
Number1: '', // 人员编号
row2: [],
khbmbh: ''
}
},
computed: {
...mapGetters([
'id',
'token'
])
},
created() {
this.initWebpack()
this.getMachine()
},
methods: {
getMachine() {
if (Cookie.get('machineValue') !== undefined) {
this.Machine = ''
this.Machines = []
this.Group = ''
this.Groups = []
getMachines().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machines.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
value2: response.data[i].项目名称
})
}
if (Cookie.get('group') !== undefined) {
this.Machine = parseInt(Cookie.get('machineValue'))
this.getGroup()
this.getTableData()
this.Group = parseInt(Cookie.get('group'))
// this.getTableData()
Cookie.remove('machineValue')
Cookie.remove('group')
} else {
// this.getTableData()
Cookie.remove('machineValue')
Cookie.remove('group')
}
})
} else {
this.Machine = ''
this.Machines = []
this.Group = ''
this.Groups = []
getMachines().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machines.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
value2: response.data[i].项目名称
})
}
})
}
}, // 获取组号
getGroup() {
this.Group = ''
this.Groups = []
getGroups(this.Machine).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Groups.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
this.getTableData()
}, // 按条件查询
getTableData() {
this.tableData = []
this.Loading = true
if (this.Machine === '') {
this.checkbox_Machine = 0
} else {
this.checkbox_Machine = 1
}
if (this.Group === '') {
this.checkbox_Group = 0
} else {
this.checkbox_Group = 1
}
if (this.Partpaint === '') {
this.checkbox_number = 0
} else {
this.checkbox_number = 1
}
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.Partpaint, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
工艺计划流水号: response.data.rows[i].工艺计划流水号,
序号: response.data.rows[i].序号,
零件图号: response.data.rows[i].零件图号,
零件名称: response.data.rows[i].零件名称,
机床图号: response.data.rows[i].机床图号,
组号: response.data.rows[i].组号,
投产数量: response.data.rows[i].批次数量,
完成日期: response.data.rows[i].机加工实际完成时间 ? response.data.rows[i].机加工实际完成时间.split(' ')[0] : '' // 排产时间
})
}
}
this.total = response.data.total
this.loading = false
})
}, // 获取工序表
getCurrentRow(row) {
this.completeTime = ''
this.dateOfProduction = ''
this.processSerialNumber = ''
this.radio = true
this.tableData1 = []
this.row2 = row
gettabledata1(row.工艺计划流水号).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
工艺名称: response.data[i].工艺名称,
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
操作者: response.data[i].操作者,
工序流水号: response.data[i].工序流水号
})
}
}
})
},
// 初始化websocket
initWebpack() {
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
this.websock.onopen = this.websocketopen
this.websock.onmessage = this.websocketonmessage
this.websock.onclose = this.websocketclose
this.websock.onerror = this.websocketerror
},
// 打开
websocketopen() {
console.log('WebSocket连接成功')
this.websock.send('{<' + name + '>}')
},
// 数据接收
websocketonmessage(msg) {
this.partNumber = msg.data.split('|')[3]
this.partNumber = this.partNumber.slice(1)
this.getPaint(this.partNumber)
},
// 关闭
websocketclose() {
console.log('WebSocket关闭')
},
// 失败
websocketerror() {
console.log('WebSocket连接失败')
},
getPaint() {
searchPartNumber(this.partNumber).then(response => {
this.Partpaint = response.data[0].零件图号
return this.Partpaint
}).then(() => {
this.getTableData()
})
},
submit() {
submitEdit(this.id, this.processSerialNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.getCurrentRow(this.row2)
} else {
this.$message.error('补录失败')
}
})
},
getRow(row) {
this.processSerialNumber = row.工序流水号
row.完成时间 ? this.Name = 1 : this.Name = 0
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.getTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.getTableData()
}
}
}
</script>
<style>
.CompleteColor{
background: #9bd7fc !important;
}
</style>

View File

@@ -293,7 +293,30 @@
<sticky :z-index="10" :sticky-top="180">
<h1 class="word">设计</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData1" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<sticky :sticky-top="240">
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 13.5%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 45px">组号</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 20%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 90px">任务名称</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 13.3%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 134px">计划开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 13.3%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 134px">计划完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 13.3%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 134px">实际完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 13.3%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">工期</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 13.3%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">备注</div>
</div>
</sticky>
<el-table v-loading="loading1" :data="tableData1" :show-header="false" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.组号 }}
@@ -333,7 +356,33 @@
<sticky :z-index="11" :sticky-top="180">
<h1 class="word">采购</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData2" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<sticky :sticky-top="240">
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 12%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 44px">组号</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 17.6%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 90px">任务名称</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">实际开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 134px">实际完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">工期</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">备注</div>
</div>
</sticky>
<el-table v-loading="loading1" :data="tableData2" :show-header="false" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.组号 }}
@@ -378,7 +427,33 @@
<sticky :z-index="12" :sticky-top="180">
<h1 class="word">备料</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData3" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<sticky :sticky-top="240">
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 12%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 44px">组号</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 17.6%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 90px">任务名称</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">实际开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 134px">实际完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">工期</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">备注</div>
</div>
</sticky>
<el-table v-loading="loading1" :data="tableData3" :show-header="false" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.组号 }}
@@ -423,7 +498,33 @@
<sticky :z-index="13" :sticky-top="180">
<h1 class="word">制造</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData4" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<sticky :sticky-top="240">
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 12%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 44px">组号</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 17.6%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 90px">任务名称</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">实际开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 134px">实际完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">工期</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">备注</div>
</div>
</sticky>
<el-table v-loading="loading1" :data="tableData4" :show-header="false" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.组号 }}
@@ -468,7 +569,33 @@
<sticky :z-index="14" :sticky-top="180">
<h1 class="word">装配调试</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData5" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<sticky :sticky-top="240">
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 12%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 44px">组号</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 17.6%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 90px">任务名称</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">实际开始时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 132px">计划完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.8%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 134px">实际完成时间</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">工期</div>
</div>
<div style="border: 1px solid #ebeef5;line-height: 60px;width: 11.7%;float: left;background-color: rgb(0, 12, 57);">
<div style="margin:0 auto;width: 46px">备注</div>
</div>
</sticky>
<el-table v-loading="loading1" :data="tableData5" :show-header="false" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.组号 }}

View File

@@ -271,8 +271,6 @@ export default {
componentNum,
groupNum,
contractNum,
pageNum,
totalNum,
drawingNum,
name,
type,
@@ -297,12 +295,10 @@ export default {
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
for (let i = 0; i < 999; i++) {
@@ -321,7 +317,7 @@ export default {
} else {
if (machineNum && groupNum) {
await sleep(50)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, 1, 1, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else {
this.loading = false
this.disabled = false
@@ -349,12 +345,10 @@ export default {
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
for (let i = 0; i < 999; i++) {
@@ -373,7 +367,7 @@ export default {
} else {
if (machineNum && groupNum) {
await sleep(50)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, 1, 1, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else {
this.loading = false
this.disabled = false

View File

@@ -664,7 +664,7 @@ export default {
} else {
this.check2 = 0
}
searchArriveOrder(0, 0, this.check, this.supplierNameValue, this.check1, this.dateRange[0], this.dateRange[1], this.check2, this.PickingValue, this.pageCurrent4, this.pageSize4).then(response => {
searchArriveOrder(this.check, this.supplierNameValue, this.check1, this.dateRange[0], this.dateRange[1], this.check2, this.PickingValue, this.pageCurrent4, this.pageSize4).then(response => {
this.tableData4 = response.data.rows
this.total4 = response.data.total
})