|
|
|
@ -7,11 +7,11 @@
|
|
|
|
|
<div class="chart">
|
|
|
|
|
<div class="whiteTable">
|
|
|
|
|
<el-table
|
|
|
|
|
:data="tableData"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
max-height="19.13vw"
|
|
|
|
|
:cell-style="{textAlign:'center'}"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:header-cell-style="{textAlign:'center'}"
|
|
|
|
|
max-height="19.13vw"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="序号"
|
|
|
|
@ -20,40 +20,40 @@
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="dispatchCode"
|
|
|
|
|
label="工单编号"
|
|
|
|
|
prop="dispatchCode"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="materialName"
|
|
|
|
|
label="物料名称"
|
|
|
|
|
prop="materialName"
|
|
|
|
|
width="100"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="planAmount"
|
|
|
|
|
label="计划"
|
|
|
|
|
prop="planAmount"
|
|
|
|
|
width="100"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="completeAmount"
|
|
|
|
|
label="实际"
|
|
|
|
|
prop="completeAmount"
|
|
|
|
|
width="100"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="difference"
|
|
|
|
|
label="差异"
|
|
|
|
|
prop="difference"
|
|
|
|
|
width="100"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{scope.row.planAmount -scope.row.completeAmount }}
|
|
|
|
|
{{ scope.row.planAmount - scope.row.completeAmount }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="planDeliveryDate"
|
|
|
|
|
label="交付时间"
|
|
|
|
|
prop="planDeliveryDate"
|
|
|
|
|
width="150"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -63,16 +63,17 @@
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
>
|
|
|
|
|
条码打印
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="getDetail"
|
|
|
|
|
>
|
|
|
|
|
开始
|
|
|
|
|
明细
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -93,11 +94,11 @@
|
|
|
|
|
<div class="chart">
|
|
|
|
|
<div class="whiteTable">
|
|
|
|
|
<el-table
|
|
|
|
|
:data="tableData1"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
max-height="19.13vw"
|
|
|
|
|
:cell-style="{textAlign:'center'}"
|
|
|
|
|
:data="tableData1"
|
|
|
|
|
:header-cell-style="{textAlign:'center'}"
|
|
|
|
|
max-height="19.13vw"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -107,18 +108,18 @@
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="planNumber"
|
|
|
|
|
label="计划编号"
|
|
|
|
|
prop="planNumber"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="workOrderNumber"
|
|
|
|
|
label="工单编号"
|
|
|
|
|
prop="workOrderNumber"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="startTime"
|
|
|
|
|
label="开始时间"
|
|
|
|
|
prop="startTime"
|
|
|
|
|
width="200"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -128,34 +129,34 @@
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
>
|
|
|
|
|
装配
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="getMaterials(scope) "
|
|
|
|
|
>
|
|
|
|
|
领料
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
>
|
|
|
|
|
扫描
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
>
|
|
|
|
|
退料
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
style="color: #f56c6c"
|
|
|
|
|
type="text"
|
|
|
|
|
>
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
@ -183,37 +184,37 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="领料"
|
|
|
|
|
:visible.sync="dialogVisible"
|
|
|
|
|
title="领料"
|
|
|
|
|
width="40%">
|
|
|
|
|
<el-form ref="form" :model="form" label-width="80px">
|
|
|
|
|
<el-form-item label="生产计划">
|
|
|
|
|
<el-input v-model="form.planCode"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="成品" v-show="false">
|
|
|
|
|
<el-form-item v-show="false" label="成品">
|
|
|
|
|
<el-input v-model="form.productId"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="领料类型" v-show="false">
|
|
|
|
|
<el-form-item v-show="false" label="领料类型">
|
|
|
|
|
<el-select v-model="form.taskType" placeholder="请选择领料类型">
|
|
|
|
|
<el-option label="类型一" value="shanghai"></el-option>
|
|
|
|
|
<el-option label="类型二" value="beijing"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="领料仓库" >
|
|
|
|
|
<el-form-item label="领料仓库">
|
|
|
|
|
<el-select v-model="form.warehouseId" placeholder="请选择领料仓库" @change="form.wmsRawOutstockDetailList =[]">
|
|
|
|
|
<el-option v-for="item in warehouseList" :label="item.warehouseName" :value="item.warehouseId"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="领料原因">
|
|
|
|
|
<el-input type="textarea" v-model="form.applyReason"></el-input>
|
|
|
|
|
<el-input v-model="form.applyReason" type="textarea"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="form.wmsRawOutstockDetailList"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
max-height="19.13vw"
|
|
|
|
|
:cell-style="{textAlign:'center'}"
|
|
|
|
|
:data="form.wmsRawOutstockDetailList"
|
|
|
|
|
:header-cell-style="{textAlign:'center'}"
|
|
|
|
|
max-height="19.13vw"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="物料编号"
|
|
|
|
@ -221,20 +222,20 @@
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="materialName"
|
|
|
|
|
label="物料名称"
|
|
|
|
|
prop="materialName"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="planAmount"
|
|
|
|
|
label="领取数量"
|
|
|
|
|
prop="planAmount"
|
|
|
|
|
width="120"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input-number
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
v-model="scope.row.quantityAcquired"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
</el-input-number>
|
|
|
|
|
</template>
|
|
|
|
@ -246,14 +247,14 @@
|
|
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="searchMaterialValue"
|
|
|
|
|
placeholder="输入物料名称搜索"
|
|
|
|
|
size="mini"
|
|
|
|
|
@change="searchMaterial"
|
|
|
|
|
placeholder="输入物料名称搜索"/>
|
|
|
|
|
@change="searchMaterial"/>
|
|
|
|
|
</template>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
type="text"
|
|
|
|
|
>
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
@ -270,7 +271,13 @@
|
|
|
|
|
<script>
|
|
|
|
|
import Chart from '@/components/board/Chart'
|
|
|
|
|
import * as echarts from 'echarts'
|
|
|
|
|
import { getProductPlans} from '@/api/board/firstFloor'
|
|
|
|
|
import {
|
|
|
|
|
getMaterialBoms,
|
|
|
|
|
getWarehouses,
|
|
|
|
|
applyRawOutstock,
|
|
|
|
|
getProductPlans,
|
|
|
|
|
insertProductPlanDetails
|
|
|
|
|
} from '@/api/board/firstFloor'
|
|
|
|
|
|
|
|
|
|
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
|
|
|
|
|
export default {
|
|
|
|
@ -280,14 +287,14 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
searchMaterialValue:'',
|
|
|
|
|
warehouseList:[],
|
|
|
|
|
searchMaterialValue: '',
|
|
|
|
|
warehouseList: [],
|
|
|
|
|
form: {
|
|
|
|
|
warehouseId: '',
|
|
|
|
|
planCode: '',
|
|
|
|
|
applyReason: '',
|
|
|
|
|
productId:''||2,
|
|
|
|
|
planDetailCode:''||1,
|
|
|
|
|
productId: '' || 2,
|
|
|
|
|
planDetailCode: '' || 1,
|
|
|
|
|
taskType: '1',
|
|
|
|
|
wmsRawOutstockDetailList: []
|
|
|
|
|
},
|
|
|
|
@ -295,7 +302,7 @@ export default {
|
|
|
|
|
materialId: '',
|
|
|
|
|
materialName: '',
|
|
|
|
|
planAmount: '',
|
|
|
|
|
quantityAcquired:0,
|
|
|
|
|
quantityAcquired: 0,
|
|
|
|
|
},
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
addDialogVisible: false,
|
|
|
|
@ -342,10 +349,18 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
getProductPlans().then(e=>{
|
|
|
|
|
getProductPlans().then(e => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.tableData = e.data
|
|
|
|
|
})
|
|
|
|
|
insertProductPlanDetails({
|
|
|
|
|
"planId": 1,
|
|
|
|
|
"planAmount": 1,
|
|
|
|
|
"materialId": 1,
|
|
|
|
|
"materialBomId": 1
|
|
|
|
|
}).then(e => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
})
|
|
|
|
|
this.$refs.chart2.setData({
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
@ -510,32 +525,49 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getDetail() {
|
|
|
|
|
if(true){
|
|
|
|
|
this.$alert('这是一段内容', '标题名称', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
callback: action => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: `action: ${ action }`
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getMaterials(val) {
|
|
|
|
|
this.searchMaterialValue = ''
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
this.form = {
|
|
|
|
|
warehouseId: '',
|
|
|
|
|
planCode: val.row.planNumber,
|
|
|
|
|
productId:''||2,
|
|
|
|
|
planDetailCode:''||1,
|
|
|
|
|
productId: '' || 2,
|
|
|
|
|
planDetailCode: '' || 1,
|
|
|
|
|
applyReason: '',
|
|
|
|
|
taskType: '1',
|
|
|
|
|
wmsRawOutstockDetailList: []
|
|
|
|
|
}
|
|
|
|
|
getWarehouses({
|
|
|
|
|
warehouseFloor:1
|
|
|
|
|
}).then(e=>{
|
|
|
|
|
warehouseFloor: 1
|
|
|
|
|
}).then(e => {
|
|
|
|
|
this.warehouseList = e.data
|
|
|
|
|
this.form.warehouseId = e.data[0]?.warehouseId
|
|
|
|
|
})
|
|
|
|
|
getMaterialBoms({
|
|
|
|
|
ancestors:1,
|
|
|
|
|
}).then(e=>{
|
|
|
|
|
this.form.wmsRawOutstockDetailList = e.data.map(r=>{
|
|
|
|
|
ancestors: 1,
|
|
|
|
|
}).then(e => {
|
|
|
|
|
this.form.wmsRawOutstockDetailList = e.data.map(r => {
|
|
|
|
|
return {
|
|
|
|
|
materialId:r.materialId,
|
|
|
|
|
materialName:r.materialName,
|
|
|
|
|
planAmount:0,
|
|
|
|
|
materialId: r.materialId,
|
|
|
|
|
materialName: r.materialName,
|
|
|
|
|
planAmount: 0,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
@ -545,9 +577,9 @@ export default {
|
|
|
|
|
this.form.wmsRawOutstockDetailList.push(this.form2)
|
|
|
|
|
},
|
|
|
|
|
receiveMaterial() {
|
|
|
|
|
applyRawOutstock(this.form).then(e=>{
|
|
|
|
|
applyRawOutstock(this.form).then(e => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
if(e.code === 200){
|
|
|
|
|
if (e.code === 200) {
|
|
|
|
|
this.dialogVisible = false
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '领料完成',
|
|
|
|
@ -556,17 +588,17 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
searchMaterial(val){
|
|
|
|
|
searchMaterial(val) {
|
|
|
|
|
console.log(val)
|
|
|
|
|
getMaterialBoms({
|
|
|
|
|
ancestors:1,
|
|
|
|
|
materialName:val
|
|
|
|
|
}).then(e=>{
|
|
|
|
|
this.form.wmsRawOutstockDetailList = e.data.map(r=>{
|
|
|
|
|
ancestors: 1,
|
|
|
|
|
materialName: val
|
|
|
|
|
}).then(e => {
|
|
|
|
|
this.form.wmsRawOutstockDetailList = e.data.map(r => {
|
|
|
|
|
return {
|
|
|
|
|
materialId:r.materialId,
|
|
|
|
|
materialName:r.materialName,
|
|
|
|
|
planAmount:0,
|
|
|
|
|
materialId: r.materialId,
|
|
|
|
|
materialName: r.materialName,
|
|
|
|
|
planAmount: 0,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|