From 8c6c13943dbe07acc1e9223abd705302cf56d2f5 Mon Sep 17 00:00:00 2001
From: wws <18630710203@163.com>
Date: Sat, 16 Sep 2023 10:44:28 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B9=BF=E6=96=99=E8=AE=A1=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/plan/plan/index.vue | 159 +++++++++++++++++++++++++++++++---
1 file changed, 145 insertions(+), 14 deletions(-)
diff --git a/src/views/plan/plan/index.vue b/src/views/plan/plan/index.vue
index 97c8f78..1de9261 100644
--- a/src/views/plan/plan/index.vue
+++ b/src/views/plan/plan/index.vue
@@ -140,6 +140,7 @@
+
@@ -191,17 +192,18 @@
-
+
-
-
-
+
+
+
+
+
+
-
+
@@ -296,17 +298,18 @@
-
+
-
-
-
+
+
+
+
+
+
-
+
@@ -349,6 +352,56 @@
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
@@ -369,12 +422,25 @@ import {
checkChangePlan
} from '@/api/plan/plan'
import moment from 'moment'
+import {selectMaterielList} from "@/api/plan/order";
export default {
name: 'Plan',
dicts: ['sys_yes_no'],
data() {
return {
+ // 新增-物料list
+ materiel: [],
+ materielList: [],
+ // 物料查询数据实体
+ materielQueryParams: {
+ productCode: undefined,
+ productDescZh: undefined,
+ pageNum: 1,
+ pageSize: 10,
+ },
+ // 内层弹窗-新增订单
+ innerVisible: false,
// 湿料计划详情list
wetMaterialPlanList: [],
// 修改计划弹出框
@@ -445,6 +511,53 @@ export default {
this.getList()
},
methods: {
+ // 新增-物料搜索
+ handleMaterielQuery() {
+ this.materielQueryParams.pageNum = 1;
+ this.getMaterielList();
+ },
+ // 选中物料信息
+ selectionChange(e) {
+ this.materiel = e;
+ },
+ // 新增-确认选择物料
+ subMateriel() {
+ if (this.materiel.length == 0) {
+ this.$message({
+ message: '请选择物料!',
+ type: 'warning'
+ })
+ return
+ }
+ if (this.materiel.length > 1) {
+ this.$message({
+ message: '物料只能选择一个!',
+ type: 'warning'
+ })
+ return
+ }
+ console.log("这里是物料信息");
+ console.log(this.materiel[0]);
+ this.form.productId = this.materiel[0].productId;
+ this.form.prodCode = this.materiel[0].productCode;
+ this.form.prodDesc = this.materiel[0].productDescZh;
+ this.innerVisible = false;
+ },
+ // 新增-查询物料列表
+ getMaterielList() {
+ this.loading = true;
+ selectMaterielList(this.materielQueryParams).then(response => {
+ this.materielList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ }
+ );
+ },
+ // 新增-打开选择物料窗口
+ selectMateriel() {
+ this.innerVisible = true;
+ this.getMaterielList();
+ },
/** 修改-确定按钮 */
changeBatchBtn() {
// 数据判空
@@ -565,6 +678,8 @@ export default {
shiftId: this.selectList[0].shiftId
}
if (this.bmsList != null || this.bmsList === undefined) {
+ console.log("这里!!!!this.bmsList")
+ console.log(this.bmsList)
for (let i = 0; i < this.bmsList.length; i++) {
if (bms.shiftId == this.bmsList[i].shiftId && bms.bucketId == this.bmsList[i].bucketId && bms.materialId != this.bmsList[i].materialId) {
this.$message({
@@ -579,6 +694,8 @@ export default {
// 数据保存(仅前端)
// 创建料罐对象
var bucket
+ console.log("这里!!!!this.selectBucketList")
+ console.log(this.selectBucketList)
for (let i = 0; i < this.selectBucketList.length; i++) {
if (this.form.bucketId == this.selectBucketList[i].bucketId) {
bucket = this.selectBucketList[i]
@@ -586,6 +703,8 @@ export default {
}
// 创建物料对象
var material
+ console.log("这里!!!!this.selectProductList")
+ console.log(this.selectProductList)
for (let i = 0; i < this.selectProductList.length; i++) {
if (this.form.productId == this.selectProductList[i].productId) {
material = this.selectProductList[i]
@@ -773,6 +892,8 @@ export default {
getBMSList(productDate).then(response => {
if (response.data !== undefined) {
this.bmsList = response.data
+ console.log("级联信息")
+ console.log(this.bmsList)
}
})
// 一会完成下方数据同步
@@ -941,4 +1062,14 @@ export default {
padding: 10px 0;
background-color: #f9fafc;
}
+
+.my-margin {
+ margin-top: 40px;
+ margin-bottom: 10px;
+}
+
+.my-materiel-btn {
+ margin-top: 20px;
+ margin-left: 650px;
+}