更新
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
width="45"/>
|
||||
<el-table-column label="零件号" prop="零件图号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
@@ -123,7 +123,7 @@
|
||||
{{ scope.row.投产总数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次" align="center">
|
||||
<el-table-column label="批数" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最大投产批次 }}
|
||||
</template>
|
||||
@@ -179,6 +179,7 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
<el-button icon="el-icon-circle-plus-outline" type="distribution" size="small" @click="openUrgentItem()">加急件</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打回到零件分配" placement="top">
|
||||
<el-button :loading="listLoading3" type="danger" size="small" style="float:right;margin-left: 10px" plain @click="back">打回</el-button>
|
||||
</el-tooltip>
|
||||
@@ -216,14 +217,6 @@
|
||||
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>
|
||||
@@ -232,6 +225,10 @@
|
||||
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>-->
|
||||
@@ -288,7 +285,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="更改投产数量" center width="300px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="投产数量" prop="投产数量">
|
||||
<el-input v-model="form3.投产数量" size="small" />
|
||||
<el-input-number v-model="form3.投产数量" :min="AlreadyCastNumber" :step="1" size="small" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -300,16 +297,16 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center width="450px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="零件图号" prop="PDnumber">
|
||||
<el-input v-model="form.PDnumber" size="small" readonly style="width:250px" />
|
||||
<el-input v-model="form.PDnumber" size="small" disabled style="width:250px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="投产总数量" prop="quantity">
|
||||
<el-input v-model="form.quantity" size="small" readonly style="width:250px" />
|
||||
<el-input v-model="form.quantity" size="small" disabled style="width:250px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="未投产数量" prop="unputquantity">
|
||||
<el-input v-model="form.unputquantity" size="small" readonly style="width:250px"/>
|
||||
<el-input v-model="form.unputquantity" size="small" disabled style="width:250px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="投产批次" prop="productionBatch">
|
||||
<el-input v-model="form.productionBatch" size="small" readonly style="width:250px" placeholder="请输入投产批次"/>
|
||||
<el-input v-model="form.productionBatch" size="small" disabled style="width:250px" placeholder="请输入投产批次"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="temp === 1" label="批次数量1" prop="batchQuantity">
|
||||
<el-input-number v-model="form.batchQuantity" :min="1" :max="parseInt(form.unputquantity)" size="small" style="width:250px" label="批次数量"/>
|
||||
@@ -321,7 +318,7 @@
|
||||
<el-date-picker
|
||||
v-model="form.startDate_F"
|
||||
size="small"
|
||||
readonly
|
||||
disabled
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="top: 1px;width:250px"
|
||||
@@ -347,11 +344,53 @@
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible10" title="添加加急件" center style="min-height: 300px" width="500px">
|
||||
<el-form ref="form10" :model="form10" :rules="rules10" label-position="left" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="机床号" prop="机床号" style="margin-left: 70px">
|
||||
<el-select v-model="form10.机床号" placeholder="选择机床" filterable clearable size="small" style="width:200px" @change="getGroupSelect1">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="组号" prop="组号" style="margin-left: 70px">
|
||||
<el-select v-model="form10.组号" placeholder="选择组号" filterable clearable size="small" style="width:200px">
|
||||
<el-option
|
||||
v-for="item in group1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件图号" prop="零件图号" style="margin-left: 70px">
|
||||
<el-input v-model="form10.零件图号" placeholder="零件图号" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件名称" prop="零件名称" style="margin-left: 70px">
|
||||
<el-input v-model="form10.零件名称" placeholder="零件名称" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" style="margin-left: 70px">
|
||||
<el-input v-model="form10.规格" placeholder="规格" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件数量" prop="零件数量" style="margin-left: 70px">
|
||||
<el-input-number v-model="form10.零件数量" :step="1" :min="0" size="mini" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件备注" prop="零件备注" style="margin-left: 70px">
|
||||
<el-input v-model="form10.零件备注" placeholder="零件备注" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form10')">取消</el-button>
|
||||
<el-button type="primary" @click="submit10('form10')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2, production20, production10, edit, EditNumber } from '@/api/ManufacturingCenter/InitialProduction'
|
||||
import { machineSelect, groupSelect, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2, production20, production10, edit, EditNumber, addUrgentItem } from '@/api/ManufacturingCenter/InitialProduction'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
@@ -365,6 +404,9 @@ export default {
|
||||
clearTable: 0,
|
||||
readonly: true,
|
||||
gongyirenwuzhuangtai: '',
|
||||
machine: [],
|
||||
group1: [],
|
||||
NUMBER10: '',
|
||||
count: 0, // 表单计数器
|
||||
count2: 0,
|
||||
count3: 0,
|
||||
@@ -380,7 +422,9 @@ export default {
|
||||
TypeflowNumber: '',
|
||||
dataType: '', // 数据类型
|
||||
productionQuantity: '', // 投产总数量
|
||||
AlreadyCastNumber: 0, // 已投产数量
|
||||
checked_waixie1: '',
|
||||
piciNumber: '',
|
||||
MaterialflowNumber: '', // 材料流水号
|
||||
checked_zhaoji1: '',
|
||||
time_planStart: '',
|
||||
@@ -393,6 +437,7 @@ export default {
|
||||
time_planpinghengStart: '',
|
||||
time_machiningFinish: '',
|
||||
time_machiningStart: '',
|
||||
time: '',
|
||||
form: { // 修改表单
|
||||
PDnumber: '',
|
||||
quantity: '',
|
||||
@@ -403,6 +448,22 @@ export default {
|
||||
startDate_F: '',
|
||||
endDate_F: ''
|
||||
},
|
||||
form10: {
|
||||
机床号: '',
|
||||
组号: '',
|
||||
零件图号: '',
|
||||
零件名称: '',
|
||||
规格: '',
|
||||
零件数量: '',
|
||||
零件备注: ''
|
||||
},
|
||||
rules10: {
|
||||
机床号: [{ required: true, message: '请选择机床', trigger: 'change' }],
|
||||
组号: [{ required: true, message: '请选择组号', trigger: 'change' }],
|
||||
零件图号: [{ required: true, message: '请输入零件图号', trigger: 'blur' }],
|
||||
零件名称: [{ required: true, message: '请输入零件名称', trigger: 'blur' }],
|
||||
零件数量: [{ required: true, message: '请输入零件数量', trigger: 'blur' }]
|
||||
},
|
||||
form1: {
|
||||
reason: ''
|
||||
},
|
||||
@@ -423,6 +484,7 @@ export default {
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible10: false,
|
||||
NumberValue: '',
|
||||
date: '',
|
||||
a: false,
|
||||
@@ -483,6 +545,7 @@ export default {
|
||||
this.typeChange()
|
||||
this.getCurrentTime()
|
||||
this.getNowTime()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
gaibianwaixie(index, row) {
|
||||
@@ -508,6 +571,7 @@ export default {
|
||||
this.time_planpinghengFinish = this.getTime0(3)
|
||||
this.time_planpinghengStart = this.getTime0(2)
|
||||
this.time_machiningStart = this.getTime0(3)
|
||||
this.time = this.getTime0(5)
|
||||
const _this = this
|
||||
setTimeout(() => {
|
||||
_this.getCurrentTime()
|
||||
@@ -541,14 +605,17 @@ export default {
|
||||
},
|
||||
// 初始化获取项目名称
|
||||
fetchData() {
|
||||
getEntryNameValue().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getSelect(machineSelect, ['机床图号', '机床流水号'], 'machine')
|
||||
},
|
||||
getGroupSelect1() {
|
||||
this.form10.组号 = ''
|
||||
this.getSelect(groupSelect, ['组号', '组件流水号'], 'group1', this.form10.机床号)
|
||||
},
|
||||
openUrgentItem() {
|
||||
if (this.$refs['form10'] !== undefined) {
|
||||
this.$refs['form10'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible10 = true
|
||||
},
|
||||
typeChange() {
|
||||
console.log(Cookie.get('machineValue'), 1111111)
|
||||
@@ -632,6 +699,20 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
submit10(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addUrgentItem(this.form10.机床号, this.form10.组号, this.form10.零件图号, this.form10.零件名称, this.form10.规格, this.form10.零件数量, this.form10.零件备注, this.id, 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).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.dialogFormVisible10 = false
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击Table查询设备信息
|
||||
handleCurrentChange1(row) {
|
||||
this.tableData1 = []
|
||||
@@ -655,9 +736,10 @@ export default {
|
||||
console.log(row, 123)
|
||||
this.NumberValue = row.组件零件基本件流水号
|
||||
this.form3.投产数量 = row.投产总数量
|
||||
this.AlreadyCastNumber = row.已投产数量 ? parseInt(row.已投产数量) : 0
|
||||
},
|
||||
EditNumber() {
|
||||
EditNumber(this.NumberValue, this.form3.投产数量).then(response => {
|
||||
EditNumber(this.NumberValue, this.form3.投产数量, this.AlreadyCastNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTable()
|
||||
this.dialogFormVisible3 = false
|
||||
@@ -733,6 +815,7 @@ export default {
|
||||
this.checked_zhaoji1 = row.checked_zhaoji
|
||||
this.form.batchQuantity2 = parseInt(row.批次数量)
|
||||
this.form.batchQuantity = parseInt(row.批次数量)
|
||||
this.piciNumber = parseInt(row.批次数量)
|
||||
this.gongyijihua = row.工艺计划流水号
|
||||
this.form.unputquantity = row.投产总数量 - row.已投产数量
|
||||
for (let i = 0; i < tableData.length; i++) {
|
||||
@@ -753,25 +836,34 @@ export default {
|
||||
} else {
|
||||
this.temp = null
|
||||
if (this.gongyirenwuzhuangtai === '1') {
|
||||
editList(this.gongyijihua, this.form.batchQuantity2, this.form.startDate_F, this.form.endDate_F).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
editList(this.gongyijihua, this.form.batchQuantity2, this.form.startDate_F, this.form.endDate_F, this.piciNumber).then(response => {
|
||||
if (response.data.hasOwnProperty('result') === false) {
|
||||
this.dialogFormVisible1 = false
|
||||
this.NUMBER10 = response.data[0].已投产数量
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '信息更新成功!'
|
||||
})
|
||||
getTable1(this.midcode, this.pageList3, this.pageSize3).then(response => {
|
||||
this.total3 = parseInt(response.data.total)
|
||||
this.tableData1 = response.data.rows
|
||||
if (parseInt(this.productionQuantity) === this.NUMBER10) {
|
||||
this.tableData1 = []
|
||||
this.total3 = 0
|
||||
this.listLoading1 = false
|
||||
})
|
||||
} else {
|
||||
getTable1(this.midcode, this.pageList3, this.pageSize3).then(response => {
|
||||
this.total3 = parseInt(response.data.total)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading1 = false
|
||||
})
|
||||
}
|
||||
this.total = 0
|
||||
this.pageSize = 10000
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$message.error('信息更新失败')
|
||||
if (response.data[0].result === '0') {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -1198,6 +1290,7 @@ export default {
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible10 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
submit1(formName) {
|
||||
|
||||
Reference in New Issue
Block a user