This commit is contained in:
liushuai
2020-01-17 18:18:15 +08:00
parent 4fb54f4d3e
commit ab32ccfb84
11 changed files with 242 additions and 149 deletions

View File

@@ -21,25 +21,25 @@ export function fetchDate(month) {
} }
}) })
} }
export function saveDate(time, num, partNum, partName, procedure, num1, num2, num3, number, time1) { export function saveDate(num, partNum, procedure, num3, number, time1) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间管理_其他数据_增加数据', name: '车间管理_其他数据_增加数据',
param: '加工日期=' + time + '&操作工流水号=' + num + '&零件图号=' + partNum + '&名称=' + partName + '&工序=' + procedure + '&责任人流水号=' + num1 + '&确认人流水号=' + num2 + '&录入人流水号=' + num3 + '&数量=' + number + '&单件工时=' + time1 param: '操作工流水号=' + num + '&零件图号=' + partNum + '&工序=' + procedure + '&录入人流水号=' + num3 + '&数量=' + number + '&单件工时=' + time1
} }
}) })
} }
export function editDate(ID, time, num, partNum, partName, procedure, num1, num2, num3, number, time1) { export function editDate(ID, num, partNum, procedure, num3, number, time1) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间管理_其他数据_编辑数据', name: '车间管理_其他数据_编辑数据',
param: 'ID=' + ID + '&加工日期=' + time + '&操作工流水号=' + num + '&零件图号=' + partNum + '&名称=' + partName + '&工序=' + procedure + '&责任人流水号=' + num1 + '&确认人流水号=' + num2 + '&录入人流水号=' + num3 + '&数量=' + number + '&单件工时=' + time1 param: 'ID=' + ID + '&操作工流水号=' + num + '&零件图号=' + partNum + '&工序=' + procedure + '&录入人流水号=' + num3 + '&数量=' + number + '&单件工时=' + time1
} }
}) })
} }

View File

@@ -322,6 +322,18 @@ export function insertOne(num0, num1) {
} }
}) })
} }
// 主界面主表插入功能
export function insertOne1(num0, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_工艺计划流水号和工序流水号_更改',
param: '工艺计划流水号=' + num0 + '=int&工序流水号=' + num1 + '=int'
}
})
}
// 主界面主表删除功能 // 主界面主表删除功能
export function deleteOne(num0, num1) { export function deleteOne(num0, num1) {
return request({ return request({
@@ -371,14 +383,14 @@ export function saveMaterial(num0, num1) {
}) })
} }
// 核准保存 // 核准保存
export function saveApprove(num0, num1, request0, spec, num2, outhelp, num3, num4, weight, area, num5, level) { export function saveApprove(num0, num1, request0, spec, num2, outhelp, num3, num4, weight, area, num5, level, num6) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间生产管理工艺_零件工序_增加数据_同时修改工艺计划', name: '车间生产管理工艺_零件工序_增加数据_同时修改工艺计划',
param: '工艺计划流水号=' + num0 + '&工艺编号=' + num1 + '&工艺要求=' + request0 + '&原材料规格=' + spec + '&工序顺序=' + num2 + '&工序间是否外协=' + outhelp + '&工序流水号=' + num3 + '&材料流水号=' + num4 + '&重量=' + weight + '&面积=' + area + '&工艺人员编号=' + num5 + '&工艺难度等级=' + level param: '工艺计划流水号=' + num0 + '&工艺编号=' + num1 + '&工艺要求=' + request0 + '&原材料规格=' + spec + '&工序顺序=' + num2 + '&工序间是否外协=' + outhelp + '&工序流水号=' + num3 + '&材料流水号=' + num4 + '&重量=' + weight + '&面积=' + area + '&工艺人员编号=' + num5 + '&工艺难度等级=' + level + '&工艺是否更改=' + num6
} }
}) })
} }
@@ -492,14 +504,14 @@ export function TableAddLi1(a, b) {
}) })
} }
// 已编制定额保存 // 已编制定额保存
export function TableAddLi(a, b, c, num0, num1) { export function TableAddLi(a, b, c, num0, num1, num2) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间生产管理工艺_零件工序_增加数据_修改数据', name: '车间生产管理工艺_零件工序_增加数据_修改数据',
param: '单件定额工时=' + a + '=string&准结定额工时=' + b + '=string&零件图号=' + c + '=string&工序流水号=' + num0 + '=int&工艺计划流水号=' + num1 + '=int' param: '单件定额工时=' + a + '=string&准结定额工时=' + b + '=string&零件图号=' + c + '=string&工序流水号=' + num0 + '=int&工艺计划流水号=' + num1 + '=int&是否加序=' + num2 + '=int'
} }
}) })
} }

