This commit is contained in:
liushuai
2019-03-19 16:27:01 +08:00
23 changed files with 990 additions and 600 deletions

View File

@@ -25,7 +25,7 @@ export function searchtable2(num1) {
}
})
}
// 更改打印状态
// 自家备料
export function edit(num1) {
return request({
url: '',
@@ -37,3 +37,15 @@ export function edit(num1) {
}
})
}
// 外购备料
export function edit2(num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_备料单导出_外购备料',
param: '工艺计划流水号=' + num1
}
})
}

View File

@@ -64,7 +64,7 @@ export function getTable2(stepNumber) {
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序',
name: '车间生产管理工艺_零件工序_查询数据_加工顺序调整查询',
param: '项目流水号_check=0&项目流水号=0&机床流水号_check=0&机床流水号=0&组件流水号_check=0&组件流水号=0&零件图号_check=1=string&零件图号=' + stepNumber + '=string&是否查询全部数据=1=string&单件是否外协=1&考核状态=6=int'
}
})
@@ -81,3 +81,27 @@ export function searchParts(stepNumber) {
}
})
}
// 跳序权限
export function JurisdictionContro2(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_加工顺序调整_更改跳序权限',
param: 'MES终端号=' + num1 + '&变更类型=' + num2
}
})
}
// 撤出零件
export function outParts(code) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '车间生产管理工艺_零件撤出待加工库',
param: '工艺计划流水号=' + code + '&结果=11111=string=output'
}
})
}

View File

@@ -48,3 +48,14 @@ export function change(Number, code, num) {
}
})
}
export function change2(Number, code, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_外购备料到货更改',
param: '工序流水号组=' + Number + '&工作者考勤编号=' + code + '&工艺计划流水号组=' + num
}
})
}

View File

@@ -36,14 +36,14 @@ export function getGroups(stepNumber) {
})
}
export function getTable(stepNumber, a, b, c, d, e, f, g, i, pageCurrent, pageSize) {
export function getTable(stepNumber, a, b, c, d, e, f, g, i, j, k, l, m, pageCurrent, pageSize) {
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=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=' + i + '=string&考核状态=6=int',
param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=' + i + '=string&考核状态=6=int&开始时间_check=' + j + '&开始时间=' + k + '&结束时间_check=' + l + '&结束时间=' + m,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -26,8 +26,9 @@ export function searchmachine(num, check, pageCurrent, pageSize) {
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据_分页',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0=int&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0',
Pagination: pageCurrent + '&' + pageSize
}
})
}
@@ -37,8 +38,9 @@ export function searchgroup(num, pageCurrent, pageSize) {
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据_分页',
param: '机床流水号=' + num + '=int&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -1,5 +1,16 @@
import request from '@/utils/request'
// 查询供应商
export function searchSupplier() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件'
}
})
}
// 根据条件查发票结算申请单
export function searchTable1(...group) {
return request({
@@ -61,51 +72,75 @@ export function searchTable2(num) {
}
})
}
// 入库单查询
export function searchInboundCard(data1, data2) {
// 根据供应商查询采购合同
export function searchPurchase(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单查询',
param: '入库单号_check=' + data1 + '&入库单号=' + data2
name: '采购管理_采购合同_查询数据',
param: '供应商流水号_check=1&供应商流水号=' + data
}
})
}
// 入库单明细查询
export function searchInboundCardDetail(data1) {
// 根据供应商查询离线合同
export function searchOffline(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单明细_查询数据',
param: '采购入库单流水号=' + data1
name: '采购管理_离线合同_查询数据',
param: '供应商流水号_check=1&供应商流水号=' + data
}
})
}
// 发票结算申请单明细增加
export function addTable2(data, group) {
// 查询采购合同明细
export function searchPurchaseDetail(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同明细_查询数据',
param: '采购合同流水号=' + data
}
})
}
// 查询离线合同明细
export function searchOfflineDetail(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同明细_查询数据',
param: '离线合同流水号=' + data
}
})
}
// 发票结算申请单明细增加-1采购/2离线
export function addTable2(data, group1, group2, type) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票结算申请单明细_增加数据',
param: '发票结算申请单流水号=' + data + '&采购入库单流水号组=' + group
param: '发票结算申请单流水号=' + data + '&合同明细流水号组=' + group1 + '&到票数量组=' + group2 + '&合同类型=' + type
}
})
}
// 发票结算申请单明细删除
export function deleteTable2(group) {
export function deleteTable2(data) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票结算申请单明细_删除数据',
param: '发票结算申请单明细流水号=' + group
param: '发票结算申请单明细流水号=' + data
}
})
}

View File

@@ -25,18 +25,6 @@ export function searchTable2(num) {
}
})
}
// 入库单明细查询
export function searchInboundCardDetail(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单明细_查询数据',
param: '采购入库单流水号=' + data1
}
})
}
// 执行审批
export function excuteApprove(...data) {
return request({

View File

@@ -0,0 +1,51 @@
import request from '@/utils/request'
// 初始化机床项目
export function initMachineProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据'
}
})
}
// 组件查询
export function searchgroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 查询表1标准件和外购件
export function searchTable1(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料',
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}`,
Pagination: params[4] + '&' + params[5]
}
})
}
// 查询表1基本件
export function searchTable2(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_基本件',
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}`,
Pagination: params[4] + '&' + params[5]
}
})
}

