@@ -105,7 +104,7 @@
-
-
-
-
-
- {{ scope.row.planAmount - scope.row.completeAmount }}
-
-
-
-
-
-
-
- 条码打印
-
-
- 明细
-
-
@@ -192,11 +149,14 @@
@@ -295,7 +255,7 @@
-
-
-
-
- {{ scope.row.planAmount - scope.row.completeAmount }}
-
-
-
-
-
-
-
- 条码打印
-
-
- 明细
-
-
-
@@ -648,6 +566,7 @@ export default {
},
data() {
return {
+ info: {},
fileList: [],
SOPModel: false,
pictureDetailModel: false,
@@ -665,6 +584,7 @@ export default {
totalNum3: 0,
nowNum4: 1,
totalNum4: 0,
+ materialBomId:null,
planId: null,
nowMaterial: null,
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
@@ -674,6 +594,8 @@ export default {
dialogVisible: false,
tableData: [],
tableData1: [],
+ tableData2: [],
+ tableData3: [],
productInstockVisible: false,
productInstockForm: {
@@ -712,185 +634,25 @@ export default {
}
},
mounted() {
- setInterval(() => {
- this.$notify.info({
- title: '通知',
- message: '通知公告',
- position: 'bottom-right',
- duration: 0
- });
- }, 60 * 1000)
+ // setInterval(() => {
+ // this.$notify.info({
+ // title: '通知',
+ // message: '通知公告',
+ // position: 'bottom-right',
+ // duration: 0
+ // });
+ // }, 60 * 1000)
getProductPlans({pageNum: 1, pageSize: 5}).then(e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
this.nowMaterial = e.rows?.[0]?.materialName
+ this.materialBomId = e.rows?.[0]?.materialBomId
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => {
this.tableData1 = res.rows
- this.totalNum2 = Math.ceil(res.total / 5)
+ this.totalNum3 = Math.ceil(res.total / 5)
+ this.$refs.table.setCurrentRow(res.rows[0]);
})
})
- this.$refs.chart2.setData({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- left: '0',
- right: '4%',
- bottom: '0',
- top: 20,
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: [1, 2, 3, 4, 5, 6],
- axisLine: {
- lineStyle: {
- color: 'white'
- }
- },
- axisLabel: {
- // interval: 0,
- // rotate: 40,
- textStyle: {
- fontFamily: 'Microsoft YaHei'
- }
- }
- },
-
- yAxis: {
- type: 'value',
- axisLine: {
- show: false,
- lineStyle: {
- color: 'white'
- }
- },
- splitLine: {
- show: false
- },
- axisLabel: {}
- },
- series: [
- {
- name: '数量',
- label: {
- normal: {
- show: true,
- position: 'top',
- textStyle: {
- color: '#a8aab0',
- fontStyle: 'normal',
- fontFamily: '微软雅黑',
- fontSize: 0.75 * vw
- }
- }
- },
- type: 'bar',
- barWidth: '30%',
- barMaxWidth: 50,
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: '#39ffff'
- },
- {
- offset: 1,
- color: '#5affa6'
- }
- ])
- }
- },
- data: [1, 2, 3, 4, 5, 6]
- }
- ]
- })
- this.$refs.chart4.setData({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- left: '0',
- right: '4%',
- bottom: '0',
- top: 20,
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: [1, 2, 3, 4, 5, 6],
- axisLine: {
- lineStyle: {
- color: 'white'
- }
- },
- axisLabel: {
- // interval: 0,
- // rotate: 40,
- textStyle: {
- fontFamily: 'Microsoft YaHei'
- }
- }
- },
-
- yAxis: {
- type: 'value',
- axisLine: {
- show: false,
- lineStyle: {
- color: 'white'
- }
- },
- splitLine: {
- show: false
- },
- axisLabel: {}
- },
- series: [
- {
- name: '数量',
- label: {
- normal: {
- show: true,
- position: 'top',
- textStyle: {
- color: '#a8aab0',
- fontStyle: 'normal',
- fontFamily: '微软雅黑',
- fontSize: 0.75 * vw
- }
- }
- },
- type: 'bar',
- barWidth: '30%',
- barMaxWidth: 50,
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0,
- color: '#39ffff'
- },
- {
- offset: 1,
- color: '#5affa6'
- }
- ])
- }
- },
- data: [1, 2, 3, 4, 5, 6]
- }
- ]
- })
},
methods: {
@@ -922,16 +684,26 @@ export default {
},
next2() {
this.nowNum2 += 1
- getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: this.planId}).then(res => {
- this.tableData1 = res.rows
- this.totalNum2 = Math.ceil(res.total / 5)
+ selectMaterialInstallationCircumstance({
+ installType: 1,
+ planDetailId: this.info.planDetailId,
+ pageNum: this.nowNum2,
+ pageSize: 5
+ }).then(v => {
+ this.tableData2 = v.rows
+ this.totalNum2 = Math.ceil(v.total / 5)
})
},
pre2() {
this.nowNum2 -= 1
- getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: this.planId}).then(res => {
- this.tableData1 = res.rows
- this.totalNum2 = Math.ceil(res.total / 5)
+ selectMaterialInstallationCircumstance({
+ installType: 1,
+ planDetailId: this.info.planDetailId,
+ pageNum: this.nowNum2,
+ pageSize: 5
+ }).then(v => {
+ this.tableData2 = v.rows
+ this.totalNum2 = Math.ceil(v.total / 5)
})
},
next3() {
@@ -950,16 +722,28 @@ export default {
},
next4() {
this.nowNum4 += 1
- getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => {
- this.tableData1 = res.rows
- this.totalNum4 = Math.ceil(res.total / 5)
+ selectMaterialInstallationCircumstance({
+ installType: 2,
+ materialBomId: this.materialBomId,
+ planDetailId: this.info.planDetailId,
+ pageNum: this.nowNum4,
+ pageSize: 5
+ }).then(v => {
+ this.tableData3 = v.rows
+ this.totalNum4 = Math.ceil(v.total / 5)
})
},
pre4() {
this.nowNum4 -= 1
- getProductPlanDetails({pageNum: this.nowNum4, pageSize: 5, planId: this.planId}).then(res => {
- this.tableData1 = res.rows
- this.totalNum4 = Math.ceil(res.total / 5)
+ selectMaterialInstallationCircumstance({
+ installType: 2,
+ materialBomId: this.materialBomId,
+ planDetailId: this.info.planDetailId,
+ pageNum: this.nowNum4,
+ pageSize: 5
+ }).then(v => {
+ this.tableData3 = v.rows
+ this.totalNum4 = Math.ceil(v.total / 5)
})
},
// 开始/继续计划
@@ -1016,8 +800,9 @@ export default {
// 生成/获取明细
async getDetail(e) {
this.planId = e.row.planId
+ this.materialBomId = e.row.materialBomId
this.nowMaterial = e.row.materialName
- this.nowNum2 = 1
+ this.nowNum3 = 1
await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => {
if (res.rows.length === 0) {
this.$confirm('是否生成计划明细', '确认', {
@@ -1028,9 +813,10 @@ export default {
insertProductPlanDetails({
"planId": e.row.planId,
}).then(val => {
- getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: e.row.planId}).then(res => {
+ getProductPlanDetails({pageNum: this.nowNum3, pageSize: 5, planId: e.row.planId}).then(res => {
this.tableData1 = res.rows
- this.totalNum2 = Math.ceil(res.total / 5)
+ this.totalNum3 = Math.ceil(res.total / 5)
+ this.$refs.table.setCurrentRow(res.rows[0]);
})
this.$message({
type: 'info',
@@ -1046,17 +832,36 @@ export default {
})
} else {
this.tableData1 = res.rows
- this.totalNum2 = Math.ceil(res.total / 5)
+ this.$refs.table.setCurrentRow(res.rows[0]);
+ this.totalNum3 = Math.ceil(res.total / 5)
}
})
+ },
+ async getMaterialInstall(e){
+ this.info = e
+ this.nowNum2 = 1
+ this.nowNum4 = 1
const table1 = await selectMaterialInstallationCircumstance({
- installType:1,
- planDetailId:e.row.planDetailId,
- materialBomId:e.row.materialBomId
+ installType: 1,
+ planDetailId: e.planDetailId,
+ pageNum: this.nowNum2,
+ pageSize: 5
})
- console.log(table1)
+ const table2 = await selectMaterialInstallationCircumstance({
+ installType: 2,
+ materialBomId: this.materialBomId,
+ planDetailId: e.planDetailId,
+ pageNum: this.nowNum4,
+ pageSize: 5
+ })
+ this.tableData2 = table1.rows
+ this.tableData3 = table2.rows
+ this.totalNum2 = Math.ceil(table1.total / 5)
+ this.totalNum4 = Math.ceil(table2.total / 5)
},
+
+
// 领料页面
getMaterials(val) {
this.searchMaterialValue = ''
@@ -1079,8 +884,6 @@ export default {
})
},
-
-
// 申请领料
receiveMaterial() {
applyRawOutstock(this.form).then(e => {
@@ -1341,6 +1144,9 @@ export default {
/deep/ .el-table .cell {
color: #fff
}
+ /deep/ .current-row .cell {
+ color: #000
+ }
/deep/ .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
background-color: #fff0;