This commit is contained in:
liushuai
2019-03-26 14:10:53 +08:00
15 changed files with 203 additions and 99 deletions

View File

@@ -49,14 +49,14 @@ export function getTable(stepNumber, a, b, c, d, e, f, g, i, j, k, l, m, pageCur
})
}
export function getTable2(stepNumber, a, b, c, d, e, g, i) {
export function getTable2(stepNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序',
param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=1=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=' + i + '=string&考核状态=6=int'
name: '车间生产管理工艺_加工进度查询_查询',
param: '工艺计划流水号=' + stepNumber
}
})
}

View File

@@ -47,14 +47,14 @@ export function getTable(stepNumber, a, b, c, d, e, f, g, h, i, j, k, pageCurren
})
}
export function getTable2(stepNumber, a, b, c, d, e, g) {
export function getTable2(stepNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_加工进度修改',
param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=1=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=0'
name: '车间生产管理工艺_加工进度修改2_查询',
param: '工艺计划流水号=' + stepNumber
}
})
}

View File

@@ -11,15 +11,39 @@ export function initProject() {
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=1&项目流水号=' + num
}
})
}
// 分组查询
export function searchGroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 初始化项目金额统计表
export function searchProjectTotal(num) {
export function searchProjectTotal(check1, num1, check2, num2, check3, num3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_项目采购总价_查询数据',
param: `项目流水号=${num}`
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}`
}
})
}

View File

@@ -1,16 +1,10 @@
<template>
<div class="app-container">
<el-card>
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADD()">增加</el-button>
</el-card>
<el-card>
<el-table
:data="tableData"
border
size="mini"
style="width: 100%;max-height: 400px"
height="400"
@row-click="getWarehouse">
<div slot="header" class="clearfix">
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADD()">新建仓库</el-button>
</div>
<el-table :data="tableData" border size="mini" style="width: 100%;max-height: 300px" height="300" @row-click="getWarehouse">
<el-table-column label="仓库编号" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.仓库编号 }}
@@ -21,27 +15,27 @@
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="仓库描述" align="center" width="110">
<el-table-column label="仓库描述" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.仓库描述 }}
</template>
</el-table-column>
<el-table-column label="地址" align="center">
<el-table-column label="地址" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column label="联系人" align="center">
<el-table-column label="联系人" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column label="备注" width="180" align="center">
<el-table-column label="备注" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<el-table-column label="操作" width="300" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@@ -59,13 +53,7 @@
</el-table>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData2"
border
size="mini"
style="width: 100%;max-height: 400px"
height="400">
<el-table v-loading="listLoading" :data="tableData2" border size="mini" style="width: 100%;max-height: 300px" height="300">
<el-table-column label="货位名称" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
@@ -592,8 +580,20 @@ export default {
</script>
<style scoped>
.code{
width:120px!important;
height: auto!important;
}
.code{
width:120px!important;
height: auto!important;
}
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -206,6 +206,7 @@ export default {
rules: { // 表单验证规则
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
GroupNumValue: [{ required: true, message: '请选择分组', trigger: 'blur' }],
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
},
locateNumber: '',

View File

@@ -458,6 +458,7 @@ export default {
} else {
this.endTime_check = 1
}
this.num111 = []
this.tableData1 = []
this.零件图号 = []
this.零件名称 = []
@@ -472,6 +473,7 @@ export default {
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, 1, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.pageCurrent, this.pageSize).then(response => {
this.length = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
this.num111.push(response.data.rows[i].工艺计划流水号)
this.零件图号.push(response.data.rows[i].零件图号)
this.零件名称.push(response.data.rows[i].零件名称)
this.投产数量.push(response.data.rows[i].投产数量)
@@ -484,31 +486,28 @@ export default {
}
if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) {
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i], 1).then(response => {
this.liushuihao = response.data[0].工艺计划流水号
getTable2(this.num111[i]).then(response => {
for (let k = 0; k < response.data.length; k++) {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工艺编号 === 29) {
response.data[k].员工姓名 = '备料'
}
if (response.data[k].工序间是否外协 === 2) {
response.data[k].员工姓名 = '外协'
}
if (response.data[k].员工姓名 === '超级管理员') {
response.data[k].员工姓名 = '无'
}
this.worker[i][k] = response.data[k].员工姓名
if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工艺编号 === 29) {
response.data[k].员工姓名 = '备料'
}
if (response.data[k].工序间是否外协 === 2) {
response.data[k].员工姓名 = '外协'
}
if (response.data[k].员工姓名 === '超级管理员') {
response.data[k].员工姓名 = '无'
}
this.worker[i][k] = response.data[k].员工姓名
if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
}
}).then(() => {

View File

@@ -372,6 +372,7 @@ import { isMachining, handlechange3, getTable8, getTree, fn, dialogtablevisible,
export default {
data() {
return {
num111: [], // 零件图号去掉P后修改
Num2: '',
gongyijihualiushuihao: [[]],
midd: 0,
@@ -557,6 +558,7 @@ export default {
} else {
this.endTime_check = 1
}
this.num111 = []
this.tableData1 = []
this.零件图号 = []
this.零件名称 = []
@@ -577,6 +579,7 @@ export default {
} else {
this.length = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
this.num111.push(response.data.rows[i].工艺计划流水号)
this.零件图号.push(response.data.rows[i].零件图号)
this.零件名称.push(response.data.rows[i].零件名称)
this.投产数量.push(response.data.rows[i].投产数量)
@@ -592,25 +595,22 @@ export default {
}
if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) {
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i]).then(response => {
this.liushuihao = response.data[0].工艺计划流水号
getTable2(this.num111[i]).then(response => {
for (let k = 0; k < response.data.length; k++) {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.kaoqinbianhao[i][k] = response.data[k].作者考勤编
this.gongxuliushuihao[i][k] = response.data[k].流水号
this.gongyijihualiushuihao[i][k] = response.data[k].工艺计划流水号
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工序状态 === 5) { // 灰色:停产,不允许修改,重新投产
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
this.gongxuliushuihao[i][k] = response.data[k].序流水
this.gongyijihualiushuihao[i][k] = response.data[k].艺计划流水号
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
this.realDate[i][k] = response.data[k].完成日期_短
if (response.data[k].工序状态 === 5) { // 灰色:停产,不允许修改,重新投产
this.colorCode[i][k] = 'grey'
} else {
this.colorCode[i][k] = response.data[k].进度颜色
}
if (response.data[k].工序间是否外协 === 2) {
this.colorCode[i][k] = 'lightblue'
}
}
}).then(() => {

View File

@@ -184,6 +184,7 @@ import { machine, getToolNum, getNum, searchPartNum1, searchTable, saveWeightAre
export default {
data() {
return {
a: '',
entryNameValue: '',
entryName: [], // 项目名称
toolNumValue: '',
@@ -383,12 +384,16 @@ export default {
if (this.tableData.length === 0) {
this.$message.error('请选择零件')
} else {
this.a = 0
for (let i = 0; i < this.tableData.length; i++) {
saveRowPrice(this.tableData[i].工序流水号, parseFloat(this.tableData[i].外协预算价格_计算), this.tableData[i].工艺计划流水号, this.cailiaofei).then(response => {
this.a += parseInt(response.data[0].result)
if (this.a === this.tableData.length) {
this.$message.success('保存成功')
this.searchPartNum()
}
})
}
this.$message.success('保存成功')
this.searchPartNum()
}
},
handleSizeChange2(val) {

View File

@@ -62,7 +62,7 @@
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<el-table-column label="申请时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
@@ -72,7 +72,7 @@
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
@@ -82,7 +82,7 @@
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
@@ -92,7 +92,7 @@
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>

View File

@@ -62,7 +62,7 @@
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<el-table-column label="申请时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
@@ -72,29 +72,29 @@
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">

View File

@@ -309,6 +309,11 @@
@click.native="param=1;openSupplier()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="常用符号">
Φ ×
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@@ -194,8 +194,8 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
<el-button type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
<el-button type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
<el-button :disabled="disable" type="success" size="mini" style="float:right;margin-left:10px" @click="doneOfflineContact">生成</el-button>
<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>
</div>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">

View File

@@ -2,13 +2,29 @@
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="machineValue" style="width:200px" placeholder="请选择" size="small" clearable filterable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="groupValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
@@ -25,9 +41,14 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="100">
<el-table-column align="center" label="机床图号" width="100px">
<template slot-scope="scope">
{{ scope.row.图号 }}
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 || '—' }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="100">
@@ -35,6 +56,11 @@
{{ 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.规格 }}
@@ -66,7 +92,7 @@
</template>
<script>
import { initProject, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
import { initProject, searchMachine, searchGroup, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
import { mapGetters } from 'vuex'
export default {
@@ -75,6 +101,10 @@ export default {
return {
projectValue: '',
project: [],
machineValue: '',
machine: [],
groupValue: '',
group: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
@@ -103,9 +133,38 @@ export default {
}
})
},
projectChange() {
this.machine = []
this.machineValue = ''
this.group = []
this.groupValue = ''
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
value: response.data[i].机床流水号,
label: response.data[i].机床图号
})
}
})
},
machineChange() {
this.group = []
this.groupValue = ''
searchGroup(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({
value: response.data[i].组件流水号,
label: response.data[i].组号
})
}
})
},
searchTable1() {
if (this.projectValue) {
searchProjectTotal(this.projectValue).then(response => {
let check2, check3
this.machineValue ? check2 = 1 : check2 = 0
this.groupValue ? check3 = 1 : check3 = 0
searchProjectTotal(1, this.projectValue, check2, this.machineValue, check3, this.groupValue).then(response => {
console.log(response.data)
this.tableData1 = response.data
})

View File

@@ -121,6 +121,9 @@ export default {
},
projectChange() {
this.machine = []
this.machineValue = ''
this.group = []
this.groupValue = ''
searchMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
@@ -132,6 +135,7 @@ export default {
},
machineChange() {
this.group = []
this.groupValue = ''
searchGroup(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({

View File

@@ -476,7 +476,7 @@
<td class="tg-baqh" colspan="3" rowspan="2"/>
</tr>
<tr>
<td class="tg-13pz"></td>
<td class="tg-13pz"></td>
<td class="tg-13pz">净重<br></td>
</tr>
<tbody>
@@ -722,6 +722,11 @@ export default {
},
addReceipt() {
this.addForm('receiptForm')
for (let i = 0; i < this.project.length; i++) {
if (this.projectValue === this.project[i].value) {
this.receiptForm.名称 = this.project[i].label
}
}
this.receiptVisible = true
this.receiptTitle = `新增总装箱单`
},
@@ -905,12 +910,14 @@ export default {
},
exportTable() {
const htmlNode = $('#cjn').html()
const body = $('body')
const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.removeAttr('style')
body.children().not('script').show()
body.children().not('#app').hide()
printNode.remove()
}
}