This commit is contained in:
lixin
2018-12-24 19:47:38 +08:00
parent cd052f438f
commit f10c1b1cd3
13 changed files with 562 additions and 61 deletions

View File

@@ -13,14 +13,14 @@ export function searchExchangePart(pageCurrent, pageSize) {
})
}
// 通过交换件
export function approvalExchangepart(data1, data2, data22, data3, data33, data4, data5, data55, data6) {
export function approvalExchangepart(data1, data2, data22, data3, data33, data4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_交换件_交换件审批通过',
param: '交换单流水号=' + data1 + '&交换件物料流水号=' + data2 + '&被交换件物料流水号=' + data22 + '&交换件组件零件流水号=' + data3 + '&被交换件组件零件流水号=' + data33 + '&交换件采购合同明细流水号=' + data4 + '&货位流水号=' + data5 + '&被货位流水号=' + data55 + '&交换数量=' + data6
param: '交换单流水号=' + data1 + '&交换件采购合同明细流水号=' + data2 + '&被交换件采购合同明细流水号=' + data22 + '&交换件货位流水号=' + data3 + '&被交换货位流水号=' + data33 + '&交换数量=' + data4
}
})
}

View File

@@ -73,14 +73,14 @@ export function searchExchangePart(pageCurrent, pageSize) {
})
}
// 增加交换件
export function addExchangepart(data1, data2, data3, data4, data5, data6, data7, data8, data88, data9, data10, data11, data12, data13) {
export function addExchangepart(data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13, data14, data15, data16, data17) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_交换件_交换件增加',
param: '交换单编号=' + data1 + '&交换件组件零件流水号=' + data2 + '&交换件物料流水号=' + data3 + '&交换件采购合同明细流水号=' + data4 + '&被交换件组件零件流水号=' + data5 + '&交换件名称=' + data6 + '&被交换件名称=' + data7 + '&货位流水号=' + data8 + '&被交换货位流水号=' + data88 + '&交换数量=' + data9 + '&申请人=' + data10 + '&备注=' + data11 + '&领料单流水号=' + data12 + '&交换件物料流水号=' + data13
param: '交换单编号=' + data1 + '&交换件采购合同明细流水号=' + data2 + '&交换件采购合同明细流水号=' + data3 + '&交换件名称=' + data4 + '&被交换件名称=' + data5 + '&交换件项目流水号=' + data6 + '&被交换件项目流水号=' + data7 + '&交换件机床流水号=' + data8 + '&被交换件机床流水号=' + data9 + '&交换件组件流水号=' + data10 + '&被交换件组件流水号=' + data11 + '&货位流水号=' + data12 + '&被交换货位流水号=' + data13 + '&交换数量=' + data14 + '&申请人=' + data15 + '&备注=' + data16 + '&领料单流水号=' + data17
}
})
}

View File

