This commit is contained in:
zds
2022-12-05 21:12:56 +08:00
parent 8f14b98765
commit dd366c7322
10 changed files with 753 additions and 8 deletions

View File

@@ -0,0 +1,151 @@
<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="pcsn" label="批次" min-width="100" />
<el-table-column prop="receive_qty" label="订单重量" min-width="100" :formatter="crud.formatNum2" />
<el-table-column prop="noin_qty" 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: 'StructIvt4',
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.query2(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.query2(this.queryrow).then(res => {
this.tableDtl = res
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
})
},
MyQuery2() {
this.fullscreenLoading = true
report.query2(this.queryrow).then(res => {
this.tableDtl = res
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
})
}
}
}
</script>

View 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>

View File

@@ -0,0 +1,147 @@
<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="dragTable"
: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="material_code" label="物料编码" min-width="150" />
<el-table-column prop="material_name" label="物料名称" min-width="150" />
<el-table-column prop="pcsn" label="批次" min-width="100" />
<el-table-column prop="qty" 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: 'StructIvt4',
mixins: [header()],
props: {
dialogShow: {
type: Boolean,
default: false
},
rowmst: {
type: Object
}
},
data() {
return {
dialogVisible: false,
tableDtl: [],
XLList: [],
fullscreenLoading: false,
queryrow: { material_id: '' },
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.query1(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.query1(this.queryrow).then(res => {
this.tableDtl = res
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
})
},
MyQuery2() {
this.fullscreenLoading = true
report.query1(this.queryrow).then(res => {
this.tableDtl = res
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
})
}
}
}
</script>

View File

@@ -49,10 +49,10 @@
>
<el-table-column type="index" label="序号" width="100" align="center" fixed />
<template v-for="(col,index) in cols">
<el-table-column v-if="col.prop !== 'first'" :prop="col.prop" :label="col.label" width="120px" />
<el-table-column v-if="col.prop === 'first'" :prop="col.prop" :label="col.label" width="120px" fixed>
<el-table-column v-if="col.prop !== 'first'" :prop="col.prop" :label="col.label" width="120px" />
<el-table-column v-if="col.prop === 'first'" :prop="col.prop" :label="col.label" width="120px" fixed>
<template slot-scope="scope">
<el-link type="warning" @click="open2()">{{ scope.row.first }}</el-link>
<el-link type="warning" @click="open2(scope.$index, scope.row)">{{ scope.row.first }}</el-link>
</template>
</el-table-column>
</template>
@@ -75,6 +75,9 @@
</template>
</el-table>
<!--分页组件-->
<StructIvt4 ref="child" :dialog-show.sync="structshow" :rowmst="form" />
<StructIvt3 ref="child3" :dialog-show.sync="structshow3" :rowmst="form" />
<StructIvt2 ref="child2" :dialog-show.sync="structshow2" :rowmst="form" />
</div>
</div>
</template>
@@ -92,8 +95,9 @@ import report from '@/api/wms/statistics/report'
import CRUD, { presenter, header, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import StructIvt4 from '@/views/wms/statistics/materPlan/StructIvt4'
import StructIvt3 from '@/views/wms/statistics/materPlan/StructIvt3'
import StructIvt2 from '@/views/wms/statistics/materPlan/StructIvt2'
import DateRangePicker from '@/components/DateRangePicker'
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
import { download } from '@/api/data'
@@ -104,7 +108,7 @@ import workorder from '@/api/wms/pdm/workorder'
const start = new Date()
export default {
name: 'MaterPlanQuery',
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
components: { crudOperation, rrOperation, DateRangePicker, StructIvt4, StructIvt2, StructIvt3 },
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({
@@ -129,6 +133,10 @@ export default {
cols: [],
cols2: [],
dtlList: [],
form: {},
structshow: false,
structshow2: false,
structshow3: false,
Depts: [],
statusList: [],
permission: {},
@@ -164,7 +172,16 @@ export default {
})
return true
},
open2() {
open2(index, row) {
if (row.first === '库存现存量') {
this.structshow = true
}
if (row.first === '待检入库量') {
this.structshow2 = true
}
if (row.first === '合同在途') {
this.structshow3 = true
}
},
hand(value) {
this.crud.toQuery()