自制件入库

This commit is contained in:
Vergil
2020-05-12 13:57:47 +08:00
parent e5a23954be
commit cadfb7f8a9

View File

@@ -2,27 +2,20 @@
<div class="app-container">
<el-card>
<el-row>
<!-- <el-select v-model="entryNameValue" placeholder="项目名称" style="width:150px;margin: 10px 10px 0px 10px" size="small" clearable filterable @change="SearchMachine">-->
<!-- <el-option-->
<!-- v-for="item in entryName"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<!-- <el-select v-model="machineToolValue" placeholder="机床号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">-->
<!-- <el-option-->
<!-- v-for="item in machineTool"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<!-- <el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable style="width: 100px;margin: 10px 10px 0px 10px">-->
<!-- <el-option-->
<!-- v-for="item in groupNumber"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<el-select v-model="machineToolValue" placeholder="机床号" size="small" filterable clearable style="width: 150px" @change="searchGroupList">
<el-option
v-for="item in machineTool"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupNumberValue" placeholder="号" size="small" clearable style="width: 100px;">
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width: 180px;margin-left: 0px"/>
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button>
<el-button type="warning" size="small" style="margin: 15px 0 0 10px" plain @click="wareHousing">出库</el-button>
@@ -125,8 +118,6 @@
</template>
<script>
// import { url } from '@/utils/request'
// import axios from 'axios'
import { initProject, searchmachine, searchgroup, searchdata, warehousing, selectdepartment, selectleaders } from '@/api/Inventory/SelfMadePartsWarehouseOut'
export default {
data() {
@@ -162,8 +153,8 @@ export default {
}
},
created() {
this.fetchData()
this.searchData()
this.SearchMachine()
// this.searchData()
},
methods: {
searchData() {
@@ -173,6 +164,7 @@ export default {
const groupNumberValue_check = this.groupNumberValue === '' ? 0 : 1
const partNumber_check = this.partNumber === '' || this.partNumber === null ? 0 : 1
searchdata(entryNameValue_check, this.entryNameValue, machineToolValue_check, this.machineToolValue, groupNumberValue_check, this.groupNumberValue, partNumber_check, this.partNumber, this.pageCurrent, this.pageSize).then(response => {
console.log(response.data)
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
@@ -227,16 +219,14 @@ export default {
this.machineTool = []
this.groupNumberValue = ''
this.groupNumber = []
if (this.entryNameValue) {
searchmachine(this.entryNameValue, 1).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineTool.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}
searchmachine(0, 0).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineTool.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
// 查询组号
searchGroupList() {