@@ -81,6 +81,18 @@ export function addInboundCard(data1, data2, data3, data4, data5, data6, data7,
})
}
// 入库单修改
export function editInboundCard(data0, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_采购入库单_入库单修改',
param: '采购入库单流水号=' + data0 + '&入库日期=' + data1 + '&仓库流水号=' + data2 + '&合同流水号=' + data3 + '&到货单号=' + data4 + '&业务员=' + data5 + '&业务号=' + data6 + '&到货日期=' + data7 + '&业务类型=' + data8 + '&采购类型=' + data9 + '&入库类别=' + data10 + '&备注=' + data11
}
})
}
// 库存角色查询
export function searchAffairPeople(data1) {
return request({

View File

@@ -121,6 +121,20 @@ export function safeAmount(data1, data2) {
}
})
}
// 采购基本件件查询
export function searchPurchaseBasicPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_库存盘点_采购部基本件查询',
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 基本件查询
export function searchBasicPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
return request({

View File

@@ -19,7 +19,7 @@
:data="tableData"
border
size="mini"
style="width: 100%;height: 400px;">
style="width: 100%;height: 550px;">
<el-table-column label="开始工作时间">
<template slot-scope="scope">
{{ scope.row.开始工作时间 }}

View File

@@ -129,7 +129,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
approvalExchangepart(row.交换单流水号, row.交换件物料流水号, row.被交换件物料流水号, row.交换件组件零件流水号, row.被交换件组件零件流水号, row.交换件采购合同明细流水号, row.货位流水号, row.被交换货位流水号, row.交换数量).then(response => {
approvalExchangepart(row.交换单流水号, row.交换件采购合同明细流水号, row.被交换件采购合同明细流水号, row.交换件货位流水号, row.被交换货位流水号, row.交换数量).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()

View File

@@ -33,6 +33,7 @@
:data="tableDataPurchase"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
@@ -66,13 +67,13 @@
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
{{ scope.row.外购件类型 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button :disabled="scope.row.是否禁用" size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">交换</el-button>
<el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selected(scope.row)">被交换</el-button>
<el-button :disabled="scope.row.是否禁用" size="mini" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">交换</el-button>
<el-button :disabled="scope.row.是否禁用" size="mini" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selected(scope.row)">被交换</el-button>
</template>
</el-table-column>
</el-table>
@@ -94,6 +95,7 @@
<el-table
:data="tableData1"
border
size="mini"
style="width: 100%;"
height="100"
>
@@ -127,7 +129,7 @@
</el-col>
<el-col :span="2">
<div style="margin: 10px 15px">
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange('form')" >交换</el-button>
<el-button size="mini" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange('form')" >交换</el-button>
</div>
</el-col>
<el-col :span="11">
@@ -135,6 +137,7 @@
<el-table
:data="tableData2"
border
size="mini"
style="width: 100%;"
height="100">
<el-table-column
@@ -173,6 +176,7 @@
v-loading="listLoading1"
:data="tableDataExchange"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -428,7 +432,7 @@ export default {
this.listLoading1 = true
searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => {
const data = response.data.rows
console.log(data)
console.log(data, 2233)
for (let i = 0; i < data.length; i++) {
data[i].审批通过 === '1' || data[i].审批通过 === '2' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
@@ -455,7 +459,7 @@ export default {
addListDetailinfor(form) {
this.$refs[form].validate((valid) => {
if (valid) {
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[1].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData1[0].货位流水号, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote, this.PickingListNumber).then(response => {
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].采购合同明细流水号, this.tableData2[0].采购合同明细流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData1[0].项目流水号, this.tableData2[0].项目流水号, this.tableData1[0].机床流水号, this.tableData2[0].机床流水号, this.tableData1[0].分组流水号, this.tableData2[0].分组流水号, this.tableData1[0].货位流水号, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote, this.PickingListNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
} else { this.$message.error('增加失败') }

View File

@@ -0,0 +1,19 @@
// 导出Excel方法表格id不加扩展名的文件名sheet名
export function exportExcelMethod(tableId, fileName, sheetName) {
tableToExcel(tableId, fileName, sheetName)
}
const tableToExcel = (function() {
const uri = 'data:application/vnd.ms-excel;base64,'
// 设置导出表格的单元格默认高度/宽度/边框样式/字体颜色/背景颜色/居中网页显示表格宽度建议1240tr/td视情况而定
const template = `<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><meta charset="UTF-8"><style type="text/css">table td {border: 1px solid #000000;width:100px;text-align: center;color: #000000;} th {border: 1px solid #000000;width:100px;text-align: center;color: #000000;}</style></head><body><table>{table}</table></body></html>`
const base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
const format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p] }) }
return function(table, filename, sheetname) {
if (!table.nodeType) table = document.getElementById(table)
const ctx = { worksheet: sheetname || 'Worksheet', table: table.innerHTML }
const aTag = document.createElement('a')
aTag.href = uri + base64(format(template, ctx))
aTag.download = filename
aTag.click()
}
})()

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName">
<el-tab-pane label="采购部采购" name="first">
<el-card>
<span>采购合同编号:</span>
@@ -28,7 +28,6 @@
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" @click="searchPartinfo()">导出</el-button>
</el-card>
<el-card>
<el-table
@@ -210,6 +209,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="50">
<template slot-scope="scope">
{{ scope.row.业务号 }}
@@ -245,16 +249,17 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200px">
<el-table-column label="操作" align="center" min-width="300px">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="chooseListinfor(scope.row)">编辑</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropListinfor(scope.row)">删除</el-button>
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" @click="exportCard(scope.row)">导出</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent3"
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total3"
@@ -264,7 +269,10 @@
</div>
<el-table
v-loading="listLoading4"
id = "cardDetail"
:data="tableData4"
:summary-method="calculateContractSum"
:show-summary="true"
border
style="width: 100%;"
size="mini"
@@ -294,7 +302,7 @@
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
@@ -304,18 +312,126 @@
{{ scope.row.本币单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="100">
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
<template slot-scope="scope">
{{ scope.row.本币单价 * scope.row.数量 }}
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200">
<el-table-column label="操作" align="center" min-width="80">
<template slot-scope="scope">
<el-button :disabled="scope.row.是否出库" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropCarddetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisibleExport" center style="min-height: 300px" width="60%">
<el-card>
<div id="print">
<div style="text-align: center">
<h2> </h2>
<hr>
<table class="tgClass" style="table-layout: fixed; width: 820px;margin: auto">
<colgroup>
<col style="width: 120px">
<col style="width: 250px">
<col style="width: 110px">
<col style="width: 100px">
<col style="width: 120px">
<col style="width: 120px">
</colgroup>
<tr>
<td class="tg-s268">入库单号:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[0] }}</td>
<td class="tg-0lax">入库日期:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[1] }}</td>
<td class="tg-0lax">仓库名称:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[2] }}</td>
</tr>
<tr>
<td class="tg-0lax">订单编号:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[3] }}</td>
<td class="tg-0lax">到货单号:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[4] }}</td>
<td class="tg-0lax">业务编号:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[5] }}</td>
</tr>
<tr>
<td class="tg-0lax">供货单位:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[6] }}</td>
<td class="tg-0lax">部门名称:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[7] }}</td>
<td class="tg-0lax">业务人员:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[8] }}</td>
</tr>
<tr>
<td class="tg-0lax">到货日期:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[9] }}</td>
<td class="tg-0lax">业务类型:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[10] }}</td>
<td class="tg-0lax">采购类型:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[11] }}</td>
</tr>
<tr>
<td class="tg-0lax">入库类别:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[12] }}</td>
<td class="tg-0lax">备注信息:</td>
<td class="tg-0lax" style="text-align: left">{{ inbondCard[13] }}</td>
<td class="tg-0lax"/>
<td class="tg-0lax"/>
</tr>
</table>
</div>
<div style="margin-top: 10px">
<table class="tg" style="table-layout: fixed; width: 820px; margin: auto">
<colgroup>
<col style="width: 150px">
<col style="width: 150px">
<col style="width: 120px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
<col style="width: 100px">
</colgroup>
<tr>
<th class="tg-c3ow">存货编码</th>
<th class="tg-c3ow">存货名称</th>
<th class="tg-c3ow">规格型号</th>
<th class="tg-baqh">零件图号</th>
<th class="tg-c3ow">数量</th>
<th class="tg-c3ow">本币单价</th>
<th class="tg-c3ow">本币金额</th>
</tr>
<tr v-for="(list, index) in tableData4" :key="index">
<td class="tg-c3ow">{{ index + 1 }}</td>
<td class="tg-c3ow">{{ list.名称 }}</td>
<td class="tg-c3ow">{{ list.规格 }}</td>
<td class="tg-baqh">{{ list.零件图号 }}</td>
<td class="tg-c3ow">{{ list.数量 }}</td>
<td class="tg-c3ow">{{ list.本币单价 }}</td>
<td class="tg-c3ow">{{ list.本币单价 * parseInt(list.数量) }}</td>
</tr>
<tr>
<td class="tg-c3ow"/>
<td class="tg-c3ow"/>
<td class="tg-c3ow"/>
<td class="tg-baqh">合计</td>
<td class="tg-c3ow">{{ inbondCard[14] }}</td>
<td class="tg-c3ow">总价</td>
<td class="tg-c3ow">{{ inbondCard[15] }}</td>
</tr>
</table>
</div>
<div style="margin-top: 20px; text-align: right">
<span style="margin-right: 50px">制单人:{{ '李鑫' }}</span>
<span style="margin-right: 50px">审核人:{{ '李鑫' }}</span>
</div>
</div>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisibleExport=false">取消</el-button>
<el-button type="primary" size="small" @click="printCard">打印</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible1" title="增加采购入库单" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="合同名称" prop="合同名称">
@@ -368,7 +484,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1=false">取消</el-button>
<el-button size="small" @click="dialogVisibleExport=false">取消</el-button>
<el-button type="primary" size="small" @click="submitCard">确定</el-button>
</div>
</el-dialog>
@@ -432,8 +548,10 @@
</template>
<script>
import { searchContract, searchInventory, searchInbound, searchShopInbound, searchInboundCard, addInboundCard, searchAffairPeople, addInboundCardDetail, searchInboundCardDetail, deleteInboundCardDetail, searchShopContract } from '@/api/Inventory/InboundCard'
import { searchContract, searchInventory, searchInbound, searchShopInbound, searchInboundCard, addInboundCard, searchAffairPeople, addInboundCardDetail, searchInboundCardDetail, deleteInboundCardDetail, searchShopContract, editInboundCard } from '@/api/Inventory/InboundCard'
import { mapGetters } from 'vuex'
import $ from 'jquery'
export default {
data() {
return {
@@ -490,7 +608,19 @@ export default {
numberGroup: [],
priceGroup: [],
DetailNumber: '',
CardDetailNumber: '' // 入库单明细流水号
CardDetailNumber: '', // 入库单明细流水号
contractSum: '',
total: 0,
pageCurrent: 1,
pageSize: 10,
total2: 0,
pageCurrent2: 1,
pageSize2: 10,
total3: 0,
pageCurrent3: 1,
pageSize3: 10,
dialogVisibleExport: false,
inbondCard: []
}
},
computed: {
@@ -644,7 +774,11 @@ export default {
searchDetail(row) {
this.DetailNumber = row.采购入库单流水号
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
const data = response.data
for (let i = 0; i < data[i].length; i++) {
data[i].数量 = parseInt(data[i].数量)
}
this.tableData4 = data
})
},
// 删除领料单明细
@@ -671,11 +805,117 @@ export default {
message: '已取消删除'
})
})
},
calculateContractSum(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[7] += ' 元'
} else if (index === 4) {
sums[index] = '合计'
return
} else if (index === 6) {
sums[index] = '总价'
return
}
})
return sums
},
handleSizeChange(val) { // 询价单列表分页
this.pageSize = val
},
handleCurrentChange(val) { // 询价单列表分页
this.pageCurrent = val
},
handleSizeChange2(val) { // 询价单列表分页
this.pageSize2 = val
},
handleCurrentChange2(val) { // 询价单列表分页
this.pageCurrent2 = val
},
handleSizeChange3(val) { // 询价单列表分页
this.pageSize2 = val
},
handleCurrentChange3(val) { // 询价单列表分页
this.pageCurrent2 = val
},
editCard() {
editInboundCard(this.CardDetailNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
})
} else {
this.$message.error('数据占用')
}
})
},
exportCard(row) {
this.dialogVisibleExport = true
this.inbondCard[0] = row.入库单号
this.inbondCard[1] = row.入库日期.substring(0, row.入库日期.length - 8)
this.inbondCard[2] = row.仓库名称
this.inbondCard[3] = row.采购合同编号
this.inbondCard[4] = row.到货单号
this.inbondCard[5] = row.业务号
this.inbondCard[6] = row.供应商名称
this.inbondCard[7] = '库存'
this.inbondCard[8] = row.姓名
this.inbondCard[9] = row.到货日期.substring(0, row.到货日期.length - 8)
this.inbondCard[10] = row.业务类型
this.inbondCard[11] = row.采购类型
this.inbondCard[12] = row.入库类别
this.inbondCard[13] = row.备注
this.DetailNumber = row.采购入库单流水号
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
return this.tableData4
}).then(data => {
var sum = 0
var total = 0
for (let i = 0; i < data.length; i++) {
sum += parseInt(data[i].数量)
total += data[i].本币单价 * parseInt(data[i].数量)
}
this.inbondCard[14] = sum
this.inbondCard[15] = total
})
},
printCard() {
const htmlNode = $('#print').html() // #print为需要打印的dom节点id
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
window.print()
body.children().show()
printNode.remove()
}
}
}
</script>
<style scoped>
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
.tg .tg-baqh{text-align:center;vertical-align:top}
.tg .tg-c3ow{border-color:inherit;text-align:center;vertical-align:top}
.tgClass {border-collapse:collapse;border-spacing:0;}
.tgtgClass td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}
.tgtgClass th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;}
.tgtgClass .tg-s268{text-align:left}
.tgtgClass .tg-0lax{text-align:left;vertical-align:top}
</style>

