序间外协

This commit is contained in:
zhangdingyu
2019-11-21 09:30:35 +08:00
parent ca0ccecf47
commit 55a2bb592a
5 changed files with 50 additions and 4 deletions

BIN
dist.zip

Binary file not shown.

View File

@@ -80,3 +80,15 @@ export function edit2(num1, num2, num3) {
}
})
}
// 保存每行价格
export function saveRowPrice(num1, price1, num2, price2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工序_修改数据_序间外协预算价格_系数',
param: '工序流水号=' + num1 + '&外协预算价格=' + price1 + '&工艺计划流水号=' + num2 + '&材料费=' + price2
}
})
}

View File

@@ -18,7 +18,7 @@ export const download = `http://192.168.1.231:8411/submit/downloadFile.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 url = `http://192.168.1.231:8411/submit/MESCommonBase.ashx` // 采购件入库、离线件入库
export const ExcelDownLoad = 'http://192.168.1.231:8411/submit/downloadFile.ashx' // 导出excel
export const ExcelDownLoad = 'http://192.168.0.110:8002/submit/downloadFile.ashx' // 导出excel
// 技术中心程序发布时要更改下面所有的IP到0段
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

View File

@@ -529,7 +529,8 @@ import {
TableAddLi,
getPartnames3,
getPartnames4,
modifyRemark
modifyRemark,
detailInfo
} from '@/api/ManufacturingCenter/ProcessPlanningNew'
import elInput from 'element-ui/packages/input'
import { mapGetters } from 'vuex'
@@ -1192,6 +1193,21 @@ export default {
searchDetail() {
if (this.partNumValue !== '' && this.partNumValue !== null) {
this.loading0 = true
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.material = response.data[0].材料流水号
this.materialName = response.data[0].材料
this.spec = response.data[0].原材料规格
if (response.data[0].重量 === null) {
this.weight = ''
} else {
this.weight = response.data[0].重量
}
}
})
mainTable(this.partNumValue).then(response => {
this.tableData = []
for (let i = 0; i < response.data.length; i++) {

View File

@@ -68,7 +68,8 @@
</el-col>
<el-col :span="14">
<el-card>
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableData1ClassName" height="635" style="width: 100%;" border element-loading-text="拼命加载中" size="small">
<el-button size="small" type="primary" style="margin: 10px" @click="saveRowPrice()">保存</el-button>
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableData1ClassName" height="580" style="width: 100%;" border element-loading-text="拼命加载中" size="small">
<el-table-column label="序号" type="index" align="center" width="50"/>
<el-table-column label="加工状态" width="100" align="center">
<template slot-scope="scope">
@@ -111,7 +112,7 @@
</template>
<script>
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2, saveRowPrice } from '@/api/Outsourcing/PreorderAssociation'
export default {
data() {
return {
@@ -324,6 +325,23 @@ export default {
})
}
},
// 保存行价格
saveRowPrice() {
if (this.tableData2.length === 0) {
this.$message.error('请选择零件')
} else {
this.a = 0
for (let i = 0; i < this.tableData2.length; i++) {
saveRowPrice(this.tableData2[i].工序流水号, 0, this.tableData2[i].工艺计划流水号, 0).then(response => {
this.a += parseInt(response.data[0].result)
if (this.a === this.tableData2.length) {
this.$message.success('保存成功')
this.searchTable()
}
})
}
}
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val