From 086e34eb89b072473e754937232f02e6199739a6 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 26 三月 2024 10:02:11 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/WMS into zzq
---
src/views/productManage/product/components/bomDialog.vue | 136 ++++++++++++++++++++++-----------------------
src/api/basic/standard.js | 9 +++
src/views/productManage/product/AddProductDialog.vue | 22 ++++++-
3 files changed, 93 insertions(+), 74 deletions(-)
diff --git a/src/api/basic/standard.js b/src/api/basic/standard.js
index fbc9a1b..753297f 100644
--- a/src/api/basic/standard.js
+++ b/src/api/basic/standard.js
@@ -27,6 +27,15 @@
});
};
+// 浜у搧-鑾峰彇鍗曚綅鍒楄〃
+export const getUnitInfo = (data) => {
+ return request({
+ url: "/api-wms/v1/product/getUnitInfo",
+ method: "get",
+ data,
+ });
+};
+
// ----bom --- 瑷堥噺鍠綅 鐨勬暩鎿� 鏇存柊
export const postGetSaveSUnitDict = (params) =>
request.post("/api-s/v1/dict/saveUnitDict", params);
\ No newline at end of file
diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index 935a066..6de1c2b 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/src/views/productManage/product/AddProductDialog.vue
@@ -130,14 +130,14 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鍗曚綅old" prop="unit">
+ <!-- <el-form-item label="鍗曚綅old" prop="unit">
<el-input
v-model="editConfig.infomation.unit"
placeholder="璇疯緭鍏�"
style="width: 85%"
:disabled="!showFooter"
></el-input>
- </el-form-item>
+ </el-form-item> -->
<el-form-item label="鍗曚綅" prop="unit">
<el-select
@@ -536,6 +536,7 @@
</el-dialog>
<BomDialog
ref="editDialog"
+ :editRow="editRow"
@sucessSet="handleGetBomKindDictList"
@handleConfirmSave="handleConfirmSave"
:workList="unitList"
@@ -552,6 +553,7 @@
import codeMixin from "@/components/mixin/codeMixin"
import { getDataByType } from "@/api/data"
import BomDialog from "./components/bomDialog";
+import {getUnitInfo, } from "@/api/basic/standard";
// import { postGetSaveSUnitDict } from "@/api/basic/standard";
@@ -656,6 +658,10 @@
fileFormdata: null, // 涓婁紶鍥剧墖鍏ュ弬
bomPurchaseTypeList: getDataByType("purchaseType"),
unitList: [],
+ editRow:{
+ editDialogVisible:false,
+ BomTableData:[]
+ }
}
},
created() {
@@ -676,12 +682,13 @@
this.setOptionalFieldsToEmpty()
this.formInfo()
this.getUserInfo()
+ this.getUnitInfo()
},
methods: {
// 鍗曚綅
handleUnitShow() {
this.handleGetBomKindDictList();
- this.$refs.editDialog.editDialogVisible = true;
+ this.editRow.editDialogVisible = true;
},
// 鍗曚綅
handleGetBomKindDictList(val) {
@@ -713,7 +720,7 @@
// this.handleGetBomKindDictList();
// }
// });
- this.$refs.editDialog.editDialogVisible = false;
+ this.editRow.editDialogVisible = false;
},
// 鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅
@@ -992,6 +999,13 @@
} else if (val === "閿�鍞�") {
this.showSale = param
}
+ },
+ // 鑾峰彇鍗曚綅鍒楄〃鏁版嵁
+ async getUnitInfo(){
+ await getUnitInfo().then((res)=>{
+ this.editRow.BomTableData = res.data;
+ console.log( this.editRow.BomTableData,"鐪嬩笅",res.data)
+ })
}
}
}
diff --git a/src/views/productManage/product/components/bomDialog.vue b/src/views/productManage/product/components/bomDialog.vue
index c350b0f..3e75b28 100644
--- a/src/views/productManage/product/components/bomDialog.vue
+++ b/src/views/productManage/product/components/bomDialog.vue
@@ -1,25 +1,13 @@
<template>
- <el-dialog
- :close-on-click-modal="false"
- :visible.sync="editDialogVisible"
- width="33rem"
- class="add-event-dialog"
- @close="shutdown"
- append-to-body
- >
+ <el-dialog :close-on-click-modal="false" :visible.sync="thatEditRow.editDialogVisible" width="33rem" class="add-event-dialog"
+ @close="shutdown" append-to-body>
<div slot="title" class="tac drawerHeader">
<!-- {{ title }}缁勪欢 -->
缂栬緫涓嬫媺妗�>鍗曚綅
</div>
<div class="drawerContent">
- <el-table
- v-if="isTableShow"
- :header-cell-style="{ background: '#f1f3f8', color: '#000009' }"
- ref="multipleTable"
- :data="BomTableData"
- tooltip-effect="dark"
- height="440"
- >
+ <el-table v-if="isTableShow" :header-cell-style="{ background: '#f1f3f8', color: '#000009' }" ref="multipleTable"
+ :data="thatEditRow.BomTableData" tooltip-effect="dark" height="440">
<el-table-column prop="unit" label="鍗曚綅">
<template slot-scope="scope">
<el-input v-model="scope.row.name"></el-input>
@@ -27,28 +15,16 @@
</el-table-column>
<el-table-column prop="createdAt" label="璁句负榛樿">
<template slot-scope="scope">
- <el-switch
- @change="switchChange(scope, scope.row.isDefault)"
- v-model="scope.row.isDefault"
- ></el-switch>
+ <el-switch @change="switchChange(scope, scope.row.isDefault)" v-model="scope.row.isDefault"></el-switch>
</template>
</el-table-column>
- <!-- <el-table-column label="鎿嶄綔" width="100">
+ <el-table-column label="鎿嶄綔" width="100">
<template slot-scope="scope">
- <i
- class="el-icon-delete"
- id="iconStyle"
- @click="handleDelete(scope.row.id)"
- ></i>
+ <i class="el-icon-delete" id="iconStyle" @click="handleDelete(scope.row.id)"></i>
</template>
- </el-table-column> -->
+ </el-table-column>
</el-table>
- <el-button
- @click="handleAdd()"
- type="text"
- class="margin_top_15px margin_left_20px"
- >鏂板涓嬫媺妗�</el-button
- >
+ <el-button @click="handleAdd()" type="text" class="margin_top_15px margin_left_20px">鏂板涓嬫媺妗�</el-button>
</div>
<div slot="footer" class="dialog-footer tac">
<!-- <el-button
@@ -56,19 +32,14 @@
style="margin-left: 16px; color: #fff; background-color: #ee790c"
>鏂板</el-button
> -->
- <el-button @click="shutdown">鍙栨秷</el-button
- ><el-button
- type="primary"
- @click="handleConfirmSave()"
- style="margin-left: 16px; color: #fff; background-color: #2a78fb"
- >纭畾</el-button
- >
+ <el-button @click="shutdown">鍙栨秷</el-button><el-button type="primary" @click="handleConfirmSave()"
+ style="margin-left: 16px; color: #fff; background-color: #2a78fb">纭畾</el-button>
</div>
</el-dialog>
</template>
<script>
-import { getCodeStandardList,addMaterial, updateMaterial } from "@/api/basic/standard";
+import { getCodeStandardList, addMaterial, updateMaterial, } from "@/api/basic/standard";
export default {
name: "bomDialog",
@@ -79,7 +50,9 @@
editRow: {
type: Object,
default: () => {
- return {};
+ return {
+ editDialogVisible: false,
+ };
},
},
workList: {
@@ -88,10 +61,11 @@
},
data() {
return {
- editDialogVisible: false,
+ thatEditRow:this.editRow,
isTableShow: true,
form: {},
- BomTableData: [1],
+ // BomTableData: JSON.parse(this.thatEditRow.BomTableData),
+ // BomTableData: [{ id: 303, createdAt: "2024-02-05 18:02:47", updatedAt: "2024-02-05 18:02:47",name: "kg", isDefault: false }],
work: 1,
flag: "add",
obj: { name: "", page: 0, pageSize: 0, type: "鐗╂枡缂栫爜" },
@@ -101,14 +75,6 @@
sum: 0,
explain: "",
Tabs: "msg",
- tableData: [
- {
- date: "PEBU",
- name: "PE甯�",
- number: "21",
- unit: "鍚�",
- },
- ],
rules: {
id: [{ required: true, message: "璇疯緭鍏ョ墿鏂欑紪鐮�", trigger: "blur" }],
name: [{ required: true, message: "璇疯緭鍏ョ墿鏂欏悕绉�", trigger: "blur" }],
@@ -135,17 +101,21 @@
};
},
watch: {
- editDialogVisible(newVal) {
- if (newVal) {
- this.BomTableData = this.workList;
- }
- },
- workList(newVal) {
- console.log(newVal)
- this.BomTableData = this.workList;
- },
+ // editDialogVisible(newVal) {
+ // console.log(newVal,"鐪嬬湅val")
+ // if (newVal) {
+ // this.BomTableData = this.workList;
+ // }
+ // },
+ // workList(newVal) {
+ // console.log(newVal)
+ // this.BomTableData = this.workList;
+ // },
},
- mounted() {},
+ created() {
+ console.log(this.thatEditRow,"thatEditRow")
+ },
+ mounted() { },
methods: {
handleAdd() {
this.BomTableData.push({ name: "", isDefault: false });
@@ -232,7 +202,7 @@
}
},
shutdown() {
- this.editDialogVisible = false;
+ this.thatEditRow.editDialogVisible = false;
},
},
};
@@ -246,9 +216,11 @@
background: #fff;
width: 25vw !important;
height: 600px;
+
#iconStyle {
font-size: 20px !important;
}
+
.drawerContent {
position: relative;
overflow-y: auto;
@@ -258,21 +230,28 @@
width: 25vw;
overflow-x: hidden;
height: 480px;
- scrollbar-width: none; /* firefox */
- -ms-overflow-style: none; /* IE 10+ */
+ scrollbar-width: none;
+ /* firefox */
+ -ms-overflow-style: none;
+
+ /* IE 10+ */
::v-deep .el-tabs__nav-scroll {
padding-left: 25px;
}
+
.baseTitle {
margin: 50px 0 20px;
font-weight: bold;
}
+
.baseInfo {
display: flex;
}
}
+
.drawerContent::-webkit-scrollbar {
- display: none; /* Chrome Safari */
+ display: none;
+ /* Chrome Safari */
}
}
@@ -280,6 +259,7 @@
margin-top: 16px;
margin-right: 20px;
text-align: right;
+
.el-button {
width: 80px;
height: 38px;
@@ -288,30 +268,38 @@
color: #000;
}
}
+
::v-deep .el-form {
width: 389px;
+
.input-box .input-content input {
margin: 0;
margin-right: 3px;
}
+
.el-input__inner,
.el-textarea__inner {
line-height: 18px;
font-family: PingFangSC;
}
}
+
::v-deep .el-tabs__header {
border: none;
+
.el-tabs__nav {
border: none;
}
}
+
::v-deep .el-form-item__content {
width: 263px;
+
.input-box {
width: 263px;
}
}
+
::v-deep .el-form-item__label {
font-size: 13px !important;
color: #000;
@@ -319,12 +307,14 @@
text-align: center !important;
width: 60px;
}
+
::v-deep .input-box .input-content input {
width: 23px;
height: 26px;
border-color: rgba(0, 0, 0, 0.1);
font-family: PingFangSC;
}
+
::v-deep .el-icon-minus {
width: 13px !important;
height: 26px !important;
@@ -332,29 +322,35 @@
color: #e5e5e5;
font-size: 13px;
}
+
::v-deep .el-input__inner {
font-size: 13px !important;
color: rgba(0, 0, 0, 0.9);
}
+
::v-deep .el-input__inner::placeholder {
color: rgba(0, 0, 0, 0.4);
}
+
::v-deep .el-form-item__error {
font-family: PingFangSC;
}
+
.self {
- ::v-deep .el-input__inner {
- }
+ ::v-deep .el-input__inner {}
}
+
::v-deep .el-select-dropdown {
position: absolute !important;
top: 36px !important;
left: 0px !important;
}
+
::v-deep .el-select-dropdown__wrap {
overflow: auto !important;
}
-::v-deep .el-dialog__body{
- padding-bottom:10px!important;
+
+::v-deep .el-dialog__body {
+ padding-bottom: 10px !important;
}
</style>
--
Gitblit v1.8.0