From 13cd01611ddc5d2cf87ab75bd8eeedcbb943286c Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 18 九月 2023 15:07:18 +0800 Subject: [PATCH] 仓库管理 业务类型弹窗及概述列表修改 --- src/views/warehouseManage/bussinessType/AddBussinessType.vue | 422 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/router/product/index.js | 9 + src/views/warehouseManage/bussinessType/index.vue | 6 3 files changed, 434 insertions(+), 3 deletions(-) diff --git a/src/router/product/index.js b/src/router/product/index.js index a869524..d1fc5a1 100644 --- a/src/router/product/index.js +++ b/src/router/product/index.js @@ -4,6 +4,7 @@ const inOutboundDetail = (resolve) => require(["@/views/reportForm/inboundOutboundDetail/index"], resolve) // 鍑哄叆搴撴槑缁� const productCategory = (resolve) => require(["@/views/productManage/productCategory/index"], resolve) // 浜у搧绫诲埆 const productList = (resolve) => require(["@/views/productManage/productCategory/ProductList"], resolve) // 浜у搧绫诲埆-浜у搧 +const overviewList = (resolve) => require(["@/views/overview/OverviewListView"], resolve) // 姒傝堪-浜у搧鍒楄〃 const appconfig = [ { @@ -37,6 +38,14 @@ meta: { title: "浜у搧" } + }, + { + path: "/overview/overviewList", + name: "overviewList", + component: overviewList, + meta: { + title: "閲囪喘鍏ュ簱" + } } ] diff --git a/src/views/warehouseManage/bussinessType/AddBussinessType.vue b/src/views/warehouseManage/bussinessType/AddBussinessType.vue new file mode 100644 index 0000000..102d20b --- /dev/null +++ b/src/views/warehouseManage/bussinessType/AddBussinessType.vue @@ -0,0 +1,422 @@ +<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="110px" + size="mini" + style="height: 60vh; overflow-x: hidden" + > + <div class="basic-info"> + <!-- <FormBtnsView :showProduct="true" @productClick="productClick" /> --> + <div class="basic-info-view"> + <el-row> + <el-col :span="24"> + <div style="margin-left: 20px">鍏ュ簱绫诲瀷</div> + <el-form-item label="" prop="client_name" label-width="20px"> + <el-input + v-model="editConfig.infomation.client_name" + placeholder="" + :disabled="!showFooter" + style="width: 85%" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <div class="purchase-view"> + <div class="left" style="margin-left: 20px"> + <el-form-item label="浣滀笟绫诲瀷" prop="operate_type" :label-width="labelWidth"> + <el-select + v-model="editConfig.infomation.operate_type" + placeholder="璇烽�夋嫨" + size="mini" + style="width: 85%" + :disabled="!showFooter" + > + <el-option v-for="item in operateTypeOptions" :key="item" :label="item" :value="item"> </el-option> + </el-select> + </el-form-item> + <el-form-item label="搴忓彿鍓嶇紑" prop="client_name" :label-width="labelWidth"> + <el-input + v-model="editConfig.infomation.client_name" + placeholder="" + :disabled="!showFooter" + style="width: 85%" + ></el-input> + </el-form-item> + <el-form-item label="浠撳簱" prop="client_name" :label-width="labelWidth"> + <el-select + v-model="editConfig.infomation.memberId" + multiple + placeholder="璇烽�夋嫨" + size="mini" + style="width: 85%" + :disabled="!showFooter" + > + <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item + v-if="editConfig.infomation.operate_type !== '鏀惰揣'" + label="淇濈暀鏂瑰紡" + prop="resource" + :label-width="labelWidth" + > + <el-radio-group + v-model="editConfig.infomation.resource" + @input="reserveMethodClick" + :disabled="!showFooter" + > + <div style="margin-top: 8px"><el-radio label="纭鏃�"></el-radio></div> + <div style="margin-top: 10px"><el-radio label="鎵嬪伐"></el-radio></div> + <div style="margin-top: 10px"><el-radio label="鍦ㄩ瀹氭棩鏈熶箣鍓�"></el-radio></div> + </el-radio-group> + </el-form-item> + <el-form-item + v-if="editConfig.infomation.operate_type !== '鏀惰揣'" + label="鍦ㄩ瀹氭棩鏈熷墠棰勫畾" + prop="client_name" + :label-width="labelWidth" + > + <el-input + v-model="editConfig.infomation.client_name" + placeholder="" + :disabled="!showFooter" + style="width: 85%" + ></el-input> + </el-form-item> + </div> + <div class="right"> + <el-form-item label="閫�璐х被鍨�" prop="client_name"> + <el-select + v-model="editConfig.infomation.memberId" + multiple + placeholder="璇烽�夋嫨" + size="mini" + style="width: 85%" + :disabled="!showFooter" + > + <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鍒涘缓娆犲崟" prop="client_name"> + <el-select + v-model="editConfig.infomation.memberId" + multiple + placeholder="璇烽�夋嫨" + size="mini" + style="width: 85%" + :disabled="!showFooter" + > + <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="鏄剧ず浣滀笟璇︽儏" prop="showDetail"> + <el-checkbox v-model="editConfig.infomation.showDetail"></el-checkbox> + </el-form-item> + <el-form-item + v-if="editConfig.infomation.operate_type === '鏀惰揣'" + label="棰勫~鍐欎綔涓氳鎯�" + prop="showDetail" + > + <el-checkbox v-model="editConfig.infomation.showDetail"></el-checkbox> + </el-form-item> + </div> + </div> + <!-- <el-col :span="24"> + + </el-col> --> + </div> + <div class="bottom"> + <div class="purchase-view"> + <div class="left"> + <div class="second-label">浣嶇疆</div> + <el-form-item label="榛樿婧愪綅缃�" prop="client_name" style="margin-left: 20px"> + <el-select + v-model="editConfig.infomation.memberId" + multiple + placeholder="璇烽�夋嫨" + size="mini" + style="width: 85%" + :disabled="!showFooter" + > + <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="榛樿鐩殑浣嶇疆" prop="client_name" style="margin-left: 20px"> + <el-select + v-model="editConfig.infomation.memberId" + multiple + placeholder="璇烽�夋嫨" + size="mini" + style="width: 85%" + :disabled="!showFooter" + > + <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + </div> + <div class="right"></div> + </div> + </div> + </div> + </el-form> + <!-- 灏� --> + <div v-if="showFooter" slot="footer" class="dialog-footer"> + <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">淇濆苟鎻愪氦瀹℃壒</el-button> --> + <el-button type="primary" size="small" @click="saveClick('form')">淇濆瓨</el-button> + <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +export default { + name: "AddBussinessType", + props: { + editCommonConfig: { + type: Object, + default: () => { + return { + visible: false, + title: "鏂板缓", + infomation: { type: [] } + } + } + } + }, + components: {}, + computed: {}, + data() { + return { + dialogWidth: "50%", + editConfig: this.editCommonConfig, + rules: { + client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }], + 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: [], + operateTypeOptions: ["鏀惰揣", "鍙戣揣", "鍐呴儴璋冩嫧"], // 鎿嶄綔绫诲瀷 + showButton: true, + showEdit: false, // 鏄惁鏄剧ず缂栬緫鎸夐挳 + isDelClick: false, // 鍒犻櫎鎸夐挳鏄惁鍙偣鍑� + showFooter: false, // 鏄惁鏄剧ず鍙栨秷淇濆瓨 + labelWidth: "80px" + } + }, + created() { + this.setBottonView() + }, + methods: { + // 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず + setBottonView() { + if (this.editConfig.title === "鏂板缓") { + this.showButton = false + this.showEdit = false + this.showFooter = true + } else { + this.showEdit = true + this.showFooter = false + } + }, + // 鍏抽棴 + handleClose() { + this.editConfig.visible = false + }, + // 缂栬緫 + editClick() { + this.showEdit = false + this.showButton = false + this.showFooter = true + }, + // 淇濆瓨 + saveClick() {}, + // 鍒犻櫎 + delClick() {}, + // 浜у搧 + productClick() { + this.$router.push({ path: "/productManage/productList", query: { name: "浜у搧" } }) + }, + // 淇濈暀鏂瑰紡 + reserveMethodClick(val) { + if (val === "鍦ㄩ瀹氭棩鏈熶箣鍓�") { + this.labelWidth = "140px" + } else { + this.labelWidth = "80px" + } + } + } +} +</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-btn { + height: 37px; + line-height: 37px; + padding-left: 20px; + border-bottom: 1px solid #e9e9e9; +} +.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; + .content-number { + display: flex; + justify-content: right; + height: 44px; + border-bottom: 1px solid #e9e9e9; + font-size: 13px; + .sub-number { + width: 12.5%; + border-right: 1px solid #e9e9e9; + display: flex; + padding: 3px 9px; + .left { + margin-top: 3px; + font-size: 22px; + font-weight: 600; + } + .icon-view { + transform: rotate(270deg); + } + .right { + margin-left: 6px; + .right-label { + color: #495057; + } + .right-one { + height: 38px; + line-height: 38px; + } + } + } + } + .basic-info-view { + margin-top: 20px; + .upload { + position: relative; + width: 90px; + height: 90px; + margin-left: 40px; + border: 1px dotted #d9d9d9; + border-radius: 4px; + .upload-icon { + position: absolute; + top: 40%; + right: 43%; + } + } + } + .purchase-view { + display: flex; + .left { + width: 50%; + } + .right { + width: 50%; + } + } + .second-label { + margin-left: 20px; + border-bottom: 1px solid #d9d9d9; + margin-bottom: 10px; + } + .list-item { + width: 300px; + } + .avatar-uploader .el-upload { + border: 1px dashed #d9d9d9; + border-radius: 6px; + cursor: pointer; + position: relative; + overflow: hidden; + } + .avatar-uploader .el-upload:hover { + border-color: #409eff; + } + .avatar-uploader-icon { + font-size: 28px; + color: #8c939d; + width: 178px; + height: 178px; + line-height: 178px; + text-align: center; + } + .avatar { + width: 178px; + height: 178px; + display: block; + } +} +::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/bussinessType/index.vue b/src/views/warehouseManage/bussinessType/index.vue index 7eda06b..8f3b512 100644 --- a/src/views/warehouseManage/bussinessType/index.vue +++ b/src/views/warehouseManage/bussinessType/index.vue @@ -23,7 +23,7 @@ </div> </div> <!-- 鏂板缓/缂栬緫 --> - <AddScrapDialog v-if="editConfig.visible" :edit-common-config="editConfig" /> + <AddBussinessType 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 AddBussinessType from "@/views/warehouseManage/bussinessType/AddBussinessType" export default { name: "WarehouseView", props: {}, - components: { AddScrapDialog }, + components: { AddBussinessType }, mixins: [pageMixin], computed: {}, data() { -- Gitblit v1.8.0