This commit is contained in:
lixin
2018-12-15 20:13:28 +08:00
parent 5239e0db48
commit 6cdec71dfd
3 changed files with 38 additions and 10 deletions

View File

@@ -61,15 +61,16 @@ export function searchErrorRecord(pageCurrent, pageSize, project_check, project,
} }
}) })
} }
// 补投查询 // 补投查询
export function searchReplacementCard(card_check, card) { export function searchReplacementCard(pageCurrent, pageSize, card_check, card) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '库存管理_补投单_补投单查询', name: '库存管理_补投单_补投单查询',
param: '补投单编号_check=' + card_check + '&补投单编号=' + card param: '补投单编号_check=' + card_check + '&补投单编号=' + card,
Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
@@ -97,3 +98,15 @@ export function deleteReplacementCard(Number) {
} }
}) })
} }
// 补投增加
export function addCardDetail(Number, project, machine, team, mun, reason) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_仓库补投_补投单明细增加',
param: '补投单流水号=' + Number + '&项目流水号=' + project + '&机床流水号=' + machine + '&组件流水号=' + team + '&补投数量=' + mun + '&原因=' + reason
}
})
}

View File

@@ -113,7 +113,7 @@
</el-table> </el-table>
</el-card> </el-card>
<!--仓库表单--> <!--仓库表单-->
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center width="450px"> <el-dialog :visible.sync="dialogFormVisible" title="仓库" center width="450px">
<el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="110px" class="demo-ruleForm"> <el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="110px" class="demo-ruleForm">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@@ -162,7 +162,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人" prop="ContactpeopleValue"> <el-form-item label="联系人" prop="ContactpeopleValue">
<el-select v-model="form.ContactpeopleValue" clearable filterable size="small" placeholder="领用者" style="width: 200px;margin-right:10px"> <el-select v-model="form.ContactpeopleValue" clearable filterable size="small" placeholder="联系人" style="width: 200px;margin-right:10px">
<el-option <el-option
v-for="item in Contactpeople" v-for="item in Contactpeople"
:key="item.value" :key="item.value"

View File

@@ -165,13 +165,13 @@
size="small" size="small"
icon="el-icon-search" icon="el-icon-search"
style="margin-left: 10px" style="margin-left: 10px"
@click="pageCurrent3=1;pageSize3=10;total3=0;searchTable2()">查询</el-button> @click="pageCurrent3=1;pageSize3=10;total3=0;getReplacement()">查询</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
icon="el-icon-plus" icon="el-icon-plus"
style="margin-left: 10px" style="margin-left: 10px"
@click="addTableData">创建补投单</el-button> @click="addCard">创建补投单</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@@ -257,7 +257,7 @@
</template> </template>
<script> <script>
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard } from '@/api/Inventory/PartsReplacement' import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard } from '@/api/Inventory/PartsReplacement'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
@@ -289,7 +289,8 @@ export default {
MachineValue_check: '', MachineValue_check: '',
GroupNumValue_check: '', GroupNumValue_check: '',
repleacecard: '', repleacecard: '',
repleacecard_check: '' repleacecard_check: '',
people: ''
} }
}, },
computed: { computed: {
@@ -299,8 +300,13 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
this.getpeopleid()
}, },
methods: { methods: {
// 获取人员编号
getpeopleid() {
this.people = this.id
},
fetchData() { fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称 this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
}, },
@@ -416,7 +422,16 @@ export default {
this.total3 = response.data.total this.total3 = response.data.total
this.listLoading3 = false this.listLoading3 = false
}) })
this.getErrorRecord() },
addCard() {
addReplacementCard(this.people).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.getReplacement()
} else {
this.$message.error('删除失败')
}
})
} }
} }
} }