From 998e2e17328d704cf642409f71508b4681ddd464 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 18 九月 2023 09:56:27 +0800
Subject: [PATCH] 仓库编辑弹框
---
src/assets/style/reset-element.scss | 3
src/views/warehouseManage/warehouse/index.vue | 6
src/components/makepager/FormBtnsView.vue | 2
src/views/warehouseManage/warehouse/AddDialog.vue | 280 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 287 insertions(+), 4 deletions(-)
diff --git a/src/assets/style/reset-element.scss b/src/assets/style/reset-element.scss
index 8ae9ff0..ceca106 100644
--- a/src/assets/style/reset-element.scss
+++ b/src/assets/style/reset-element.scss
@@ -39,3 +39,6 @@
// background-position: center;
// width: 160px !important;
// }
+.line_height_30px{
+ line-height:30px;
+}
diff --git a/src/components/makepager/FormBtnsView.vue b/src/components/makepager/FormBtnsView.vue
index c312e36..cc75469 100644
--- a/src/components/makepager/FormBtnsView.vue
+++ b/src/components/makepager/FormBtnsView.vue
@@ -75,7 +75,7 @@
</div>
</div>
<div v-if="showWarehouse" class="sub-number">
- <div class="left"><i class="el-icon-help"></i></div>
+ <div class="left"><i class="el-icon-refresh"></i></div>
<div class="right">
<div class="right-one">璺嚎</div>
</div>
diff --git a/src/views/warehouseManage/warehouse/AddDialog.vue b/src/views/warehouseManage/warehouse/AddDialog.vue
new file mode 100644
index 0000000..9377289
--- /dev/null
+++ b/src/views/warehouseManage/warehouse/AddDialog.vue
@@ -0,0 +1,280 @@
+<template>
+ <div class="add-common">
+ <el-dialog
+ :title="editCommonConfig.title + '浠撳簱'"
+ :visible.sync="editConfig.visible"
+ :width="dialogWidth"
+ :before-close="handleClose"
+ >
+ <!-- 澶� -->
+ <div slot="title" class="dialog-header">
+ <span>{{ editCommonConfig.title + "浠撳簱" }}</span>
+ <div class="header_btns">
+ <span class="btn">
+ <i class="el-icon-printer"></i>
+ <span>鎵撳嵃</span>
+ </span>
+ <span class="btn" style="margin-left: 15px">
+ <i class="el-icon-s-tools"></i>
+ <span>鍔ㄤ綔</span>
+ </span>
+ <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">缂栬緫</el-button>
+ </div>
+ </div>
+ <!-- 鍐呭 -->
+ <el-form
+ ref="form"
+ :model="editConfig.infomation"
+ :rules="rules"
+ label-position="left"
+ label-width="100px"
+ size="mini"
+ style="height: 60vh; overflow-x: hidden"
+ >
+ <div>
+ <!-- <div>aaa</div> -->
+ <!-- <StatusCommonView :list="list" showWarehouse="true" /> -->
+ <FormBtnsView :showWarehouse="true" @productClick="productClick" />
+ </div>
+ <div class="basic-info">
+ <div class="basic-info-view">
+
+ <el-row>
+ <el-col :span="24" class="line_height_30px">浠撳簱鍚嶇О-warehouse#</el-col>
+ <el-col :span="12">
+ <el-form-item label="缂╁啓" prop="client_name">
+ 瀵瑰瀵�
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍦板潃" prop="client_name">
+ 瀵瑰瀵�
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ <div class="bottom">
+ <el-tabs v-model="activeName" type="card">
+ <el-tab-pane label="浠撳簱閰嶇疆" name="first">
+ <div class="second-label">杩愯緭</div>
+ <el-form-item label="鍏ュ悜杩愯緭" prop="desc">
+ <el-radio-group
+
+ >
+ <el-radio style="width:100%;" class="line_height_30px" v-for="(item,index) in wareList" :key='index' :label="item.id">{{item.name}}</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="鍑哄簱杩愯緭" prop="desc">
+ <el-radio-group
+
+ >
+ <el-radio style="width:100%;" class="line_height_30px" v-for="(item,index) in wareoutList" :key='index' :label="item.id">{{item.name}}</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-tab-pane>
+ <el-tab-pane label="鎶�鏈俊鎭�" name="third">
+ <el-form-item label="澶囨敞" prop="desc">
+
+ </el-form-item>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+ </div>
+ </el-form>
+ <!-- 灏� -->
+ <div v-if="showFooter" slot="footer" class="dialog-footer">
+ <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button>
+ <el-button type="primary" size="small" @click="saveClick('form')">淇濆瓨</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+export default {
+ name: "AddScrapDialog",
+ props: {
+ editCommonConfig: {
+ type: Object,
+ default: () => {
+ return {
+ visible: false,
+ title: "鏂板缓",
+ infomation: {}
+ }
+ }
+ }
+ },
+ components: {},
+ computed: {},
+ data() {
+ return {
+ activeName:'first',
+ dialogWidth: "50%",
+ editConfig: this.editCommonConfig,
+ rules: {
+
+ number: [{ required: true, message: "璇疯緭鍏ラ��娆惧崟缂栧彿", trigger: "blur" }],
+ refundDate: [{ required: true, message: "璇烽�夋嫨閫�娆炬棩鏈�", trigger: "change" }],
+ memberId: [{ required: true, message: "璇烽�夋嫨閿�鍞礋璐d汉", trigger: "change" }],
+ sale_return_nunber: [{ required: true, message: "璇烽�夋嫨閿�鍞��璐у崟", trigger: "change" }]
+ },
+ memberOptions: [],
+ paymentTypeListOptions: [],
+ list: [
+ { label: "鑽夌", status: "todo" },
+ { label: "瀹屾垚", status: "todo" }
+ ],
+ showEdit: false, // 鏄惁鏄剧ず缂栬緫鎸夐挳
+ showFooter: false, // 鏄惁鏄剧ず鍙栨秷淇濆瓨
+ currentState: "todo", // 褰撳墠鐘舵��
+ wareList:[
+ {
+ name:'鐩存帴鎺ユ敹浜у搧锛�1姝ユ敹璐э級',
+ id:1,
+ },
+ {
+ name:'鎺ュ埌浜у搧鍒版敹鏂欏尯锛屽啀鍏ュ簱锛�2姝ユ敹璐э級',
+ id:2,
+ },
+ {
+ name:'鎺ユ敹浜у搧鍒版敹鏂欏尯锛屾楠岋紝鐒跺悗鍏ュ簱锛�3姝ユ敹璐э級',
+ id:3,
+ }
+ ],
+ wareoutList:[
+ {
+ name:'鐩存帴鍑哄簱锛�1姝ワ級',
+ id:1,
+ },
+ {
+ name:'閫佸埌寰呭嚭搴撳尯锛屽啀閫佽揣锛�2姝ュ彂璐э級',
+ id:2,
+ },
+ {
+ name:'鍖呰浜у搧锛屽彂閫佸埌寰呭嚭搴撳尯锛屽啀閫佽揣锛�3姝ュ彂璐э級',
+ id:3,
+ }
+ ],
+ }
+ },
+ created() {
+ this.setBottonView()
+ },
+ methods: {
+ // 璺嚎
+ productClick() {
+
+ },
+ // 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
+ setBottonView() {
+ if (this.editConfig.title === "鏂板缓") {
+ this.showEdit = false
+ this.showFooter = true
+ } else if (this.editConfig.infomation.status === "瀹屾垚") {
+ this.showEdit = false
+ this.showFooter = false
+ } else {
+ this.showEdit = true
+ this.showFooter = false
+ }
+ if (this.editConfig.title === "鏂板缓") {
+ this.list[0].status = "active"
+ } else {
+ this.list.map((item) => {
+ if (item.label === this.editConfig.infomation.status) {
+ item.status = "active"
+ } else {
+ item.status = "todo"
+ }
+ })
+ }
+ },
+ // 鍏抽棴
+ handleClose() {
+ this.editConfig.visible = false
+ },
+ // 缂栬緫
+ editClick() {
+ this.showEdit = false
+ this.showFooter = true
+ },
+ // 淇濆瓨
+ saveClick() {}
+ }
+}
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style lang="scss" scoped>
+.dialog-header {
+ display: flex;
+ align-items: center;
+ font-size: 14px;
+ color: #333;
+ .header_btns {
+ margin-left: auto;
+ margin-right: 60px;
+ .btn {
+ cursor: no-drop;
+ }
+ }
+}
+.content-status {
+ display: flex;
+}
+.basic-info {
+ height: calc(100% - 80px);
+ overflow: auto;
+ margin: 20px;
+ border: 1px solid #dcdfe6;
+ box-shadow: inset 0 0 2px #dee2e6;
+ -moz-box-shadow: inset 0 0 2px #dee2e6;
+ -webkit-box-shadow: inset 0 0 2px #dee2e6;
+ .basic-info-view {
+ margin-top: 20px;
+ padding:0 20px;
+
+ }
+ .bottom{
+ .second-label {
+ border-bottom: 1px solid #d9d9d9;
+ margin-bottom: 10px;
+ }
+ ::v-deep .el-tabs__content{
+ padding: 0 20px;
+ }
+ }
+
+}
+.purchase-view {
+ display: flex;
+ .left {
+ width: 50%;
+ }
+ .right {
+ width: 50%;
+ }
+}
+
+::v-deep {
+ .el-dialog__headerbtn {
+ position: absolute;
+ top: 18px;
+ }
+ .el-button {
+ &:hover {
+ border: 1px solid #dcdfe6;
+ color: #333;
+ }
+ }
+ .el-tabs--card > .el-tabs__header .el-tabs__nav {
+ margin-left: 20px;
+ }
+ .el-tabs__item {
+ height: 30px;
+ line-height: 30px;
+ font-size: 13px;
+ }
+}
+</style>
diff --git a/src/views/warehouseManage/warehouse/index.vue b/src/views/warehouseManage/warehouse/index.vue
index 53637d9..d7c28ab 100644
--- a/src/views/warehouseManage/warehouse/index.vue
+++ b/src/views/warehouseManage/warehouse/index.vue
@@ -23,7 +23,7 @@
</div>
</div>
<!-- 鏂板缓/缂栬緫 -->
- <AddScrapDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
+ <AddDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
</div>
</template>
@@ -31,12 +31,12 @@
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getProductList } from "@/api/product/product"
// import DetailProduct from "@/views/productManage/product/DetailProduct"
-import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog"
+import AddDialog from "@/views/warehouseManage/warehouse/AddDialog"
export default {
name: "WarehouseView",
props: {},
- components: { AddScrapDialog },
+ components: { AddDialog },
mixins: [pageMixin],
computed: {},
data() {
--
Gitblit v1.8.0