chore: 初始化南京中车 APP
This commit is contained in:
@@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<div class="container" v-loading.fullscreen.lock="fullscreenLoading">
|
||||
|
||||
<div v-if='!isshow'>
|
||||
<div class="sel" style="margin-top: 120px;">
|
||||
<el-select v-model='车间' placeholder="请选择车间" clearable @change="search">
|
||||
<el-option v-for="(ele,index) in 车间数组" :key='index' :label='ele.text' :value="ele.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="sel">
|
||||
<el-select v-model='产线' placeholder="请选择产线" clearable @change="search2">
|
||||
<el-option v-for="(ele,index) in 产线数组" :key='index' :label='ele.text' :value="ele.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="sel">
|
||||
<el-select v-model='工单' placeholder="请选择工单" clearable @change="show">
|
||||
<el-option v-for="(ele,index) in 工单数组" :key='index' :label='ele.text' :value="ele.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog" v-if="isshow" width="100%" :before-close="handleClose">
|
||||
<div style="float: right;font-size: 24px;color: #409eff;margin-right: 10px;margin-top: 10px;margin-bottom:5px"><i @click='handleClose' class="el-icon-close"></i> </div>
|
||||
<el-table :data="list" stripe border style="width: 100%;font-size: 18px;" max-height="480px"
|
||||
:header-cell-style="{color: '#000',fonSize:'18px'}">
|
||||
<el-table-column prop="物料名称" align="center" label="物料名称" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="物料批次" align="center" label="物料批次" width="110">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已配/应配">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
{{scope.row.已领数量}}/{{scope.row.配送数量}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
|
||||
var requestConfig = window.dt_Config.requestConfig
|
||||
export default {
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.get()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fullscreenLoading: false,
|
||||
车间: '',
|
||||
车间数组: [],
|
||||
工单: "",
|
||||
工单数组: [],
|
||||
产线:'',
|
||||
产线数组:[],
|
||||
isshow: false,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toFixed(num) {
|
||||
if (!isNaN(num)) {
|
||||
return ((num + '').indexOf('.') == -1) ? num : num.toFixed(6);
|
||||
}
|
||||
},
|
||||
init() {},
|
||||
get() {
|
||||
var data = this.CreateData(
|
||||
'Select',
|
||||
'基础表_车间',
|
||||
['车间id', '车间名称'], {}
|
||||
)
|
||||
this.ExecDatabase(data).then(res => {
|
||||
console.log(res)
|
||||
this.车间数组 = res.data.map(item => {
|
||||
return {
|
||||
value: item.车间id,
|
||||
text: item.车间名称
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.工单 = ''
|
||||
this.工单数组 = []
|
||||
this.产线 = ''
|
||||
this.产线数组 = []
|
||||
let data = this.CreateData(
|
||||
'Select',
|
||||
'基础表_产线名称',
|
||||
['产线id', '产线名称'], {
|
||||
where: [{
|
||||
fieldname: '车间id',
|
||||
value: parseInt(this.车间)
|
||||
}]
|
||||
}
|
||||
)
|
||||
this.ExecDatabase(data).then(res=>{
|
||||
this.产线数组 = res.data.map(item => {
|
||||
return {
|
||||
value: item.产线id,
|
||||
text: item.产线名称
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
search2(){
|
||||
this.工单数组 = []
|
||||
this.工单= ''
|
||||
let data2 = this.CreateData(
|
||||
'Select',
|
||||
'工单管理_工单信息视图',
|
||||
['工单id', '工单号'], {
|
||||
where: [{
|
||||
fieldname: '产线id',
|
||||
value: parseInt(this.产线)
|
||||
}]
|
||||
}
|
||||
)
|
||||
this.ExecDatabase(data2).then(res => {
|
||||
this.工单数组 = res.data.map(item => {
|
||||
return {
|
||||
value: item.工单id,
|
||||
text: item.工单号
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
show() {
|
||||
var data = this.CreateData(
|
||||
'Select',
|
||||
'仓储管理_物料配送单明细_视图',
|
||||
[
|
||||
'配送单id',
|
||||
'单据编号',
|
||||
'工单id',
|
||||
'配送单明细id',
|
||||
'物料编码',
|
||||
'规格型号',
|
||||
'物料名称',
|
||||
'单位',
|
||||
'配送数量',
|
||||
'物料批次',
|
||||
'已领数量',
|
||||
'线边已领数量',
|
||||
'生产订单',
|
||||
'生产产线',
|
||||
'车间id',
|
||||
'订单状态',
|
||||
'接收完成',
|
||||
'工位'
|
||||
],
|
||||
{
|
||||
where: [
|
||||
{
|
||||
fieldname: '工单id',
|
||||
value: this.工单,
|
||||
},
|
||||
],
|
||||
fieldOrder: ['配送数量 desc'],
|
||||
}
|
||||
)
|
||||
this.ExecDatabase(data).then((res) => {
|
||||
console.log(res)
|
||||
this.list = res.data
|
||||
})
|
||||
this.isshow = true
|
||||
},
|
||||
handleClose() {
|
||||
this.isshow = false
|
||||
this.list = []
|
||||
}
|
||||
|
||||
},
|
||||
computed: {},
|
||||
components: {},
|
||||
watch: {},
|
||||
props: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sel {
|
||||
width:100%;
|
||||
text-align: center;
|
||||
.el-select{
|
||||
width: 80%;
|
||||
margin: 20px 0;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
border: 1px solid #409eff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
/deep/ .el-input__inner {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
}
|
||||
.dialog{
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
/deep/ .el-input__inner::placeholder {
|
||||
color: #000;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/ .el-select .el-input__inner{
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user