This commit is contained in:
caoxinyu
2018-12-15 20:15:29 +08:00
10 changed files with 567 additions and 261 deletions

View File

@@ -19,7 +19,7 @@ export function searchProgramme() {
method: 'post',
data: {
type: '1',
name: 'dbo.设备管理_基础表_班次表_查询数据'
name: '设备管理_基础表_班次表_查询班次'
}
})
}
@@ -60,4 +60,15 @@ export function deleteShift(shiftCode) {
}
})
}
// 删除班次
export function addShiftType() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '设备管理_基础表_班次表_班次类型与工作时间_增加'
}
})
}

View File

@@ -61,3 +61,52 @@ export function searchErrorRecord(pageCurrent, pageSize, project_check, project,
}
})
}
// 补投单查询
export function searchReplacementCard(pageCurrent, pageSize, card_check, card) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_补投单_补投单查询',
param: '补投单编号_check=' + card_check + '&补投单编号=' + card,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 补投增加
export function addReplacementCard(Number) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_补投单_补投单增加',
param: '人员编号=' + Number
}
})
}
// 补投删除
export function deleteReplacementCard(Number) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_补投单_补投单删除',
param: '补投单流水号=' + 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

@@ -1,16 +1,5 @@
import request from '@/utils/request'
// 初始化询价状态
export function initInquiryState() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购部采购_询价状态_查询'
}
})
}
// 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, check1, num1, check2, num2, person) {
return request({

View File

@@ -60,14 +60,3 @@ export function searchTable2(num) {
}
})
}
export function submitApproval(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_合同审批_修改数据',
param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2
}
})
}

View File

