更新
This commit is contained in:
@@ -24,6 +24,19 @@ export function searchPurchaseOrder(pageCurrent, pageSize, check1, num, check2,
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线采购单
|
||||
export function searchLxPurchaseOrder(pageCurrent, pageSize, check1, num, check2, name, check, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_离线采购计划_查询数据_到货',
|
||||
param: `离线采购计划编号_check=${check1}&离线采购计划编号=${num}&供应商流水号_check=${check2}&供应商流水号=${name}&零件图号_check=${check}&零件图号=${num1}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询采购计划明细
|
||||
export function searchMateriel(num, check, num1) {
|
||||
return request({
|
||||
@@ -36,6 +49,18 @@ export function searchMateriel(num, check, num1) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线采购计划明细
|
||||
export function searchLxMateriel(num, check, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '备料管理_离线采购计划明细_查询数据_未选入',
|
||||
param: `离线采购计划流水号=${num}&零件图号_check=${check}&零件图号=${num1}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询到货单
|
||||
export function searchArriveOrder(num8, num9, num2, num3, num5, num6, num7, pageCurrent, pageSize) {
|
||||
return request({
|
||||
@@ -131,26 +156,26 @@ export function AddArrivalOrderMX(num, num1, num2, num3, num4, num5) {
|
||||
})
|
||||
}
|
||||
// 取消关联
|
||||
export function deleteMateriel(num1, num2) {
|
||||
export function deleteMateriel(num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_取消到货单明细绑定',
|
||||
param: `到货单明细绑定流水号=${num1}&采购计划明细流水号=${num2}`
|
||||
param: `到货单明细绑定流水号=${num1}&采购计划明细流水号=${num2}&离线采购计划明细流水号=${num3}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 关联材料
|
||||
export function addMateriel(num1, num2, num3, num4) {
|
||||
export function addMateriel(num1, num2, num3, num4, num5) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_到货单明细关联',
|
||||
param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}&本次到货数量组=${num4}`
|
||||
param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}&本次到货数量组=${num4}&离线采购计划明细流水号组=${num5}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -188,3 +213,14 @@ export function saveWeight(num1, num3, num4) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function saveWeight1(num1, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '备料管理_到货明细关联备料_保存单件重量和总重量_离线',
|
||||
param: `离线采购计划明细流水号=${num1}&总重量=${num3}&总金额=${num4}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -316,6 +316,13 @@
|
||||
<span>采购计划单号:</span>
|
||||
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/>
|
||||
<el-input v-model="partNumber" placeholder="零件图号" size="small" style="margin: 3px 0" clearable/>
|
||||
<el-select v-model="planType" placeholder="计划类型" size="small" filterable @change="ageCurrent2=1;pageSize2=10;total2=0;tableData3=[];searchTable2()">
|
||||
<el-option
|
||||
v-for="item in planTypes"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
</el-tooltip>
|
||||
@@ -323,12 +330,12 @@
|
||||
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="采购计划单号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
{{ scope.row.采购单号 ? scope.row.采购单号 : scope.row.离线采购计划编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购计划单名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单名称 }}
|
||||
{{ scope.row.采购单名称 ? scope.row.采购单名称 : scope.row.离线采购计划名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" show-overflow-tooltip>
|
||||
@@ -336,19 +343,19 @@
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center">
|
||||
<el-table-column v-show="planType===0" 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.下单日期.split(' ')[0] }}
|
||||
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划完成日期" align="center">
|
||||
<el-table-column v-show="planType===0" label="计划完成日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划完成日期.split(' ')[0] }}
|
||||
{{ scope.row.计划完成日期 ? scope.row.计划完成日期.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -402,7 +409,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" width="60px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
{{ scope.row.单位 ? scope.row.单位 : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
@@ -419,7 +426,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, searchTable5, searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6 } from '@/api/WorkshopProcurement/NewArrivalList.js'
|
||||
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, saveWeight1, searchTable5,
|
||||
searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -432,6 +440,17 @@ export default {
|
||||
ArrivalOrderNumber: '',
|
||||
ArrivalOrderMXNumber: '',
|
||||
supplierName0: '',
|
||||
planType: 0,
|
||||
planTypes: [
|
||||
{
|
||||
value: 0,
|
||||
label: '采购计划'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '离线采购计划'
|
||||
}
|
||||
],
|
||||
arrest: [],
|
||||
check: 0,
|
||||
Name: '',
|
||||
@@ -456,6 +475,7 @@ export default {
|
||||
tableData3: [],
|
||||
tableData6: [],
|
||||
采购计划流水号: '',
|
||||
离线采购计划流水号: '',
|
||||
tableData4: [],
|
||||
total4: 0,
|
||||
pageCurrent4: 1,
|
||||
@@ -497,7 +517,8 @@ export default {
|
||||
},
|
||||
本次到货数量组: [],
|
||||
工艺计划流水号组: [],
|
||||
采购计划明细流水号组: []
|
||||
采购计划明细流水号组: [],
|
||||
离线采购计划明细流水号组: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -525,6 +546,7 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable2() { // 查询采购单列表
|
||||
if (this.planType === 0) {
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||
@@ -532,6 +554,15 @@ export default {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
} else {
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||
searchLxPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.check5, this.partNumber).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange2(val) { // 采购单列表分页
|
||||
this.pageSize2 = val
|
||||
@@ -543,10 +574,17 @@ export default {
|
||||
},
|
||||
searchTable3(row) { // 查询采购计划明细
|
||||
this.采购计划流水号 = row.采购计划流水号
|
||||
this.离线采购计划流水号 = row.离线采购计划流水号
|
||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||
if (this.planType === 0) {
|
||||
searchMateriel(this.采购计划流水号, this.check5, this.partNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else {
|
||||
searchLxMateriel(this.离线采购计划流水号, this.check5, this.partNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
@@ -672,6 +710,7 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (row.采购计划明细流水号) {
|
||||
saveWeight(row.采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('录入成功')
|
||||
@@ -685,6 +724,21 @@ export default {
|
||||
this.$message.error('录入失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
saveWeight1(row.离线采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('录入成功')
|
||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||
this.tableData6 = response.data
|
||||
if (response.data.length !== 0) {
|
||||
this.未绑定数量 = response.data[0].未绑定数量
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('录入失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
Calculation() {
|
||||
@@ -922,13 +976,15 @@ export default {
|
||||
} else {
|
||||
this.工艺计划流水号组 = []
|
||||
this.采购计划明细流水号组 = []
|
||||
this.离线采购计划明细流水号组 = []
|
||||
this.本次到货数量组 = []
|
||||
this.arrest.map(v => {
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.采购计划明细流水号组.push(v.采购计划明细流水号)
|
||||
this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号)
|
||||
this.本次到货数量组.push(v.未到货数量)
|
||||
})
|
||||
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组).then(response => {
|
||||
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('关联成功')
|
||||
searchMateriel(this.采购计划流水号).then(response => {
|
||||
@@ -950,7 +1006,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteMateriel(row.到货单明细绑定流水号, row.采购计划明细流水号).then(response => {
|
||||
deleteMateriel(row.到货单明细绑定流水号, row.采购计划明细流水号, row.离线采购计划明细流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('取消成功')
|
||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||
|
||||
Reference in New Issue
Block a user