Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -22,6 +22,17 @@ export function initPurchaseOrder() {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function initGroupNum(machineValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_组件流水号_查询数据_根据机床',
|
||||
param: `机床流水号=${machineValue}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchData(num) {
|
||||
return request({
|
||||
url: '',
|
||||
|
||||
@@ -143,14 +143,14 @@ export function deleteMateriel(num1, num2) {
|
||||
})
|
||||
}
|
||||
// 关联材料
|
||||
export function addMateriel(num1, num2, num3) {
|
||||
export function addMateriel(num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_到货单明细关联',
|
||||
param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}`
|
||||
param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}&本次到货数量组=${num4}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -212,10 +212,10 @@
|
||||
<el-card>
|
||||
<el-row>
|
||||
<!-- <span>请购单号:</span>-->
|
||||
<el-input v-model="PurchaseOrder" size="small" style="width: 150px" placeholder="请购单号" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable1()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 15px" @click="handleAdd()">新增</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 15px" plain @click="handleDelete()">删除</el-button>
|
||||
<el-input v-model="PurchaseOrder" size="small" style="width: 155px" placeholder="请购单号" clearable/>
|
||||
<el-button type="primary" size="mini" style="margin-left: 10px" plain @click="searchTable1()">查询</el-button>
|
||||
<el-button type="warning" size="mini" style="margin-left: 10px" plain @click="handleAdd()">新增</el-button>
|
||||
<el-button type="danger" size="mini" style="margin-left: 10px" plain @click="handleDelete()">删除</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-row>
|
||||
@@ -251,22 +251,23 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 900px">
|
||||
<el-col style="width: 900px;margin-left: 10px">
|
||||
<el-card>
|
||||
<el-table :data="tableData6" border size="mini" style="width: 100%" height="300px">
|
||||
<el-table-column label="序号" type="index" align="center" width="45px"/>
|
||||
<el-table-column label="零件名称" show-overflow-tooltip align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" show-overflow-tooltip align="center" width="120px">
|
||||
<el-table-column label="图号或型号" show-overflow-tooltip align="center" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" show-overflow-tooltip align="center" width="50px">
|
||||
<el-table-column label="材料或规格" show-overflow-tooltip align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
{{ scope.row.规格或材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="50px">
|
||||
@@ -289,7 +290,7 @@
|
||||
<!-- {{ scope.row.项目名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="机床编号" align="center" width="100px">
|
||||
<el-table-column label="机床编号" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
@@ -299,12 +300,12 @@
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="120px">
|
||||
<el-table-column label="备注" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120px">
|
||||
<el-table-column label="操作" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block;margin-right: 10px">
|
||||
@@ -322,79 +323,6 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-card>
|
||||
<el-table :data="tableData5" border size="mini" style="width: 100%" height="300px">
|
||||
<el-table-column label="物料代码" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料代码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料计划到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床编号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block;margin-right: 10px">
|
||||
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleEdit1(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="移出" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button type="text" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="新增请购单" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="请购车间" prop="请购车间">
|
||||
@@ -600,7 +528,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, submit, submit1, Delete, Delete1, editStock, editNum, OutPart } from '@/api/ManufacturingCenter/PartAssignment'
|
||||
import { initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, submit, submit1, Delete, Delete1, editStock, editNum, OutPart } from '@/api/ManufacturingCenter/PartAssignment'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Cookie from 'js-cookie'
|
||||
export default {
|
||||
@@ -627,7 +555,6 @@ export default {
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
tableData5: [],
|
||||
tableData6: [],
|
||||
loading: false,
|
||||
title: '',
|
||||
@@ -985,7 +912,6 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.tableData5 = []
|
||||
this.tableData6 = []
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('增加失败') }
|
||||
@@ -1013,7 +939,6 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible = false
|
||||
this.tableData5 = []
|
||||
this.tableData6 = []
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
@@ -1037,7 +962,6 @@ export default {
|
||||
deleteData(this.RequisitionList).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.tableData5 = []
|
||||
this.tableData6 = []
|
||||
this.searchTable1()
|
||||
} else {
|
||||
@@ -1093,22 +1017,6 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible3 = false
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData5 = res.map(item => {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
}
|
||||
return item
|
||||
})
|
||||
})
|
||||
searchDetailed1(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
@@ -1117,7 +1025,11 @@ export default {
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '3') {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
@@ -1171,22 +1083,6 @@ export default {
|
||||
},
|
||||
searchDetailed(row) {
|
||||
this.RequisitionList = row.请购单流水号
|
||||
searchDetailed(row.请购单流水号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData5 = res.map(item => {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
}
|
||||
return item
|
||||
})
|
||||
})
|
||||
searchDetailed1(row.请购单流水号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
@@ -1195,7 +1091,11 @@ export default {
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '3') {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
@@ -1280,7 +1180,11 @@ export default {
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '3') {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
@@ -1298,18 +1202,20 @@ export default {
|
||||
searchPart1(this.groupFloatValue, 2).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
searchDetailed1(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData5 = res.map(item => {
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
})
|
||||
@@ -1326,18 +1232,20 @@ export default {
|
||||
searchPart1(this.groupFloatValue, 1).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
searchDetailed1(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData5 = res.map(item => {
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
})
|
||||
@@ -1433,7 +1341,11 @@ export default {
|
||||
}
|
||||
const res = response.data
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '3') {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
@@ -1448,13 +1360,24 @@ export default {
|
||||
searchPart1(this.groupFloatValue, 2).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
searchDetailed1(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData5 = response.data
|
||||
this.tableData6 = response.data
|
||||
const res = response.data
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
})
|
||||
})
|
||||
} else { this.$message.error('移出失败') }
|
||||
})
|
||||
@@ -1465,13 +1388,24 @@ export default {
|
||||
searchPart1(this.groupFloatValue, 1).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
searchDetailed1(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData5 = response.data
|
||||
this.tableData6 = response.data
|
||||
const res = response.data
|
||||
this.tableData6 = res.map(item => {
|
||||
if (item.零件类型 === '2') {
|
||||
item.零件类型 = '外购件'
|
||||
} else if (item.零件类型 === '1') {
|
||||
item.零件类型 = '标准件'
|
||||
} else if (item.零件类型 === '3') {
|
||||
item.零件类型 = '基本件'
|
||||
}
|
||||
return item
|
||||
})
|
||||
})
|
||||
} else { this.$message.error('移出失败') }
|
||||
})
|
||||
|
||||
@@ -28,23 +28,70 @@
|
||||
placeholder="规定到货时间"/>
|
||||
<el-input v-model="name" placeholder="采购员" size="small" readonly/>
|
||||
<el-input v-model="taxRate" placeholder="税率" size="small"/>
|
||||
<el-button type="success" size="small" @click="linkGroup">成组采购</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData4" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<el-table v-show="contractNumType===1" :data="tableData5" border style="width: 100%" height="100px" size="mini">
|
||||
<el-table-column label="组件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.数量" size="mini" style="width:70px" @change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:70px" @change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.金额" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.物料计划到货时间"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 133px"
|
||||
@change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="mini" style="width: 120px" @change="update1(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-show="contractNumType===0" :data="tableData4" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||
<el-table-column label="物料名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" width="200">
|
||||
<el-table-column label="材料或规格" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
{{ scope.row.规格或材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订货数量" align="center" width="100">
|
||||
@@ -80,55 +127,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="tableData3" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||
<el-table-column label="物料名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" width="200">
|
||||
<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="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:70px"/>
|
||||
</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="150">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.物料计划到货时间"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 133px"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="small" style="width: 120px" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button
|
||||
type="shengcheng"
|
||||
size="small"
|
||||
@@ -266,11 +264,39 @@
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="成组采购" center style="min-height: 200px" width="430px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules1" label-position="right" label-width="120px">
|
||||
<el-row>
|
||||
<el-form-item label="机床" prop="机床">
|
||||
<el-input v-model="form3.机床" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="组号" prop="groupNumValue">
|
||||
<el-select v-model="form3.groupNumValue" placeholder="组号" size="small" filterable>
|
||||
<el-option
|
||||
v-for="item in groupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitGroup">转为成组采购</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData2, searchContractDemo, initGroupNum } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
@@ -279,7 +305,10 @@ export default {
|
||||
submitDisable: true, // 不点击表格中的行不让确定
|
||||
AdvanceCharge: '',
|
||||
loading: false,
|
||||
groupNum: [],
|
||||
groupNumValue: '',
|
||||
dialogVisible1: false,
|
||||
dialogVisible2: false,
|
||||
disable2: true,
|
||||
disable3: true,
|
||||
disable4: true,
|
||||
@@ -289,6 +318,14 @@ export default {
|
||||
tableData2: [], // 合同模板表
|
||||
form1: {},
|
||||
form2: {},
|
||||
form3: {
|
||||
groupNumValue: '',
|
||||
机床: ''
|
||||
},
|
||||
machineValue: '',
|
||||
rules1: {
|
||||
groupNumValue: [{ required: true, message: '请选择组号' }]
|
||||
},
|
||||
textArea: '',
|
||||
paramRow: '', // 参数row
|
||||
contractSum: 0,
|
||||
@@ -297,6 +334,7 @@ export default {
|
||||
deliveryDay: [],
|
||||
deliveryDay1: [],
|
||||
contractNumValue: '',
|
||||
contractNumType: 0,
|
||||
RequisitionNumber: '',
|
||||
contract: [{
|
||||
label: '合同模板1',
|
||||
@@ -370,9 +408,7 @@ export default {
|
||||
stipulateArrivalTime: '', // 规定到货时间
|
||||
freight: '', // 运费
|
||||
taxRate: '0.13', // 税率
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
groupNum1: [],
|
||||
groupNum2: [],
|
||||
group1: '',
|
||||
group2: '',
|
||||
@@ -399,25 +435,34 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
linkGroup() {
|
||||
console.log(this.form3, 111)
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitGroup() {},
|
||||
searchData() {
|
||||
searchData1(this.contractNumValue).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.contractNumType = this.contractNum[i].id
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay[i] = 0
|
||||
this.tableData3[i].金额 = parseFloat(this.tableData3[i].单价) * parseFloat(this.tableData3[i].零件数量)
|
||||
}
|
||||
}).then(() => {
|
||||
this.groupNum1 = this.tableData3 // 给中间变量,需要时重新push
|
||||
console.log(this.tableData3)
|
||||
})
|
||||
searchData2(this.contractNumValue).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
this.machineValue = response.data[0].机床流水号
|
||||
this.form3.机床 = response.data[0].机床图号
|
||||
this.form3.groupNumValue = response.data[0].组件流水号
|
||||
console.log(this.machineValue, 111)
|
||||
initGroupNum(this.machineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay1[i] = 0
|
||||
this.tableData4[i].金额 = parseFloat(this.tableData4[i].单价) * parseFloat(this.tableData4[i].零件数量)
|
||||
@@ -436,19 +481,13 @@ export default {
|
||||
this.contractSum1 = 0
|
||||
this.costAccount = 0
|
||||
this.riseFallPoint = 0
|
||||
this.tableData3 = []
|
||||
this.tableData4 = []
|
||||
for (let i = 0; i < this.groupNum1.length; i++) {
|
||||
this.groupNum1[i].金额 = parseFloat(this.groupNum1[i].单价) * parseFloat(this.groupNum1[i].零件数量)
|
||||
this.contractSum += parseFloat(this.groupNum1[i].金额)
|
||||
this.tableData3.push(this.groupNum1[i])
|
||||
}
|
||||
for (let i = 0; i < this.groupNum2.length; i++) {
|
||||
this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量)
|
||||
this.contractSum1 += parseFloat(this.groupNum2[i].金额)
|
||||
this.tableData4.push(this.groupNum2[i])
|
||||
}
|
||||
this.contractSum = (this.contractSum + this.contractSum1).toFixed(2)
|
||||
this.contractSum = (this.contractSum1).toFixed(2)
|
||||
this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100
|
||||
this.costAccount = this.contractSum
|
||||
if (parseInt(this.costAccount) === 0) {
|
||||
@@ -462,7 +501,15 @@ export default {
|
||||
searchContractDemo(1).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容
|
||||
})
|
||||
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
|
||||
initPurchaseOrder().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum.push({
|
||||
label: response.data[i].请购单编号,
|
||||
value: response.data[i].请购单流水号,
|
||||
id: response.data[i].请购类型
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeContract() {
|
||||
searchContractDemo(this.contractValue).then(response => {
|
||||
@@ -549,16 +596,6 @@ export default {
|
||||
this.group10 = ''
|
||||
this.group11 = ''
|
||||
this.group12 = ''
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.group1 += this.tableData3[i].物料流水号 + ','
|
||||
this.group2 += this.tableData3[i].零件数量 + ','
|
||||
this.group3 += this.tableData3[i].单价 + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9 += this.tableData3[i].请购单明细流水号 + ','
|
||||
this.group11 += this.tableData3[i].单件定额工时 + ','
|
||||
this.group12 += this.tableData3[i].准结定额工时 + ','
|
||||
}
|
||||
for (let i = 0; i < this.tableData4.length; i++) {
|
||||
this.group1 += this.tableData4[i].物料流水号 + ','
|
||||
this.group2 += this.tableData4[i].零件数量 + ','
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center">
|
||||
@@ -382,12 +382,12 @@
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center">
|
||||
<el-table-column label="零件名称" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" >
|
||||
<el-table-column label="材料" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
@@ -397,6 +397,16 @@
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货数量" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次到货数量" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.成品尺寸 }}
|
||||
@@ -499,6 +509,7 @@ export default {
|
||||
单位: [{ required: true, message: '请填写单位' }],
|
||||
单价: [{ required: true, message: '请填写单价' }]
|
||||
},
|
||||
本次到货数量组: [],
|
||||
工艺计划流水号组: [],
|
||||
采购计划明细流水号组: []
|
||||
}
|
||||
@@ -671,10 +682,10 @@ export default {
|
||||
},
|
||||
save(index, row) {
|
||||
this.SUM = 0
|
||||
this.allWeight = parseInt(row.批次数量 * row.单件重量 * 100) / 100
|
||||
this.allWeight = parseInt(row.数量 * row.单件重量 * 100) / 100
|
||||
this.ALLMoney = parseInt(this.allWeight * this.单价 * 100) / 100
|
||||
for (let i = 0; i < this.tableData6.length; i++) {
|
||||
this.SUM += parseFloat(this.tableData6[i].单件重量) * parseFloat(this.tableData6[i].批次数量)
|
||||
this.SUM += parseFloat(this.tableData6[i].单件重量) * parseFloat(this.tableData6[i].数量)
|
||||
}
|
||||
if (this.数量 - this.SUM < 0) {
|
||||
this.$message.warning('总重量已超出上限')
|
||||
@@ -927,6 +938,7 @@ export default {
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.arrest = val
|
||||
console.log(this.arrest)
|
||||
},
|
||||
// 选入
|
||||
addMateriel() {
|
||||
@@ -937,11 +949,13 @@ export default {
|
||||
} else {
|
||||
this.工艺计划流水号组 = []
|
||||
this.采购计划明细流水号组 = []
|
||||
this.本次到货数量组 = []
|
||||
this.arrest.map(v => {
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.采购计划明细流水号组.push(v.采购计划明细流水号)
|
||||
this.本次到货数量组.push(v.未到货数量)
|
||||
})
|
||||
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组).then(response => {
|
||||
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('关联成功')
|
||||
searchMateriel(this.采购计划流水号).then(response => {
|
||||
|
||||
@@ -573,6 +573,7 @@ export default {
|
||||
xhr.responseType = 'blob'
|
||||
xhr.onload = function() {
|
||||
if (xhr.status === 200) {
|
||||
console.log(xhr, 1111)
|
||||
const name = xhr.getResponseHeader('content-disposition').split('=')[1]
|
||||
cb(xhr.response, name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user