@@ -1,126 +1,179 @@
<template>
<div class="app-container">
<table style="width: 100%">
<el-card>
<span style="margin-left: 15px">班次类型:</span>
<el-select v-model="roleName" placeholder="班次类型" clearable size="small" style="width:200px">
<el-option
v-for="item in roleNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="searchTable()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addShifttable()">增加</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="ShiftType()">班次类型工作时间</el-button>
</el-card>
<el-card>
<span style="margin-left: 15px">班次类型:</span>
<el-select v-model="roleName" placeholder="班次类型" clearable size="small" style="width:200px">
<el-option
v-for="item in roleNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent1=1;searchTable()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handelAdd">增加</el-button>
</el-card>
<el-card>
<el-table :data="tableData" highlight-current-row>
<el-table-column label="开始工作时间">
<template slot-scope="scope">
{{ scope.row.开始工作时间 }}
</template>
</el-table-column>
<el-table-column disabled label="结束工作时间" >
<template slot-scope="scope">
{{ scope.row.结束工作时间 }}
</template>
</el-table-column>
<el-table-column label="班次类型">
<template slot-scope="scope">
{{ scope.row.班次类型 }}
</template>
</el-table-column>
<el-table-column label="班次代码">
<template slot-scope="scope">
{{ scope.row.班次代码 }}
</template>
</el-table-column>
<el-table-column label="是否夜班">
<template slot-scope="scope">
{{ scope.row.是否夜班 }}
</template>
</el-table-column>
<el-table-column label="是否工作">
<template slot-scope="scope">
{{ scope.row.是否工作 }}
</template>
</el-table-column>
<el-table-column label="是否工作">
<template slot-scope="scope">
{{ scope.row.是否工作 }}
</template>
</el-table-column>
<el-table-column label="日工作能力">
<template slot-scope="scope">
{{ scope.row.日工作能力 }}
</template>
</el-table-column>
<el-table-column label="是否可以安排高难度件">
<template slot-scope="scope">
{{ scope.row.是否可以安排高难度件 }}
</template>
</el-table-column>
<el-table-column label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="submitEdit(scope.$index, scope.row)">修改</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="10"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
</table>
<el-dialog :visible.sync="dialogFormVisible1" title="增加" center style="min-height: 270px" width="800px">
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-card>
<el-table
:data="tableData"
border
size="mini"
style="width: 100%;height: 400px;">
<el-table-column label="开始工作时间">
<template slot-scope="scope">
{{ scope.row.开始工作时间 }}
</template>
</el-table-column>
<el-table-column disabled label="结束工作时间" >
<template slot-scope="scope">
{{ scope.row.结束工作时间 }}
</template>
</el-table-column>
<el-table-column label="班次类型">
<template slot-scope="scope">
{{ scope.row.班次类型 }}
</template>
</el-table-column>
<el-table-column label="班次代码">
<template slot-scope="scope">
{{ scope.row.班次代码 }}
</template>
</el-table-column>
<el-table-column label="是否夜班">
<template slot-scope="scope">
{{ scope.row.是否夜班 }}
</template>
</el-table-column>
<el-table-column label="是否工作">
<template slot-scope="scope">
{{ scope.row.是否工作 }}
</template>
</el-table-column>
<el-table-column label="是否工作">
<template slot-scope="scope">
{{ scope.row.是否工作 }}
</template>
</el-table-column>
<el-table-column label="日工作能力">
<template slot-scope="scope">
{{ scope.row.日工作能力 }}
</template>
</el-table-column>
<el-table-column label="是否可以安排高难度件">
<template slot-scope="scope">
{{ scope.row.是否可以安排高难度件 }}
</template>
</el-table-column>
<el-table-column label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="aeditShifttable(scope.row)">修改</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="10"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :visible.sync ="dialogFormVisible1" title="增加" center style="min-height: 270px" width="900px">
<el-form ref="form1" :model="form1" :rules="rules" label-position="right" label-width="160px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="员工姓名" prop="staffName">
<el-input v-model="form1.staffName" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="dialogTableVisible()"/>
<el-col :span="10">
<el-form-item label="开始工作时间" >
<el-time-picker
v-model="form1.value"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="角色名称" prop="roleName">
<el-select v-model="form1.roleName" placeholder="角色名称" size="small" clearable style="width:200px">
<el-form-item label="结束工作时间" >
<el-time-picker
v-model="form1.value2"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="班次类型" >
<el-input
v-model="form1.shifttype"
size="mini"
style="width:200px"/>
</el-form-item>
<el-form-item label="班次代码" >
<el-input v-model="form1.shiftnumber" size="mini" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="是否夜班" >
<el-select v-model="form1.nightwork" placeholder="请选择" size="mini">
<el-option
v-for="item in roleNames"
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考勤编号" >
<el-input
v-model="cjscgy"
disabled
size="small"
style="width:200px"/>
<el-form-item label="是否工作" >
<el-select v-model="form1.work" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="所属部门" >
<el-input v-model="ssks" size="small" style="width:200px"/>
<el-form-item label="是否可以安排临时件" >
<el-select v-model="form1.temporary" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否可以安排高难度件" >
<el-select v-model="form1.difficult" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" >
<el-input
v-model="form1.note"
size="mini"
style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
@@ -130,34 +183,84 @@
<el-button type="primary" @click="submitAdd1()"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="编辑" center style="min-height: 270px" width="800px">
<el-form ref="form2" :model="form2" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm">
<el-dialog :visible.sync="dialogFormVisible2" title="编辑" center style="min-height: 270px" width="900px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="员工姓名" >
<el-input v-model="form2.staffName" disabled size="small" clearable style="width:200px"/>
<el-col :span="10">
<el-form-item label="开始工作时间" >
<el-time-picker
v-model="form1.value"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="角色名称" prop="roleName">
<el-select v-model="form2.roleName" placeholder="角色名称" clearable size="small" style="width:200px">
<el-form-item label="结束工作时间" >
<el-time-picker
v-model="form1.value2"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="班次类型" >
<el-input
v-model="form2.shifttype"
size="mini"
style="width:200px"/>
</el-form-item>
<el-form-item label="班次代码" >
<el-input v-model="form2.shiftnumber" size="mini" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="是否夜班" >
<el-select v-model="form2.nightwork" placeholder="请选择" size="mini">
<el-option
v-for="item in roleNames"
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考勤编号" >
<el-input
v-model="cjscgy"
disabled
size="small"
style="width:200px"/>
<el-form-item label="是否工作" >
<el-select v-model="form2.work" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item disabled="true" label="所属部门" >
<el-input v-model="ssks" disabled size="small" style="width:200px"/>
<el-form-item label="是否可以安排临时件" >
<el-select v-model="form2.temporary" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否可以安排高难度件" >
<el-select v-model="form2.difficult" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" >
<el-input
v-model="form2.note"
size="mini"
style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
@@ -167,12 +270,11 @@
<el-button type="primary" @click="submitAdd2()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getScheduling, searchProgramme, addShift, editShift, deleteShift } from '@/api/BasicData/ShiftManagement'
import { getScheduling, searchProgramme, addShift, editShift, deleteShift, addShiftType } from '@/api/BasicData/ShiftManagement'
export default {
data() {
return {
@@ -183,7 +285,52 @@ export default {
minutes: '',
seconds: '',
tableDatate: [],
dialogFormVisible: false
dialogFormVisible: false,
form1: {
value: '',
value2: '',
shifttype: '',
shiftnumber: '',
nightwork: '',
work: '',
temporary: '',
difficult: '',
note: ''
},
options: [{
value: '1',
label: '是'
}, {
value: '0',
label: '否'
}],
rules: { // 表单验证规则
value: [{ required: true, message: '请选择时间', trigger: 'blur' }],
value2: [{ required: true, message: '请选择时间', trigger: 'blur' }],
shifttype: [{ required: true, message: '请输入班次', trigger: 'change' }]
},
form2: {
value: new Date(2016, 9, 10, 18, 40),
value2: new Date(2016, 9, 10, 18, 40),
shifttype: '',
shiftnumber: '',
nightwork: '',
work: '',
temporary: '',
difficult: '',
note: ''
},
dialogFormVisible1: false,
dialogFormVisible2: false,
pageCurrent: 1,
pageSize: 10,
total: 0,
rules2: { // 表单验证规则
value: [{ required: true, message: '请选择时间', trigger: 'blur' }],
value2: [{ required: true, message: '请选择时间', trigger: 'blur' }],
shifttype: [{ required: true, message: '请输入班次', trigger: 'change' }]
},
listnumber: ''
}
},
created() {
@@ -192,6 +339,7 @@ export default {
methods: {
searchData() {
searchProgramme().then(response => {
console.log(response.data)
for (let i = 0; i < response.data.length; i++) {
this.roleNames.push({
label: response.data[i].班次代码,
@@ -203,7 +351,6 @@ export default {
searchTable() {
getScheduling(this.roleName).then(response => {
this.tableDatate = response.data
console.log(response.data)
for (let i = 0; i < this.tableDatate.length; i++) {
this.hour = this.tableDatate[i].开始工作时间.Hours
this.minutes = this.tableDatate[i].开始工作时间.Minutes
@@ -219,18 +366,33 @@ export default {
this.tableDatate[i].结束工作时间 = this.hour.toString() + ':' + this.minutes.toString() + ':' + this.seconds.toString()
}
this.tableData = this.tableDatate
this.total = this.tableData.length
})
},
addShifttable() {
this.dialogFormVisible1 = true
},
aeditShifttable(row) {
this.listnumber = row.序号
this.form2.value = row.开始工作时间
this.form2.value2 = row.结束工作时间
this.form2.shifttype = row.班次类型
this.form2.shiftnumber = row.班次代码
this.form2.nightwork = row.是否夜班
this.form2.work = row.是否工作
this.form2.temporary = row.是否可以安排临时件
this.form2.difficult = row.是否可以安排高难度件
this.form2.note = row.备注
this.dialogFormVisible2 = true
},
submitAdd1() {
this.$refs['form1'].validate((valid) => {
if (valid) {
addShift(this.personnelNumber, this.form1.roleName).then(response => {
addShift(this.form1.value, this.form1.value2, this.form1.shifttype, this.form1.shiftnumber, this.form1.nightwork, this.form1.work, this.form1.temporary, this.form1.difficult, this.form1.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.ssks = ''
this.form1.staffName = ''
this.form1.roleName = ''
this.searchData()
this.form1 = {}
this.searchTable()
this.dialogFormVisible1 = false
} else { this.$message.error('增加失败') }
})
@@ -240,15 +402,23 @@ export default {
}
})
},
ShiftType() {
addShiftType().then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchTable()
} else { this.$message.error('增加失败') }
})
},
submitAdd2() {
this.$refs['form2'].validate((valid) => {
if (valid) {
editShift(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => {
editShift(this.listnumber, this.form2.value, this.form2.value2, this.form2.shifttype, this.form2.shiftnumber, this.form2.nightwork, this.form2.work, this.form2.temporary, this.form2.difficult, this.form2.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.ssks = ''
this.searchData()
this.searchTable()
this.dialogFormVisible2 = false
this.form2 = {}
} else { this.$message.error('修改失败') }
})
} else {
@@ -263,11 +433,11 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteShift(row.人员角色流水).then(response => {
deleteShift(row.).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
} else { this.$message.error('删除失败') }
this.searchData()
this.searchTable()
})
}).catch(() => {
this.$message({
@@ -276,17 +446,20 @@ export default {
})
})
},
handleCurrentChange(row) { // 获取当前行人员信息
this.ssks = row.节点名称
this.number = row.考勤编号
this.name = row.姓名
this.personnelNumber = row.人员编号
callOFF() {
this.dialogFormVisible1 = false
this.form1 = {}
this.dialogFormVisible2 = false
this.form2 = {}
},
getName() { // 提交人员
this.cjscgy = this.number
this.dialogFormVisible = false
this.form1.staffName = this.name
this.form2.staffName = this.name
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}

View File

@@ -113,7 +113,7 @@
</el-table>
</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-row>
<el-col :span="12">
@@ -162,7 +162,7 @@
<el-row>
<el-col :span="12">
<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
v-for="item in Contactpeople"
:key="item.value"

View File

@@ -38,7 +38,7 @@
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
@click="pageCurrent=1;pageSize=10;total=0;getAlterRecord()">查询</el-button>
</el-card>
<el-card>
<el-table
@@ -50,49 +50,39 @@
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="物料名称" min-width="200" align="center">
<el-table-column label="项目名称" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" min-width="200" align="center">
<el-table-column label="机床图号" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料型 }}
{{ scope.row.机床图 }}
</template>
</el-table-column>
<el-table-column label="物料规格" min-width="200" align="center">
<el-table-column label="组号" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="供货商" min-width="200" align="center">
<el-table-column label="数量" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="当前库存量" min-width="100" align="center">
<el-table-column label="修改原因" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
</template>
</el-table-column>
<el-table-column label="安全库存量" min-width="100" align="center">
<el-table-column label="姓名" min-width="100" align="center">
<template slot-scope="scope">
<template v-if="scope.row.changeSafeValue">
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.安全库存量 }}</span>
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="设置" min-width="100" align="center">
<el-table-column label="修改日期" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button
v-else
type="primary"
size="mini"
icon="el-icon-edit"
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
{{ scope.row.修改日期 }}
</template>
</el-table-column>
</el-table>
@@ -104,8 +94,8 @@
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<el-table
v-loading="loading1"
@@ -116,67 +106,52 @@
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="物料名称" min-width="200" align="center">
<el-table-column label="项目名称" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" min-width="200" align="center">
<el-table-column label="机床图号" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料型 }}
{{ scope.row.机床图 }}
</template>
</el-table-column>
<el-table-column label="物料规格" min-width="200" align="center">
<el-table-column label="组号" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="供货商" min-width="200" align="center">
<el-table-column label="异常数量" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
{{ scope.row.异常数量 }}
</template>
</el-table-column>
<el-table-column label="当前库存量" min-width="100" align="center">
<el-table-column label="异常原因" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
{{ scope.row.异常原因 }}
</template>
</el-table-column>
<el-table-column label="安全库存量" min-width="100" align="center">
<el-table-column label="货位流水号" min-width="100" align="center">
<template slot-scope="scope">
<template v-if="scope.row.changeSafeValue">
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.安全库存量 }}</span>
</template>
</el-table-column>
<el-table-column label="设置" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button
v-else
type="primary"
size="mini"
icon="el-icon-edit"
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
{{ scope.row.货位流水号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<el-card>
<span>请购单号:</span>
<el-input v-model="purchasecard" placeholder="请购单号" size="small" clearable style="width: 150px"/>
<span>补投单号:</span>
<el-input v-model="repleacecard" placeholder="补投单号" size="small" clearable style="width: 150px"/>
<span>仓库:</span>
<el-select v-model="HouseNumber" placeholder="请选择仓库" size="small" @change="searchDemo();payMethodChange()">
<el-option
@@ -190,13 +165,13 @@
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
@click="pageCurrent3=1;pageSize3=10;total3=0;getReplacement()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="addTableData">创建离线请购</el-button>
@click="addCard">创建补投</el-button>
<el-button
type="primary"
size="small"
@@ -206,30 +181,25 @@
</el-card>
<el-card>
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="请购单状态" align="center" width="80" fixed="left">
<el-table-column label="补投单状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否传递)===0" type="warning" size="small">未传递</el-tag>
<el-tag v-if="parseInt(scope.row.是否传递)===1" type="primary" size="small">已传递</el-tag>
</template>
</el-table-column>
<el-table-column label="请购单编号" align="center" min-width="150">
<el-table-column label="补投单编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请购单编号 }}
{{ scope.row.补投单编号 }}
</template>
</el-table-column>
<el-table-column label="请购人" align="center" min-width="150">
<el-table-column label="姓名" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="250">
<el-table-column label="补投时间" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="请购时间" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.请购时间.split(' ')[0] }}
{{ scope.row.补投时间 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="280" fixed="right">
@@ -240,14 +210,14 @@
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent2"
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
:page-size="pageSize3"
:total="total3"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
<el-button style="margin-left:500px;" type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">传递</el-button>
</div>
<el-table v-loading="" :data="tableData4" border style="max-height: 300px;" height="300px" size="mini">
@@ -287,7 +257,7 @@
</template>
<script>
import { initProject, searchmachine, searchTeam } from '@/api/Inventory/PartsReplacement'
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard } from '@/api/Inventory/PartsReplacement'
import { mapGetters } from 'vuex'
export default {
data() {
@@ -298,7 +268,29 @@ export default {
Machine: [],
GroupNumValue: '',
GroupNum: '',
tableData1: []
tableData1: [],
tableData2: [],
tableData3: [],
tableData4: [],
listLoading: false,
listLoading2: false,
listLoading3: false,
listLoading4: false,
PageCurrent: 1,
PageSize: 10,
total: 0,
PageCurrent2: 1,
PageSize2: 10,
total2: 0,
PageCurrent3: 1,
PageSize3: 10,
total3: 0,
ProjectValue_check: '',
MachineValue_check: '',
GroupNumValue_check: '',
repleacecard: '',
repleacecard_check: '',
people: ''
}
},
computed: {
@@ -308,8 +300,13 @@ export default {
},
created() {
this.fetchData()
this.getpeopleid()
},
methods: {
// 获取人员编号
getpeopleid() {
this.people = this.id
},
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
},
@@ -341,6 +338,100 @@ export default {
})
}
})
},
// 查询修改记录
getAlterRecord() {
this.listLoading = true
this.tableData1 = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
}
if (this.MachineValue === '') {
this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
}
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
}
searchAlterRecord(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableData1 = response.data.rows
this.total = response.data.total
this.listLoading = false
})
this.getErrorRecord()
},
// 查询异常记录
getErrorRecord() {
this.listLoading2 = true
this.tableData2 = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
}
if (this.MachineValue === '') {
this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
}
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
}
searchErrorRecord(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
this.listLoading2 = false
})
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.searchPartinfo()
},
handleCurrentChange(val) {
this.PageCurrent = val
this.searchPartinfo()
},
handleSizeChange2(val) {
this.PageCurrent2 = 1
this.PageSize2 = val
this.searchPartinfo()
},
handleCurrentChange2(val) {
this.PageCurrent2 = val
this.searchPartinfo()
},
// 查询补投单
getReplacement() {
this.listLoading3 = true
this.tableData3 = []
if (this.repleacecard === '') {
this.repleacecard_check = 0
} else {
this.repleacecard_check = 1
}
searchReplacementCard(this.PageCurrent3, this.PageSize3, this.repleacecard_check, this.repleacecard).then(response => {
this.tableData3 = response.data.rows
this.total3 = response.data.total
this.listLoading3 = false
})
},
addCard() {
addReplacementCard(this.people).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.getReplacement()
} else {
this.$message.error('删除失败')
}
})
}
}
}

View File

@@ -11,6 +11,7 @@
:data="tableData1"
border
style="width: 100%;"
size="mini"
height="200"
@row-click = "searchListDetailt()">
<el-table-column
@@ -55,6 +56,7 @@
:data="tableDataPicking"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
@@ -152,6 +154,7 @@
:data="tableDataBasic"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
@@ -234,6 +237,7 @@
:data="tableDataPurchase"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"

View File

@@ -5,8 +5,8 @@
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini">查询全部</el-checkbox>
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
</el-row>
</el-card>

View File

@@ -605,6 +605,7 @@ export default {
},
created() {
this.fetchData()
this.searchData()
},
methods: {
fetchData() {
@@ -617,7 +618,6 @@ export default {
searchData() {
this.loading = true
search(this.pageCurrent, this.pageSize, this.PrNum).then(response => {
console.log(response.data)
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false