View File

@@ -280,7 +280,7 @@
</el-table-column>
<el-table-column label="入库人员" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.入库人员 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="到货时间" align="center" min-width="80">
@@ -343,7 +343,8 @@
style="margin: 10px;"
@change="GeneralShow()">
<el-radio v-model="radio2" :label="3">外购件</el-radio>
<el-radio v-model="radio2" :label="4" style="margin-left: 2px">标准件</el-radio>
<el-radio v-model="radio2" :label="4" style="margin-left: 20px">标准件</el-radio>
<el-radio v-model="radio2" :label="5" style="margin-left: 20px">基本件</el-radio>
</el-radio-group>
<span>项目名称:</span>
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
@@ -452,7 +453,7 @@
</el-table-column>
<el-table-column label="入库人员" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.入库人员 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="到货时间" align="center" min-width="80">
@@ -497,7 +498,8 @@
style="margin: 10px;"
@change="GeneralShow()">
<el-radio v-model="radio2" :label="3">外购件</el-radio>
<el-radio v-model="radio2" :label="4" style="margin-left: 2px">标准件</el-radio>
<el-radio v-model="radio2" :label="4" style="margin-left: 20px">标准件</el-radio>
<el-radio v-model="radio2" :label="5" style="margin-left: 20px">基本件</el-radio>
</el-radio-group>
<span>项目名称:</span>
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
@@ -604,6 +606,161 @@
<el-button type="primary" @click="edeitsafeAmount()"> </el-button>
</div>
</el-dialog>
<el-card v-show="purchaseBasicShow">
<el-radio-group
v-model="radio"
size="mini"
style="margin: 10px;"
@change="GeneralShow()">
<el-radio v-model="radio2" :label="3">外购件</el-radio>
<el-radio v-model="radio2" :label="4" style="margin-left: 20px">标准件</el-radio>
<el-radio v-model="radio2" :label="7" style="margin-left: 20px">基本件</el-radio>
</el-radio-group>
<span>项目名称:</span>
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
<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" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
<el-option
v-for="item in GroupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total7 = 0;pageSize7 = 10;pageList7 = 1;searchPurchaseBasciinfo()">基本件查询</el-button><br>
</el-card>
<el-card v-show="purchaseBasicShow">
<el-table
v-loading="listLoading6"
:data="tablePurchaseBasic"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<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-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-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchPurchasePartRecord(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent7"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total7"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange7"
@current-change="handleCurrentChange7"/>
</div>
</el-card>
<el-card v-show="purchaseBasicShow">
<el-table
v-loading="listLoading7"
:data="PurchasePartIn"
size="mini"
border
style="width: 100%;"
height="200">
<el-table-column
label="序号"
size="mini"
align="center"
type="index"
width="50"/>
<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.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template>
</el-table-column>
</el-table>
<el-table
v-loading="listLoading8"
:data="PurchasePartOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<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.出库时间 ? scope.row.出库时间.split(' ')[0] : '' }}
</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>
</el-card>
<el-card v-show="standardshow">
<el-table
v-loading="listLoading10"
@@ -624,7 +781,7 @@
</el-table-column>
<el-table-column label="入库人员" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.入库人员 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="到货时间" align="center" min-width="80">
@@ -784,7 +941,7 @@
</el-table-column>
<el-table-column label="入库人员" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.入库人员 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="到货时间" align="center" min-width="80">
@@ -947,7 +1104,7 @@
</el-table-column>
<el-table-column label="入库人员" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.入库人员 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="到货时间" align="center" min-width="80">
@@ -992,7 +1149,7 @@
<script>
import { mapGetters } from 'vuex'
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut, searchHourseBasicPart, searchHoursePurchasePart, CheckAlter } from '@/api/Inventory/InventoryCheck'
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut, searchHourseBasicPart, searchHoursePurchasePart, CheckAlter, searchPurchaseBasicPart } from '@/api/Inventory/InventoryCheck'
export default {
data() {
return {
@@ -1061,6 +1218,9 @@ export default {
PageCurrent6: 1,
PageSize6: 10,
total6: null,
PageCurrent7: 1,
PageSize7: 10,
total7: null,
radio: 1,
radio2: 1,
radio3: 1,
@@ -1070,12 +1230,14 @@ export default {
standardshow: false,
housebasicshow: true,
housepurchaseshow: false,
purchaseBasicShow: false,
HouseDataBasic: [],
HouseDataBasicOut: [],
HouseDataBasicIn: [],
HouseDataPurchase: [],
HouseDataPurchaseOut: [],
HouseDataPurchaseIn: [],
tablePurchaseBasic: [],
rules2: { // 表单验证规则
Number: [{ required: true, message: '请输入安全库存量', trigger: 'blur' }],
AlterReason: [{ required: true, message: '请输入安全库存量', trigger: 'blur' }]
@@ -1117,11 +1279,17 @@ export default {
},
GeneralShow() {
if (this.radio === 3) {
this.purchaseBasicShow = false
this.purchaseshow = true
this.standardshow = false
} else {
} else if (this.radio === 4) {
this.purchaseBasicShow = false
this.purchaseshow = false
this.standardshow = true
} else {
this.purchaseBasicShow = true
this.purchaseshow = false
this.standardshow = false
}
},
HouseShow() {
@@ -1278,6 +1446,31 @@ export default {
this.listLoading3 = false
})
},
// 查询外购基本件
searchPurchaseBasciinfo() {
this.listLoading = true
this.tablePurchaseBasic = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
}
if (this.MachineValue === '') {
this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
}
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
}
searchPurchaseBasicPart(this.PageCurrent7, this.PageSize7, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tablePurchaseBasic = response.data.rows
this.listLoading = false
this.total7 = response.data.total
})
},
// 查询基本件
searchBasciPartinfo() {
this.listLoading = true
@@ -1429,6 +1622,15 @@ export default {
this.PageCurrent6 = val
this.searchHousePurchase()
},
handleSizeChange7(val) {
this.PageCurrent7 = 1
this.PageSize7 = val
this.searchPurchaseBasciinfo()
},
handleCurrentChange7(val) {
this.PageCurrent7 = val
this.searchPurchaseBasciinfo()
},
// 查询车间采购基本件
searchHouseBasci() {
this.listLoadingx1 = true

View File

@@ -4,6 +4,7 @@
<el-table
v-loading="listLoading"
:data="tableDataBasic"
size="mini"
border
style="width: 100%;"
height="200">
@@ -39,8 +40,8 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="parOut(scope.row)">出库</el-button>
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="searchoutRecord(scope.row)">选择</el-button>
<el-button size="mini" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="parOut(scope.row)">出库</el-button>
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="searchoutRecord(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
@@ -100,6 +101,7 @@
<el-table
v-loading="listLoading1"
:data="tableDataOut"
size="mini"
border
style="width: 100%;"
height="350">
@@ -244,7 +246,6 @@ export default {
},
// 打开表单
parOut(row) {
console.log(row)
this.form = []
this.MachineValue = ''
this.GroupNumValue = ''
@@ -253,7 +254,6 @@ export default {
this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号
this.partnumber = row.货位存量
console.log(this.partnumber)
this.searchoutRecord()
},
// 重置表单
@@ -280,15 +280,15 @@ export default {
} else {
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
message: '信息添加成功',
type: 'success'
})
this.$message.success('零件出库成功')
this.dialogFormVisible = false
this.searchDirect()
this.searchPurchasePartinfo()
outRecord(this.contractNumber).then(response => {
this.tableDataOut = response.data
this.listLoading1 = false
})
} else {
this.$message.error('信息添加失败')
this.$message.error('零件出库失败')
}
})
this.dialogFormVisible = false

View File

@@ -5,7 +5,8 @@
<el-input v-model="pickingListNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchListinfor()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addListinfor()">创建</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="downLoadCjn()">导出</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData1"
@@ -36,8 +37,8 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="200px">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="chooseListinfor(scope.row)">选择</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropListinfor(scope.row)">删除</el-button>
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="chooseListinfor(scope.row)">选择</el-button>
<el-button size="mini" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropListinfor(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -115,8 +116,8 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="200">
<template slot-scope="scope">
<el-button :disabled="scope.row.是否出库" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 10px 10px" @click="editListDetailx(scope.row)">编辑</el-button>
<el-button :disabled="scope.row.是否出库" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropListdetail(scope.row)">删除</el-button>
<el-button :disabled="scope.row.是否出库" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 10px 10px" @click="editListDetailx(scope.row)">编辑</el-button>
<el-button :disabled="scope.row.是否出库" size="mini" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropListdetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -218,7 +219,7 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="80">
<template slot-scope="scope" align="center">
<el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicListDetailinfor(scope.row)">领料</el-button>
<el-button :disabled="scope.row.是否禁用" size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicListDetailinfor(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>
@@ -301,7 +302,7 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="80">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addListDetailinfor(scope.row)">领料</el-button>
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addListDetailinfor(scope.row)">领料</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -25,12 +25,13 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total = 0;pageSize = 10;pageList = 1;searchPartinfo()">查询</el-button><br>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px; " @click="total = 0;pageSize = 10;pageList = 1;searchPartinfo()">查询</el-button><br>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableDataPurchase"
size = "mini"
border
style="width: 100%;"
height="200">
@@ -66,12 +67,12 @@
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
{{ scope.row.外购件类型 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selecting(scope.row)">替换</el-button>
<el-button size="mini" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selecting(scope.row)">替换</el-button>
</template>
</el-table-column>
</el-table>
@@ -85,6 +86,7 @@
:data="tableData1"
border
style="width: 100%;"
size = "mini"
height="100"
>
<el-table-column
@@ -128,6 +130,7 @@
<el-table
:data="tableData2"
border
size = "mini"
style="width: 100%;"
height="100">
<el-table-column
@@ -228,6 +231,7 @@
v-loading="listLoading1"
:data="tableDataExchange"
border
size = "mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -287,13 +291,13 @@ import { mapGetters } from 'vuex'
export default {
data() {
return {
ProjectValue: ' ',
ProjectValue: '',
Project: [],
ProjectValue_check: 1,
MachineValue: ' ',
MachineValue: '',
Machine: [],
MachineValue_check: 1,
GroupNumValue: ' ',
GroupNumValue: '',
GroupNumValue_check: 1,
GroupNum: [],
tableDataPurchase: [],
@@ -381,19 +385,24 @@ export default {
// 被替换件查询
searchPartinfo() {
this.tableDataPurchase = []
if (this.ProjectValue === ' ') {
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
}
if (this.MachineValue === ' ') {
if (this.MachineValue === '') {
this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
}
if (this.GroupNumValue === ' ') {
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
}
this.listLoading = true
searchPurchasePart(this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataPurchase = response.data
console.log(this.tableDataPurchase)
this.listLoading = false
})
},