优化
This commit is contained in:
150
mes/qd/src/views/wms/statistics/materPlan/StructIvt3.vue
Normal file
150
mes/qd/src/views/wms/statistics/materPlan/StructIvt3.vue
Normal file
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="合同在途"
|
||||
:visible.sync="dialogVisible"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
物料:<el-select
|
||||
v-model="queryrow.material_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择物料"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="MyQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in XLList"
|
||||
:key="item.material_id"
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="success" @click="MyQuery2">查询</el-button>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="receive_code" label="合同号" min-width="100" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" />
|
||||
<el-table-column prop="sumqty" label="合同重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="notqty" label="在途重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { header } from '@crud/crud'
|
||||
import report from '@/api/wms/statistics/report'
|
||||
|
||||
export default {
|
||||
name: 'StructIvt3',
|
||||
mixins: [header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
fullscreenLoading: false,
|
||||
queryrow: { material_id: '' },
|
||||
sortable: null,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue, oldValue) {
|
||||
this.queryrow = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
report.query4().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
this.queryStruct()
|
||||
},
|
||||
/**
|
||||
* 接受父组件传值
|
||||
* @param msg
|
||||
*/
|
||||
getMsg(msg) {
|
||||
this.queryrow = msg
|
||||
},
|
||||
queryStruct() {
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.queryrow.material_id = ''
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
MyQuery(value) {
|
||||
this.queryrow.material_id = value
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
MyQuery2() {
|
||||
this.fullscreenLoading = true
|
||||
report.query3(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
this.fullscreenLoading = false
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user