Initial commit: 景耀JY1.0项目
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
style="width:812px"
|
||||
style="width:962px"
|
||||
height="258px"
|
||||
size="small">
|
||||
<el-table-column label="物料编号" align="center" prop="物料码">
|
||||
@@ -115,6 +115,11 @@
|
||||
{{ scope.row.日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150px" label="批次编码" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次编号 || scope.row.批次编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -227,19 +232,42 @@
|
||||
{{ scope.row.最低库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="Number(token)===7 || Number(token)===8 || Number(token)===2"
|
||||
width="120px"
|
||||
label="安全库存"
|
||||
align="center"
|
||||
sortable="安全库存"
|
||||
prop="安全库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安全库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="Number(token)===7 || Number(token)===8 || Number(token)===2"
|
||||
width="120px"
|
||||
label="最高库存"
|
||||
align="center"
|
||||
sortable="最高库存"
|
||||
prop="最高库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最高库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="Number(token)===7 || Number(token)===8 || Number(token)===2"
|
||||
width="180px"
|
||||
label="操作"
|
||||
align="center">
|
||||
align="center"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
style="margin-right: 10px"
|
||||
@click="openStock(scope.row)">最低库存
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table
|
||||
:data="gridData"
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
</div>-->
|
||||
<div style="margin-left: 10px">
|
||||
<el-input v-model="PickingListName" placeholder="领料单号/领料人" style="width: 170px" size="small" clearable/>
|
||||
<el-select v-model="orderNameValue" style="width:200px;margin-right: 0px" placeholder="订单号" size="small" filterable clearable @change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in orderNumberType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"/>
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain @click="searchTable">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-printer" plain @click="exportTable">打印</el-button>
|
||||
</div>
|
||||
@@ -442,6 +449,8 @@ export default {
|
||||
pickValue: '',
|
||||
temporaryValue: '',
|
||||
PickingListName: '',
|
||||
orderNameValue: '',
|
||||
orderNumberType: [],
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
@@ -493,8 +502,22 @@ export default {
|
||||
this.getCustomer()
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
this.getOrderNumberType()
|
||||
},
|
||||
methods: {
|
||||
getOrderNumberType() {
|
||||
// this.orderNumberType = []
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '领料单_未领订单_列表_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.orderNumberType.push({
|
||||
label: response.data[i].订单号,
|
||||
value: response.data[i].订单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
showRemark(row) {
|
||||
this.materialNumber1 = row.物料流水号
|
||||
this.remark = row.备注
|
||||
@@ -555,6 +578,7 @@ export default {
|
||||
var param = []
|
||||
param[0] = ['领料单号_check', check]
|
||||
param[1] = ['领料单号', this.PickingListName]
|
||||
param[2] = ['订单号', this.orderNameValue]
|
||||
var Data = this.CreateData('11', '装配管理_未领完领料单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.ProductionPick = response.data
|
||||
|
||||
479
src/views/WarehouseManagement/OutboundDetails/index.vue
Normal file
479
src/views/WarehouseManagement/OutboundDetails/index.vue
Normal file
@@ -0,0 +1,479 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 825px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-select
|
||||
v-model="customerNameValue"
|
||||
style="width:200px"
|
||||
placeholder="订单号"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="pageCurrent=1;pageSize=100;searchTable();getProductName()">
|
||||
<el-option
|
||||
v-for="item in customerName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="productNameValue"
|
||||
style="width:200px ; margin-left: 10px"
|
||||
size="small"
|
||||
placeholder="产品部件"
|
||||
filterable
|
||||
clearable
|
||||
@change="pageCurrent=1;pageSize=100;searchTable()">
|
||||
<el-option
|
||||
v-for="item in productName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="pickListValue"
|
||||
style="width:200px ; margin-left: 10px"
|
||||
size="small"
|
||||
placeholder="领料单号"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="pageCurrent=1;pageSize=100;searchTable()">
|
||||
<el-option
|
||||
v-for="item in pickList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<el-input
|
||||
v-model="production"
|
||||
style="width: 200px ; margin-left: 10px"
|
||||
size="small"
|
||||
clearable
|
||||
placeholder="物料名称/编号"
|
||||
@keyup.enter.native="pageCurrent=1;pageSize=100;searchTable()"/>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
:row-class-name="tableRowClassName"
|
||||
highlight-current-row
|
||||
show-summary
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 1611px"
|
||||
height="720px">
|
||||
<el-table-column :width="setColumnWidth('序号')" label="序号" type="index" align="center" />
|
||||
<el-table-column :width="setColumnWidth('领料单号')" label="领料单号" align="center" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领料单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('物料名称')" label="物料名称" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130px" label="物料编号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="图号/型号" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="47px" label="单位" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="申请数" align="center" prop="申请数">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="已领数" align="center" prop="已领数">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已领数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="库存数" align="center" prop="库存数">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库存数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column width="150px" label="本次领用" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.本次领用"
|
||||
:min="0"
|
||||
:max="getMaxNumber(scope.row)"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
controls-position="right"/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :width="setColumnWidth('数量')" label="货位名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="125px" label="订单号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品/部件名称" width="140px" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="批次" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120px" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="isDeliveryDisabled(scope.row)" type="text" size="mini" @click="showBatchDialog(scope.row, scope.$index)">
|
||||
出库
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
<el-dialog :visible.sync="batchDialogVisible" title="批次选择" width="600px" @close="closeBatchDialog">
|
||||
<el-table :data="batchData" border highlight-current-row size="mini" show-summary>
|
||||
<el-table-column width="50px" align="center" type="index" label="序号"/>
|
||||
<el-table-column width="150px" align="center" label="批次编号">
|
||||
<template slot-scope="batchScope">
|
||||
{{ batchScope.row.批次编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px" align="center" label="批次库存">
|
||||
<template slot-scope="batchScope">
|
||||
{{ batchScope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="140px" label="本次领用" align="center">
|
||||
<template slot-scope="batchScope">
|
||||
<el-input-number
|
||||
v-model="batchScope.row.本次领用"
|
||||
:min="0"
|
||||
:max="Number(batchScope.row.货位存量)"
|
||||
size="mini"
|
||||
style="width:100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="70px" label="操作" align="center">
|
||||
<template slot-scope="batchScope">
|
||||
<el-button type="text" size="mini" @click="confirmBatchDelivery(batchScope.row)">
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="batchPageCurrent"
|
||||
:total="batchTotal"
|
||||
:page-size="batchPageSize"
|
||||
layout="total, prev, pager, next"
|
||||
@current-change="handleBatchPageChange"/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 出库相关数据
|
||||
exWarehouse: false,
|
||||
currentRow: null,
|
||||
batchData: [],
|
||||
batchTotal: 0,
|
||||
batchPageCurrent: 1,
|
||||
batchPageSize: 5,
|
||||
materialSerialNumber: '',
|
||||
pickingList: '',
|
||||
pickingPeople: '',
|
||||
orderNumber: '',
|
||||
isGroup: '',
|
||||
|
||||
typeValue: '',
|
||||
type: [{
|
||||
label: '自制',
|
||||
value: '自制'
|
||||
}, {
|
||||
label: '外购',
|
||||
value: '外购'
|
||||
}, {
|
||||
label: '耗材',
|
||||
value: '耗材'
|
||||
}, {
|
||||
label: '通用',
|
||||
value: '通用'
|
||||
}, {
|
||||
label: '临时',
|
||||
value: '临时'
|
||||
}, {
|
||||
label: '备货',
|
||||
value: '备货'
|
||||
}],
|
||||
returnMaterialChecked: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
数量: ''
|
||||
},
|
||||
rules: {
|
||||
数量: [{ required: true, message: '请输入数量' }]
|
||||
},
|
||||
NumberValue: '',
|
||||
DeliveryNumber: '',
|
||||
customerNameValue: '',
|
||||
customerName: [],
|
||||
productNameValue: '',
|
||||
productName: [],
|
||||
pickList: [],
|
||||
pickListValue: '',
|
||||
pickPeople: [],
|
||||
pickPeopleValue: '',
|
||||
dateRange: '',
|
||||
contractStateValue: '',
|
||||
production: '',
|
||||
loading: false,
|
||||
total: 0,
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 100,
|
||||
orderName: '',
|
||||
order: '',
|
||||
popoverVisible: {}, // 添加这个
|
||||
batchDialogVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['table'] && this.$refs['table'].doLayout()
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 表格行样式
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
const needCount = (row.申请数 || 0) - (row.已领数 || 0)
|
||||
if ((row.库存数 || 0) < needCount) {
|
||||
return 'warning-row'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
||||
// 获取最大可领数量
|
||||
getMaxNumber(row) {
|
||||
const needCount = Number(row.申请数) - Number(row.已领数)
|
||||
const maxNum = needCount > Number(row.库存数) ? Number(row.库存数) : needCount
|
||||
return maxNum > 0 ? maxNum : 0
|
||||
},
|
||||
|
||||
// 判断出库按钮是否禁用
|
||||
isDeliveryDisabled(row) {
|
||||
return row.库存数 === 0 || Number(row.申请数) <= Number(row.已领数) || this.exWarehouse
|
||||
},
|
||||
|
||||
// 显示批次选择弹窗
|
||||
showBatchDialog(row, index) {
|
||||
this.$set(this.popoverVisible, index, true) // 打开弹窗
|
||||
this.exWarehouse = true
|
||||
this.currentRow = row
|
||||
this.materialSerialNumber = row.物料流水号
|
||||
this.pickingList = row.领料单流水号
|
||||
this.pickingPeople = row.领料人流水号
|
||||
this.orderNumber = row.订单流水号
|
||||
this.isGroup = row.是否部件 || 0
|
||||
this.batchDialogVisible = true // 打开弹窗
|
||||
// 初始化本次领用数量
|
||||
if (!row.本次领用) {
|
||||
row.本次领用 = this.getMaxNumber(row)
|
||||
}
|
||||
|
||||
this.searchBatchList()
|
||||
},
|
||||
|
||||
// 查询批次列表
|
||||
searchBatchList() {
|
||||
var param = []
|
||||
param[0] = ['物料流水号', this.materialSerialNumber]
|
||||
var Data = this.CreateData('11', '装配管理_领料单明细_批次查询', param, this.batchPageSize, this.batchPageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.exWarehouse = false
|
||||
this.batchData = response.data.rows
|
||||
this.batchTotal = response.data.total
|
||||
})
|
||||
},
|
||||
|
||||
// 确认批次出库
|
||||
confirmBatchDelivery(batchRow, tableRow, index) {
|
||||
if (!batchRow.本次领用 || batchRow.本次领用 <= 0) {
|
||||
this.$message.warning('请输入领用数量')
|
||||
return
|
||||
}
|
||||
|
||||
this.exWarehouse = true
|
||||
var param = []
|
||||
param[0] = ['物料流水号', batchRow.物料流水号]
|
||||
param[1] = ['出库数量', batchRow.本次领用]
|
||||
param[2] = ['基本件流水号', this.currentRow.基本件流水号 || '']
|
||||
param[3] = ['标准件和外购件流水号', this.currentRow.标准件和外购件流水号 || '']
|
||||
param[4] = ['领料单明细流水号', this.currentRow.领料单明细流水号]
|
||||
param[5] = ['产品流水号', this.currentRow.产品流水号 || '']
|
||||
param[6] = ['组件流水号', this.currentRow.组件流水号 || '']
|
||||
param[7] = ['领料流水号', this.currentRow.领料流水号 || '']
|
||||
param[8] = ['临时流水号', this.currentRow.临时流水号 || '']
|
||||
param[9] = ['出库人流水号', this.id]
|
||||
param[10] = ['领料人流水号', this.pickingPeople]
|
||||
param[11] = ['领料单流水号', this.pickingList]
|
||||
param[12] = ['是否部件', this.isGroup]
|
||||
param[13] = ['物料与货位流水号', batchRow.物料与货位流水号]
|
||||
|
||||
var Data = this.CreateData('12', '仓储管理_物料出库_新', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
// 关闭 popover
|
||||
this.batchDialogVisible = false // 关闭弹窗
|
||||
this.exWarehouse = false
|
||||
this.batchData = []
|
||||
// 刷新表格数据
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('出库失败')
|
||||
this.exWarehouse = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 批次分页切换
|
||||
handleBatchPageChange(val) {
|
||||
this.batchPageCurrent = val
|
||||
this.searchBatchList()
|
||||
},
|
||||
|
||||
getProductName() {
|
||||
this.productNameValue = ''
|
||||
this.productName = []
|
||||
if (this.customerNameValue) {
|
||||
var param = []
|
||||
param[0] = ['订单流水号', this.customerNameValue]
|
||||
var Data = this.CreateData('11', '订单信息_产品信息_查询数据', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.productName.push({
|
||||
label: response.data[i].产品名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
searchTable() {
|
||||
var param = []
|
||||
param.push(['物料名称', this.production])
|
||||
param.push(['订单流水号', this.customerNameValue])
|
||||
param.push(['组件流水号', this.productNameValue])
|
||||
param.push(['领料单号', this.pickListValue])
|
||||
var Data = this.CreateData('11', '仓储管理_待出库明细_查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
const rows = response.data.rows || []
|
||||
// 为每行添加本次领用字段
|
||||
rows.forEach(row => {
|
||||
this.$set(row, '本次领用', 0)
|
||||
})
|
||||
this.customerName = [...new Map(
|
||||
rows.map(item => [item.订单流水号, {
|
||||
label: item.订单号,
|
||||
value: item.订单流水号
|
||||
}])
|
||||
).values()]
|
||||
this.pickList = [...new Map(
|
||||
rows.map(item => [item.领料单号, {
|
||||
label: item.领料单号,
|
||||
value: item.领料单号
|
||||
}])
|
||||
).values()]
|
||||
console.log('出库记录查询数据', response.data)
|
||||
this.tableData = rows
|
||||
this.total = response.data.total
|
||||
this.exWarehouse = false
|
||||
})
|
||||
},
|
||||
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
closeBatchDialog() {
|
||||
this.batchDialogVisible = false
|
||||
this.batchData = []
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ziduan {
|
||||
width: 50px !important;
|
||||
}
|
||||
|
||||
/* 红色背景行 */
|
||||
.el-table .warning-row {
|
||||
background-color: #f56c6c !important;
|
||||
}
|
||||
|
||||
.el-table .warning-row td {
|
||||
background-color: #f56c6c !important;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -2,10 +2,26 @@
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-select
|
||||
v-model="pickingListNoValue"
|
||||
:remote-method="getPickingListNo"
|
||||
style="width:200px"
|
||||
placeholder="领料单号"
|
||||
size="small"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
@change="searchTable()">
|
||||
<el-option
|
||||
v-for="item in pickingListNo"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="orderNumberTypeValue"
|
||||
:remote-method="getOrderNumberType"
|
||||
style="width:200px"
|
||||
style="width:200px;margin-left: 10px"
|
||||
placeholder="订单号"
|
||||
size="small"
|
||||
filterable
|
||||
@@ -183,6 +199,8 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pickingListNoValue: '', // 领料单号
|
||||
pickingListNo: [], // 领料单号数组
|
||||
orderNumberTypeValue: '', // 订单号
|
||||
orderNumberType: [], // 订单号数组
|
||||
productpartNameValue: '', // 产品部件名称
|
||||
@@ -213,8 +231,23 @@ export default {
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.getOrderNumberType('')
|
||||
this.getPickingListNo('')
|
||||
},
|
||||
methods: {
|
||||
getPickingListNo(query) {
|
||||
this.pickingListNo = []
|
||||
var param = []
|
||||
param[0] = ['领料单号', query]
|
||||
var Data = this.CreateData('11', '领料单_领料单信息_列表_查询数据_BAK', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.pickingListNo.push({
|
||||
label: response.data[i].领料单号,
|
||||
value: response.data[i].领料单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getOrderNumberType(query) {
|
||||
this.orderNumberType = []
|
||||
var param = []
|
||||
@@ -247,19 +280,22 @@ export default {
|
||||
}
|
||||
},
|
||||
searchTable() {
|
||||
let orderNumberTypeValue_check, productpartNameValue_check, pickingListPeople_check
|
||||
let pickingListNoValue_check, orderNumberTypeValue_check, productpartNameValue_check, pickingListPeople_check
|
||||
this.pickingListNoValue ? pickingListNoValue_check = 1 : pickingListNoValue_check = 0
|
||||
this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
|
||||
this.productpartNameValue ? productpartNameValue_check = 1 : productpartNameValue_check = 0
|
||||
this.pickingListPeople ? pickingListPeople_check = 1 : pickingListPeople_check = 0
|
||||
var param = []
|
||||
param[0] = ['订单号_check', orderNumberTypeValue_check]
|
||||
param[1] = ['订单流水号', this.orderNumberTypeValue]
|
||||
param[2] = ['产品_check', productpartNameValue_check]
|
||||
param[3] = ['组件流水号', this.productpartNameValue]
|
||||
param[4] = ['领料人_check', pickingListPeople_check]
|
||||
param[5] = ['领料人', this.pickingListPeople]
|
||||
param[6] = ['排序名称', this.orderName]
|
||||
param[7] = ['排序方式', this.order]
|
||||
param[0] = ['领料单号_check', pickingListNoValue_check]
|
||||
param[1] = ['领料单流水号', this.pickingListNoValue]
|
||||
param[2] = ['订单号_check', orderNumberTypeValue_check]
|
||||
param[3] = ['订单流水号', this.orderNumberTypeValue]
|
||||
param[4] = ['产品_check', productpartNameValue_check]
|
||||
param[5] = ['组件流水号', this.productpartNameValue]
|
||||
param[6] = ['领料人_check', pickingListPeople_check]
|
||||
param[7] = ['领料人', this.pickingListPeople]
|
||||
param[8] = ['排序名称', this.orderName]
|
||||
param[9] = ['排序方式', this.order]
|
||||
var Data = this.CreateData('11', '装配管理_领料单_查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
|
||||
@@ -388,7 +388,8 @@ export default {
|
||||
},
|
||||
getList(query) {
|
||||
var param = []
|
||||
param[0] = ['订单编号', query]
|
||||
this.pickList = []
|
||||
param[0] = ['领料单号', query]
|
||||
var Data = this.CreateData('11', '仓库管理_领料单_查询_BAK', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
|
||||
@@ -42,7 +42,15 @@
|
||||
style="margin-left: 10px"
|
||||
plain
|
||||
size="small"
|
||||
@click="submitInStorage">入库/入库单
|
||||
@click="submitInStorage">入库
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-s-home"
|
||||
style="margin-left: 10px"
|
||||
plain
|
||||
size="small"
|
||||
@click="showRKDDialog">入库单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -68,6 +76,16 @@
|
||||
height="740px"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
|
||||
<el-table-column label="供应商" align="center" show-overflow-tooltip width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同号" align="center" show-overflow-tooltip width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
@@ -111,9 +129,9 @@
|
||||
<el-table-column width="140px" label="本次到货数" prop="本次到货数" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.本次到货数"
|
||||
v-model=" scope.row.等待入库数量"
|
||||
:min="0"
|
||||
:max="scope.row.采购数-scope.row.已到数"
|
||||
:max="scope.row.采购数 - scope.row.已到数"
|
||||
size="mini"
|
||||
style="margin: 0;width: 100%"/>
|
||||
</template>
|
||||
@@ -505,6 +523,18 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisibleRKD" title="入库单" center width="700px">
|
||||
<el-table :data="tableDataRKD" border stripe size="small" height="400px">
|
||||
<el-table-column prop="采购合同号" label="采购合同" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="供应商名称" label="供应商" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="到货数" label="到货数" align="center" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" @click="selectRKDRow(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-card v-show="false">
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
@@ -659,6 +689,8 @@ export default {
|
||||
tableData2: [], // 合同信息表
|
||||
tableData3: [], // 合同信息表
|
||||
tableData30: [], // 合同信息表
|
||||
dialogFormVisibleRKD: false,
|
||||
tableDataRKD: [],
|
||||
pageCurrent: 1, // 分页当前页
|
||||
pageSize: 30, // 分页每页显示条数
|
||||
pageCurrent1: 1, // 分页当前页
|
||||
@@ -689,6 +721,7 @@ export default {
|
||||
this.getSelectTheOutsourcingManufacturers()
|
||||
this.initWebpack()
|
||||
this.getorderSelection()
|
||||
// this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
onChangeSupplierSelection() {
|
||||
@@ -698,6 +731,24 @@ export default {
|
||||
})
|
||||
this.supplierSelectionName = obj.label
|
||||
},
|
||||
showRKDDialog() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_入库单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableDataRKD = response.data.filter(item => item.是否入库 === 0)
|
||||
this.dialogFormVisibleRKD = true
|
||||
})
|
||||
},
|
||||
selectRKDRow(row) {
|
||||
this.supplierSelectionValue = row.供应商流水号
|
||||
this.getContractState()
|
||||
this.$nextTick(() => {
|
||||
this.contractStateValue = row.采购合同流水号
|
||||
this.searchTable1()
|
||||
this.orderSelectionValue = row.供应商
|
||||
})
|
||||
this.dialogFormVisibleRKD = false
|
||||
},
|
||||
exportTable() {
|
||||
const htmlNode = $('#WGBLD').html()
|
||||
const body = $('body')
|
||||
@@ -991,55 +1042,71 @@ export default {
|
||||
},
|
||||
submitInStorage() {
|
||||
// this.exportTable()
|
||||
if (this.contractStateValue) {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
const materialGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
const purchaseGroup = []
|
||||
const locateGroup = []
|
||||
const isPurchaseGroup = []
|
||||
const batchGroup = []
|
||||
this.multipleSelection_variable = this.multipleSelection
|
||||
this.multipleSelection = []
|
||||
for (let i = 0; i < this.multipleSelection_variable.length; i++) {
|
||||
if (this.multipleSelection_variable[i].货位流水号 === 0) {
|
||||
this.$message.warning('存在未绑定货位的物料')
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable[i].本次到货数
|
||||
partGroup[i] = this.multipleSelection_variable[i].标准件和外购件流水号
|
||||
purchaseGroup[i] = this.multipleSelection_variable[i].采购合同明细流水号
|
||||
locateGroup[i] = this.multipleSelection_variable[i].货位流水号
|
||||
isPurchaseGroup[i] = this.multipleSelection_variable[i].采购类型
|
||||
batchGroup[i] = this.multipleSelection_variable[i].批号
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
param[1] = ['实际到货数量组', numberGroup]
|
||||
param[2] = ['标准件和外购件流水号组', partGroup]
|
||||
param[3] = ['采购合同明细流水号组', purchaseGroup]
|
||||
param[4] = ['入库人员流水号', this.id]
|
||||
param[5] = ['货位流水号组', locateGroup]
|
||||
param[6] = ['是否采购组', isPurchaseGroup]
|
||||
param[7] = ['批号组', batchGroup]
|
||||
var Data = this.CreateData('12', '仓储管理_采购件入库_循环执行', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('入库成功')
|
||||
this.exportTable()
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.success('入库失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择物料')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择合同')
|
||||
if (!this.multipleSelection || this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请先选择物料')
|
||||
return
|
||||
}
|
||||
|
||||
const firstContractNo = this.multipleSelection[0]['采购合同流水号']
|
||||
const hasDifferent = this.multipleSelection.some(item => item['采购合同流水号'] !== firstContractNo)
|
||||
|
||||
if (hasDifferent) {
|
||||
this.$message.warning('只能选择一个合同的物料')
|
||||
return
|
||||
}
|
||||
console.log(this.multipleSelection)
|
||||
// if (this.contractStateValue) {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
const materialGroup = []
|
||||
const numberGroup = []
|
||||
const partGroup = []
|
||||
const purchaseGroup = []
|
||||
const locateGroup = []
|
||||
const isPurchaseGroup = []
|
||||
const batchGroup = []
|
||||
const batchCodeGroup = []
|
||||
this.multipleSelection_variable = this.multipleSelection
|
||||
this.multipleSelection = []
|
||||
for (let i = 0; i < this.multipleSelection_variable.length; i++) {
|
||||
if (this.multipleSelection_variable[i].货位流水号 === 0) {
|
||||
this.$message.warning('存在未绑定货位的物料')
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable[i].等待入库数量
|
||||
partGroup[i] = this.multipleSelection_variable[i].标准件和外购件流水号
|
||||
purchaseGroup[i] = this.multipleSelection_variable[i].采购合同明细流水号
|
||||
locateGroup[i] = this.multipleSelection_variable[i].货位流水号
|
||||
isPurchaseGroup[i] = this.multipleSelection_variable[i].采购类型
|
||||
batchGroup[i] = this.multipleSelection_variable[i].批号
|
||||
batchCodeGroup[i] = this.multipleSelection_variable[i].批次编码
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
param[1] = ['实际到货数量组', numberGroup]
|
||||
param[2] = ['标准件和外购件流水号组', partGroup]
|
||||
param[3] = ['采购合同明细流水号组', purchaseGroup]
|
||||
param[4] = ['入库人员流水号', this.id]
|
||||
param[5] = ['货位流水号组', locateGroup]
|
||||
param[6] = ['是否采购组', isPurchaseGroup]
|
||||
param[7] = ['批号组', batchGroup]
|
||||
param[8] = ['批次编码组', batchCodeGroup]
|
||||
var Data = this.CreateData('12', '仓储管理_采购件入库_循环执行', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('入库成功')
|
||||
this.exportTable()
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.success('入库失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择物料')
|
||||
}
|
||||
// } else {
|
||||
// this.$message.warning('请先选择合同')
|
||||
// }
|
||||
},
|
||||
searchTable2() {
|
||||
let materialNameTypeValue_check
|
||||
@@ -1126,6 +1193,7 @@ export default {
|
||||
const typeGroup = []
|
||||
const locateGroup = []
|
||||
const batchGroup = []
|
||||
const batchCodeGroup = []
|
||||
this.multipleSelection_variable2 = this.multipleSelection2
|
||||
this.multipleSelection2 = []
|
||||
for (let i = 0; i < this.multipleSelection_variable2.length; i++) {
|
||||
@@ -1134,11 +1202,12 @@ export default {
|
||||
return
|
||||
}
|
||||
materialGroup[i] = this.multipleSelection_variable2[i].物料流水号
|
||||
numberGroup[i] = this.multipleSelection_variable2[i].本次入库
|
||||
numberGroup[i] = this.multipleSelection_variable2[i].等待入库数量
|
||||
processGroup[i] = this.multipleSelection_variable2[i].工艺计划流水号
|
||||
typeGroup[i] = this.multipleSelection_variable2[i].类型
|
||||
locateGroup[i] = this.multipleSelection_variable2[i].货位流水号
|
||||
batchGroup[i] = this.multipleSelection_variable2[i].批号
|
||||
batchCodeGroup[i] = this.multipleSelection_variable2[i].批次编码
|
||||
}
|
||||
var param = []
|
||||
param[0] = ['物料流水号组', materialGroup]
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<el-col style="width: 921px">
|
||||
<el-card style="height: 850px ;display:flex">
|
||||
<el-col style="width: 930px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-cascader ref="cascader" :options="product" :show-all-levels="false" placeholder="产品名称" clearable size="small" @clear="clearData" @change="getData"/>
|
||||
<el-input v-model="specificationsValue" style="width:200px" placeholder="名称/规格/型号" size="small" clearable @keyup.enter.native="pageCurrent=1;updateCheck()"/>
|
||||
<el-button :disabled="disabled1" icon="el-icon-edit" type="primary" style="margin-left: 10px" plain size="small" @click="setUpInventory()">最低库存</el-button>
|
||||
<!-- <el-button :disabled="disabled1" icon="el-icon-edit" type="primary" style="margin-left: 10px" plain size="small" @click="setUpInventory()">最低库存</el-button> -->
|
||||
<el-button :disabled="disabled" type="distribution" icon="el-icon-check" size="small" @click="openOrder()">提交补货</el-button>
|
||||
<el-checkbox v-model="checked" style="margin-left: 40px" @change="updateCheck">自制补货</el-checkbox>
|
||||
<el-badge :value="numberReturnedItems" class="item">
|
||||
<el-button type="text" size="small" style="margin-left: 70px" @click="viewReturnedContracts()">打回通知</el-button>
|
||||
</el-badge>
|
||||
</div>
|
||||
<div>
|
||||
<div >
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="table"
|
||||
@@ -23,7 +23,6 @@
|
||||
show-summary
|
||||
border
|
||||
size="small"
|
||||
style="width: 921px"
|
||||
height="740px"
|
||||
@sort-change="sortChange"
|
||||
@row-click="updateStock">
|
||||
@@ -67,12 +66,31 @@
|
||||
{{ scope.row.需求量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="73px" label="最低库存" align="center" prop="最低库存">
|
||||
<el-table-column width="85px" label="可用库存" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最低库存 }}
|
||||
{{ (Number(scope.row.库存) || 0) - (Number(scope.row.需求量) || 0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补货数" align="center" prop="补货数">
|
||||
<el-table-column width="73px" label="最高库存" align="center" prop="最高库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最高库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="73px" label="安全库存" align="center" prop="安全库存">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安全库存 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="73px" label="最低库存" align="center" prop="最低库存">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
:class="{
|
||||
'red': Number(scope.row.最低库存) === 1,
|
||||
'yellow': Number(scope.row.最低库存) === 2
|
||||
}">{{ scope.row.最低库存 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补货数" width="130px" align="center" prop="补货数" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.补货数" :min="1" size="mini" style="margin: 0;width: 100%"/>
|
||||
</template>
|
||||
@@ -692,10 +710,16 @@ export default {
|
||||
background: #D9FFFF!important;
|
||||
}
|
||||
.red {
|
||||
background: #e88383!important;
|
||||
color: #e88383!important;
|
||||
font-weight: bold;
|
||||
}
|
||||
.yellow {
|
||||
background: yellow!important;
|
||||
color: orange!important;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-card__body{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@@ -30,19 +30,27 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select v-model="deadlineStatusValue" style="width:100px;margin-right: 0" placeholder="期限状态" size="small" filterable clearable @change="pageSize=100;pageCurrent=1;searchTable()">
|
||||
<el-option
|
||||
v-for="item in deadlineStatusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="replenishmentManValue" style="width:100px" placeholder="补货人" size="small" clearable @keyup.enter.native="pageSize=100;pageCurrent=1;searchTable()"/>
|
||||
</div>
|
||||
<el-col style="margin-left: 7px;width: 691px">
|
||||
<el-col style="margin-left: 7px;width: 801px">
|
||||
<!-- <el-card>-->
|
||||
<div style="margin-top: 10px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
:row-class-name="rowClassName"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="mini"
|
||||
style="width: 691px;margin-top: 10px"
|
||||
style="width: 801px;margin-top: 10px"
|
||||
height="750"
|
||||
@sort-change="sortChange"
|
||||
@row-click="searchTable1">
|
||||
@@ -61,6 +69,11 @@
|
||||
{{ scope.row.补货日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('日期')" label="补货期限" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.补货期限 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('状态')" label="补货人" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.补货人 }}
|
||||
@@ -176,6 +189,17 @@ export default {
|
||||
value: '入库',
|
||||
label: '入库'
|
||||
}], // 补货状态数组
|
||||
deadlineStatusValue: [],
|
||||
deadlineStatusOptions: [{
|
||||
value: '正常',
|
||||
label: '正常'
|
||||
}, {
|
||||
value: '临期',
|
||||
label: '临期'
|
||||
}, {
|
||||
value: '超期',
|
||||
label: '超期'
|
||||
}], // 补货期限数组
|
||||
replenishmentManValue: '', // 补货人
|
||||
dateRange: '', // 提交日期
|
||||
loading: false, // 数据加载
|
||||
@@ -236,6 +260,7 @@ export default {
|
||||
param[8] = ['补货单号_check', orderValue_check]
|
||||
param[9] = ['排序名称', this.orderName]
|
||||
param[10] = ['排序方式', this.order]
|
||||
param[11] = ['期限状态', this.deadlineStatusValue]
|
||||
var Data = this.CreateData('11', '仓储管理_补货信息_查询', param, this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
console.log('补货信息查询', response.data)
|
||||
@@ -301,8 +326,31 @@ export default {
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
rowClassName({ row, rowIndex }) {
|
||||
console.log(row)
|
||||
if (row.期限状态 === '超期') {
|
||||
return 'overdue-row'
|
||||
} else if (row.期限状态 === '临期') {
|
||||
return 'near-due-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 超期行:纯红背景,覆盖斑马纹和 hover */
|
||||
.el-table .overdue-row,
|
||||
.el-table .overdue-row td {
|
||||
background: #e79696!important;
|
||||
}
|
||||
|
||||
/* 临期行:黄色背景,覆盖斑马纹和 hover */
|
||||
.el-table .near-due-row,
|
||||
.el-table .near-due-row td {
|
||||
background: rgb(223, 223, 137)!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="500" content="删除调拨单" effect="dark" placement="top">
|
||||
<el-button
|
||||
:disabled="(Number(scope.row.单据状态) > 1) || (jobNumber != '1002')"
|
||||
:disabled="(Number(scope.row.单据状态) > 1) || (jobNumber != '2009')"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
|
||||
481
src/views/WarehouseManagement/WarehouseSummary/index.vue
Normal file
481
src/views/WarehouseManagement/WarehouseSummary/index.vue
Normal file
@@ -0,0 +1,481 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 20px; margin-bottom: 20px">
|
||||
<h2 style="text-align: center; margin-bottom: 20px">仓储汇总</h2>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('待入库')">
|
||||
<div class="stat-number">{{ statistics.待入库 }}</div>
|
||||
<div class="stat-label">待入库</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('待出库')">
|
||||
<div class="stat-number">{{ statistics.待出库 }}</div>
|
||||
<div class="stat-label">待出库</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('可出库')">
|
||||
<div class="stat-number">{{ statistics.可出库 }}</div>
|
||||
<div class="stat-label">可出库</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 20px">
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('补货中')">
|
||||
<div class="stat-number">{{ statistics.补货中 }}</div>
|
||||
<div class="stat-label">补货中</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('生产中')">
|
||||
<div class="stat-number">{{ statistics.生产中 }}</div>
|
||||
<div class="stat-label">生产中</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="stat-card" @click.native="showDetail('待投产')">
|
||||
<div class="stat-number">{{ statistics.待投产 }}</div>
|
||||
<div class="stat-label">待投产</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<h3 style="margin-bottom: 10px">{{ currentDetail }}详情</h3>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="detailData"
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
height="400">
|
||||
<el-table-column
|
||||
v-for="(column, index) in detailColumns"
|
||||
:key="index"
|
||||
:width="column.width"
|
||||
:label="column.label"
|
||||
:align="column.align">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[column.prop] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
statistics: {
|
||||
待入库: 0,
|
||||
待出库: 0,
|
||||
可出库: 0,
|
||||
补货中: 0,
|
||||
生产中: 0,
|
||||
待投产: 0
|
||||
},
|
||||
currentDetail: '',
|
||||
detailData: [],
|
||||
detailColumns: [],
|
||||
领料单流水号列表: [],
|
||||
statisticsTimer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.getStatistics()
|
||||
// 每半小时运行一次getStatistics
|
||||
this.statisticsTimer = setInterval(() => {
|
||||
this.getStatistics()
|
||||
console.log(1)
|
||||
}, 60 * 1000) // 30分钟 = 30 * 60 * 1000 毫秒
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 清除定时器
|
||||
if (this.statisticsTimer) {
|
||||
clearInterval(this.statisticsTimer)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取统计数据
|
||||
getStatistics() {
|
||||
this.loading = true
|
||||
|
||||
// 待入库数据:采购合同组件中状态为为到货的订单数量
|
||||
this.getPendingInStorage()
|
||||
|
||||
// 待出库数据:物料出库组件中所有领料单还未领的物料种类数量
|
||||
this.getPendingOutStorage()
|
||||
|
||||
// 可出库数据:待出库数据的基础上又库存的数量
|
||||
this.getAvailableOutStorage()
|
||||
|
||||
// 补货中数据:补货件查询组件中状态已到以外的订单数量
|
||||
this.getReplenishing()
|
||||
|
||||
// 生产中数据:补货件查询组件中状态为加工中的订单数量
|
||||
this.getInProduction()
|
||||
|
||||
// 待投产数据:补货件查询组件中状态为未开始的订单数量
|
||||
this.getPendingProduction()
|
||||
|
||||
this.loading = false
|
||||
},
|
||||
|
||||
// 获取待入库数据
|
||||
getPendingInStorage() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
let count = 0
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 === '未到' || item.状态 === '加工中' || item.状态 === '部分到') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.待入库 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待出库数据
|
||||
getPendingOutStorage() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '装配管理_未领完领料单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// 获取领料单流水号
|
||||
this.领料单流水号列表 = response.data.map(item => item.领料单流水号)
|
||||
if (this.领料单流水号列表.length > 0) {
|
||||
// 用领料单流水号查询物料明细
|
||||
var param2 = []
|
||||
param2[0] = ['领料单流水号列表', this.领料单流水号列表]
|
||||
var Data2 = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param2)
|
||||
this.ExecDatabase(Data2).then(response2 => {
|
||||
// 计算物料种类数量
|
||||
let count = 0
|
||||
response2.data.forEach(item => {
|
||||
if (item.已领数 < item.申请数) {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.待出库 = count
|
||||
})
|
||||
} else {
|
||||
this.statistics.待出库 = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取可出库数据
|
||||
getAvailableOutStorage() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '装配管理_未领完领料单_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
// 获取领料单流水号
|
||||
const 领料单流水号列表 = response.data.map(item => item.领料单流水号)
|
||||
|
||||
if (领料单流水号列表.length > 0) {
|
||||
// 用领料单流水号查询物料明细
|
||||
var param2 = []
|
||||
param2[0] = ['领料单流水号列表', 领料单流水号列表]
|
||||
var Data2 = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param2)
|
||||
this.ExecDatabase(Data2).then(response2 => {
|
||||
// 计算库存数不为0的物料种类数量
|
||||
let count = 0
|
||||
response2.data.forEach(item => {
|
||||
// 假设库存数字段名为"库存"或"库存数量"
|
||||
if (item.已领数 < item.申请数 && item.库存数 > 0) {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.可出库 = count
|
||||
})
|
||||
} else {
|
||||
this.statistics.可出库 = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取补货中数据
|
||||
getReplenishing() {
|
||||
let count = 0
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 !== '已到' && item.状态 !== '完成' && item.状态 !== '已完成' && item.状态 !== '入库' && item.状态 !== '已编制') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.补货中 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 获取生产中数据
|
||||
getInProduction() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
let count = 0
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 === '加工中') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.生产中 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待投产数据
|
||||
getPendingProduction() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
let count = 0
|
||||
response.data.forEach(item => {
|
||||
if (item.状态 === '未开始') {
|
||||
count++
|
||||
}
|
||||
})
|
||||
this.statistics.待投产 = count
|
||||
})
|
||||
},
|
||||
|
||||
// 显示详情
|
||||
showDetail(type) {
|
||||
this.currentDetail = type
|
||||
this.loading = true
|
||||
|
||||
switch (type) {
|
||||
case '待入库':
|
||||
this.getPendingInStorageDetail()
|
||||
break
|
||||
case '待出库':
|
||||
this.getPendingOutStorageDetail()
|
||||
break
|
||||
case '可出库':
|
||||
this.getAvailableOutStorageDetail()
|
||||
break
|
||||
case '补货中':
|
||||
this.getReplenishingDetail()
|
||||
break
|
||||
case '生产中':
|
||||
this.getInProductionDetail()
|
||||
break
|
||||
case '待投产':
|
||||
this.getPendingProductionDetail()
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
// 获取待入库详情
|
||||
getPendingInStorageDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 === '未到' || item.状态 === '加工中' || item.状态 === '部分到')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '补货人', label: '补货人', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '120px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '180px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待出库详情
|
||||
getPendingOutStorageDetail() {
|
||||
var param = []
|
||||
param[0] = ['领料单流水号列表', this.领料单流水号列表]
|
||||
var Data = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => (item.已领数 || 0) < (item.申请数 || 0))
|
||||
this.detailColumns = [
|
||||
{ prop: '领料单号', label: '领料单号', width: '100px', align: 'center' },
|
||||
{ prop: '物料名称', label: '物料名称', width: '150px', align: 'center' },
|
||||
{ prop: '图号或型号', label: '图号或型号', width: '150px', align: 'center' },
|
||||
{ prop: '货位名称', label: '库位', width: '180px', align: 'center' },
|
||||
{ prop: '库存数', label: '库存数', width: '100px', align: 'center' },
|
||||
{ prop: '申请数', label: '申请数', width: '100px', align: 'center' },
|
||||
{ prop: '已领数', label: '已领数', width: '100px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取可出库详情
|
||||
getAvailableOutStorageDetail() {
|
||||
var param = []
|
||||
param[0] = ['领料单流水号列表', this.领料单流水号列表]
|
||||
var Data = this.CreateData('11', '装配管理_领料单明细_查询_汇总', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.已领数 < item.申请数 && item.库存数 > 0)
|
||||
this.detailColumns = [
|
||||
{ prop: '领料单号', label: '领料单号', width: '100px', align: 'center' },
|
||||
{ prop: '物料名称', label: '物料名称', width: '150px', align: 'center' },
|
||||
{ prop: '图号或型号', label: '图号或型号', width: '150px', align: 'center' },
|
||||
{ prop: '货位名称', label: '库位', width: '180px', align: 'center' },
|
||||
{ prop: '库存数', label: '库存数', width: '100px', align: 'center' },
|
||||
{ prop: '申请数', label: '申请数', width: '100px', align: 'center' },
|
||||
{ prop: '已领数', label: '已领数', width: '100px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取补货中详情
|
||||
getReplenishingDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 !== '已到' && item.状态 !== '完成' && item.状态 !== '已完成' && item.状态 !== '入库' && item.状态 !== '已编制')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '名称', label: '物料名称', width: '180px', align: 'center' },
|
||||
{ prop: '补货数', label: '补货数量', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '100px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '150px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取生产中详情
|
||||
getInProductionDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 === '加工中')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '名称', label: '物料名称', width: '180px', align: 'center' },
|
||||
{ prop: '补货数', label: '补货数量', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '100px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '150px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 获取待投产详情
|
||||
getPendingProductionDetail() {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '仓储管理_补货件查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.detailData = response.data.filter(item => item.状态 === '未开始')
|
||||
this.detailColumns = [
|
||||
{ prop: '补货单号', label: '补货单号', width: '150px', align: 'center' },
|
||||
{ prop: '名称', label: '物料名称', width: '180px', align: 'center' },
|
||||
{ prop: '补货数', label: '补货数量', width: '100px', align: 'center' },
|
||||
{ prop: '状态', label: '状态', width: '100px', align: 'center' },
|
||||
{ prop: '补货日期', label: '补货日期', width: '150px', align: 'center' },
|
||||
{ prop: '补货期限', label: '补货期限', width: '150px', align: 'center' }
|
||||
]
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.stat-card {
|
||||
height: 120px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 8px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
/* 为不同类型的卡片设置不同的颜色 */
|
||||
.stat-card:nth-child(1) .stat-number {
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(2) .stat-number {
|
||||
color: #ff9800;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(3) .stat-number {
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(4) .stat-number {
|
||||
color: #9c27b0;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(5) .stat-number {
|
||||
color: #e91e63;
|
||||
}
|
||||
|
||||
.stat-card:nth-child(6) .stat-number {
|
||||
color: #607d8b;
|
||||
}
|
||||
</style>
|
||||
1516
src/views/WarehouseManagement/WarehouseVisualization/index.vue
Normal file
1516
src/views/WarehouseManagement/WarehouseVisualization/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user