This commit is contained in:
liushuai
2019-03-29 08:37:02 +08:00
12 changed files with 1236 additions and 178 deletions

View File

@@ -1,18 +1,7 @@
import request from '@/utils/request'
// 初始化项目
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据_按时间排序'
}
})
}
// 机床查询
export function searchmachine(check, num) {
export function getMachines(check, num) {
return request({
url: '',
method: 'post',
@@ -24,7 +13,7 @@ export function searchmachine(check, num) {
})
}
// 分组查询
export function searchTeam(machineNumber) {
export function getGroups(machineNumber) {
return request({
url: '',
method: 'post',
@@ -35,3 +24,16 @@ export function searchTeam(machineNumber) {
}
})
}
// 主表查询
export function getTable(num1, num2, num3, num4, num5, num6, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_库存管理_基本件库存查询',
param: '机床流水号_check=' + num1 + '&机床流水号=' + num2 + '&组件流水号_check=' + num3 + '&组件流水号=' + num4 + '&零件图号_check=' + num5 + '&零件图号=' + num6,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -10,23 +10,24 @@ export function getProject() {
}
})
}
export function getToolNum(check, num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
}
})
}
export function getCustomerName() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
}
})
}
export function getToolNum() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
name: '客户关系管理系统_初始化查询_客户名称'
}
})
}
@@ -37,18 +38,63 @@ export function searchtable(num1, num2, num3, num4, num5, num6, num7, num8, num9
data: {
type: '1',
name: '项目计划管理_项目总计划_查询数据',
param: `项目流水号_check=` + num1 + '&项目流水号=' + num2 + '&机床流水号_check=' + num3 + '&@机床流水号=' + num4 + '&客户名称_check=' + num5 + '&客户名称=' + num6 + '&签订日期_check=' + num7 + '&签订日期开始时间=' + num8 + '&签订日期结束时间=' + num9 + '&交货期_check=' + num10 + '&交货期开始时间=' + num11 + '&交货期结束时间=' + num12,
param: `项目流水号_check=` + num1 + '&项目流水号=' + num2 + '&机床流水号_check=' + num3 + '&机床流水号=' + num4 + '&客户名称_check=' + num5 + '&客户名称=' + num6 + '&签订日期_check=' + num7 + '&签订日期开始时间=' + num8 + '&签订日期结束时间=' + num9 + '&交货期_check=' + num10 + '&交货期开始时间=' + num11 + '&交货期结束时间=' + num12,
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchtable2() {
export function editTable(num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, num12) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '项目计划管理_项目总计划_编辑数据',
param: `项目流水号=` + num1 + '&机床流水号=' + num2 + '&项目编号=' + num3 + '&数量=' + num4 + '&设计者=' + num5 + '&机床设计完成时间=' + num6 + '&采购完成时间=' + num7 + '&备料完成时间=' + num8 + '&机床生产完成时间=' + num9 + '&机床装配完成时间=' + num10 + '&完成顺序=' + num11 + '&更新=' + num12
}
})
}
export function searchTable2(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_传递后_项目名称_查询数据_加工进度修改'
name: '项目计划管理_项目详细计划_查询数据',
param: `机床流水号=` + num1 + '&计划类型=' + num2
}
})
}
export function editTable2(num1, num2, num3, num4, num5, num6, num7, num8, num9, num10) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '项目计划管理_项目详细计划_编辑数据',
param: `组件计划流水号=` + num1 + '&组号=' + num2 + '&任务名称=' + num3 + '&负责人=' + num4 + '&接收任务时间=' + num5 + '&任务开始时间=' + num6 + '&计划完成时间=' + num7 + '&货期=' + num8 + '&实际完成时间=' + num9 + '&备注=' + num10
}
})
}
export function Delete(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '项目计划管理_项目详细计划_删除数据',
param: `组件计划流水号=` + num1
}
})
}
export function addTable(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '项目计划管理_项目详细计划_增加数据',
param: `机床流水号=` + num1 + '&计划类型=' + num2
}
})
}

View File

@@ -0,0 +1,40 @@
import request from '@/utils/request'
// 查询库存量
export function searchMaterialNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_物料与货位对照_查询数据',
param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询滞货库存量
export function searchBacklogNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_滞货物料与货位对照_查询数据',
param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 转为滞货
export function submitTurn(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_转为滞货',
param: `物料流水号=${params[0]}&转滞货数量=${params[1]}&物料与货位对照流水号=${params[2]}&货位流水号=${params[3]}`
}
})
}

View File

