更新
This commit is contained in:
@@ -24,6 +24,19 @@ export function searchArrivalState(pageCurrent, pageSize, check1, num, check2, n
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询仓库到货情况
|
||||
export function searchArrivalState1(pageCurrent, pageSize, check1, num, check2, name) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_仓库到货情况_查询数据',
|
||||
param: `采购合同流水号_check=${check1}&采购合同流水号=${num}&供应商名称_check=${check2}&供应商名称=${name}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询到货情况
|
||||
export function searchArrivalNum(num) {
|
||||
return request({
|
||||
@@ -36,3 +49,15 @@ export function searchArrivalNum(num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 更改到货情况
|
||||
export function submit(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_仓库到货情况_到货',
|
||||
param: `采购合同流水号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
|
||||
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
|
||||
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
||||
const service = axios.create({
|
||||
baseURL: `http://192.168.0.103:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<span>机床号:</span>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="机床号" @change="getGroup()">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 180px;">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px;margin: 3px 0"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
|
||||
@@ -91,12 +110,16 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2, searchtable3, change2, change3, edit } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
<script>import { getMachines, getGroups, searchtable, searchtable2, searchtable3, change2, change3, edit } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Cookie from 'js-cookie'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Machine: '',
|
||||
Machines: [],
|
||||
Group: '',
|
||||
Groups: [],
|
||||
arrest2: [],
|
||||
editTime: '',
|
||||
bianliang1: [],
|
||||
@@ -128,10 +151,21 @@ export default {
|
||||
'userId'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
watch: {
|
||||
// 如果路由有变化,会再次执行该方法
|
||||
'$route': {
|
||||
handler(route) {
|
||||
const _this = this
|
||||
if (route.name === 'MaterialArrivalManagement') {
|
||||
_this.getMachine()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// created() {
|
||||
// this.searchTable()
|
||||
// this.searchTable2()
|
||||
// },
|
||||
methods: {
|
||||
handleSelectionChange2(val) {
|
||||
this.arrest2 = val
|
||||
@@ -151,17 +185,67 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
getMachine() {
|
||||
if (Cookie.get('machineValue') !== undefined) {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.Machine = parseInt(Cookie.get('machineValue'))
|
||||
this.getGroup()
|
||||
this.Group = parseInt(Cookie.get('group'))
|
||||
this.searchTable()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
this.searchTable2()
|
||||
})
|
||||
} else {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
this.searchTable()
|
||||
}
|
||||
},
|
||||
getGroup() {
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getGroups(this.Machine).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Groups.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.Data = []
|
||||
if (this.partName !== '' && this.partName !== null) {
|
||||
this.partNamecheck = true
|
||||
} else {
|
||||
this.partNamecheck = false
|
||||
}
|
||||
searchtable(this.partNamecheck, this.partName, 0, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (this.Machine) { this.Machinecheck = true } else { this.Machinecheck = false }
|
||||
if (this.Group) { this.Groupcheck = true } else { this.Groupcheck = false }
|
||||
if (this.partName) { this.partNamecheck = true } else { this.partNamecheck = false }
|
||||
searchtable(this.Machinecheck, this.Machine, this.Groupcheck, this.Group, this.partNamecheck, this.partName, 0, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading = false
|
||||
} else {
|
||||
|
||||
245
src/views/PurchasingCenter/ArrivalEnquiry/index.vue
Normal file
245
src/views/PurchasingCenter/ArrivalEnquiry/index.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData1"
|
||||
border
|
||||
highlight-current-row
|
||||
style="width: 100%;max-height: 250px;"
|
||||
height="250px"
|
||||
size="mini"
|
||||
@row-click="searchTable2">
|
||||
<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" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" align="center" min-width="120">
|
||||
<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" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货进度" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="18"
|
||||
:percentage="scope.row.到货进度 = (100*(Number(scope.row.合同到货总数))/scope.row.合同采购总数) > 100 ? 100 : Number((100*(Number(scope.row.合同到货总数))/scope.row.合同采购总数).toFixed(2))"
|
||||
status="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="date" label="操作" width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="success"
|
||||
plain
|
||||
@click="submit(scope.row)">到货</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" stripe border style="width: 100%;max-height: 300px;margin-top: 10px" 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.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 ? scope.row.物料规格 : 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" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initArrivalStateContact, searchArrivalState1, searchArrivalNum, submit } from '@/api/PurchasingCenter/ArrivalStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initArrivalStateContact().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchArrivalState1(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
submit(row) {
|
||||
this.$confirm('采购订单是否全部到货', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
submit(row.采购合同流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('到货成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('到货失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消到货'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
searchArrivalNum(row.采购合同流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
@@ -132,8 +132,8 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="25%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px">
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="33%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-width="110px">
|
||||
<el-form-item label="供应商名称" prop="供应商名称">
|
||||
<el-input v-model="form1.供应商名称" size="small" readonly>
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogVisible=true"/>
|
||||
|
||||
Reference in New Issue
Block a user