自制件入库

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