View File

@@ -22,7 +22,7 @@ const service = axios.create({
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间git
timeout: 1500000 // 请求超时时间
})
// request拦截器

View File

@@ -7,7 +7,8 @@
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini">查询全部</el-checkbox>
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="exportTable('BL')">导出备料单</el-button>
<el-button type="primary" size="small" icon="el-icon-success" style="margin-left:10px" @click="edit()">导出完成</el-button>
<el-button type="primary" size="small" icon="el-icon-success" style="margin-left:10px" @click="edit()">自家备料</el-button>
<el-button type="primary" size="small" icon="el-icon-success" style="margin-left:10px" @click="edit2()">外购备料</el-button>
</el-row>
</el-card>
@@ -104,7 +105,7 @@
</template>
<script>
import { searchtable, searchtable2, edit } from '@/api/ManufacturingCenter/CreatePreparationBill'
import { searchtable, searchtable2, edit, edit2 } from '@/api/ManufacturingCenter/CreatePreparationBill'
import { exportExcelMethod } from './exportExcel'
import $ from 'jquery'
export default {
@@ -196,6 +197,23 @@ export default {
}
}
},
edit2() {
if (this.tableData2.length === 0) {
this.$message.warning('暂无数据')
} else {
this.a = 0
for (let i = 0; i < this.tableData2.length; i++) {
edit2(this.tableData2[i].工艺计划流水号).then(response => {
this.a += parseInt(response.data[0].result)
if (this.a === this.tableData2.length) {
this.pageSize = 10
this.pageCurrent = 1
this.searchTable()
}
})
}
}
},
downLoad(tableid) {
if (this.tableData2.length === 0) {
this.$message.warning('暂无数据')

View File

@@ -18,7 +18,7 @@
<span v-if="lengths !== 0" style="color: #53A3F7;font-size: 14px"> 加工零件 {{ Parts }};加工工序 {{ gongxu }}</span>
<span v-if="lengths === 0" style="color: #53A3F7;font-size: 14px"> 无正在加工零件</span>
<el-badge :value="num" :max="99" class="item">
<el-button size="small" type="text" @click="dialogFormVisible=true;Jurisdiction()">序权限</el-button>
<el-button size="small" type="text" @click="dialogFormVisible=true;Jurisdiction()">序权限</el-button>
</el-badge>
</el-card>
@@ -260,26 +260,11 @@
<el-table-column label="操作" width="300" align="center">
<template slot-scope="scope">
<div>
<el-button
size="mini"
icon="el-icon-arrow-up"
type="primary"
@click="upOne(scope.row)"/>
<el-button
size="mini"
icon="el-icon-arrow-down"
type="primary"
@click="downOne(scope.row)"/>
<el-button
size="mini"
icon="el-icon-upload2"
type="primary"
@click="TOP(scope.row)"/>
<el-button
size="mini"
icon="el-icon-download"
type="primary"
@click="Down(scope.row)"/>
<el-button size="mini" icon="el-icon-arrow-up" type="primary" @click="upOne(scope.row)"/>
<el-button size="mini" icon="el-icon-arrow-down" type="primary" @click="downOne(scope.row)"/>
<el-button size="mini" icon="el-icon-upload2" type="primary" @click="TOP(scope.row)"/>
<el-button size="mini" icon="el-icon-download" type="primary" @click="Down(scope.row)"/>
<el-button size="mini" icon="el-icon-delete" type="danger" @click="outParts(scope.row)"/>
</div>
</template>
</el-table-column>
@@ -312,16 +297,20 @@
</el-table-column>
<el-table-column property="date" label="操作" align="center">
<template slot-scope="scope">
<el-button
v-if="scope.row.调序权限==='0'"
size="mini"
type="success"
@click="JurisdictionControl1(scope.row)">开启</el-button>
<el-button
v-if="scope.row.序权限==='1'"
size="mini"
type="danger"
@click="JurisdictionControl2(scope.row)">关闭</el-button>
<el-button v-if="scope.row.调序权限==='0'" size="mini" type="success" @click="JurisdictionControl1(scope.row)">开启</el-button>
<el-button v-if="scope.row.调序权限==='1'" size="mini" type="danger" @click="JurisdictionControl2(scope.row)">关闭</el-button>
</template>
</el-table-column>
<el-table-column property="name" label="跳序权限" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.序权限===1" type="success" size="small">已开放</el-tag>
<el-tag v-else type="info" size="small">未开放</el-tag>
</template>
</el-table-column>
<el-table-column property="date" label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.跳序权限===0" size="mini" type="success" @click="JurisdictionControl3(scope.row)">开启</el-button>
<el-button v-if="scope.row.跳序权限===1" size="mini" type="danger" @click="JurisdictionControl4(scope.row)">关闭</el-button>
</template>
</el-table-column>
</el-table>
@@ -331,7 +320,7 @@
</template>
<script>
import { searchParts, getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
import { searchParts, getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl, JurisdictionContro2, outParts } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
import { wsuri, name } from '@/utils/request'
export default {
data() {
@@ -532,7 +521,7 @@ export default {
getMachine2().then(response => {
this.gridData = response.data
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].序权限 === '1') { this.count = this.count + 1 }
if (response.data[i].序权限 === 1) { this.count = this.count + 1 }
}
this.num = this.count
})
@@ -555,6 +544,24 @@ export default {
this.websock.send('TOBS?MES?' + data + '?MES|PartsSequentialAuthority|' + data + '|0')
})
},
JurisdictionControl3(row) {
this.opname = row.MES终端号
JurisdictionContro2(row.MES终端号, 1).then(response => {
this.Jurisdiction()
return this.opname
}).then(data => {
this.websock.send('TOBS?MES?' + data + '?MES|SkipPermission|' + data + '|1')
})
},
JurisdictionControl4(row) {
this.opname = row.MES终端号
JurisdictionContro2(row.MES终端号, 2).then(response => {
this.Jurisdiction()
return this.opname
}).then(data => {
this.websock.send('TOBS?MES?' + data + '?MES|SkipPermission|' + data + '|0')
})
},
// 上移
upOne(row) {
Order(this.MachineValue, row.工序流水号, '上移').then(response => {
@@ -579,6 +586,13 @@ export default {
this.searchTable()
})
},
outParts(row) {
outParts(row.工艺计划流水号).then(response => {
this.searchTable()
}).then(data => {
this.websock.send('TOBS?MES?' + data + '?MES|PartsSequentialAuthority|' + data + '|0')
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1

View File

@@ -5,8 +5,9 @@
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
<!--<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>-->
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料出库</el-button>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit2()">外购备料出库</el-button>
<!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
</el-row>
</el-card>
@@ -51,12 +52,52 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column label="到货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.备料到货==='1'" type="success" size="small">已到货</el-tag>
<el-tag v-if="scope.row.备料到货==='0'" type="warning" size="small">未到货</el-tag>
</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">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="备料" align="center">
<template slot-scope="scope">
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
: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 { searchtable, searchtable2, change } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { searchtable, searchtable2, change, change2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
export default {
data() {
return {
@@ -114,6 +155,8 @@ export default {
this.arrest = val
},
edit() {
this.bianliang1 = []
this.bianliang2 = []
if (this.arrest.length === 0) {
this.$message.warning('请选择零件')
} else {
@@ -126,6 +169,21 @@ export default {
})
}
},
edit2() {
this.bianliang1 = []
this.bianliang2 = []
if (this.arrest.length === 0) {
this.$message.warning('请选择零件')
} else {
for (let i = 0; i < this.arrest.length; i++) {
this.bianliang1.push(this.arrest[i].工艺计划流水号)
this.bianliang2.push(this.arrest[i].工序流水号)
}
change2(this.bianliang2, '0000', this.bianliang1).then(() => {
this.searchTable()
})
}
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1

View File

@@ -2,24 +2,12 @@
<div class="app-container">
<el-card>
<el-radio-group
v-model="radio"
size="small"
style="margin: 10px;"
@change="CraftmenValue = '';checked = false;
partNumValue = '';typeValue = '';partName = '';
material = '';materialName = '';spec = '';batchNum = '';
searchParts()">
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="CraftmenValue = '';checked = false;partNumValue = '';typeValue = '';partName = '';material = '';prepareMateriel = '';spec = '';batchNum = '';searchParts()">
<el-radio v-model="radio" :label="1">未编制</el-radio>
<el-radio v-model="radio" :label="2">已编制</el-radio>
</el-radio-group>
<span>工艺员:</span>
<el-select
v-model="CraftmenValue"
placeholder="工艺员"
size="small"
style="width:100px"
@change="clearDetail();searchParts()">
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();searchParts()">
<el-option
v-for="item in Craftmen"
:key="item.value"
@@ -27,14 +15,7 @@
:value="item.value"/>
</el-select>
<span>零件号:</span>
<el-select
v-model="partNumValue"
filterable
clearable
placeholder="零件号"
size="small"
@clear="clearDetail"
@change="searchParts();searchDetail()">
<el-select v-model="partNumValue" filterable clearable placeholder="零件号" size="small" @clear="clearDetail" @change="searchParts();searchDetail()">
<el-option
v-for="item in partNum"
:key="item.value"
@@ -50,15 +31,15 @@
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
<span>零件名称:</span>
<el-input v-model="partName" placeholder="零件名称" size="small" readonly style="width:115px"/>
<span>投产总数量:</span>
<el-input v-model="batchNum" readonly size="small" style="width:80px;margin-top:10px;"/>
<span>材质:</span>
<el-input v-model="materialName" placeholder="材质" size="small" style="width:215px" readonly>
<el-button slot="prepend" icon="el-icon-search" @click="dialogMaterial=true"/>
<el-input v-model="prepareMateriel" placeholder="物料" size="small" style="width:215px" readonly>
<el-button slot="prepend" icon="el-icon-search" @click="dialogMateria2=true"/>
<el-button slot="append" icon="el-icon-cjn-09" @click="saveMaterial"/>
</el-input>
<span>规格:</span>
<el-input v-model="spec" :readonly="isShow2" style="width:100px" size="small" placeholder="规格"/>
<span>投产总数量:</span>
<el-input v-model="batchNum" readonly size="small" style="width:80px;margin-top:10px;"/>
</div>
<div>
<el-row>
@@ -120,6 +101,7 @@
<el-input-number v-model="changdu2" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation5()">计算重量</el-button>
</el-col>
</el-row>
</div>
</el-card>
@@ -225,21 +207,37 @@
</el-table>
</el-card>
<el-dialog :visible.sync="dialogMaterial" title="材质选择" center width="400px">
<el-dialog :visible.sync="dialogMaterial" title="物料选择" center width="400px">
<el-input v-model="input" placeholder="材质" size="small" style="width:200px"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin: 0 0 10px 10px"
@click="total=0;pageCurrent=1;pageSize=10;searchMaterial()">查询
</el-button>
<el-table
:data="tableMaterial"
size="mini"
highlight-current-row
border
@row-click="selectMaterial">
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="total=0;pageCurrent=1;pageSize=10;searchMaterial()">查询</el-button>
<el-table :data="tableMaterial" size="mini" highlight-current-row border @row-click="selectMaterial">
<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
:current-page="1"
:page-sizes="[10, 20]"
:page-size="10"
:pager-count="5"
:total="total"
small
layout="sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="selectMaterial2()">提交</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogMateria2" title="物料选择" center width="400px">
<el-input v-model="input" placeholder="材质" size="small" style="width:200px"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="total=0;pageCurrent=1;pageSize=10;searchMaterial()">查询</el-button>
<el-table :data="tableMaterial" size="mini" highlight-current-row border @row-click="selectMaterial">
<el-table-column align="center" label="材质名称">
<template slot-scope="scope">
{{ scope.row.材料 }}
@@ -452,19 +450,8 @@
</el-form>
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible3"
title="工艺定额人员"
center
style="min-height: 300px">
<el-table
:data="tableData3"
size="mini"
style="width: 97%;max-height: 300px"
height="300"
highlight-current-row
border
@row-click="selectPerson">
<el-dialog :visible.sync="dialogFormVisible3" title="工艺定额人员" center style="min-height: 300px">
<el-table :data="tableData3" size="mini" style="width: 97%;max-height: 300px" height="300" highlight-current-row border @row-click="selectPerson">
<el-table-column align="center" label="考勤编号" width="150">
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
@@ -540,6 +527,8 @@ export default {
},
data() {
return {
dialogMateria2: false,
prepareMateriel: '',
lastFocusText: '',
Result1: '',
Result2: '',

View File

@@ -23,9 +23,6 @@
</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-row>
<el-row style="margin-top:10px;">
<span>进度颜色</span>
<span style="background-color: red">拖期</span>
<span style="background-color: yellow">即将拖期</span>
@@ -33,6 +30,25 @@
<span style="background-color: deepskyblue">工序外协</span>
<span style="background-color: grey">报废</span>
</el-row>
<el-row style="margin-top:10px;">
<span class="demonstration">计划下达时间:</span>
<el-date-picker
v-model="startTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 160px"
type="date"
placeholder="选择日期"/>
<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-row>
</el-card>
<el-card>
@@ -298,6 +314,10 @@ import { getNames, getMachines, getGroups, getTable, getTable2 } from '@/api/Man
export default {
data() {
return {
startTime: '',
endTime: '',
startTime_check: 0,
endTime_check: 0,
liushuihao: '',
// value2: null,
radioList: '0',
@@ -428,6 +448,16 @@ export default {
} else {
this.checkbox_number = true
}
if (this.startTime === '' || this.startTime === null) {
this.startTime_check = 0
} else {
this.startTime_check = 1
}
if (this.endTime === '' || this.endTime === null) {
this.endTime_check = 0
} else {
this.endTime_check = 1
}
this.tableData1 = []
this.零件图号 = []
this.零件名称 = []
@@ -439,7 +469,7 @@ export default {
this.colorCode = [[]]
this.realDate = [[]]
this.length = 0
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, 1, this.pageCurrent, this.pageSize).then(response => {
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.零件图号.push(response.data.rows[i].零件图号)

View File

@@ -32,7 +32,7 @@
style="width: 160px"
type="date"
placeholder="选择日期"/>
<span class="demonstration">-</span>
<span class="demonstration">~</span>
<el-date-picker
v-model="endTime"
value-format="yyyy-MM-dd"

View File

@@ -1453,12 +1453,7 @@ export default {
this.result1 = 0
for (let i = 0; i < this.tableData1.length; i++) {
this.length = this.tableData1.length
if (this.预计外协[i] === '否') {
this.预计外协[i] = 1
} else {
this.预计外协[i] = 2
}
out(this.tableData1[i].工艺计划流水号, this.预计外协[i]).then(response => {
out(this.tableData1[i].工艺计划流水号, 1).then(response => {
}).then(() => {
plan(this.tableData1[i].工艺计划流水号).then(response => {
if (this.tableData1[i].平衡次数 !== 0 || this.tableData1[i].是否焊接 !== 1) {
@@ -1466,7 +1461,6 @@ export default {
if (this.result1 === this.length) {
this.$message.success('零件计划制定成功')
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
} else if (response.data[0].result === '0') {

View File

@@ -381,22 +381,22 @@ export default {
this.dialogFormVisible2 = true
this.check6 = 1
searchmachine(this.entryNameValue, this.check6, this.pageCurrent1, this.pageSize1).then(response => {
for (let i = 0; i < response.data.result.length; i++) {
if (response.data.result[i].机床开始时间 !== '') {
response.data.result[i].机床开始时间 = response.data.result[i].机床开始时间.substr(0, 10)
for (let i = 0; i < response.data.total; i++) {
if (response.data.rows[i].机床开始时间 !== '') {
response.data.rows[i].机床开始时间 = response.data.rows[i].机床开始时间.substr(0, 10)
}
if (response.data.result[i].机床结束时间 !== '') {
response.data.result[i].机床结束时间 = response.data.result[i].机床结束时间.substr(0, 10)
if (response.data.rows[i].机床结束时间 !== '') {
response.data.rows[i].机床结束时间 = response.data.rows[i].机床结束时间.substr(0, 10)
}
if (response.data.result[i].工位属性 === '请选择') {
response.data.result[i].工位属性 = ''
if (response.data.rows[i].工位属性 === '请选择') {
response.data.rows[i].工位属性 = ''
}
if (response.data.result[i].机床主管 === '请选择') {
response.data.result[i].机床主管 = ''
if (response.data.rows[i].机床主管 === '请选择') {
response.data.rows[i].机床主管 = ''
}
}
this.tableData6 = response.data.result
this.total1 = parseInt(response.data.output[0].ItemCount)
this.tableData6 = response.data.rows
this.total1 = parseInt(response.data.total)
})
} else {
this.$message.warning('请先选择项目')
@@ -415,10 +415,11 @@ export default {
},
searchGroupList() { // 查询组号
if (this.machineToolNumber !== '') {
this.tableData7 = []
this.dialogFormVisible3 = true
searchgroup(this.machine, this.pageCurrent2, this.pageSize2).then(response => {
this.tableData7 = response.data.result
this.total2 = parseInt(response.data.output[0].ItemCount)
this.tableData7 = response.data.rows
this.total2 = parseInt(response.data.total)
})
} else {
this.$message.warning('请先选择机床')
@@ -460,7 +461,6 @@ export default {
this.searchData()
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.SearchMachine()
},
@@ -469,7 +469,6 @@ export default {
this.SearchMachine()
},
handleSizeChange3(val) {
this.pageCurrent2 = 1
this.pageSize2 = val
this.searchGroupList()
},

View File

@@ -3,13 +3,13 @@
<el-card>
<span>发票号:</span>
<el-input v-model="invoiceNum" 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>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
</el-card>
<el-card>
<h4 style="margin-top: 5px">发票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 400px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 300px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
@@ -42,6 +42,11 @@
</el-form>
</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="90">
<template slot-scope="scope">
{{ scope.row.发票号 }}
@@ -72,7 +77,7 @@
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="生产审批" align="center" min-width="60">
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
@@ -82,7 +87,7 @@
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
@@ -92,16 +97,6 @@
{{ 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.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
@@ -124,114 +119,49 @@
</el-card>
<el-card>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
<span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreOrder()">追加入库</el-button>
<el-button :disabled="group2.length === 0" type="danger" size="small" icon="el-icon-delete" style="margin-left:10px" @click="deleteTable2()">移除入库单</el-button>
<el-table ref="multipleTable" :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3" @selection-change="handleSelectionChange2">
<el-table-column type="selection" align="center" width="35"/>
<el-table-column label="入库单号" align="center" min-width="100">
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || 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.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<el-table-column label="规格" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.仓库 }}
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || 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="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">
<el-table-column label="到票数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
{{ scope.row.票数量 }}
</template>
</el-table-column>
<el-table-column label="业务号" align="center" min-width="100">
<el-table-column label="操作" align="center" 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="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="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<h4>采购入库单明细</h4>
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" 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.型号 }}
</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="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<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" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
<el-button :disabled="disabled" type="danger" size="mini" icon="el-icon-delete" @click="deleteTable2(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -253,8 +183,14 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="已付款项">
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
<el-form-item label="供应商" prop="supplierValue">
<el-select v-model="form1.supplierValue" :disabled="title1 === '编辑发票结算申请单'" placeholder="供应商" filterable size="small">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -270,15 +206,22 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否费用类">
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
<el-form-item label="已付款项">
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="备注">
<el-input v-model="form1.remark" size="small" placeholder="备注" style="width: 500px"/>
</el-form-item>
<el-col :span="12">
<el-form-item label="是否费用类">
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
</el-form-item>
</el-col>
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
<el-upload
@@ -289,7 +232,7 @@
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
@@ -304,119 +247,77 @@
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
<span>入库单号</span>
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="searchInboundCard()">查询</el-button>
<el-table ref="multipleTable" :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="35"/>
<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" width="100" >
<template slot-scope="scope" value-format="yyyy-MM-dd">
{{ scope.row.入库日期 ? 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="150">
<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" width="100">
<template slot-scope="scope">
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
</template>
</el-table-column>
<span>供应商</span>
<el-input v-model="supplierName" size="small" placeholder="请选择供应商发票" style="margin: 0 5px 10px 0;" readonly/>
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
<el-radio label="采购合同" border/>
<el-radio label="离线合同" border/>
</el-radio-group>
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02">
<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="70">
<el-table-column label="合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : 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="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="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
{{ scope.row.采购合同名称 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
</template>
</el-table-column>
</el-table>
<el-table :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<el-table ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="35"/>
<el-table-column label="名称" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="150">
<el-table-column label="图号或型号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row. }}
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<el-table-column label="规格" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.规格 }}
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="100" prop="数量">
<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">
<el-table-column label="已到货数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.本币单价 }}
{{ scope.row.已到货数量 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" width="100">
<el-table-column label="已到票数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
{{ scope.row.到票数量 }}
</template>
</el-table-column>
<el-table-column label="本次到票数量" align="center" width="100">
<template slot-scope="scope">
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button :disabled="group1.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchInboundCard, searchInboundCardDetail,
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
import { mapGetters } from 'vuex'
import { uploadInvoiceScan, readFile } from '@/utils/request'
@@ -425,6 +326,8 @@ export default {
name: '', // 发票结算申请
data() {
return {
disabled: false,
contractType: '采购合同',
invoiceNum: '',
total1: 0,
pageCurrent1: 1,
@@ -435,12 +338,15 @@ export default {
title2: '',
dialogVisible2: false,
tableData2: [],
tableData3: [],
dialogVisible1: false,
title1: '',
supplier: [],
supplierName: '',
supplierValue: '',
form1: {
invoiceNum: '',
money: '',
supplierValue: '',
paid: '',
unpaid: '',
tax: '',
@@ -454,6 +360,9 @@ export default {
],
money: [
{ required: true, message: '请输入开票金额' }
],
supplierValue: [
{ required: true, message: '请选择供应商' }
]
},
upload: uploadInvoiceScan,
@@ -461,8 +370,7 @@ export default {
tableData01: [],
tableData02: [],
inboundCardNumber: '', // 入库单号
group1: [], // 入库单流水号组
group2: [] // 发票结算申请单明细流水号组
group: [] // 发票结算申请单明细流水号组
}
},
computed: {
@@ -477,13 +385,24 @@ export default {
this.searchTable1()
},
methods: {
fetchData() {},
fetchData() {
this.supplier = []
searchSupplier().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplier.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
},
createOrder() {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.invoiceNum = ''
this.form1.money = ''
this.form1.supplierValue = ''
this.form1.paid = ''
this.form1.unpaid = ''
this.form1.tax = ''
@@ -493,8 +412,9 @@ export default {
this.dialogVisible1 = true
},
searchTable1() {
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
searchTable1(this.check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
let check1
this.invoiceNum ? check1 = 1 : check1 = 0
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')
@@ -506,12 +426,41 @@ export default {
this.total1 = response.data.total
})
},
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
} else {
console.log('error submit!!')
return false
}
})
},
submitEdit() { // 提交编辑
this.$refs['form1'].validate((valid) => {
if (valid) {
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
if (response.data[0].result === '修改成功') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else if (response.data[0].result === '修改失败') {
this.$message.error('已提交申请,编辑失败')
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleEdit(row) {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.invoiceNum = row.发票号
this.form1.money = row.发票金额
this.form1.supplierValue = Number(row.供应商流水号)
this.form1.paid = row.已付款项
this.form1.unpaid = row.尚欠金额
this.form1.tax = row.税额
@@ -553,60 +502,10 @@ export default {
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
warningExceed() {
this.$message.error('仅可上传一张发票')
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
submitApply(row) {
this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.tableData2.length === 0) {
this.$message.warning('入库单为空')
} else {
submitApply(row.发票结算申请单流水号, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('提交成功')
this.searchTable1()
} else { this.$message.error('提交失败') }
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
searchInboundCard() {
let check
this.inboundCardNumber ? check = 1 : check = 0
this.tableData01 = []
searchInboundCard(check, this.inboundCardNumber).then(response => {
console.log(response.data)
this.tableData01 = response.data
})
},
searchTable2(row) {
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
searchTable3(row) {
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData3 = response.data
})
},
beforeUpload(file) { // 上船前检测
beforeUpload(file) { // 上传前检测
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
if (!isJPG) {
@@ -627,96 +526,30 @@ export default {
this.$message.error('增加失败')
}
},
warningExceed() {
this.$message.error('仅可上传一张发票')
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
addInStoreOrder() {
if (this.applyOrderNum) {
this.title2 = '追加入库单'
this.dialogVisible2 = true
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
submitApply(row) {
if (this.tableData2.length === 0) {
this.$message.warning('发票结算申请明细为空!')
} else {
this.$message.error('请选择发票!')
}
},
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
} else {
console.log('error submit!!')
return false
}
})
},
submitEdit() { // 提交编辑
this.$refs['form1'].validate((valid) => {
if (valid) {
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
if (response.data[0].result === '修改成功') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else if (response.data[0].result === '修改失败') {
this.$message.error('已提交申请,编辑失败')
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
searchTable02(row) {
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData02 = response.data
})
},
handleSelectionChange(val) {
this.group1 = val
},
submitAdd2() { // 追加入库单
if (this.group1.length === 0) {
this.$message.warning('请选择入库单')
} else {
const group = []
for (let i = 0; i < this.group1.length; i++) {
group.push(this.group1[i].采购入库单流水号)
}
addTable2(this.applyOrderNum, group).then(response => {
if (response.data[0].result === '1') {
this.$message.success('追加成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('追加失败') }
})
}
},
handleSelectionChange2(val) {
this.group2 = val
},
deleteTable2() { // 移除入库单
if (this.group2.length === 0) {
this.$message.warning('请选择入库单')
} else {
this.$confirm('此操作将移除入库单, 是否继续?', '提示', {
this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const group = []
for (let i = 0; i < this.group2.length; i++) {
group.push(this.group2[i].发票结算申请单明细流水号)
}
deleteTable2(group).then(response => {
submitApply(row.发票结算申请单流水号, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('移除成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('移除失败') }
this.$message.success('提交成功')
this.searchTable1()
this.tableData2 = []
} else { this.$message.error('提交失败') }
})
}).catch(() => {
this.$message({
@@ -725,6 +558,126 @@ export default {
})
})
}
},
searchTable2(row) {
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号
this.supplierName = row.供应商名称
this.supplierValue = row.供应商流水号
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
addInStoreRecord() {
if (this.applyOrderNum) {
this.searchTable01()
this.title2 = '追加入库单'
this.dialogVisible2 = true
} else {
this.$message.error('请选择发票!')
}
},
searchTable01() {
this.tableData01 = []
this.tableData02 = []
if (this.contractType === '采购合同') {
searchPurchase(this.supplierValue).then(response => {
this.tableData01 = response.data
})
} else if (this.contractType === '离线合同') {
searchOffline(this.supplierValue).then(response => {
response.data.map(data => {
if (Number(data.离线合同状态) === 2) {
this.tableData01.push(data)
}
})
})
}
},
searchTable02(row) {
this.tableData02 = []
if (this.contractType === '采购合同') {
searchPurchaseDetail(row.采购合同流水号).then(response => {
response.data.map(data => {
this.$set(data, '本次到票数量', 0)
data.本次到票数量 = data.已到货数量 - data.到票数量
this.tableData02.push(data)
})
})
} else if (this.contractType === '离线合同') {
searchOfflineDetail(row.离线合同流水号).then(response => {
response.data.map(data => {
this.$set(data, '本次到票数量', 0)
data.本次到票数量 = data.到货数量 - data.到票数量
this.tableData02.push(data)
})
})
}
},
handleSelectionChange(val) {
this.group = val
},
submitAdd2() { // 追加入库单
if (this.group.length === 0) {
this.$message.warning('请选择零件或物料')
} else {
const group1 = []
const group2 = []
if (this.contractType === '采购合同') {
for (let i = 0; i < this.group.length; i++) {
group1.push(this.group[i].采购合同明细流水号)
group2.push(this.group[i].本次到票数量)
}
addTable2(this.applyOrderNum, group1, group2, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('追加成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('追加失败') }
})
} else if (this.contractType === '离线合同') {
for (let i = 0; i < this.group.length; i++) {
group1.push(this.group[i].离线合同明细流水号)
group2.push(this.group[i].本次到票数量)
}
addTable2(this.applyOrderNum, group1, group2, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('追加成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('追加失败') }
})
}
}
},
deleteTable2(row) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteTable2(row.发票结算申请单明细流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
selectable(row) {
return Number(row.本次到票数量) > 0
}
}
}

View File

@@ -42,6 +42,11 @@
</el-form>
</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="90">
<template slot-scope="scope">
{{ scope.row.发票号 }}
@@ -72,7 +77,7 @@
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="生产审批" align="center" min-width="60">
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
@@ -82,7 +87,7 @@
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
@@ -92,16 +97,6 @@
{{ 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.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(scope.row)">审批</el-button>
@@ -122,111 +117,43 @@
</el-card>
<el-card>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
<span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3">
<el-table-column label="入库单号" align="center" min-width="100">
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || 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.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<el-table-column label="规格" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.仓库 }}
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || 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="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">
<el-table-column label="到票数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.货日期 ? 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.业务员 }}
</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.入库类型 }}
</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>
<h4>采购入库单明细</h4>
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" 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.型号 }}
</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="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<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" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
{{ scope.row.票数量 }}
</template>
</el-table-column>
</el-table>
@@ -235,7 +162,7 @@
</template>
<script>
import { searchTable1, searchTable2, searchInboundCardDetail, excuteApprove } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
import { searchTable1, searchTable2, excuteApprove } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
import { mapGetters } from 'vuex'
import { readFile } from '@/utils/request'
import request from '@/utils/request'
@@ -326,17 +253,10 @@ export default {
})
},
searchTable2(row) {
console.log(row)
this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
searchTable3(row) {
console.log(row)
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData3 = response.data
})
}
}
}

View File

@@ -0,0 +1,309 @@
<template>
<div class="app-container">
<el-card>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange">
<el-option
v-for="item in machineNumber"
: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-select v-model="groupNumberValue" placeholder="组号" size="small" clearable>
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable()">查询</el-button>
</el-card>
<el-tabs v-model="PartType" type="border-card" @tab-click="searchTable()">
<el-tab-pane label="标准件和外购件" name="标准件和外购件">
<el-table :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe>
<el-table-column align="center" label="采购情况" width="80px">
<template slot-scope="scope">
<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" width="100px">
<template slot-scope="scope">
{{ 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 align="center" label="名称" width="100px">
<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.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" min-width="150px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="技术下达数量" width="100px">
<template slot-scope="scope">
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量" width="100px">
<template slot-scope="scope">
{{ scope.row.数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量" width="100px">
<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.供应商名称 || '—' }}
</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>
<div class="block">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-table :data="tableData2" size="mini" style="max-height: 600px" height="600px" border stripe>
<el-table-column align="center" label="采购情况" width="80px">
<template slot-scope="scope">
<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" width="100px">
<template slot-scope="scope">
{{ 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 align="center" label="名称" min-width="100px">
<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.零件图号 }}
</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="100px">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column align="center" label="技术下达数量" width="100px">
<template slot-scope="scope">
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量" width="100px">
<template slot-scope="scope">
{{ scope.row.数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量" width="100px">
<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.供应商名称 || '—' }}
</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>
<div class="block">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { initMachineProject, searchgroup, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseSituationSearch'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购件采购查询
data() {
return {
machineNumberValue: '',
machineNumber: [],
groupNumberValue: '',
groupNumber: [],
PartType: '标准件和外购件',
tableData1: [],
tableData2: [],
tableData3: [],
pageCurrent1: 1,
pageSize1: 20,
total1: 0,
pageCurrent2: 1,
pageSize2: 20,
total2: 0
}
},
computed: {
...mapGetters([
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
},
methods: {
fetchData() {
initMachineProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
},
machineChange() {
this.groupNumberValue = ''
this.groupNumber = []
searchgroup(this.machineNumberValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNumber.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
searchTable() {
if (this.PartType === '标准件和外购件') {
this.pageCurrent1 = 1
this.pageSize1 = 20
this.total1 = 0
this.searchTable1()
} else if (this.PartType === '基本件') {
this.pageCurrent2 = 1
this.pageSize2 = 20
this.total2 = 0
this.searchTable2()
}
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable1() { // 查询标准件和外购件
this.total1 = 0
let check1, check2
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2() { // 查询基本件
this.total2 = 0
let check1, check2
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.el-tag{
margin: 0
}
</style>

View File

@@ -74,15 +74,7 @@
<el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
</el-row>
<el-row style="margin-bottom: 10px">
<el-table
v-loading=""
:data="tableData1"
size="mini"
style="max-height: 600px"
height="600px"
border
stripe
@selection-change="handleSelectionChange1">
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="采购情况" min-width="80px">
<template slot-scope="scope">
@@ -208,15 +200,7 @@
</div>
</el-row>
<el-row style="margin-bottom: 10px">
<el-table
v-loading=""
:data="tableData2"
size="mini"
style="max-height: 600px"
height="600px"
border
stripe
@selection-change="handleSelectionChange2">
<el-table v-loading="" :data="tableData2" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange2">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="采购情况" min-width="80px">
<template slot-scope="scope">
@@ -365,8 +349,6 @@ export default {
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])

View File

@@ -24,7 +24,7 @@ export default {
<style scoped>
.app-main {
/*50 = navbar */
min-height: calc(100vh - 50px);
min-height: calc(100% - 50px);
position: relative;
overflow: hidden;
}

View File

@@ -10,6 +10,7 @@
background-color="#304156"
text-color="#cccccc"
active-text-color="#409EFF"
style="height:calc(100% - 124px)"
>
<sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path"/>
</el-menu>