Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0
This commit is contained in:
@@ -1,5 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化人员
|
||||
export function initPickPerson() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: 'select 姓名,人员编号 from 人事档案管理_人员名单 where 是否离职 = 0'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化机床项目
|
||||
export function initMachineProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 组件查询
|
||||
export function searchgroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 领料单查询
|
||||
export function searchList(pageCurrent, pageSize, listNumber_check, listNumber) {
|
||||
return request({
|
||||
@@ -37,3 +71,15 @@ export function searchStockNumber(...params) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 出库
|
||||
export function submitOutStore(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_物料出库_出库记录_增加数据',
|
||||
param: `物料流水号=${params[0]}&货位流水号=${params[1]}&出库数量=${params[2]}&出库人流水号=${params[3]}&基本件流水号=${params[4]}&标准件和外购件流水号=${params[5]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -62,14 +62,14 @@ export function production(num, a, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q,
|
||||
})
|
||||
}
|
||||
// 合并投产
|
||||
export function production2(num, a, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, x, s, t, u, v, w) {
|
||||
export function production2(num1, num, b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, x, s, t, u, v, w) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '设备管理_可安排生产计划零件排序_制定组时间_同时传递_合并投产',
|
||||
param: '组件零件基本件流水号=' + num + '=int&投产类型流水号=' + a + '=int&数据类型=' + b + '=int&投产批次=1=int&批次数量=' + d + '=string&计划开始时间=' + e + '=string&计划结束时间=' + f + '=string&工艺计划开始时间=' + g + '=string&工艺计划结束时间=' + h + '=string&定额计划开始时间=' + i + '=string&定额计划结束时间=' + j + '=string&计划编制计划开始时间=' + k + '=string&计划编制计划结束时间=' + l + '=string&机加工开始时间=' + m + '=string&机加工结束时间=' + n + '=string&单件外协时间=' + o + '=string&单件是否外协=' + p + '=int&单件是否外协分类=' + q + '=string&计划制定人员编号=' + x + '&材料流水号=' + s + '=int&是否临时件=' + t + '=int&是否难度件=' + u + '=string&是否着急=' + v + '=int&是否白图=' + w + '=int'
|
||||
param: '零件图号=' + num1 + '&机床流水号=' + num + '&投产类型流水号=' + 1 + '=int&数据类型=' + b + '=int&投产批次=1=int&批次数量=' + d + '=string&计划开始时间=' + e + '=string&计划结束时间=' + f + '=string&工艺计划开始时间=' + g + '=string&工艺计划结束时间=' + h + '=string&定额计划开始时间=' + i + '=string&定额计划结束时间=' + j + '=string&计划编制计划开始时间=' + k + '=string&计划编制计划结束时间=' + l + '=string&机加工开始时间=' + m + '=string&机加工结束时间=' + n + '=string&单件外协时间=' + o + '=string&单件是否外协=' + p + '=int&单件是否外协分类=' + q + '=string&计划制定人员编号=' + x + '&材料流水号=' + s + '=int&是否临时件=' + t + '=int&是否难度件=' + u + '=string&是否着急=' + v + '=int&是否白图=' + w + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="selecttable">查询</el-button>-->
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
|
||||
@@ -282,6 +282,11 @@
|
||||
{{ scope.row.备件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已领数量" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="true" label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="!!scope.row.是否出库" size="mini" type="danger" icon="el-icon-delete" @click="dropListDetail(scope.row)">删除</el-button>
|
||||
@@ -612,7 +617,7 @@ export default {
|
||||
this.$message.success('删除成功')
|
||||
this.clickList()
|
||||
} else {
|
||||
this.$message.error('已确认领回,不可删除')
|
||||
this.$message.error('已领取,不可删除')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="领回确认" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否启用)===1" type="warning">未确认</el-tag>
|
||||
<el-tag v-else type="success">已确认</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否启用)===1" type="warning" size="small">未确认</el-tag>
|
||||
<el-tag v-else type="success" size="small">已确认</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -47,7 +47,7 @@
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<h4>领料单明细:{{ pickingListNumberShow }}</h4>
|
||||
<el-table :data="pickListTable2" highlight-current-row border style="width: 100%;" size="mini" height="300" @row-click="clickListDetail">
|
||||
<el-table :data="pickListTable2" highlight-current-row border style="width: 100%;" size="mini" height="400" @row-click="clickListDetail">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
@@ -86,7 +86,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="已领数量" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备件数量 }}
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" icon="el-icon-back" type="primary" disabled>归还</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -144,11 +149,69 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="物料出库" center width="380px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left">
|
||||
<el-form-item label="机床" prop="machineValue" label-width="100px">
|
||||
<el-select v-model="form1.machineValue" :disabled="true" filterable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px"> {{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组" prop="groupNumValue" label-width="100px">
|
||||
<el-select v-model="form1.groupNumValue" :disabled="true" filterable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="outNumber" label-width="100px" size="small">
|
||||
<el-input-number v-model="form1.outNumber" :min="0.01" :precision="2" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库人" prop="personValue" label-width="100px">
|
||||
<el-select v-model="form1.personValue" :disabled="true" size="small" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible1=false">取消</el-button>
|
||||
<el-button type="primary" @click="submitOutStore()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="异常记录" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left">
|
||||
<el-form-item label="异常数量" prop="errorNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form2.errorNumber" size="small" placeholder="异常数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="异常原因" prop="reason" label-width="100px">
|
||||
<el-input v-model="form2.reason" size="small" placeholder="异常原因" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible2=false">取消</el-button>
|
||||
<el-button type="primary" @click="submitErrorRecord()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchList, searchListDetail, searchStockNumber } from '@/api/Inventory/MaterialOut'
|
||||
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber, submitOutStore } from '@/api/Inventory/MaterialOut'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'MaterialOut',
|
||||
data() {
|
||||
@@ -160,13 +223,90 @@ export default {
|
||||
pageSize3: 20,
|
||||
total3: 0,
|
||||
pickListTable2: [],
|
||||
StockNumberTable: []
|
||||
StockNumberTable: [],
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
form1: {
|
||||
machineValue: '',
|
||||
groupNumValue: '',
|
||||
outNumber: '',
|
||||
personValue: ''
|
||||
},
|
||||
form2: {
|
||||
errorNumber: '',
|
||||
reason: '',
|
||||
物料流水号: '',
|
||||
基本件流水号: '',
|
||||
仓库流水号: '',
|
||||
货位流水号: ''
|
||||
},
|
||||
rules1: {
|
||||
machineValue: [{ required: true, message: '请选择' }],
|
||||
groupNumValue: [{ required: true, message: '请选择' }],
|
||||
outNumber: [{ required: true, message: '请输入' }],
|
||||
personValue: [{ required: true, message: '请输入' }]
|
||||
},
|
||||
rules2: {
|
||||
errorNumber: [{ required: true, message: '请输入' }],
|
||||
reason: [{ required: true, message: '请输入' }]
|
||||
},
|
||||
machine: [],
|
||||
group: [],
|
||||
person: [],
|
||||
materialNum: '', // 中间变量物料流水号
|
||||
machineValue: '', // 中间变量机床流水号
|
||||
groupNumValue: '', // 中间变量组件流水号
|
||||
basePartNum: '', // 中间变量基本件流水u和
|
||||
parchasePartNum: '', // 中间变量标准件和外购件流水号
|
||||
locationNum: '', // 中间变量货位流水号
|
||||
outNumber: 0 // 中间变量出库数量
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.fetchData()
|
||||
this.searchList()
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
fetchData() {
|
||||
this.person = []
|
||||
initPickPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.machine = []
|
||||
initMachineProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询组号
|
||||
searchGroup() {
|
||||
this.group = []
|
||||
this.form1.groupNumValue = ''
|
||||
searchgroup(this.form1.machineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.group.push({
|
||||
label: response.data[i].组号,
|
||||
value: Number(response.data[i].组件流水号)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询领料单列表
|
||||
searchList() {
|
||||
let check
|
||||
@@ -187,30 +327,96 @@ export default {
|
||||
},
|
||||
// 查看领料单明细
|
||||
clickList(row) {
|
||||
row ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
|
||||
row ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
|
||||
row && row.领料单流水号 ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
|
||||
row && row.领料单编号 ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
|
||||
searchListDetail(this.pickingListNum).then(res => {
|
||||
this.pickListTable2 = res.data
|
||||
})
|
||||
},
|
||||
// 查看领料单明细相关的物料货位数量
|
||||
clickListDetail(row) {
|
||||
console.log(row)
|
||||
if (row.物料流水号) {
|
||||
searchStockNumber(row.物料流水号).then(res => {
|
||||
row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = '', this.parchasePartNum = '') : this.basePartNum
|
||||
row && row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = '') : this.materialNum
|
||||
row && row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = '') : this.parchasePartNum
|
||||
row && row.机床流水号 ? this.machineValue = row.机床流水号 : this.machineValue
|
||||
row && row.组件流水号 ? this.groupNumValue = row.组件流水号 : this.groupNumValue
|
||||
row && row.总数量 ? this.outNumber = row.总数量 : this.outNumber
|
||||
if (this.materialNum) {
|
||||
searchStockNumber(this.materialNum).then(res => {
|
||||
this.StockNumberTable = res.data
|
||||
})
|
||||
} else if (row.基本件流水号) {
|
||||
console.log(row.基本件流水号)
|
||||
} else if (this.basePartNum) {
|
||||
console.log(this.basePartNum)
|
||||
}
|
||||
},
|
||||
// 出库
|
||||
outStore(row) {
|
||||
console.log(row)
|
||||
console.log(this.form1.machineValue, this.form1.groupNumValue, row, this.id)
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.machineValue = this.machineValue
|
||||
this.locationNum = row.货位流水号
|
||||
this.form1.outNumber = this.outNumber
|
||||
this.form1.personValue = Number(this.id)
|
||||
this.group = []
|
||||
this.form1.groupNumValue = ''
|
||||
searchgroup(this.form1.machineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.group.push({
|
||||
label: response.data[i].组号,
|
||||
value: Number(response.data[i].组件流水号)
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.form1.groupNumValue = this.groupNumValue
|
||||
this.dialogFormVisible1 = true
|
||||
})
|
||||
},
|
||||
// 提交出库
|
||||
submitOutStore() {
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
|
||||
// 物料流水号,货位流水号,出库数量 => 剪掉货位物料数
|
||||
console.log(this.materialNum, this.locationNum)
|
||||
submitOutStore(this.materialNum, this.locationNum, this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
this.dialogFormVisible1 = false
|
||||
this.clickListDetail()
|
||||
this.clickList()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 异常记录
|
||||
errorRecord(row) {
|
||||
console.log(row)
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.form2.errorNumber = ''
|
||||
this.form2.reason = ''
|
||||
this.form2.物料流水号 = row.物料流水号
|
||||
this.form2.基本件流水号 = row.基本件流水号
|
||||
this.form2.仓库流水号 = row.仓库流水号
|
||||
this.form2.货位流水号 = row.货位流水号
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
// 提交异常记录
|
||||
submitErrorRecord() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(this.form2.errorNumber, this.form2.reason, this.form2.物料流水号, this.form2.基本件流水号, this.form2.仓库流水号, this.form2.货位流水号)
|
||||
this.dialogFormVisible2 = false
|
||||
this.$message.success('记录成功')
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,7 +831,7 @@ export default {
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production2(this.multipleSelection[i].组件零件基本件流水号, this.multipleSelection[i].投产类型流水号, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu).then(response => {
|
||||
production2(this.multipleSelection[i].零件图号, this.toolNumValue, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
this.$message.success('投产成功')
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="60px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.投产总数量 }}
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="投产时间" width="130px">
|
||||
|
||||
@@ -214,7 +214,7 @@ export default {
|
||||
fax2: '',
|
||||
postCode2: '',
|
||||
hasTax: '含税',
|
||||
taxRate: 0.16,
|
||||
taxRate: 0.13,
|
||||
preview: false, // 预览
|
||||
demoRadio: '', // 模板radio
|
||||
content: ``, // 合同格式模板
|
||||
|
||||
Reference in New Issue
Block a user