修改生产界面

master
夜笙歌 1 year ago
parent 2b4b139cdf
commit 78c92e8756

@ -8,3 +8,35 @@ export function getProductPlans(query) {
params: query params: query
}) })
} }
export function insertProductPlanDetails(query) {
return request({
url: '/mes/api/insertProductPlanDetails',
method: 'post',
data: query
})
}
export function getMaterialBoms(query) {
return request({
url: '/mes/api/getMaterialBoms',
method: 'get',
params: query
})
}
export function getWarehouses(query) {
return request({
url: '/wms/api/getWarehouses',
method: 'get',
params: query
})
}
export function applyRawOutstock(query) {
return request({
url: '/wms/api/applyRawOutstock',
method: 'post',
data: query
})
}

@ -7,11 +7,11 @@
<div class="chart"> <div class="chart">
<div class="whiteTable"> <div class="whiteTable">
<el-table <el-table
:data="tableData"
style="width: 100%"
max-height="19.13vw"
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="tableData"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
max-height="19.13vw"
style="width: 100%"
> >
<el-table-column <el-table-column
label="序号" label="序号"
@ -20,31 +20,31 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="dispatchCode"
label="工单编号" label="工单编号"
prop="dispatchCode"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="materialName"
label="物料名称" label="物料名称"
prop="materialName"
width="100" width="100"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="planAmount"
label="计划" label="计划"
prop="planAmount"
width="100" width="100"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="completeAmount"
label="实际" label="实际"
prop="completeAmount"
width="100" width="100"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="difference"
label="差异" label="差异"
prop="difference"
width="100" width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -52,8 +52,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="planDeliveryDate"
label="交付时间" label="交付时间"
prop="planDeliveryDate"
width="150" width="150"
> >
</el-table-column> </el-table-column>
@ -63,16 +63,17 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text"
size="small" size="small"
type="text"
> >
条码打印 条码打印
</el-button> </el-button>
<el-button <el-button
type="text"
size="small" size="small"
type="text"
@click="getDetail"
> >
开始 明细
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -93,11 +94,11 @@
<div class="chart"> <div class="chart">
<div class="whiteTable"> <div class="whiteTable">
<el-table <el-table
:data="tableData1"
style="width: 100%"
max-height="19.13vw"
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="tableData1"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
max-height="19.13vw"
style="width: 100%"
> >
<el-table-column <el-table-column
@ -107,18 +108,18 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="planNumber"
label="计划编号" label="计划编号"
prop="planNumber"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="workOrderNumber"
label="工单编号" label="工单编号"
prop="workOrderNumber"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="startTime"
label="开始时间" label="开始时间"
prop="startTime"
width="200" width="200"
> >
</el-table-column> </el-table-column>
@ -128,34 +129,34 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text"
size="small" size="small"
type="text"
> >
装配 装配
</el-button> </el-button>
<el-button <el-button
type="text"
size="small" size="small"
type="text"
@click="getMaterials(scope) " @click="getMaterials(scope) "
> >
领料 领料
</el-button> </el-button>
<el-button <el-button
type="text"
size="small" size="small"
type="text"
> >
扫描 扫描
</el-button> </el-button>
<el-button <el-button
type="text"
size="small" size="small"
type="text"
> >
退料 退料
</el-button> </el-button>
<el-button <el-button
type="text"
size="small" size="small"
style="color: #f56c6c" style="color: #f56c6c"
type="text"
> >
删除 删除
</el-button> </el-button>
@ -183,17 +184,17 @@
</div> </div>
<el-dialog <el-dialog
title="领料"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
title="领料"
width="40%"> width="40%">
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item label="生产计划"> <el-form-item label="生产计划">
<el-input v-model="form.planCode"></el-input> <el-input v-model="form.planCode"></el-input>
</el-form-item> </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-input v-model="form.productId"></el-input>
</el-form-item> </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-select v-model="form.taskType" placeholder="请选择领料类型">
<el-option label="类型一" value="shanghai"></el-option> <el-option label="类型一" value="shanghai"></el-option>
<el-option label="类型二" value="beijing"></el-option> <el-option label="类型二" value="beijing"></el-option>
@ -205,15 +206,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="领料原因"> <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-item>
</el-form> </el-form>
<el-table <el-table
:data="form.wmsRawOutstockDetailList"
style="width: 100%"
max-height="19.13vw"
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="form.wmsRawOutstockDetailList"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
max-height="19.13vw"
style="width: 100%"
> >
<el-table-column <el-table-column
label="物料编号" label="物料编号"
@ -221,20 +222,20 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="materialName"
label="物料名称" label="物料名称"
prop="materialName"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="planAmount"
label="领取数量" label="领取数量"
prop="planAmount"
width="120" width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
style="width: 100%"
controls-position="right"
v-model="scope.row.quantityAcquired" v-model="scope.row.quantityAcquired"
controls-position="right"
style="width: 100%"
> >
</el-input-number> </el-input-number>
</template> </template>
@ -246,14 +247,14 @@
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<el-input <el-input
v-model="searchMaterialValue" v-model="searchMaterialValue"
placeholder="输入物料名称搜索"
size="mini" size="mini"
@change="searchMaterial" @change="searchMaterial"/>
placeholder="输入物料名称搜索"/>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text"
size="small" size="small"
type="text"
> >
删除 删除
</el-button> </el-button>
@ -270,7 +271,13 @@
<script> <script>
import Chart from '@/components/board/Chart' import Chart from '@/components/board/Chart'
import * as echarts from 'echarts' 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 const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default { export default {
@ -346,6 +353,14 @@ export default {
console.log(e) console.log(e)
this.tableData = e.data this.tableData = e.data
}) })
insertProductPlanDetails({
"planId": 1,
"planAmount": 1,
"materialId": 1,
"materialBomId": 1
}).then(e => {
console.log(e)
})
this.$refs.chart2.setData({ this.$refs.chart2.setData({
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -510,6 +525,23 @@ export default {
}) })
}, },
methods: { methods: {
getDetail() {
if(true){
this.$alert('这是一段内容', '标题名称', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${ action }`
});
}
});
}else{
}
},
getMaterials(val) { getMaterials(val) {
this.searchMaterialValue = '' this.searchMaterialValue = ''
this.dialogVisible = true this.dialogVisible = true

@ -126,12 +126,10 @@ export default {
// this.loginForm.stationId = this.$route?.query?.station || ''; // this.loginForm.stationId = this.$route?.query?.station || '';
if (this.$route?.query?.isStationId === 'true') { if (this.$route?.query?.isStationId === 'true') {
this.isStationId = true this.isStationId = true
}
},
mounted() {
getStations().then(e => { getStations().then(e => {
this.options = e.data this.options = e.data
}) })
}
}, },
methods: { methods: {
getCode() { getCode() {
@ -168,8 +166,9 @@ export default {
} }
this.$store.dispatch("Login", this.loginForm).then(() => { this.$store.dispatch("Login", this.loginForm).then(() => {
let data = this.options.find(v=>v.stationId === this.loginForm.stationId) || {} let data = this.options.find(v=>v.stationId === this.loginForm.stationId) || {}
let routeData = this.floorData.find(v=>v.floor === data.floor && v.processId === data.processId) let routeData = this.floorData.find(v=>v.floor === data.floor && v.processId === data.processId) || {}
console.log(routeData) // this.$router.push({path: this.redirect || "/"}).catch(() => {
// });
this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => { this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => {
}); });
}).catch(() => { }).catch(() => {

Loading…
Cancel
Save