优化
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#################################################
|
#################################################
|
||||||
输入.flag TYPEAS s_string
|
输入.flag TYPEAS s_string
|
||||||
输入.ext_id TYPEAS s_string
|
输入.ext_id TYPEAS s_string
|
||||||
|
输入.material_id TYPEAS s_string
|
||||||
输入.pcsn TYPEAS s_string
|
输入.pcsn TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
@@ -138,3 +139,27 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "6"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
sum(PURCHASE.QTY_ZT) AS notqty,
|
||||||
|
sum(PURCHASE.QTY_HT) AS sumqty,
|
||||||
|
PURCHASE.VBILLCODE AS receive_code,
|
||||||
|
mater.material_code,
|
||||||
|
mater.material_name
|
||||||
|
FROM
|
||||||
|
PURCHASE_CONTRACT_VIEW PURCHASE
|
||||||
|
INNER JOIN md_me_materialbase mater ON PURCHASE.ITEM_ID = mater.ext_id
|
||||||
|
where
|
||||||
|
STATUSFLAG = '3'
|
||||||
|
AND DEL_FLAG = '0'
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
mater.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
GROUP BY PURCHASE.ITEM_ID,PURCHASE.VBILLCODE
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -68,4 +68,35 @@ public class StatisticalReportController {
|
|||||||
return new ResponseEntity<>(statisticalReportService.getHeader2(), HttpStatus.OK);
|
return new ResponseEntity<>(statisticalReportService.getHeader2(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/query1")
|
||||||
|
@Log("查询月生产计划")
|
||||||
|
@ApiOperation("查询月生产计划")
|
||||||
|
public ResponseEntity<Object> query1(@RequestParam Map whereJson){
|
||||||
|
return new ResponseEntity<>(statisticalReportService.
|
||||||
|
query1(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/query2")
|
||||||
|
@Log("查询月生产计划")
|
||||||
|
@ApiOperation("查询月生产计划")
|
||||||
|
public ResponseEntity<Object> query2(@RequestParam Map whereJson){
|
||||||
|
return new ResponseEntity<>(statisticalReportService.
|
||||||
|
query2(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/query3")
|
||||||
|
@Log("查询月生产计划")
|
||||||
|
@ApiOperation("查询月生产计划")
|
||||||
|
public ResponseEntity<Object> query3(@RequestParam Map whereJson){
|
||||||
|
return new ResponseEntity<>(statisticalReportService.
|
||||||
|
query3(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
@GetMapping("/query4")
|
||||||
|
@Log("查询月生产计划")
|
||||||
|
@ApiOperation("查询月生产计划")
|
||||||
|
public ResponseEntity<Object> query4(@RequestParam Map whereJson){
|
||||||
|
return new ResponseEntity<>(statisticalReportService.
|
||||||
|
query4(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,4 +33,12 @@ public interface StatisticalReportService {
|
|||||||
JSONArray getHeader();
|
JSONArray getHeader();
|
||||||
|
|
||||||
JSONArray getHeader2();
|
JSONArray getHeader2();
|
||||||
|
|
||||||
|
JSONArray query1(Map whereJson);
|
||||||
|
|
||||||
|
JSONArray query2(Map whereJson);
|
||||||
|
|
||||||
|
JSONArray query3(Map whereJson);
|
||||||
|
|
||||||
|
JSONArray query4(Map whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,4 +396,54 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
return jonsResuftArr;
|
return jonsResuftArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray query1(Map whereJson) {
|
||||||
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
|
|
||||||
|
String material_id = map.get("material_id");
|
||||||
|
|
||||||
|
JSONArray ja = WQL.getWO("statistical_report_query_02")
|
||||||
|
.addParam("flag", "1")
|
||||||
|
.addParam("material_id", material_id)
|
||||||
|
.process().getResultJSONArray(0);
|
||||||
|
return ja;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray query2(Map whereJson) {
|
||||||
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
|
|
||||||
|
String material_id = map.get("material_id");
|
||||||
|
|
||||||
|
JSONArray ja = WQL.getWO("statistical_report_query_02")
|
||||||
|
.addParam("flag", "2")
|
||||||
|
.addParam("material_id", material_id)
|
||||||
|
.process().getResultJSONArray(0);
|
||||||
|
return ja;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray query3(Map whereJson) {
|
||||||
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
|
|
||||||
|
String material_id = map.get("material_id");
|
||||||
|
|
||||||
|
JSONArray ja = WQL.getWO("QL_ERP")
|
||||||
|
.setDbname("dataSource1")
|
||||||
|
.addParam("flag", "6")
|
||||||
|
.addParam("material_id", material_id)
|
||||||
|
.process().getResultJSONArray(0);
|
||||||
|
return ja;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray query4(Map whereJson) {
|
||||||
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
|
|
||||||
|
JSONArray ja = WQL.getWO("statistical_report_query_02")
|
||||||
|
.addParam("flag", "3")
|
||||||
|
.process().getResultJSONArray(0);
|
||||||
|
return ja;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,134 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 压制性能分页查询
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.begin_time TYPEAS s_string
|
||||||
|
输入.end_time TYPEAS s_string
|
||||||
|
输入.pcsn TYPEAS s_string
|
||||||
|
输入.material_code TYPEAS s_string
|
||||||
|
输入.bill_code TYPEAS s_string
|
||||||
|
输入.io_type TYPEAS s_string
|
||||||
|
输入.buss_type TYPEAS s_string
|
||||||
|
输入.bill_type TYPEAS s_string
|
||||||
|
输入.stor_id TYPEAS s_string
|
||||||
|
输入.deptIds TYPEAS s_string
|
||||||
|
输入.create_mode TYPEAS s_string
|
||||||
|
输入.bill_status TYPEAS s_string
|
||||||
|
输入.material_id TYPEAS s_string
|
||||||
|
输入.org_id TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
structivt.material_id,
|
||||||
|
structivt.pcsn,
|
||||||
|
max( mater.material_code ) AS material_code,
|
||||||
|
max( mater.material_name ) AS material_name,
|
||||||
|
SUM( structivt.canuse_qty ) AS qty
|
||||||
|
FROM
|
||||||
|
st_ivt_structivt structivt
|
||||||
|
INNER JOIN md_me_materialbase mater ON structivt.material_id = mater.material_id
|
||||||
|
WHERE
|
||||||
|
structivt.quality_scode = '01'
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
structivt.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
GROUP BY structivt.material_id,structivt.pcsn
|
||||||
|
order by mater.material_code
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "2"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
dtl.receive_qty - dtl.instor_qty AS noin_qty,
|
||||||
|
dtl.receive_qty,
|
||||||
|
mater.material_code,
|
||||||
|
mater.material_name,
|
||||||
|
dtl.pcsn,
|
||||||
|
dtl.receive_code,
|
||||||
|
dtl.material_id
|
||||||
|
FROM
|
||||||
|
PCS_RC_ReceiveDtl dtl
|
||||||
|
inner JOIN pcs_rc_receivemst mst ON mst.receive_id = dtl.receive_id
|
||||||
|
INNER JOIN md_me_materialbase mater ON dtl.material_id = mater.material_id
|
||||||
|
WHERE
|
||||||
|
mst.is_delete = '0'
|
||||||
|
AND mst.STATUS <> '99'
|
||||||
|
AND dtl.STATUS <> '99'
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
dtl.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
order by mater.material_code
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "3"
|
||||||
|
QUERY
|
||||||
|
SELECT DISTINCT
|
||||||
|
mb.material_id,
|
||||||
|
mb.material_name,
|
||||||
|
mb.material_code
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
wo.material_id
|
||||||
|
FROM
|
||||||
|
pdm_bi_workorder wo
|
||||||
|
WHERE
|
||||||
|
wo.is_delete = '0'
|
||||||
|
AND wo.`status` IN ( '10', '20', '30' )
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
plan.material_id
|
||||||
|
FROM
|
||||||
|
mps_bd_productdailyplan plan
|
||||||
|
WHERE
|
||||||
|
plan.`status` = '01'
|
||||||
|
) a
|
||||||
|
LEFT JOIN md_pd_productbom bom ON bom.material_id = a.material_id
|
||||||
|
LEFT JOIN md_pd_productbomdtl dtl ON dtl.bom_id = bom.bom_id
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||||
|
ORDER BY material_code
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
@@ -22,4 +22,36 @@ export function materPlanDtlQuery(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { getHeader, getHeader2, materPlanDtlQuery }
|
export function query1(params) {
|
||||||
|
return request({
|
||||||
|
url: 'api/statistical/query1',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function query2(params) {
|
||||||
|
return request({
|
||||||
|
url: 'api/statistical/query2',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function query3(params) {
|
||||||
|
return request({
|
||||||
|
url: 'api/statistical/query3',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function query4(params) {
|
||||||
|
return request({
|
||||||
|
url: 'api/statistical/query4',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { getHeader, getHeader2, materPlanDtlQuery, query1, query2, query3, query4 }
|
||||||
|
|||||||
151
mes/qd/src/views/wms/statistics/materPlan/StructIvt2.vue
Normal file
151
mes/qd/src/views/wms/statistics/materPlan/StructIvt2.vue
Normal 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>
|
||||||
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>
|
||||||
147
mes/qd/src/views/wms/statistics/materPlan/StructIvt4.vue
Normal file
147
mes/qd/src/views/wms/statistics/materPlan/StructIvt4.vue
Normal 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>
|
||||||
@@ -49,10 +49,10 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
<el-table-column type="index" label="序号" width="100" align="center" fixed />
|
||||||
<template v-for="(col,index) in cols">
|
<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" />
|
||||||
<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" fixed>
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
@@ -75,6 +75,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -92,8 +95,9 @@ import report from '@/api/wms/statistics/report'
|
|||||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import StructIvt4 from '@/views/wms/statistics/materPlan/StructIvt4'
|
||||||
import pagination from '@crud/Pagination'
|
import StructIvt3 from '@/views/wms/statistics/materPlan/StructIvt3'
|
||||||
|
import StructIvt2 from '@/views/wms/statistics/materPlan/StructIvt2'
|
||||||
import DateRangePicker from '@/components/DateRangePicker'
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
|
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
|
||||||
import { download } from '@/api/data'
|
import { download } from '@/api/data'
|
||||||
@@ -104,7 +108,7 @@ import workorder from '@/api/wms/pdm/workorder'
|
|||||||
const start = new Date()
|
const start = new Date()
|
||||||
export default {
|
export default {
|
||||||
name: 'MaterPlanQuery',
|
name: 'MaterPlanQuery',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
components: { crudOperation, rrOperation, DateRangePicker, StructIvt4, StructIvt2, StructIvt3 },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -129,6 +133,10 @@ export default {
|
|||||||
cols: [],
|
cols: [],
|
||||||
cols2: [],
|
cols2: [],
|
||||||
dtlList: [],
|
dtlList: [],
|
||||||
|
form: {},
|
||||||
|
structshow: false,
|
||||||
|
structshow2: false,
|
||||||
|
structshow3: false,
|
||||||
Depts: [],
|
Depts: [],
|
||||||
statusList: [],
|
statusList: [],
|
||||||
permission: {},
|
permission: {},
|
||||||
@@ -164,7 +172,16 @@ export default {
|
|||||||
})
|
})
|
||||||
return true
|
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) {
|
hand(value) {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user