Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
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) {
|
export function searchMateriel(num, check, num1) {
|
||||||
return request({
|
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) {
|
export function searchArriveOrder(num8, num9, num2, num3, num5, num6, num7, pageCurrent, pageSize) {
|
||||||
return request({
|
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({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '备料管理_取消到货单明细绑定',
|
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({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '备料管理_到货单明细关联',
|
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}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -316,6 +316,13 @@
|
|||||||
<span>采购计划单号:</span>
|
<span>采购计划单号:</span>
|
||||||
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/>
|
<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-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-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-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>
|
</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 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">
|
<el-table-column label="采购计划单号" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.采购单号 }}
|
{{ scope.row.采购单号 ? scope.row.采购单号 : scope.row.离线采购计划编号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购计划单名称" align="center">
|
<el-table-column label="采购计划单名称" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.采购单名称 }}
|
{{ scope.row.采购单名称 ? scope.row.采购单名称 : scope.row.离线采购计划名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商" align="center" show-overflow-tooltip>
|
<el-table-column label="供应商" align="center" show-overflow-tooltip>
|
||||||
@@ -336,19 +343,19 @@
|
|||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购员" align="center">
|
<el-table-column v-show="planType===0" label="采购员" align="center">
|
||||||
<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">
|
<el-table-column label="下单日期" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.下单日期.split(' ')[0] }}
|
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '-' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划完成日期" align="center">
|
<el-table-column v-show="planType===0" label="计划完成日期" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.计划完成日期.split(' ')[0] }}
|
{{ scope.row.计划完成日期 ? scope.row.计划完成日期.split(' ')[0] : '-' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -402,7 +409,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位" align="center" width="60px">
|
<el-table-column label="单位" align="center" width="60px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.单位 }}
|
{{ scope.row.单位 ? scope.row.单位 : '-' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center">
|
<el-table-column label="备注" align="center">
|
||||||
@@ -419,7 +426,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -432,6 +440,17 @@ export default {
|
|||||||
ArrivalOrderNumber: '',
|
ArrivalOrderNumber: '',
|
||||||
ArrivalOrderMXNumber: '',
|
ArrivalOrderMXNumber: '',
|
||||||
supplierName0: '',
|
supplierName0: '',
|
||||||
|
planType: 0,
|
||||||
|
planTypes: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '采购计划'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '离线采购计划'
|
||||||
|
}
|
||||||
|
],
|
||||||
arrest: [],
|
arrest: [],
|
||||||
check: 0,
|
check: 0,
|
||||||
Name: '',
|
Name: '',
|
||||||
@@ -456,6 +475,7 @@ export default {
|
|||||||
tableData3: [],
|
tableData3: [],
|
||||||
tableData6: [],
|
tableData6: [],
|
||||||
采购计划流水号: '',
|
采购计划流水号: '',
|
||||||
|
离线采购计划流水号: '',
|
||||||
tableData4: [],
|
tableData4: [],
|
||||||
total4: 0,
|
total4: 0,
|
||||||
pageCurrent4: 1,
|
pageCurrent4: 1,
|
||||||
@@ -497,7 +517,8 @@ export default {
|
|||||||
},
|
},
|
||||||
本次到货数量组: [],
|
本次到货数量组: [],
|
||||||
工艺计划流水号组: [],
|
工艺计划流水号组: [],
|
||||||
采购计划明细流水号组: []
|
采购计划明细流水号组: [],
|
||||||
|
离线采购计划明细流水号组: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -525,13 +546,23 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchTable2() { // 查询采购单列表
|
searchTable2() { // 查询采购单列表
|
||||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
if (this.planType === 0) {
|
||||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||||
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.check5, this.partNumber).then(response => {
|
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||||
this.tableData2 = response.data.rows
|
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0, this.check5, this.partNumber).then(response => {
|
||||||
this.total2 = response.data.total
|
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) { // 采购单列表分页
|
handleSizeChange2(val) { // 采购单列表分页
|
||||||
this.pageSize2 = val
|
this.pageSize2 = val
|
||||||
@@ -543,10 +574,17 @@ export default {
|
|||||||
},
|
},
|
||||||
searchTable3(row) { // 查询采购计划明细
|
searchTable3(row) { // 查询采购计划明细
|
||||||
this.采购计划流水号 = row.采购计划流水号
|
this.采购计划流水号 = row.采购计划流水号
|
||||||
|
this.离线采购计划流水号 = row.离线采购计划流水号
|
||||||
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
this.partNumber ? this.check5 = 1 : this.check5 = 0
|
||||||
searchMateriel(this.采购计划流水号, this.check5, this.partNumber).then(response => {
|
if (this.planType === 0) {
|
||||||
this.tableData3 = response.data
|
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) {
|
getSummaries(param) {
|
||||||
const { columns, data } = param
|
const { columns, data } = param
|
||||||
@@ -672,19 +710,35 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
saveWeight(row.采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
|
if (row.采购计划明细流水号) {
|
||||||
if (response.data[0].result === '1') {
|
saveWeight(row.采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
|
||||||
this.$message.success('录入成功')
|
if (response.data[0].result === '1') {
|
||||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
this.$message.success('录入成功')
|
||||||
this.tableData6 = response.data
|
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||||
if (response.data.length !== 0) {
|
this.tableData6 = response.data
|
||||||
this.未绑定数量 = response.data[0].未绑定数量
|
if (response.data.length !== 0) {
|
||||||
}
|
this.未绑定数量 = response.data[0].未绑定数量
|
||||||
})
|
}
|
||||||
} else {
|
})
|
||||||
this.$message.error('录入失败')
|
} else {
|
||||||
}
|
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() {
|
Calculation() {
|
||||||
@@ -922,13 +976,15 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.工艺计划流水号组 = []
|
this.工艺计划流水号组 = []
|
||||||
this.采购计划明细流水号组 = []
|
this.采购计划明细流水号组 = []
|
||||||
|
this.离线采购计划明细流水号组 = []
|
||||||
this.本次到货数量组 = []
|
this.本次到货数量组 = []
|
||||||
this.arrest.map(v => {
|
this.arrest.map(v => {
|
||||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||||
this.采购计划明细流水号组.push(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') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('关联成功')
|
this.$message.success('关联成功')
|
||||||
searchMateriel(this.采购计划流水号).then(response => {
|
searchMateriel(this.采购计划流水号).then(response => {
|
||||||
@@ -950,7 +1006,7 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteMateriel(row.到货单明细绑定流水号, row.采购计划明细流水号).then(response => {
|
deleteMateriel(row.到货单明细绑定流水号, row.采购计划明细流水号, row.离线采购计划明细流水号).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('取消成功')
|
this.$message.success('取消成功')
|
||||||
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
searchTable6(this.ArrivalOrderMXNumber).then(response => {
|
||||||
|
|||||||
Reference in New Issue
Block a user