This commit is contained in:
chenjianan
2019-06-02 14:29:59 +08:00
4 changed files with 116 additions and 53 deletions

View File

@@ -61,6 +61,18 @@ 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) {
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'
}
})
}
// 获取表2的值
export function getTable1(num, pageList, pageSize) {
return request({

View File

@@ -17,7 +17,7 @@ export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoice
export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoiceScan1.ashx` // invoice(workshop)
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
const service = axios.create({
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间
})

View File

@@ -164,6 +164,7 @@
<el-table-column label="操作" width="200px" fixed="right" align="center">
<template slot-scope="scope">
<el-button
:disabled="checked_hebing"
size="mini"
type="primary"
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
@@ -185,8 +186,8 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;margin-top:10px" @click="production"></el-button>
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;" @click="production">投产</el-button>
<el-checkbox v-model="checked_hebing" style="float:right;margin-top:10px;margin-right:10px">合并生</el-checkbox>
</div>
</div>
</el-card>
@@ -331,12 +332,13 @@
</template>
<script>
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele } from '@/api/ManufacturingCenter/InitialProduction'
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2 } from '@/api/ManufacturingCenter/InitialProduction'
import { mapGetters } from 'vuex'
export default {
data() {
return {
checked_hebing: true,
maxmax: '',
clearTable: 0,
readonly: true,
@@ -801,52 +803,102 @@ export default {
if (this.multipleSelection.length === 0) {
this.$message.error('请至少选择一个零件')
} else {
this.listLoading3 = true
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].checked_waixie === false) {
this.multipleSelection[i].checked_waixie = 1
} else {
this.multipleSelection[i].checked_waixie = 2
}
if (this.multipleSelection[i].checked_zhaoji === false) {
this.multipleSelection[i].checked_zhaoji = 0
} else {
this.multipleSelection[i].checked_zhaoji = 1
}
if (this.multipleSelection[i].checked_dailiao === true) {
this.multipleSelection[i].checked_dailiao = 2
} else {
this.multipleSelection[i].checked_dailiao = 1
}
if (this.checked_gaonandu === false) {
this.checked_gaonandu = 0
} else {
this.checked_gaonandu = 1
}
if (this.checked_baitu === false) {
this.checked_baitu = 0
} else {
this.checked_baitu = 1
}
production(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 => {
this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) {
this.$message.success('投产成功')
this.total = 0
this.pageList = 1
this.getTable()
this.checked_baitu = false
this.checked_gaonandu = false
this.tableData1 = []
this.listLoading3 = false
} else if (response.data[0].result === '0') {
this.listLoading3 = false
this.$message.error('投产失败')
if (this.checked_hebing === true) {
this.listLoading3 = true
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].checked_waixie === false) {
this.multipleSelection[i].checked_waixie = 1
} else {
this.multipleSelection[i].checked_waixie = 2
}
})
this.shijiancuo1 = 0
this.shijiancuo = 0
this.jieguo = 0
if (this.multipleSelection[i].checked_zhaoji === false) {
this.multipleSelection[i].checked_zhaoji = 0
} else {
this.multipleSelection[i].checked_zhaoji = 1
}
if (this.multipleSelection[i].checked_dailiao === true) {
this.multipleSelection[i].checked_dailiao = 2
} else {
this.multipleSelection[i].checked_dailiao = 1
}
if (this.checked_gaonandu === false) {
this.checked_gaonandu = 0
} else {
this.checked_gaonandu = 1
}
if (this.checked_baitu === false) {
this.checked_baitu = 0
} 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 => {
this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) {
this.$message.success('投产成功')
this.total = 0
this.pageList = 1
this.getTable()
this.checked_baitu = false
this.checked_gaonandu = false
this.tableData1 = []
this.listLoading3 = false
} else if (response.data[0].result === '0') {
this.listLoading3 = false
this.$message.error('投产失败')
}
})
this.shijiancuo1 = 0
this.shijiancuo = 0
this.jieguo = 0
}
} else {
this.listLoading3 = true
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].checked_waixie === false) {
this.multipleSelection[i].checked_waixie = 1
} else {
this.multipleSelection[i].checked_waixie = 2
}
if (this.multipleSelection[i].checked_zhaoji === false) {
this.multipleSelection[i].checked_zhaoji = 0
} else {
this.multipleSelection[i].checked_zhaoji = 1
}
if (this.multipleSelection[i].checked_dailiao === true) {
this.multipleSelection[i].checked_dailiao = 2
} else {
this.multipleSelection[i].checked_dailiao = 1
}
if (this.checked_gaonandu === false) {
this.checked_gaonandu = 0
} else {
this.checked_gaonandu = 1
}
if (this.checked_baitu === false) {
this.checked_baitu = 0
} else {
this.checked_baitu = 1
}
production(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 => {
this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) {
this.$message.success('投产成功')
this.total = 0
this.pageList = 1
this.getTable()
this.checked_baitu = false
this.checked_gaonandu = false
this.tableData1 = []
this.listLoading3 = false
} else if (response.data[0].result === '0') {
this.listLoading3 = false
this.$message.error('投产失败')
}
})
this.shijiancuo1 = 0
this.shijiancuo = 0
this.jieguo = 0
}
}
}
}

View File

@@ -63,18 +63,17 @@
</el-select>
</el-col>
<el-col v-show="materielValue==='1'||materielValue==='6'||materielValue==='7'||materielValue==='8'" :span="20">
<el-col v-show="materielValue==='1'||materielValue==='6'||materielValue==='7'||materielValue==='8'" :span="15">
<span>直径:</span>
<el-input-number v-model="diameter" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<span>长度:</span>
<el-input-number v-model="height2" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation1()">计算重量
</el-button>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation1()">计算重量</el-button>
<span>重量:</span>
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
<!--<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="insertThestring()">计算重量</el-button>-->
<el-button style="margin-left: 10px;" type="primary" size="small" @click="insertThestring()">合并生产</el-button>
</el-col>
<el-col v-show="materielValue==='2'||materielValue==='9'||materielValue==='10'||materielValue==='11'" :span="20">