| | |
| | | <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> |
| | |
| | | </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 |
| | |
| | | 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", |
| | |
| | | editRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | return { |
| | | editDialogVisible: false, |
| | | }; |
| | | }, |
| | | }, |
| | | workList: { |
| | |
| | | }, |
| | | 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: "物料编码" }, |
| | |
| | | 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" }], |
| | |
| | | }; |
| | | }, |
| | | 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 }); |
| | |
| | | } |
| | | }, |
| | | shutdown() { |
| | | this.editDialogVisible = false; |
| | | this.thatEditRow.editDialogVisible = false; |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | background: #fff; |
| | | width: 25vw !important; |
| | | height: 600px; |
| | | |
| | | #iconStyle { |
| | | font-size: 20px !important; |
| | | } |
| | | |
| | | .drawerContent { |
| | | position: relative; |
| | | overflow-y: auto; |
| | |
| | | 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 */ |
| | | } |
| | | } |
| | | |
| | |
| | | margin-top: 16px; |
| | | margin-right: 20px; |
| | | text-align: right; |
| | | |
| | | .el-button { |
| | | width: 80px; |
| | | height: 38px; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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> |