@@ -1,27 +1,27 @@
import request from '@/utils/request'
// 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, check1, num1, check2, num2, person) {
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, person) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `询价状态编号_check=${check1}&询价状态编号=${num1}&物料名称_check=${check2}&物料名称=${num2}&人员编号=${person}`,
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&人员编号=${person}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询分配后的基本件
export function searchPart(pageCurrent, pageSize, check1, num1, person) {
export function searchPart(pageCurrent, pageSize, num1, person) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_基本件_分配后',
param: `询价状态编号_check=${check1}&询价状态编号=${num1}&人员编号=${person}`,
param: `物料状态编号=${num1}&人员编号=${person}`,
Pagination: pageCurrent + '&' + pageSize
}
})
@@ -183,3 +183,27 @@ export function saveOrder(num1, num2, num3) {
}
})
}
// 使用滞货
export function submitUseInventory(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_使用滞货',
param: `物料流水号=${params[0]}&使用滞货数量=${params[1]}&组件零件流水号=${params[2]}`
}
})
}
// 取消使用滞货
export function cancelUseInventory(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_取消使用滞货',
param: `物料流水号=${params[0]}&取消数量=${params[1]}&组件零件流水号=${params[2]}`
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553736654324" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1686" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M1020.221442 259.023358l0.057305-0.01535L512.668731 6.224772 5.978666 258.526031l-0.948605 0 0 505.962493 507.639692 252.7904 507.610016-252.7904L1020.27977 259.023358 1020.221442 259.023358zM512.668731 67.442018l381.63693 190.562127L749.096465 330.981227l-383.65796-190.004425L512.668731 67.442018zM298.950208 176.850847l388.576993 186.487322-174.857447 84.181261-381.642047-188.511421L298.950208 176.850847zM68.45458 322.952366l20.269649-0.025583-20.269649-0.696872 0-31.654954L480.873584 495.91772l0 442.368106L68.45458 732.932832 68.45458 322.952366zM956.881858 353.789699l0 379.144156L544.462854 938.285826 544.462854 495.91772l412.417981-205.343785L956.880835 353.789699z" p-id="1687"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,239 @@
<template>
<div class="app-container">
<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="number" placeholder="零件号" clearable size="small" style="width: 180px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
</el-card>
<el-card>
<el-table v-loading="listLoading1" :data="tableData1" class="table" border height="650">
<el-table-column
label="序号"
align="center"
width="50"
type="index"/>
<el-table-column align="center" label="零件名称" width="150px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件图号" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="入库数量" width="120px">
<template slot-scope="scope">
{{ scope.row.入库数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="120px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="仓库名称" width="120px">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="货位名称" width="120px">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="入库时间">
<template slot-scope="scope">
{{ scope.row.入库时间 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-if="!listLoading1"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { getMachines, getGroups, getTable } from '@/api/Inventory/StockInquiry'
export default {
data() {
return {
startTime: '',
endTime: '',
startTime_check: 0,
endTime_check: 0,
liushuihao: '',
// value2: null,
radioList: '0',
length: 0,
listLoading1: false,
tableData1: [],
project: '',
projects: [],
Machine: '',
Machines: [],
Group: '',
Groups: [],
part: '',
parts: [{
value: 0,
label: '全部零件'
}, {
value: 1,
label: '自家生产'
}, {
value: 2,
label: '外协生产'
}],
Speed: '',
Speeds: [{
value: 5,
label: '全部'
}, {
value: 1,
label: '拖期'
}, {
value: 2,
label: '即将拖期'
}, {
value: 3,
label: '如期'
}, {
value: 4,
label: '工序外协'
}],
number: '',
checkbox_project: false,
checkbox_Machine: false,
checkbox_Group: false,
checkbox_part: false,
checkbox_number: false,
零件图号: [],
零件名称: [],
投产数量: [],
result: [],
process: [[]],
planDate: [[]],
worker: [[]],
colorCode: [[]],
realDate: [[]],
// waixie: [[]],
total: 0, // 总条数
pageSize: 10,
pageCurrent: 1
}
},
created() {
this.getMachine()
this.getTableData()
},
methods: {
getMachine() {
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].项目名称
})
}
})
},
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].组件流水号
})
}
})
},
// 按条件查询
getTableData() {
this.listLoading1 = true
if (this.Machine === '') {
this.checkbox_Machine = 0
} else {
this.checkbox_Machine = 1
}
if (this.Group === '') {
this.checkbox_Group = 0
} else {
this.checkbox_Group = 1
}
if (this.number === '') {
this.checkbox_number = 0
} else {
this.checkbox_number = 1
}
this.tableData1 = []
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.listLoading1 = false
} else {
// for (let i = 0; i < response.data.rows.length; i++) {
// response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ')[0]
// }
this.tableData1 = response.data.rows
this.total = response.data.total
this.listLoading1 = false
}
})
},
handleSizeChange(val) {
this.pageSize = val
this.getTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.getTableData()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -19,123 +19,156 @@
:value="item.value"/>
</el-select>
<span>客户名称:</span>
<el-select v-model="CustomerNameValue" clearable filterable size="small" style="margin-bottom:10px;width: 220px" placeholder="客户名称">
<el-option
v-for="item in CustomerName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="CustomerNameValue" placeholder="客户名称" size="small" clearable style="width:200px"/>
</el-row>
<el-row>
<span>签订日期:</span>
<el-date-picker v-model="time_SignStart" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>~
<el-date-picker v-model="time_SignFinish" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>
<el-date-picker v-model="time_SignStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>~
<el-date-picker v-model="time_SignFinish" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>
<span>交货期:</span>
<el-date-picker v-model="time_deliveryStart" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>~
<el-date-picker v-model="time_deliveryFinish" size="small" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>
<el-date-picker v-model="time_deliveryStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>~
<el-date-picker v-model="time_deliveryFinish" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table v-loading="loading" :data="tableData" height="580" size="mini" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column min-width="300px" label="项目编号" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.项目编号" class="edit-input" size="small"/>
<el-input v-model="scope.row.项目编号" size="mini"/>
</template>
<template v-else>
{{ scope.row.项目编号 }}
</template>
<span v-else>{{ scope.row.项目编号 }}</span>
</template>
</el-table-column>
<!--<el-table-column label="项目编号" align="center" width="220px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.项目编号 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="项目名称" align="center" width="240px">
<el-table-column label="项目名称" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" width="100px">
<el-table-column label="机床图号" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" width="100px">
<el-table-column label="机床名称" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.数量 }}
<template v-if="scope.row.edit">
<el-input v-model="scope.row.数量" size="mini"/>
</template>
<template v-else>
{{ scope.row.数量 }}
</template>
</template>
</el-table-column>
<el-table-column label="签订日期" align="center">
<el-table-column label="签订日期" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column label="交货期" align="center">
<el-table-column label="交货期" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center">
<el-table-column label="客户名称" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="设计者" align="center">
<el-table-column label="设计者" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.机床设计者 }}
<template v-if="scope.row.edit">
<el-input v-model="scope.row.机床设计者" size="mini"/>
</template>
<template v-else>
{{ scope.row.机床设计者 }}
</template>
</template>
</el-table-column>
<el-table-column label="发图" align="center">
<el-table-column label="发图" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.机床设计完成时间 }}
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床设计完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
<el-button type="text" @click="code = 1;openDialog(scope.row)">{{ scope.row.机床设计完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="采购" align="center">
<el-table-column label="采购" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.采购完成时间 }}
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.采购完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
<el-button type="text" @click="code = 2;openDialog(scope.row)">{{ scope.row.采购完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="备料" align="center">
<el-table-column label="备料" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.备料完成时间 }}
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.备料完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
<el-button type="text" @click="code = 3;openDialog(scope.row)">{{ scope.row.备料完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="制造" align="center">
<el-table-column label="制造" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.机床生产完成时间 }}
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床生产完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
<el-button type="text" @click="code = 4;openDialog(scope.row)">{{ scope.row.机床生产完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="装配" align="center">
<el-table-column label="装配" align="center" width="250px">
<template slot-scope="scope">
{{ scope.row.机床装配完成时间 }}
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床装配完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
<el-button type="text" @click="code = 5;openDialog(scope.row)">{{ scope.row.机床装配完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="顺序" align="center">
<el-table-column label="顺序" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.完成顺序 }}
<template v-if="scope.row.edit">
<el-input v-model="scope.row.完成顺序" size="mini"/>
</template>
<template v-else>
{{ scope.row.完成顺序 }}
</template>
</template>
</el-table-column>
<el-table-column label="更新" align="center">
<el-table-column label="更新" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.更新 }}
<template v-if="scope.row.edit">
<el-input v-model="scope.row.更新" size="mini"/>
</template>
<template v-else>
{{ scope.row.更新 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="300px" align="center" fixed="right">
<el-table-column label="操作" width="200px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="success" size="small" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">保存</el-button>
<el-button v-else type="primary" size="small" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
<el-button v-if="scope.row.edit" type="primary" size="small" @click="scope.row.edit=!scope.row.edit">取消</el-button>
</template>
</el-table-column>
</el-table>
@@ -151,15 +184,123 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<span>{{ title }}</span>
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="margin-left: 10px" @click="addTable()">增加</el-button>
<el-table v-loading="loading2" :data="tableData2" size="mini" style="margin-top: 10px;width: 100%;" border element-loading-text="拼命加载中">
<el-table-column min-width="300px" label="组号" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.组号" size="mini"/>
</template>
<template v-else>
{{ scope.row.组号 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="任务名称" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini"/>
</template>
<template v-else>
{{ scope.row.任务名称 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="负责人" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.负责人" size="mini"/>
</template>
<template v-else>
{{ scope.row.负责人 }}
</template>
</template>
</el-table-column>
<el-table-column label="接收任务时间" align="center" width="250px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.接收任务时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
{{ scope.row.接收任务时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="任务开始时间" align="center" width="250px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.任务开始时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
{{ scope.row.任务开始时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="计划完成时间" align="center" width="250px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
{{ scope.row.计划完成时间 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="货期" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.货期" size="mini"/>
</template>
<template v-else>
{{ scope.row.货期 }}
</template>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" width="250px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
</template>
<template v-else>
{{ scope.row.实际完成时间 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="备注" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.备注" size="mini"/>
</template>
<template v-else>
{{ scope.row.备注 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit2(scope.row)">确定</el-button>
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
<el-button v-if="scope.row.edit" type="primary" size="small" @click="scope.row.edit=!scope.row.edit">取消</el-button>
<el-button v-else type="danger" size="small" @click="Delete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { getProject, getCustomerName, getToolNum, searchtable } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
import { getProject, getCustomerName, getToolNum, searchtable, editTable, searchTable2, editTable2, Delete, addTable } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
export default {
data() {
return {
jichuang: '',
title: '',
tableData2: [],
loading2: false,
code: '',
time_SignStart: '', // 签订开始
time_SignFinish: '', // 签订结束
time_deliveryStart: '', // 交货开始
@@ -183,22 +324,6 @@ export default {
this.searchTable()
},
methods: {
cancelEdit(row) {
row.title = row.originalTitle
row.edit = false
this.$message({
message: 'The title has been restored to the original value',
type: 'warning'
})
},
confirmEdit(row) {
row.edit = false
row.originalTitle = row.title
this.$message({
message: 'The title has been edited',
type: 'success'
})
},
fetchData() {
this.projectValue = ''
this.project = []
@@ -211,6 +336,21 @@ export default {
}
})
},
typeChange() {
if (this.projectValue === '' || this.projectValue === null) {
this.toolNumValue = ''
this.toolNum = []
} else {
getToolNum(1, this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.toolNum.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}
},
getCustomerName() {
this.CustomerNameValue = ''
this.CustomerName = []
@@ -223,38 +363,257 @@ export default {
}
})
},
typeChange() {
this.toolNumValue = ''
this.toolNum = []
getToolNum().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.toolNum.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
// 查询表格数据
searchTable() {
this.loading = true
this.tableData = []
this.tableData2 = []
this.jichuang = ''
this.code = ''
if (this.projectValue !== '' && this.projectValue !== null) { this.projectValuecheck = 1 } else { this.projectValuecheck = 0 }
if (this.CustomerNameValue !== '' && this.CustomerNameValue !== null) { this.CustomerNameValuecheck = 1 } else { this.CustomerNameValuecheck = 0 }
if (this.toolNumValue !== '' && this.toolNumValue !== null) { this.toolNumValuecheck = 1 } else { this.toolNumValuecheck = 0 }
if (this.time_SignStart !== '' && this.time_SignStart !== null && this.time_SignFinish !== '' && this.time_SignFinish) { this.time_Signcheck = 1 } else { this.time_Signcheck = 0 }
if (this.time_deliveryStart !== '' && this.time_deliveryStart !== null && this.time_deliveryFinish !== '' && this.time_deliveryFinish) { this.time_deliverycheck = 1 } else { this.time_deliverycheck = 0 }
searchtable(this.projectValuecheck, this.projectValue, this.CustomerNameValuecheck, this.CustomerNameValue, this.toolNumValuecheck, this.toolNumValue, this.time_Signcheck, this.time_deliveryStart, this.time_deliveryFinish, this.time_deliverycheck, this.time_deliveryStart, this.time_deliveryFinish, this.pageCurrent, this.pageSize).then(response => {
searchtable(this.projectValuecheck, this.projectValue, this.toolNumValuecheck, this.toolNumValue, this.CustomerNameValuecheck, this.CustomerNameValue, this.time_Signcheck, this.time_SignStart, this.time_SignFinish, this.time_deliverycheck, this.time_deliveryStart, this.time_deliveryFinish, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
this.tableData = response.data.rows
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].合同签订日期 !== '' && response.data.rows[i].合同签订日期 !== null) {
response.data.rows[i].合同签订日期 = response.data.rows[i].合同签订日期.split(' ')[0]
}
if (response.data.rows[i].发货节点 !== '' && response.data.rows[i].发货节点 !== null) {
response.data.rows[i].发货节点 = response.data.rows[i].发货节点.split(' ')[0]
}
if (response.data.rows[i].机床设计完成时间 !== '' && response.data.rows[i].机床设计完成时间 !== null) {
response.data.rows[i].机床设计完成时间 = response.data.rows[i].机床设计完成时间.split(' ')[0]
}
if (response.data.rows[i].采购完成时间 !== '' && response.data.rows[i].采购完成时间 !== null) {
response.data.rows[i].采购完成时间 = response.data.rows[i].采购完成时间.split(' ')[0]
}
if (response.data.rows[i].备料完成时间 !== '' && response.data.rows[i].备料完成时间 !== null) {
response.data.rows[i].备料完成时间 = response.data.rows[i].备料完成时间.split(' ')[0]
}
if (response.data.rows[i].机床生产完成时间 !== '' && response.data.rows[i].机床生产完成时间 !== null) {
response.data.rows[i].机床生产完成时间 = response.data.rows[i].机床生产完成时间.split(' ')[0]
}
if (response.data.rows[i].机床装配完成时间 !== '' && response.data.rows[i].机床装配完成时间 !== null) {
response.data.rows[i].机床装配完成时间 = response.data.rows[i].机床装配完成时间.split(' ')[0]
}
this.tableData.push({
edit: false,
项目编号: response.data.rows[i].项目编号,
项目名称: response.data.rows[i].项目名称,
机床图号: response.data.rows[i].机床图号,
机床名称: response.data.rows[i].机床名称,
数量: response.data.rows[i].数量,
合同签订日期: response.data.rows[i].合同签订日期,
发货节点: response.data.rows[i].发货节点,
客户名称: response.data.rows[i].客户名称,
机床设计者: response.data.rows[i].机床设计者,
机床设计完成时间: response.data.rows[i].机床设计完成时间,
采购完成时间: response.data.rows[i].采购完成时间,
备料完成时间: response.data.rows[i].备料完成时间,
机床生产完成时间: response.data.rows[i].机床生产完成时间,
机床装配完成时间: response.data.rows[i].机床装配完成时间,
完成顺序: response.data.rows[i].完成顺序,
更新: response.data.rows[i].更新,
项目流水号: response.data.rows[i].项目流水号,
机床流水号: response.data.rows[i].机床流水号
})
}
this.total = response.data.total
}
}).then(() => {
this.loading = false
})
},
// 表格1保存
confirmEdit(row) {
editTable(row.项目流水号, row.机床流水号, row.项目编号, row.数量, row.机床设计者, row.机床设计完成时间, row.采购完成时间, row.备料完成时间, row.机床生产完成时间, row.机床装配完成时间, row.完成顺序, row.更新).then(response => {
if (response.data[0].result === '1') {
row.edit = false
this.$notify({
title: '成功',
message: '信息修改成功',
type: 'success'
})
this.searchTable()
} else {
this.$message.error('信息修改失败')
}
})
},
// 查询表格2数据
openDialog(row) {
this.loading2 = true
this.tableData2 = []
if (this.code === 1) {
this.title = '发图'
} else if (this.code === 2) {
this.title = '采购'
} else if (this.code === 3) {
this.title = '备料'
} else if (this.code === 4) {
this.title = '制造'
} else if (this.code === 5) {
this.title = '装配'
}
searchTable2(row.机床流水号, this.code).then(response => {
this.jichuang = row.机床流水号
if (response.data.length === 0) {
this.loading2 = false
} else {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].接收任务时间 !== '' && response.data[i].接收任务时间 !== null) {
response.data[i].接收任务时间 = response.data[i].接收任务时间.split(' ')[0]
}
if (response.data[i].任务开始时间 !== '' && response.data[i].任务开始时间 !== null) {
response.data[i].任务开始时间 = response.data[i].任务开始时间.split(' ')[0]
}
if (response.data[i].接收任务时间 !== '' && response.data[i].接收任务时间 !== null) {
response.data[i].接收任务时间 = response.data[i].接收任务时间.split(' ')[0]
}
if (response.data[i].计划完成时间 !== '' && response.data[i].计划完成时间 !== null) {
response.data[i].计划完成时间 = response.data[i].计划完成时间.split(' ')[0]
}
if (response.data[i].实际完成时间 !== '' && response.data[i].实际完成时间 !== null) {
response.data[i].实际完成时间 = response.data[i].实际完成时间.split(' ')[0]
}
this.tableData2.push({
edit: false,
组件计划流水号: response.data[i].组件计划流水号,
机床流水号: response.data[i].机床流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
负责人: response.data[i].负责人,
接收任务时间: response.data[i].接收任务时间,
任务开始时间: response.data[i].任务开始时间,
计划完成时间: response.data[i].计划完成时间,
实际完成时间: response.data[i].实际完成时间,
备注: response.data[i].备注
})
}
}
}).then(() => {
this.loading2 = false
})
},
searchTable2() {
this.loading2 = true
this.tableData2 = []
if (this.code === 1) {
this.title = '发图'
} else if (this.code === 2) {
this.title = '采购'
} else if (this.code === 3) {
this.title = '备料'
} else if (this.code === 4) {
this.title = '制造'
} else if (this.code === 5) {
this.title = '装配'
}
searchTable2(this.jichuang, this.code).then(response => {
if (response.data.length === 0) {
this.loading2 = false
} else {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].接收任务时间 !== '' && response.data[i].接收任务时间 !== null) {
response.data[i].接收任务时间 = response.data[i].接收任务时间.split(' ')[0]
}
if (response.data[i].任务开始时间 !== '' && response.data[i].任务开始时间 !== null) {
response.data[i].任务开始时间 = response.data[i].任务开始时间.split(' ')[0]
}
if (response.data[i].接收任务时间 !== '' && response.data[i].接收任务时间 !== null) {
response.data[i].接收任务时间 = response.data[i].接收任务时间.split(' ')[0]
}
if (response.data[i].计划完成时间 !== '' && response.data[i].计划完成时间 !== null) {
response.data[i].计划完成时间 = response.data[i].计划完成时间.split(' ')[0]
}
if (response.data[i].实际完成时间 !== '' && response.data[i].实际完成时间 !== null) {
response.data[i].实际完成时间 = response.data[i].实际完成时间.split(' ')[0]
}
this.tableData2.push({
edit: false,
组件计划流水号: response.data[i].组件计划流水号,
机床流水号: response.data[i].机床流水号,
组号: response.data[i].组号,
任务名称: response.data[i].任务名称,
负责人: response.data[i].负责人,
接收任务时间: response.data[i].接收任务时间,
任务开始时间: response.data[i].任务开始时间,
计划完成时间: response.data[i].计划完成时间,
实际完成时间: response.data[i].实际完成时间,
备注: response.data[i].备注
})
}
}
}).then(() => {
this.loading2 = false
})
},
// 表格2保存
confirmEdit2(row) {
editTable2(row.组件计划流水号, row.组号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
if (response.data[0].result === '1') {
row.edit = false
this.$notify({
title: '成功',
message: '信息修改成功',
type: 'success'
})
this.searchTable2()
} else {
this.$message.error('信息修改失败')
}
})
},
// 表格2删除
Delete(row) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
Delete(row.组件计划流水号).then(response => {
if (response.data[0].result === '1') {
row.edit = false
this.$notify({
title: '成功',
message: '信息修改成功',
type: 'success'
})
this.searchTable2()
} else {
this.$message.error('信息修改失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 表格2增加
addTable() {
if (this.jichuang === '') {
this.$message.error('请先选择一个类别')
} else {
addTable(this.jichuang, this.code).then(response => {
if (response.data[0].result === '1') {
this.$message({
type: 'success',
message: '添加成功!'
})
this.searchTable2()
} else {
this.$message.error('添加失败')
}
})
}
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
@@ -270,5 +629,7 @@ export default {
</script>
<style scoped>
.el-card {
margin-bottom: 15px;
}
</style>

View File

@@ -71,17 +71,17 @@
{{ scope.row.付款方式 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总金额(元)" width="150">
<el-table-column align="center" label="合同总金额(元)" width="150">
<template slot-scope="scope">
{{ scope.row.合同总金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="已到账金额(元)" width="150">
<el-table-column align="center" label="已到账金额(元)" width="150">
<template slot-scope="scope">
{{ scope.row.已支付 }}
</template>
</el-table-column>
<el-table-column align="center" label="未到账金额(元)" width="150">
<el-table-column align="center" label="未到账金额(元)" width="150">
<template slot-scope="scope">
<el-tag size="small" style="width: 100px" type="warning">{{ scope.row.未支付金额 }}</el-tag>
</template>
@@ -203,17 +203,17 @@
label="付款批次"
type="index"
width="150"/>
<el-table-column align="center" label="应收金额(元)" width="180px">
<el-table-column align="center" label="应收金额(元)" width="180px">
<template slot-scope="scope">
{{ scope.row.应收金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="已收金额(元)" width="180px">
<el-table-column align="center" label="已收金额(元)" width="180px">
<template slot-scope="scope">
{{ scope.row.已收金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="未收金额(元)" width="180px">
<el-table-column align="center" label="未收金额(元)" width="180px">
<template slot-scope="scope">
<el-tag type="warning" style="width: 100px" size="small">{{ scope.row.未收金额 }}</el-tag>
</template>
@@ -309,7 +309,7 @@
<el-input v-model="form2.ContractNumberValue" :disabled="true" size="small" placeholder="请输入合同编号" style="width: 200px"/>
</el-form-item>
<el-form-item label="合同总金额" prop="TotalContractAmount" label-width="100px">
<el-input v-model="form2.TotalContractAmount" size="small" placeholder="请输入合同总金额(元)" style="width: 200px"/>
<el-input v-model="form2.TotalContractAmount" size="small" placeholder="请输入合同总金额(元)" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -333,7 +333,7 @@
<el-input v-model="form2.ContractNumberValue" :disabled="true" size="small" placeholder="请输入合同编号" style="width: 200px"/>
</el-form-item>
<el-form-item label="合同总金额" prop="TotalContractAmount" label-width="100px">
<el-input v-model="form2.TotalContractAmount" size="small" placeholder="请输入合同总金额(元)" style="width: 200px"/>
<el-input v-model="form2.TotalContractAmount" size="small" placeholder="请输入合同总金额(元)" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -348,10 +348,10 @@
<el-input v-model="form.EntryName" :disabled="true" size="small" placeholder="请输入项目名称"/>
</el-form-item>
<el-form-item label="合同总金额" prop="TotalContractAmount" label-width="100px">
<el-input v-model="form.TotalContractAmount" :disabled="true" size="small" placeholder="请输入合同总金额(元)"/>
<el-input v-model="form.TotalContractAmount" :disabled="true" size="small" placeholder="请输入合同总金额(元)"/>
</el-form-item>
<el-form-item label="未付款金额" prop="AlreadyPaid1" label-width="100px">
<el-input v-model="form.AlreadyPaid1 " :disabled="true" size="small" placeholder="请输入未付款金额(元)"/>
<el-input v-model="form.AlreadyPaid1 " :disabled="true" size="small" placeholder="请输入未付款金额(元)"/>
</el-form-item>
<el-form-item label="本次付款" prop="ThisPayment" label-width="100px">
<el-input-number v-model="form.ThisPayment" :min="0" :max="maxMoney" :precision="2" :step="1" controls-position="right" size="small" style="width: 232px" placeholder="请输入本次付款金额" @change="changeMoney"/>

View File

@@ -213,7 +213,7 @@
<el-step :description="time4" title="预备验收" icon="el-icon-view"/>
<el-step :description="time5" title="设备发货" icon="el-icon-sold-out"/>
<el-step :description="time6" title="安装调试" icon="el-icon-time"/>
<el-step :description="time7" title="项目验收" icon="el-icon-circle-check-outline"/>
<el-step :description="time7" title="项目验收" icon="el-icon-circle-check-outline"/>
<el-step :description="time8" title="质保阶段" icon="el-icon-service"/>
</el-steps>
</div>

View File

@@ -0,0 +1,251 @@
<template>
<div class="app-container">
<el-card>
<div slot="header" class="clearfix">
<span>物料名称</span>
<el-input v-model="materialName" placeholder="物料名称" clearable size="small"/>
<span>物料规格</span>
<el-input v-model="materialSpec" placeholder="物料规格" clearable size="small"/>
<span>物料型号</span>
<el-input v-model="materialModel" placeholder="物料型号" clearable size="small"/>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1();pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
</div>
<h4 style="margin-top: 0">采购件列表</h4>
<el-table :data="tableData1" size="mini" border style="width: 100%;" height="440">
<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="150">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column props="仓库名称" label="仓库名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="货位存量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
</el-table-column>
<el-table-column label="待出库数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.待出库数量 }}
</template>
</el-table-column>
<el-table-column label="可转滞货数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.可转滞货数量 = scope.row.货位存量 - 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="80">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope" align="center">
<el-button size="mini" type="primary" @click="turnToBacklogGoods(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>
<h4>滞货件列表</h4>
<el-table :data="tableData2" size="mini" border style="width: 100%;" height="440">
<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="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="仓库名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="货位名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
</template>
</el-table-column>
<el-table-column label="滞货货位存量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible" title="转为滞货" center width="380px">
<span>转为滞货数量</span>
<el-input-number :min="0" :max="maxNumber" v-model="number" controls-position="right"/>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible=false">取消</el-button>
<el-button :disabled="Number(number)===0" type="primary" @click="submitTurn()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchMaterialNum, searchBacklogNum, submitTurn } from '@/api/PurchasingCenter/BacklogGoodsAnalysis'
import { mapGetters } from 'vuex'
export default {
name: 'BacklogGoodsAnalysis',
data() {
return {
materialName: '',
materialSpec: '',
materialModel: '',
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
number: 0,
maxNumber: 0,
dialogFormVisible: false,
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
tableData2: [],
materialNum: '', // 物料流水号
materialLocalNum: '', // 物料与货位对照流水号
localNum: '' // 货位流水号
}
},
computed: {
...mapGetters([
'name',
'id' // 人员编号
])
},
mounted() {
this.searchTable1()
this.searchTable2()
},
methods: {
searchTable1() {
let check1, check2, check3
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchMaterialNum(this.pageCurrent1, this.pageSize1, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
turnToBacklogGoods(row) {
this.number = 0
this.dialogFormVisible = true
this.maxNumber = row.可转滞货数量
this.materialNum = row.物料流水号
this.materialLocalNum = row.物料与货位对照流水号
this.localNum = row.货位流水号
},
submitTurn() {
submitTurn(this.materialNum, this.number, this.materialLocalNum, this.localNum).then(response => {
if (response.data[0].result === '1') {
this.searchTable1()
this.searchTable2()
this.$message.success('操作成功')
this.dialogFormVisible = false
} else {
this.$message.error('操作失败')
}
})
},
searchTable2() {
let check1, check2, check3
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchBacklogNum(this.pageCurrent2, this.pageSize2, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -3,14 +3,8 @@
<el-tabs type="border-card" @tab-click="searchTable11();searchTable12()">
<el-tab-pane label="标准件和外购件">
<el-row style="margin-bottom: 10px">
<span>询价状态:</span>
<el-select v-model="inquiryStateValue" placeholder="询价状态" size="small" clearable>
<el-option
v-for="item in inquiryState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<el-button
@@ -36,7 +30,7 @@
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="materialChange(scope.row)">物料变更</el-button>
</template>
</el-table-column>
<el-table-column label="物料状态" align="center" width="100">
<el-table-column label="物料状态" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
@@ -48,11 +42,11 @@
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</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="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -73,26 +67,51 @@
{{ 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="100">
<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="200">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<el-table-column label="分配数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="待询价数量" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="使用滞货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="使用滞货" align="center" min-width="130">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="使用滞货" placement="top-start">
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0" icon="el-icon-goods" plain type="primary" size="mini" @click="useInventory(scope.row)"/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="取消使用滞货" placement="top-start">
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.使用滞货数量)===0" icon="el-icon-sold-out" plain type="danger" size="mini" @click="cancelUseInventory(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="滞货数量" align="center" min-width="80">
<template slot-scope="scope">
{{ Number(scope.row.滞货数量) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
@@ -119,14 +138,8 @@
</el-tab-pane>
<el-tab-pane label="基本件">
<el-row style="margin-bottom: 10px">
<span>询价状态:</span>
<el-select v-model="inquiryStateValue" placeholder="询价状态" size="small" clearable>
<el-option
v-for="item in inquiryState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<el-button
type="success"
size="small"
@@ -316,12 +329,12 @@
{{ scope.row.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="技术下达数量" align="center" width="110">
<el-table-column label="待询价数量" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.技术下达数量 }}
</template>
</el-table-column>
<el-table-column label="实际采购数量" align="center" width="110">
<el-table-column label="实际询价(采购)数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" size="mini" style="width:100%"/>
</template>
@@ -559,12 +572,23 @@
<el-button type="primary" size="small" @click="submitMaterialChange">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible4" title="使用滞货" center style="min-height: 300px;" width="460px">
<span>使用滞货数量:</span>
<el-input-number :min="0" :max="maxUseNumber" v-model="useNumber" controls-position="right"/>
<div style="margin-top: 10px;color: red">注意:若设置待询价物料全部使用滞货,则将不可再取消使用滞货</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible4=false">取消</el-button>
<el-button :disabled="Number(useNumber)===0" type="primary" size="small" @click="submitUseInventory">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder } from '@/api/PurchasingCenter/CreateInquirySheet'
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
submitUseInventory, cancelUseInventory } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex'
import { exportExcelMethod } from './exportExcel'
@@ -572,18 +596,29 @@ export default {
name: '', // 创建询价单
data() {
return {
check1: 0, // 询价状态
check2: 0, // 物料名称
check3: 0, // 供应商
check4: 0, // 询价单号
inquiryStateValue: '', // 询价状态
inquiryState: [{
label: '未询价',
value: 1
}, {
label: '已询价',
value: 3
}],
materialStatusValue: [0], // 物料状态
materialStatus: [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '未询价'
}, {
value: 2,
label: '已询价',
children: [{
value: 3,
label: '未采购'
}, {
value: 4,
label: '已采购'
}]
}
], // 物料状态
materialName: '',
tableData11: [], // 标准件和外购件列表
total11: 0,
@@ -656,13 +691,17 @@ export default {
standardAndPurchaseValue: '', // 标准件和外购件流水号
title2: '',
orderExport: '',
supplierExport: ''
supplierExport: '',
useNumber: '',
maxUseNumber: '',
dialogVisible4: false,
backlogGroupPartNum: '',
backlogMaterialNum: '',
cancelNum: 0
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
@@ -672,6 +711,45 @@ export default {
this.searchTable2() // 查表2
},
methods: {
submitUseInventory() {
submitUseInventory(this.backlogMaterialNum, this.useNumber, this.backlogGroupPartNum).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.searchTable11()
this.dialogVisible4 = false
this.$message.success('操作成功')
} else { this.$message.error('操作失败') }
})
},
useInventory(row) { // 使用滞货
console.log(row)
this.useNumber = 0
row.滞货数量 < row.待询价数量 ? this.maxUseNumber = Number(row.滞货数量) : this.maxUseNumber = Number(row.待询价数量)
this.backlogMaterialNum = row.物料流水号
this.backlogGroupPartNum = row.组件零件流水号
this.dialogVisible4 = true
},
cancelUseInventory(row) { // 取消使用滞货
console.log(row)
this.backlogMaterialNum = row.物料流水号
this.backlogGroupPartNum = row.组件零件流水号
this.cancelNum = row.使用滞货数量
this.$confirm('确定取消使用滞货?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum)
cancelUseInventory(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum).then(response => {
if (response.data[0].result === '1') {
this.searchTable11()
this.$message.success('操作成功')
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message.info('已取消操作')
})
},
saveOrder() { // 保存询价单
const orderNumGroup = []
const numGroup = []
@@ -694,11 +772,10 @@ export default {
return row['供货商'] === value
},
searchTable11() { // 查询标准件和外购件列表
this.inquiryStateValue !== '' && this.inquiryStateValue !== null ? this.check1 = 1 : this.check1 = 0
this.materialName ? this.check2 = 1 : this.check2 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, this.check1, this.inquiryStateValue, this.check2, this.materialName, this.id).then(response => {
let check1
this.materialName ? check1 = 1 : check1 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, this.id).then(response => {
this.tableData11 = response.data.rows
console.log(response.data.rows)
this.total11 = response.data.total
})
},
@@ -712,10 +789,8 @@ export default {
this.searchTable11()
},
searchTable12() { // 查询基本件列表
this.inquiryStateValue !== '' && this.inquiryStateValue !== null ? this.check1 = 1 : this.check1 = 0
searchPart(this.pageCurrent12, this.pageSize12, this.check1, this.inquiryStateValue, this.id).then(response => {
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], this.id).then(response => {
this.tableData12 = response.data.rows
console.log(response.data.rows)
this.total12 = response.data.total
})
},
@@ -899,7 +974,7 @@ export default {
this.allNum = []
for (let i = 0; i < val.length; i++) {
this.groupPartNum[i] = val[i].组件零件流水号
this.allNum[i] = val[i].零件数量
this.allNum[i] = val[i].待询价数量
}
},
handleSelectionChange2(val) { // 基本件多选
@@ -1047,7 +1122,6 @@ export default {
this.supplierExport = row.供应商名称
this.orderExport = row.询价单编号
searchSheetDetail(row.询价单流水号).then(response => {
console.log(response.data)
this.tableData3 = response.data
})
},

View File

@@ -89,6 +89,16 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" min-width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料类别" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料类别 }}
@@ -215,6 +225,16 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" min-width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}