Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -73,6 +73,30 @@ export function production2(num1, num2, num, b, d, e, f, g, h, i, j, k, l, m, n,
|
||||
}
|
||||
})
|
||||
}
|
||||
// 备料投产
|
||||
export function production10(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'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 合并备料投产
|
||||
export function production20(num1, num2, 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: '零件图号=' + num1 + '&规格=' + num2 + '&机床流水号=' + 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'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取表2的值
|
||||
export function getTable1(num, pageList, pageSize) {
|
||||
return request({
|
||||
|
||||
@@ -165,11 +165,14 @@
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打回到零件分配" placement="top">
|
||||
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;margin-left: 10px" @click="back">打回</el-button>
|
||||
<el-button :loading="listLoading3" type="danger" size="small" style="float:right;margin-left: 10px" @click="back">打回</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="选中零件进行投产" placement="top">
|
||||
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;" @click="production">投产</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="选中零件进行备料投产" placement="top">
|
||||
<el-button :loading="listLoading3" type="success" size="small" style="float:right;" @click="production10">备料投产</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="将不同组号中相同图号的零件合并" placement="top">
|
||||
<el-checkbox v-model="checked_hebing" style="float:right;margin-top:10px;margin-right:10px">合并生产</el-checkbox>
|
||||
</el-tooltip>
|
||||
@@ -318,7 +321,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2, edit } from '@/api/ManufacturingCenter/InitialProduction'
|
||||
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2, production20, production10, edit } from '@/api/ManufacturingCenter/InitialProduction'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
@@ -928,6 +931,122 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 备料投产
|
||||
production10() {
|
||||
this.result = 0
|
||||
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
|
||||
this.$message.error('请输入加工结束时间')
|
||||
} else {
|
||||
this.shijiancuo1 = Date.parse(this.time_machiningStart)
|
||||
this.shijiancuo = Date.parse(this.time_machiningFinish)
|
||||
this.jieguo = this.shijiancuo1 - this.shijiancuo
|
||||
if (this.jieguo >= 0) {
|
||||
this.$message.error('加工结束时间应大于开始时间')
|
||||
} else {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.error('请至少选择一个零件')
|
||||
} else {
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
production20(this.multipleSelection[i].零件图号, 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('投产成功')
|
||||
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
|
||||
}
|
||||
production10(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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
back() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.error('请至少选择一个零件')
|
||||
|
||||
@@ -196,14 +196,17 @@
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span style="font-weight: bold">制造:</span>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="将零件选择到采购单" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 15px" @click="purchaseRequisition()">制造部采购</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配到采购部" placement="top">
|
||||
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 5px" @click="purchaseRequisition()">制造部采购</el-button>
|
||||
</el-tooltip>
|
||||
<span style="margin-left: 40px;font-weight: bold">金工:</span>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配为自家生产" placement="top">
|
||||
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin: 3px 15px 10px 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 5px" @click="Production()">车间生产</el-button>
|
||||
</el-tooltip>
|
||||
<span style="margin-left: 40px;font-weight: bold">采购:</span>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配到采购部" placement="top">
|
||||
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 5px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
</el-tooltip>
|
||||
</el-card>
|
||||
<el-card>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<el-pagination
|
||||
v-show="false"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 1000000]"
|
||||
:page-sizes="[10, 20, 30, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="float:left"
|
||||
@@ -151,7 +151,7 @@
|
||||
<div v-if="是否扫描 === true" class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="currentPage5"
|
||||
:page-sizes="[10, 20, 30, 1000000]"
|
||||
:page-sizes="[10, 20, 30, 100]"
|
||||
:page-size="pageSize5"
|
||||
:total="total5"
|
||||
style="float:left"
|
||||
@@ -706,15 +706,15 @@ export default {
|
||||
tableData2: [], // 导出临时表
|
||||
length: 0, // 记TABLEDATA1的长度
|
||||
total: 0, // 总条数
|
||||
pageSize: 1000000, // 每页显示条数
|
||||
pageSize: 100, // 每页显示条数
|
||||
pageList: 1, // 后台获取页
|
||||
currentPage: 1, // 显示当前页
|
||||
total1: 0, // 总条数
|
||||
pageSize1: 1000000, // 每页显示条数
|
||||
pageSize1: 10, // 每页显示条数
|
||||
pageList1: 1, // 后台获取页
|
||||
currentPage1: 1, // 显示当前页
|
||||
total5: 0, // 总条数
|
||||
pageSize5: 1000000, // 每页显示条数
|
||||
pageSize5: 100, // 每页显示条数
|
||||
pageList5: 1, // 后台获取页
|
||||
currentPage5: 1 // 显示当前页
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user