View File

@@ -23,6 +23,18 @@ export function isExit(projectNum, machineNum) {
} }
}) })
} }
// 替换
export function updateNum(num, id) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_零件明细表_外购件和标准件_数据导入保存_更改物料流水号',
param: `物料流水号=${num}&id=${id}`
}
})
}
export function isExit1(projectNum, machineNum, groupNum) { export function isExit1(projectNum, machineNum, groupNum) {
return request({ return request({
url: '', url: '',

View File

@@ -17,8 +17,8 @@ export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoic
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
export const uploadPerson = `http://192.168.1.231:8411/submit/uploadPerson.ashx` export const uploadPerson = `http://192.168.1.231:8411/submit/uploadPerson.ashx`
export const uploadOP = `http://192.168.1.231:8411/submit/uploadOP.ashx` export const uploadOP = `http://192.168.1.231:8411/submit/uploadOP.ashx`
export const url = `http://192.168.0.107:8079/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 export const url = `http://192.168.1.231:8411/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
export const ExcelDownLoad = 'http://192.168.0.107:8079/submit/downloadFile.ashx' // 导出excel export const ExcelDownLoad = 'http://192.168.1.231:8411/submit/downloadFile.ashx' // 导出excel
// 技术中心程序发布时要更改下面所有的IP到0段 // 技术中心程序发布时要更改下面所有的IP到0段
export const ServerIP = `http://192.168.1.231:8411/webpage/file/` export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231 export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231

View File

@@ -2,16 +2,6 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-row> <el-row>
<el-date-picker
v-model="time"
size="small"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="加工日期"
style="width: 140px;margin-top: 10px"
clearable
@change="change"/>
<el-select v-model="Person" style="width:100px" placeholder="操作工" size="small" filterable clearable> <el-select v-model="Person" style="width:100px" placeholder="操作工" size="small" filterable clearable>
<el-option <el-option
v-for="item in Persons" v-for="item in Persons"
@@ -19,27 +9,12 @@
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 150px" clearable/> <el-input v-model="partNumber" size="small" placeholder="零件图号及名称" style="width: 200px" clearable/>
<el-input v-model="partName" size="small" placeholder="零件名称" style="width: 140px" clearable/>
<el-input v-model="procedureName" size="small" placeholder="工序名称" style="width: 100px" clearable/> <el-input v-model="procedureName" size="small" placeholder="工序名称" style="width: 100px" clearable/>
<span>数量</span> <span>数量</span>
<el-input-number v-model="number" :min="0" :step="1" size="small" placeholder="数量" style="width: 120px" clearable/> <el-input-number v-model="number" :min="0" :step="1" size="small" placeholder="数量" style="width: 120px" clearable/>
<span>单件工时</span> <span>单件工时</span>
<el-input-number v-model="workTime" :min="0" :step="1" size="small" placeholder="单件工时" style="width: 120px" clearable/> <el-input-number v-model="workTime" :min="0" :step="1" size="small" placeholder="单件工时" style="width: 120px" clearable/>
<el-select v-model="PersonLiable" style="width:100px" placeholder="责任人" size="small" filterable clearable>
<el-option
v-for="item in Persons"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="ConfirmingPerson" style="width:100px" placeholder="确认人" size="small" filterable clearable>
<el-option
v-for="item in Persons"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row> </el-row>
<el-row> <el-row>
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="saveDate">保存</el-button> <el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="saveDate">保存</el-button>
@@ -66,16 +41,11 @@
{{ scope.row.操作工姓名 }} {{ scope.row.操作工姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件图号" align="center" width="150"> <el-table-column label="零件图号及名称" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件名称" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="工序名称" align="center" width="100"> <el-table-column label="工序名称" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工序 }} {{ scope.row.工序 }}
@@ -91,16 +61,6 @@
{{ scope.row.单件工时 }} {{ scope.row.单件工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="责任人" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.责任人姓名 }}
</template>
</el-table-column>
<el-table-column label="确认人" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.确认人姓名 }}
</template>
</el-table-column>
<el-table-column label="录入人" align="center" width="100"> <el-table-column label="录入人" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.录入人姓名 }} {{ scope.row.录入人姓名 }}
@@ -116,7 +76,6 @@ import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
time: '',
Person: '', Person: '',
Persons: [], Persons: [],
partNumber: '', partNumber: '',
@@ -124,10 +83,8 @@ export default {
procedureName: '', procedureName: '',
number: '', number: '',
workTime: '', workTime: '',
PersonLiable: '',
ConfirmingPerson: '',
tableData: [], tableData: [],
monthValue: '' monthValue: new Date()
} }
}, },
computed: { computed: {
@@ -141,11 +98,9 @@ export default {
}, },
created() { created() {
this.searchPerson() this.searchPerson()
this.getNowFormatDate()
}, },
methods: { methods: {
change() {
console.log(this.time.slice(0, 7))
},
searchPerson() { searchPerson() {
searchPerson().then(response => { searchPerson().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
@@ -156,6 +111,14 @@ export default {
} }
}) })
}, },
getNowFormatDate() {
var year = this.monthValue.getFullYear()
var month = this.monthValue.getMonth() + 1
if (month >= 1 && month <= 9) {
month = '0' + month
}
this.monthValue = year + '-' + month
},
fetchDate() { fetchDate() {
if (this.monthValue) { if (this.monthValue) {
fetchDate(this.monthValue).then(response => { fetchDate(this.monthValue).then(response => {
@@ -166,11 +129,10 @@ export default {
} }
}, },
saveDate() { saveDate() {
if (this.time && this.Person && this.partNumber && this.partName && this.procedureName && this.number && this.workTime) { if (this.Person && this.partNumber && this.procedureName && this.number && this.workTime) {
saveDate(this.time, this.Person, this.partNumber, this.partName, this.procedureName, this.PersonLiable, this.ConfirmingPerson, this.id, this.number, this.workTime).then(response => { saveDate(this.Person, this.partNumber, this.procedureName, this.id, this.number, this.workTime).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
this.monthValue = this.time.slice(0, 7)
this.RemoveDate() this.RemoveDate()
this.fetchDate() this.fetchDate()
} else { } else {
@@ -182,11 +144,10 @@ export default {
} }
}, },
editDate() { editDate() {
if (this.time && this.Person && this.partNumber && this.partName && this.procedureName && this.number && this.workTime) { if (this.Person && this.partNumber && this.procedureName && this.number && this.workTime) {
editDate(this.ID, this.time, this.Person, this.partNumber, this.partName, this.procedureName, this.PersonLiable, this.ConfirmingPerson, this.id, this.number, this.workTime).then(response => { editDate(this.ID, this.Person, this.partNumber, this.procedureName, this.id, this.number, this.workTime).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.monthValue = this.time.slice(0, 7)
this.RemoveDate() this.RemoveDate()
this.fetchDate() this.fetchDate()
} else { } else {
@@ -218,26 +179,18 @@ export default {
}) })
}, },
RemoveDate() { RemoveDate() {
this.time = ''
this.Person = '' this.Person = ''
this.partNumber = '' this.partNumber = ''
this.partName = ''
this.number = 0 this.number = 0
this.workTime = 0 this.workTime = 0
this.procedureName = '' this.procedureName = ''
this.PersonLiable = ''
this.ConfirmingPerson = ''
}, },
searchTable(row) { searchTable(row) {
this.time = row.加工日期
this.Person = row.操作工流水号 this.Person = row.操作工流水号
this.partNumber = row.零件图号 this.partNumber = row.零件图号
this.partName = row.名称
this.procedureName = row.工序 this.procedureName = row.工序
this.number = row.数量 this.number = row.数量
this.workTime = row.单件工时 this.workTime = row.单件工时
this.PersonLiable = row.责任人流水号
this.ConfirmingPerson = row.确认人流水号
this.ID = row.ID this.ID = row.ID
} }
} }

View File

@@ -47,7 +47,7 @@
{{ scope.row.修补准结工时 }} {{ scope.row.修补准结工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="实际工时" width="80px"> <el-table-column align="center" label="加工工时" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.设备工时 }} {{ scope.row.设备工时 }}
</template> </template>
@@ -67,9 +67,9 @@
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="日期" width="100px"> <el-table-column align="center" label="加工日期" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.操作时间 }} {{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="计划准结工时" width="100px"> <el-table-column align="center" label="计划准结工时" width="100px">

View File

@@ -95,6 +95,16 @@
{{ scope.row.机床数量 }} {{ scope.row.机床数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="投产总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.投产总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="90px"> <el-table-column label="备注" align="center" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件备注 }} {{ scope.row.零件备注 }}
@@ -140,6 +150,16 @@
{{ scope.row.机床数量 }} {{ scope.row.机床数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="采购总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.采购总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="120"> <el-table-column label="备注" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
@@ -180,6 +200,16 @@
{{ scope.row.机床数量 }} {{ scope.row.机床数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="采购总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.采购总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="120"> <el-table-column label="备注" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
@@ -601,6 +631,7 @@ export default {
MaterialSpecification: [], MaterialSpecification: [],
MaterialModel: [], MaterialModel: [],
NumberOfParts: [], NumberOfParts: [],
multipleSelection: [],
ReMarks: [], ReMarks: [],
projectName: '', projectName: '',
MachineToolNumber: '', MachineToolNumber: '',
@@ -1113,67 +1144,29 @@ export default {
}) })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
if (this.PartType === '基本件') { this.multipleSelection = val
this.MaterialNum = []
this.BasicPartsNumber = []
this.MaterialName = []
this.PartToolNumber = []
this.Material = []
this.NumberOfParts = []
for (let i = 0; i < val.length; i++) {
this.MaterialNum[i] = val[i].物料流水号
this.BasicPartsNumber[i] = val[i].基本件流水号
this.MaterialName[i] = val[i].零件名称
this.PartToolNumber[i] = val[i].零件图号
this.Material[i] = val[i].材料
this.NumberOfParts[i] = val[i].零件数量
this.ReMarks[i] = val[i].零件备注
}
console.log(this.NumberOfParts, 1111)
} else if (this.PartType === '外购件') {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
this.MaterialModel = []
this.NumberOfParts = []
for (let i = 0; i < val.length; i++) {
this.StandardPartsAndOutsourcing[i] = val[i].标准件和外购件流水号
this.MaterialNum[i] = val[i].物料流水号
this.MaterialCode[i] = val[i].物料代码
this.MaterialName[i] = val[i].物料名称
this.MaterialSpecification[i] = val[i].物料规格
this.MaterialModel[i] = val[i].物料型号
this.NumberOfParts[i] = val[i].零件数量
this.ReMarks[i] = val[i].备注
}
} else if (this.PartType === '标准件') {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
this.MaterialModel = []
this.NumberOfParts = []
for (let i = 0; i < val.length; i++) {
this.StandardPartsAndOutsourcing[i] = val[i].标准件和外购件流水号
this.MaterialNum[i] = val[i].物料流水号
this.MaterialCode[i] = val[i].物料代码
this.MaterialName[i] = val[i].物料名称
this.MaterialSpecification[i] = val[i].物料规格
this.MaterialModel[i] = val[i].物料型号
this.NumberOfParts[i] = val[i].零件数量
this.ReMarks[i] = val[i].备注
}
}
}, },
purchaseRequisition() { purchaseRequisition() {
if (this.RequisitionList !== '') { if (this.RequisitionList !== '') {
if (this.time !== '' && this.time !== null) { if (this.time !== '' && this.time !== null) {
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) { if (this.multipleSelection.length !== 0) {
this.result = 0 this.result = 0
if (this.PartType === '基本件') { if (this.PartType === '基本件') {
this.MaterialNum = []
this.BasicPartsNumber = []
this.MaterialName = []
this.PartToolNumber = []
this.Material = []
this.NumberOfParts = []
for (let i = 0; i < this.multipleSelection.length; i++) {
this.MaterialNum[i] = this.multipleSelection[i].物料流水号
this.BasicPartsNumber[i] = this.multipleSelection[i].基本件流水号
this.MaterialName[i] = this.multipleSelection[i].零件名称
this.PartToolNumber[i] = this.multipleSelection[i].零件图号
this.Material[i] = this.multipleSelection[i].材料
this.NumberOfParts[i] = this.multipleSelection[i].投产总数量
this.ReMarks[i] = this.multipleSelection[i].零件备注
}
for (let i = 0; i < this.BasicPartsNumber.length; i++) { for (let i = 0; i < this.BasicPartsNumber.length; i++) {
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => { purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
this.result += parseInt(response.data[0].result) this.result += parseInt(response.data[0].result)
@@ -1204,6 +1197,23 @@ export default {
}) })
} }
} else if (this.PartType === '外购件') { } else if (this.PartType === '外购件') {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
this.MaterialModel = []
this.NumberOfParts = []
for (let i = 0; i < this.multipleSelection.length; i++) {
this.StandardPartsAndOutsourcing[i] = this.multipleSelection[i].标准件和外购件流水号
this.MaterialNum[i] = this.multipleSelection[i].物料流水号
this.MaterialCode[i] = this.multipleSelection[i].物料代码
this.MaterialName[i] = this.multipleSelection[i].物料名称
this.MaterialSpecification[i] = this.multipleSelection[i].物料规格
this.MaterialModel[i] = this.multipleSelection[i].物料型号
this.NumberOfParts[i] = this.multipleSelection[i].采购总数量
this.ReMarks[i] = this.multipleSelection[i].备注
}
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) { for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => { purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
this.result += parseInt(response.data[0].result) this.result += parseInt(response.data[0].result)
@@ -1234,6 +1244,23 @@ export default {
}) })
} }
} else if (this.PartType === '标准件') { } else if (this.PartType === '标准件') {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
this.MaterialModel = []
this.NumberOfParts = []
for (let i = 0; i < this.multipleSelection.length; i++) {
this.StandardPartsAndOutsourcing[i] = this.multipleSelection[i].标准件和外购件流水号
this.MaterialNum[i] = this.multipleSelection[i].物料流水号
this.MaterialCode[i] = this.multipleSelection[i].物料代码
this.MaterialName[i] = this.multipleSelection[i].物料名称
this.MaterialSpecification[i] = this.multipleSelection[i].物料规格
this.MaterialModel[i] = this.multipleSelection[i].物料型号
this.NumberOfParts[i] = this.multipleSelection[i].采购总数量
this.ReMarks[i] = this.multipleSelection[i].备注
}
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) { for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => { purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
this.result += parseInt(response.data[0].result) this.result += parseInt(response.data[0].result)
@@ -1276,8 +1303,23 @@ export default {
}, },
PurchasingDepartment() { PurchasingDepartment() {
if (this.time !== '' && this.time !== null) { if (this.time !== '' && this.time !== null) {
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) { if (this.multipleSelection.length !== 0) {
if (this.PartType === '基本件') { if (this.PartType === '基本件') {
this.MaterialNum = []
this.BasicPartsNumber = []
this.MaterialName = []
this.PartToolNumber = []
this.Material = []
this.NumberOfParts = []
for (let i = 0; i < this.multipleSelection.length; i++) {
this.MaterialNum[i] = this.multipleSelection[i].物料流水号
this.BasicPartsNumber[i] = this.multipleSelection[i].基本件流水号
this.MaterialName[i] = this.multipleSelection[i].零件名称
this.PartToolNumber[i] = this.multipleSelection[i].零件图号
this.Material[i] = this.multipleSelection[i].材料
this.NumberOfParts[i] = this.multipleSelection[i].投产总数量
this.ReMarks[i] = this.multipleSelection[i].零件备注
}
purchaseRequisition2(this.projectFloatValue, this.machineFloatValue, this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.time).then(response => { purchaseRequisition2(this.projectFloatValue, this.machineFloatValue, this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.time).then(response => {
if (response.data[0].result !== '0') { if (response.data[0].result !== '0') {
console.log(response.data[0].result) console.log(response.data[0].result)
@@ -1290,6 +1332,23 @@ export default {
} }
}) })
} else { } else {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
this.MaterialModel = []
this.NumberOfParts = []
for (let i = 0; i < this.multipleSelection.length; i++) {
this.StandardPartsAndOutsourcing[i] = this.multipleSelection[i].标准件和外购件流水号
this.MaterialNum[i] = this.multipleSelection[i].物料流水号
this.MaterialCode[i] = this.multipleSelection[i].物料代码
this.MaterialName[i] = this.multipleSelection[i].物料名称
this.MaterialSpecification[i] = this.multipleSelection[i].物料规格
this.MaterialModel[i] = this.multipleSelection[i].物料型号
this.NumberOfParts[i] = this.multipleSelection[i].采购总数量
this.ReMarks[i] = this.multipleSelection[i].备注
}
PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing, this.time, this.MaterialNum, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => { PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing, this.time, this.MaterialNum, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => {
if (response.data[0].result !== '0') { if (response.data[0].result !== '0') {
this.$message.success('请购成功') this.$message.success('请购成功')
@@ -1315,7 +1374,22 @@ export default {
} }
}, },
Production() { Production() {
if (this.PartType === '基本件' && this.BasicPartsNumber.length !== 0) { if (this.PartType === '基本件' && this.multipleSelection.length !== 0) {
this.MaterialNum = []
this.BasicPartsNumber = []
this.MaterialName = []
this.PartToolNumber = []
this.Material = []
this.NumberOfParts = []
for (let i = 0; i < this.multipleSelection.length; i++) {
this.MaterialNum[i] = this.multipleSelection[i].物料流水号
this.BasicPartsNumber[i] = this.multipleSelection[i].基本件流水号
this.MaterialName[i] = this.multipleSelection[i].零件名称
this.PartToolNumber[i] = this.multipleSelection[i].零件图号
this.Material[i] = this.multipleSelection[i].材料
this.NumberOfParts[i] = this.multipleSelection[i].投产总数量
this.ReMarks[i] = this.multipleSelection[i].零件备注
}
Production(this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => { Production(this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => {
if (response.data[0].result !== '0') { if (response.data[0].result !== '0') {
this.$message.success('投产成功') this.$message.success('投产成功')

View File

@@ -532,6 +532,7 @@ import {
getPartnames3, getPartnames3,
getPartnames4, getPartnames4,
modifyRemark, modifyRemark,
insertOne1,
detailInfo detailInfo
} from '@/api/ManufacturingCenter/ProcessPlanningNew' } from '@/api/ManufacturingCenter/ProcessPlanningNew'
import elInput from 'element-ui/packages/input' import elInput from 'element-ui/packages/input'
@@ -697,6 +698,7 @@ export default {
result: 0, result: 0,
oldNum: '', oldNum: '',
newNum: '', newNum: '',
工艺是否更改: '',
// tableRecord: [], // tableRecord: [],
materialName2: '', materialName2: '',
material2: '' material2: ''
@@ -1130,7 +1132,8 @@ export default {
label: response.data[i].零件图号, label: response.data[i].零件图号,
value: response.data[i].工艺计划流水号, value: response.data[i].工艺计划流水号,
machine: response.data[i].机床图号, machine: response.data[i].机床图号,
group: response.data[i].组号 group: response.data[i].组号,
update: response.data[i].工艺是否更改
}) })
} }
}) })
@@ -1203,6 +1206,7 @@ export default {
this.material = response.data[0].材料流水号 this.material = response.data[0].材料流水号
this.materialName = response.data[0].材料 this.materialName = response.data[0].材料
this.spec = response.data[0].原材料规格 this.spec = response.data[0].原材料规格
this.工艺是否更改 = response.data[0].工艺是否更改
if (response.data[0].重量 === null) { if (response.data[0].重量 === null) {
this.weight = '' this.weight = ''
} else { } else {
@@ -1509,13 +1513,13 @@ export default {
let 零件图号 let 零件图号
let flag = 0 let flag = 0
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
saveApprove(this.tableData[i].工艺计划流水号, this.tableData[i].工艺编号, this.tableData[i].工艺要求, this.spec, this.tableData[i].工序顺序, this.tableData[i].工序间是否外协, this.tableData[i].工序流水号, this.material, '', '', this.CraftmenValue, this.tableData[i].工艺难度等级).then(() => { saveApprove(this.tableData[i].工艺计划流水号, this.tableData[i].工艺编号, this.tableData[i].工艺要求, this.spec, this.tableData[i].工序顺序, this.tableData[i].工序间是否外协, this.tableData[i].工序流水号, this.material, '', '', this.CraftmenValue, this.tableData[i].工艺难度等级, this.工艺是否更改).then(() => {
for (let j = 0; j < this.partNum.length; j++) { for (let j = 0; j < this.partNum.length; j++) {
if (this.partNum[j].value === this.partNumValue) { if (this.partNum[j].value === this.partNumValue) {
零件图号 = this.partNum[j].label 零件图号 = this.partNum[j].label
} }
} }
TableAddLi(this.tableData[i].单件定额工时, this.tableData[i].准结定额工时, 零件图号, this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号).then(() => { TableAddLi(this.tableData[i].单件定额工时, this.tableData[i].准结定额工时, 零件图号, this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData[i].是否加序).then(() => {
flag++ flag++
if (flag === this.tableData.length) { if (flag === this.tableData.length) {
TableAddLi1(this.partNumValue, this.CraftmenValue).then(() => { TableAddLi1(this.partNumValue, this.CraftmenValue).then(() => {
@@ -1544,9 +1548,15 @@ export default {
if (this.partNumValue === '') { if (this.partNumValue === '') {
this.$message.error('请先选择一个零件') this.$message.error('请先选择一个零件')
} else { } else {
insertOne(this.partNumValue, row.工序流水号).then(response => { if (this.工艺是否更改 === 1) {
this.searchDetail() insertOne1(this.partNumValue, row.工序流水号).then(response => {
}) this.searchDetail()
})
} else {
insertOne(this.partNumValue, row.工序流水号).then(response => {
this.searchDetail()
})
}
} }
}, },
deleteOne(row) { // 删除行 deleteOne(row) { // 删除行

View File

@@ -179,13 +179,15 @@
</el-table-column> </el-table-column>
<el-table-column label="库存(BZ)" align="center" min-width="70" prop="库存"> <el-table-column label="库存(BZ)" align="center" min-width="70" prop="库存">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }} {{ scope.row.库存 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数"> <el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="Number(scope.row.零件类型) !== 1">-</span> <template v-if="scope.row.库存 === '0'">
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template>
<el-input-number v-else v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已用滞货" align="center" min-width="70"> <el-table-column label="已用滞货" align="center" min-width="70">

View File

@@ -341,6 +341,7 @@ export default {
return return
} else { } else {
if (this.worksheet[j].M2.v.substring(0, 1) !== '9') { if (this.worksheet[j].M2.v.substring(0, 1) !== '9') {
console.log(this.worksheet[j].P1, 123344)
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = '' this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = '' this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = '' this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''

View File

@@ -144,11 +144,6 @@
highlight-current-row highlight-current-row
border border
stripe> stripe>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="物料名称" show-overflow-tooltip> <el-table-column align="center" label="物料名称" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
@@ -169,6 +164,15 @@
{{ scope.row.供货商 }} {{ scope.row.供货商 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handle(scope.row)">替换
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
@@ -279,7 +283,7 @@
<script> <script>
import { sleep } from '../../../utils/tool' import { sleep } from '../../../utils/tool'
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1, getMachineNames } from '../../../api/TechnologyCenter/ImportParts' import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1, getMachineNames, updateNum } from '../../../api/TechnologyCenter/ImportParts'
export default { export default {
name: 'SpecificationData', name: 'SpecificationData',
props: { props: {
@@ -316,6 +320,7 @@ export default {
pageSize: 10, pageSize: 10,
total: 0, total: 0,
title: '', title: '',
NumId: '',
materials: [], materials: [],
dialogFormVisible: false, dialogFormVisible: false,
type: 0, // 零件类型 暂定1为基本件2为外购件和标准件 type: 0, // 零件类型 暂定1为基本件2为外购件和标准件
@@ -346,7 +351,8 @@ export default {
pageCurrentMaterial: 1, pageCurrentMaterial: 1,
pageSizeMaterial: 10, pageSizeMaterial: 10,
totalMaterial: 0, totalMaterial: 0,
loadingMaterial: false loadingMaterial: false,
multipleSelection: []
} }
}, },
computed: { computed: {
@@ -403,6 +409,28 @@ export default {
return 'rgb196' return 'rgb196'
} }
}, },
handle(row) {
this.$confirm('是否替换?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateNum(row.物料流水号, this.NumId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('替换成功')
this.tableData10 = []
this.fetchData()
} else {
this.$message.error('替换失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消替换'
})
})
},
async fetchData() { async fetchData() {
this.pageCurrent = 1 this.pageCurrent = 1
this.tableData10 = [] this.tableData10 = []
@@ -519,6 +547,7 @@ export default {
} }
}, },
searchMaterial1(row) { searchMaterial1(row) {
this.NumId = row.id
searchMaterial1(row.图号或者型号, row.名称, row.规格).then(response => { searchMaterial1(row.图号或者型号, row.名称, row.规格).then(response => {
this.tableData10 = response.data this.tableData10 = response.data
}) })