基本件入库

This commit is contained in:
zhangdingyu
2019-02-27 16:51:55 +08:00
parent b40bc41105
commit 28c383c1d9
2 changed files with 15 additions and 17 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://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`, baseURL: `http://192.168.0.106:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间

View File

@@ -5,14 +5,11 @@
<el-input v-model="Partpaint" clearable size="small" style="width:200px" /> <el-input v-model="Partpaint" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</el-button> <el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</el-button>
<el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" @click="Empty()">清空</el-button> <el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" @click="Empty()">清空</el-button>
<el-button type="primary" size="small" class="el-icon-success" style="margin: 0 0 0 10px" @click="Innumber">入库</el-button>
</el-card> </el-card>
<el-card> <el-card>
<el-table <el-table v-loading="listLoading" :data="tableData" border size="mini" style="width: 100%" height="650px">
v-loading="listLoading"
:data="tableData"
border
size="mini"
style="width: 100%;height: 650px" >
<el-table-column <el-table-column
label="序号" label="序号"
align="center" align="center"
@@ -33,7 +30,6 @@
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划数量" align="center" min-width="100"> <el-table-column label="计划数量" align="center" min-width="100">
<template slot-scope="scope" align="center"> <template slot-scope="scope" align="center">
<el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/> <el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/>
@@ -71,9 +67,8 @@
<el-input v-model="tableData[scope.$index].note" clearable size="small"/> <el-input v-model="tableData[scope.$index].note" clearable size="small"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="150"> <el-table-column label="操作" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
<el-button <el-button
:disabled="scope.row.是否禁用" :disabled="scope.row.是否禁用"
size="mini" size="mini"
@@ -82,10 +77,9 @@
@click="handleDelete(scope.$index, scope.row)">移除</el-button> @click="handleDelete(scope.$index, scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</div> </div>
</template> </template>
@@ -188,17 +182,21 @@ export default {
}, },
// 扫描查询 // 扫描查询
getscantable() { getscantable() {
if (this.partNumber === '') { if (this.partNumber === '' || this.partNumber === null) {
this.$message.error('请输入零件号') this.$message.error('请输入零件号')
} else { } else {
this.listLoading = true this.listLoading = true
searchTable(this.partNumber).then(response => { searchTable(this.partNumber).then(response => {
if (response.data.length === 0) { if (response.data.length === 0) {
this.listLoading = false this.listLoading = false
this.$message.warning('无此零件') this.$message.warning('该零件未加工完成')
} else if (response.data[0].剩余数量 === 0) { } else if (response.data[0].考核状态 === 8) {
this.$message.warning('该零件已入库完毕') this.listLoading = false
} else { this.$message.warning('该零件已入库')
} else if (response.data[0].考核状态 === 9) {
this.listLoading = false
this.$message.warning('该零件已出库')
} else if (response.data[0].考核状态 === 7) {
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) { if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
this.ace = this.ace + 1 this.ace = this.ace + 1