diff --git a/src/views/report/WIPInquiryReport/index.vue b/src/views/report/WIPInquiryReport/index.vue
index c681815..50c623b 100644
--- a/src/views/report/WIPInquiryReport/index.vue
+++ b/src/views/report/WIPInquiryReport/index.vue
@@ -2,26 +2,26 @@
-
+
-
+
-
+
-
-
+
+
+
+ -
+
+
-
-
-
搜索
@@ -63,33 +61,33 @@
-
-
-
-
-
-
-
-
-
-
+
+ 合计数量:{{ totalSum }}
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- {{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}
-
-
-
-
-
-
+
+
+
+
+
+
+
import {
- productionExecutionReportList
+ WIPInquiryReportList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
@@ -138,6 +136,8 @@ export default {
showSearch: true,
// 总条数
total: 0,
+ //合计数量
+ totalSum: 0,
// 报表表格数据
reportList: [],
// 弹出层标题
@@ -152,11 +152,14 @@ export default {
// pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
- WORK_CENTER_CODE: null,
- PRODUCT_LINE_NAME: null,
+ productLineCode: 'CX_02',
+ beginStationCode: null,
+ endStationCode: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
+ PRODUCT_CODE: null,
+ PRODUCT_NAME: null,
BEGIN_DATE: null
},
// 表单参数
@@ -165,13 +168,14 @@ export default {
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
- { key: 1, label: `工位`, visible: true },
- { key: 2, label: `订单编号`, visible: true },
- { key: 3, label: `物料编码`, visible: true },
- { key: 4, label: `物料名称`, visible: true },
- { key: 5, label: `产品编码`, visible: true },
- { key: 6, label: `产品型号`, visible: true },
- { key: 7, label: `数量`, visible: true },
+ { key: 1, label: `产线`, visible: true },
+ { key: 2, label: `工位`, visible: true },
+ { key: 3, label: `订单编号`, visible: true },
+ { key: 4, label: `物料编号`, visible: true },
+ { key: 5, label: `物料名称`, visible: true },
+ { key: 6, label: `产品编号`, visible: true },
+ { key: 7, label: `产品名称`, visible: true },
+ { key: 8, label: `数量`, visible: true },
],
// 产线选项
productLineList: [],
@@ -179,13 +183,20 @@ export default {
findStationList: []
}
},
+ watch: {
+ 'queryParams.productLineCode': function(newVal, oldVal) {
+ // 执行方法,可以在这里调用你的方法
+ this.getStationList()
+ }
+ },
created() {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
+ }).then(() => {
+ return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode })
+ }).then(response => {
+ this.findStationList = response.data
})
- findProductLineList({productLineType: 2}).then(response => {
- this.findStationList = response.data;
- });
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate
this.daterangeBeginTime[1] = nowDate
@@ -195,15 +206,12 @@ export default {
/** 查询工单信息列表 */
getList() {
this.loading = true
- if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
- this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
- this.queryParams.endBeginTime = this.daterangeBeginTime[1]
- } else {
- this.queryParams.beginBeginTime = null
- this.queryParams.endBeginTime = null
- }
- productionExecutionReportList(this.queryParams).then(response => {
+ WIPInquiryReportList(this.queryParams).then(response => {
this.reportList = response.data
+ this.totalSum = 0;
+ this.reportList.forEach(e => {
+ this.totalSum += e.COMP_AMOUNT
+ })
// this.total = response.total;
this.loading = false
})
@@ -217,11 +225,13 @@ export default {
reset() {
this.daterangeBeginTime = []
this.form = {
- WORK_CENTER_CODE: null,
- PRODUCT_LINE_NAME: null,
+ beginStationCode: null,
+ endStationCode: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
+ PRODUCT_CODE: null,
+ PRODUCT_NAME: null,
BEGIN_DATE: null
}
this.resetForm('form')
@@ -236,9 +246,20 @@ export default {
this.resetForm('queryForm')
this.handleQuery()
},
+
/** 查看明细 */
handleOrderDetails(row) {
- this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE});
+ this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE })
+ },
+
+ /** 获取工位方法 */
+ getStationList() {
+ this.queryParams.beginStationCode = null;
+ this.queryParams.endStationCode = null;
+ findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode })
+ .then(response => {
+ this.findStationList = response.data
+ })
},
// 多选框选中数据
diff --git a/src/views/report/productionExecutionReport/index.vue b/src/views/report/productionExecutionReport/index.vue
index 99f1645..74d6bb0 100644
--- a/src/views/report/productionExecutionReport/index.vue
+++ b/src/views/report/productionExecutionReport/index.vue
@@ -63,30 +63,34 @@
-
-
-
-
-
-
-
-
-
-
+
+ 合计数量:{{ totalSum }}
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
@@ -134,6 +138,8 @@ export default {
showSearch: true,
// 总条数
total: 0,
+ //合计数量
+ totalSum: 0,
// 报表表格数据
reportList: [],
// 弹出层标题
@@ -144,8 +150,8 @@ export default {
daterangeBeginTime: [],
// 查询参数
queryParams: {
- pageNum: 1,
- pageSize: 10,
+ // pageNum: 1,
+ // pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
productLineCode: 'CX_02',
@@ -170,8 +176,7 @@ export default {
{ key: 5, label: `物料名称`, visible: true },
{ key: 6, label: `产品编号`, visible: true },
{ key: 7, label: `产品名称`, visible: true },
- { key: 8, label: `数量`, visible: true },
- { key: 9, label: `数量`, visible: true }
+ { key: 8, label: `数量`, visible: true }
],
// 产线选项
productLineList: [],
@@ -210,8 +215,12 @@ export default {
this.queryParams.endBeginTime = null
}
productionExecutionReportList(this.queryParams).then(response => {
- this.reportList = response.rows
- this.total = response.total
+ this.reportList = response.data
+ this.totalSum = 0;
+ this.reportList.forEach(e => {
+ this.totalSum += e.COMP_AMOUNT
+ })
+ // this.total = response.total
this.loading = false
})
},
@@ -234,22 +243,26 @@ export default {
}
this.resetForm('form')
},
+
/** 搜索按钮操作 */
handleQuery() {
// this.queryParams.pageNum = 1;
this.getList()
},
+
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
+
/** 查看明细 */
handleOrderDetails(row) {
this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE })
},
/** 获取工位方法 */
getStationList() {
+ this.queryParams.stationCode = null
findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode })
.then(response => {
this.findStationList = response.data