admin-web/public/index.html
@@ -11,11 +11,9 @@ <title><%= webpackConfig.name %></title> </head> <body> <script type="text/javascript" src="<%= BASE_URL %>static/config.js"></script> <!-- <script type="text/javascript" src="<%= BASE_URL %>static/config.js"></script>--> <script src="<%= BASE_URL %>static/tinymce4.7.5/tinymce.min.js"></script> <script src="<%= BASE_URL %>static/js/jquery.min.js"></script> <script src="<%= BASE_URL %>static/js/reconnecting-websocket.js"></script> <script src="https://map.qq.com/api/gljs?v=1.exp&key=PGNBZ-XZ7C3-MPE34-OF2VP-7MRH6-BOFUG"></script> <div id="app"></div> <!-- built files will be auto injected --> <div class="pre-loader" id="pre-loader"> admin-web/src/assets/dataV/1.pngadmin-web/src/assets/dataV/2.pngadmin-web/src/assets/dataV/3.pngadmin-web/src/assets/dataV/EX.pngadmin-web/src/assets/dataV/Ellipse 1954.pngadmin-web/src/assets/dataV/Group 3649.pngadmin-web/src/assets/dataV/Group 88.pngadmin-web/src/assets/dataV/MYD.pngadmin-web/src/assets/dataV/SLABG.pngadmin-web/src/assets/dataV/ST.pngadmin-web/src/assets/dataV/SX.pngadmin-web/src/assets/dataV/TSLX.pngadmin-web/src/assets/dataV/YX.pngadmin-web/src/assets/dataV/bg.pngadmin-web/src/assets/dataV/boxBG.pngadmin-web/src/assets/dataV/cityBox.pngadmin-web/src/assets/dataV/comprehensive-ico1.pngadmin-web/src/assets/dataV/comprehensive-ico2.pngadmin-web/src/assets/dataV/comprehensive-ico3.pngadmin-web/src/assets/dataV/comprehensive-ico4.pngadmin-web/src/assets/dataV/comprehensive-ico5.pngadmin-web/src/assets/dataV/comprehensive-ico6.pngadmin-web/src/assets/dataV/fwt.pngadmin-web/src/assets/dataV/g1.pngadmin-web/src/assets/dataV/g2.pngadmin-web/src/assets/dataV/g3.pngadmin-web/src/assets/dataV/gdzs.pngadmin-web/src/assets/dataV/header.pngadmin-web/src/assets/dataV/jxzdgd.pngadmin-web/src/assets/dataV/kfpjl.pngadmin-web/src/assets/dataV/little-box.pngadmin-web/src/assets/dataV/sla.pngadmin-web/src/assets/dataV/wjdcl.pngadmin-web/src/assets/dataV/ywtdry.pngadmin-web/src/assets/dataV/zsk.pngadmin-web/src/assets/images/40b2.jpegadmin-web/src/assets/images/acttch-icon.pngadmin-web/src/assets/images/app.pngadmin-web/src/assets/images/avatar-kefu.pngadmin-web/src/assets/images/cloud-bg.pngadmin-web/src/assets/images/dataV.pngadmin-web/src/assets/images/doc.pngadmin-web/src/assets/images/examine-icon.pngadmin-web/src/assets/images/exel.pngadmin-web/src/assets/images/form-lf.pngadmin-web/src/assets/images/head-one.pngadmin-web/src/assets/images/head-two.pngadmin-web/src/assets/images/icon-connect.pngadmin-web/src/assets/images/icon-datav.pngadmin-web/src/assets/images/icon-line-up.pngadmin-web/src/assets/images/icon-notice.pngadmin-web/src/assets/images/icon-phone.pngadmin-web/src/assets/images/img.pngadmin-web/src/assets/images/index-icon.pngadmin-web/src/assets/images/index/down.pngadmin-web/src/assets/images/index/dxy.pngadmin-web/src/assets/images/index/fbgd.pngadmin-web/src/assets/images/index/gdc.pngadmin-web/src/assets/images/index/jxzgd.pngadmin-web/src/assets/images/index/qbgd.pngadmin-web/src/assets/images/index/top.pngadmin-web/src/assets/images/index/wtc.pngadmin-web/src/assets/images/jpg.pngadmin-web/src/assets/images/left-nav-bg.pngadmin-web/src/assets/images/line-current-icon.pngadmin-web/src/assets/images/line-current.pngadmin-web/src/assets/images/line-nopass.pngadmin-web/src/assets/images/line-pass-icon.pngadmin-web/src/assets/images/line-pass.pngadmin-web/src/assets/images/login-name.pngadmin-web/src/assets/images/login_img.pngadmin-web/src/assets/images/logo.pngadmin-web/src/assets/images/map/cancel.pngadmin-web/src/assets/images/map/close-total.pngadmin-web/src/assets/images/map/end.pngadmin-web/src/assets/images/map/icon-gj.pngadmin-web/src/assets/images/map/icon-gygz.pngadmin-web/src/assets/images/map/icon-gz.pngadmin-web/src/assets/images/map/icon-other.pngadmin-web/src/assets/images/map/icon-qt.pngadmin-web/src/assets/images/map/icon-sclzx.pngadmin-web/src/assets/images/map/icon-sjzx.pngadmin-web/src/assets/images/map/icon-sn.pngadmin-web/src/assets/images/map/icon-xcpzx.pngadmin-web/src/assets/images/map/icon-xxh.pngadmin-web/src/assets/images/map/icon-zhywl.pngadmin-web/src/assets/images/map/ing.pngadmin-web/src/assets/images/map/open-total.pngadmin-web/src/assets/images/map/wait.pngadmin-web/src/assets/images/obg-icon.pngadmin-web/src/assets/images/pdf.pngadmin-web/src/assets/images/phone.pngadmin-web/src/assets/images/png.pngadmin-web/src/assets/images/project/del.pngadmin-web/src/assets/images/project/icon-gj-lv.pngadmin-web/src/assets/images/project/icon-gygz-lv.pngadmin-web/src/assets/images/project/icon-gz-lv.pngadmin-web/src/assets/images/project/icon-other-lv.pngadmin-web/src/assets/images/project/icon-qt-lv.pngadmin-web/src/assets/images/project/icon-return.pngadmin-web/src/assets/images/project/icon-sclzx-lv.pngadmin-web/src/assets/images/project/icon-sjzx-lv.pngadmin-web/src/assets/images/project/icon-sn-lv.pngadmin-web/src/assets/images/project/icon-xcpzx-lv.pngadmin-web/src/assets/images/project/icon-xxh-lv.pngadmin-web/src/assets/images/project/icon-zhywl-lv.pngadmin-web/src/assets/images/project/no-file.pngadmin-web/src/assets/images/project/pdf.pngadmin-web/src/assets/images/project/pic-add.pngadmin-web/src/assets/images/project/ppt.pngadmin-web/src/assets/images/project/txt.pngadmin-web/src/assets/images/project/word.pngadmin-web/src/assets/images/project/xls.pngadmin-web/src/assets/images/staff-female.jpgadmin-web/src/assets/images/staff-male.jpgadmin-web/src/assets/images/talk/dataV-1.pngadmin-web/src/assets/images/talk/dataV-2.pngadmin-web/src/assets/images/talk/head-kf.pngadmin-web/src/assets/images/talk/head-my.pngadmin-web/src/assets/images/talk/icon-doc.pngadmin-web/src/assets/images/talk/icon-pdf.pngadmin-web/src/assets/images/talk/icon-ppt.pngadmin-web/src/assets/images/talk/icon-unknown.pngadmin-web/src/assets/images/talk/icon-xls.pngadmin-web/src/assets/images/text.pngadmin-web/src/assets/images/top-bg.pngadmin-web/src/assets/images/top-title.pngadmin-web/src/assets/images/visualization/bg1.pngadmin-web/src/assets/images/visualization/bg2.pngadmin-web/src/assets/images/visualization/bg3.pngadmin-web/src/assets/images/visualization/bg4.pngadmin-web/src/assets/images/visualization/bg5.pngadmin-web/src/assets/images/visualization/bg6.pngadmin-web/src/assets/images/visualization/col.pngadmin-web/src/assets/images/visualization/left.pngadmin-web/src/assets/images/visualization/line.pngadmin-web/src/assets/images/visualization/right.pngadmin-web/src/assets/images/visualization/v-bg.pngadmin-web/src/assets/images/visualization/v-top-bg.pngadmin-web/src/assets/images/visualization/v-top-title.pngadmin-web/src/assets/images/word.pngadmin-web/src/assets/images/xls.pngadmin-web/src/assets/images/zip.pngadmin-web/src/assets/imgs/app.pngadmin-web/src/assets/imgs/dark.svg
@@ -1,39 +1 @@ <?xml version="1.0" encoding="UTF-8"?> <svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1"> <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset> <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur> <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix> <feMerge> <feMergeNode in="shadowMatrixOuter1"></feMergeNode> <feMergeNode in="SourceGraphic"></feMergeNode> </feMerge> </filter> <rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect> <filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4"> <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset> <feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur> <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix> </filter> </defs> <g id="配置面板" width="48" height="40" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="setting-copy-2" width="48" height="40" transform="translate(-1190.000000, -136.000000)"> <g id="Group-8" width="48" height="40" transform="translate(1167.000000, 0.000000)"> <g id="Group-5-Copy-5" filter="url(#filter-1)" transform="translate(25.000000, 137.000000)"> <mask id="mask-3" fill="white"> <use xlink:href="#path-2"></use> </mask> <g id="Rectangle-18"> <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use> <use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use> </g> <rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="48" height="10"></rect> <rect id="Rectangle-18" fill="#303648" mask="url(#mask-3)" x="0" y="0" width="16" height="40"></rect> </g> </g> </g> </g> </svg> <svg height="45" viewBox="0 0 52 45" width="52" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter id="a" height="122.5%" width="118.8%" x="-9.4%" y="-6.2%"><feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1"/><feColorMatrix in="shadowBlurOuter1" result="shadowMatrixOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/><feMerge><feMergeNode in="shadowMatrixOuter1"/><feMergeNode in="SourceGraphic"/></feMerge></filter><rect id="b" height="40" rx="4" width="48"/><filter id="c" height="110%" width="108.3%" x="-4.2%" y="-2.5%"><feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation=".5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><mask id="d" fill="#fff"><use fill="#fff" fill-rule="evenodd" xlink:href="#b"/></mask></defs><g fill="none" fill-rule="evenodd" filter="url(#a)" height="40" transform="translate(2 1)" width="48"><use fill="#000" filter="url(#c)" xlink:href="#b"/><use fill="#f0f2f5" fill-rule="evenodd" xlink:href="#b"/><path d="m0 0h48v10h-48z" fill="#fff" mask="url(#d)"/><path d="m0 0h16v40h-16z" fill="#303648" mask="url(#d)"/></g></svg> admin-web/src/assets/imgs/default.jpgadmin-web/src/assets/imgs/default_avatar.pngadmin-web/src/assets/imgs/expressi.jpgadmin-web/src/assets/imgs/fahuo.pngadmin-web/src/assets/imgs/fukuan.pngadmin-web/src/assets/imgs/haowu.pngadmin-web/src/assets/imgs/head.gifadmin-web/src/assets/imgs/index_logo.pngadmin-web/src/assets/imgs/kefuImg.jpgadmin-web/src/assets/imgs/laber.pngadmin-web/src/assets/imgs/light.svg
@@ -1,34 +1 @@ <?xml version="1.0" encoding="UTF-8"?> <svg width="48px" height="40px" viewBox="0 0 48 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>light</title> <defs> <rect id="path-1" x="0" y="0" width="48" height="40" rx="4"></rect> <rect id="path-3" x="0" y="0" width="48" height="40" rx="4"></rect> </defs> <g id="后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="light"> <g id="Rectangle-18"> <g id="path-2-link" fill="#000000" fill-rule="nonzero"> <rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect> </g> <g id="path-2-link" fill="#F0F2F5"> <rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect> </g> </g> <g id="Rectangle-11-Clipped"> <mask id="mask-2" fill="white"> <use xlink:href="#path-1"></use> </mask> <g id="path-2"></g> <rect id="Rectangle-11" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-2)" x="0" y="0" width="48" height="10"></rect> </g> <g id="Rectangle-18-Clipped"> <mask id="mask-4" fill="white"> <use xlink:href="#path-3"></use> </mask> <g id="path-2"></g> <rect id="Rectangle-18" fill="#2B68C9" fill-rule="nonzero" mask="url(#mask-4)" x="0" y="0" width="16" height="40"></rect> </g> </g> </g> </svg> <svg height="40" viewBox="0 0 48 40" width="48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><mask id="a" fill="#fff"><rect fill="#fff" fill-rule="evenodd" height="40" rx="4" width="48"/></mask><mask id="b" fill="#fff"><rect fill="#fff" fill-rule="evenodd" height="40" rx="4" width="48"/></mask><g fill="none" fill-rule="evenodd"><rect fill="#000" fill-rule="nonzero" height="40" rx="4" width="48"/><rect fill="#f0f2f5" height="40" rx="4" width="48"/><g fill-rule="nonzero"><path d="m0 0h48v10h-48z" fill="#fff" mask="url(#a)"/><path d="m0 0h16v40h-16z" fill="#2b68c9" mask="url(#b)"/></g></g></svg> admin-web/src/assets/imgs/line.jpgadmin-web/src/assets/imgs/live-logo.gifadmin-web/src/assets/imgs/login-bg.pngadmin-web/src/assets/imgs/login-name.pngadmin-web/src/assets/imgs/logo.pngadmin-web/src/assets/imgs/mobilefoot.pngadmin-web/src/assets/imgs/mobilehead.pngadmin-web/src/assets/imgs/moren.jpgadmin-web/src/assets/imgs/moren.pngadmin-web/src/assets/imgs/new_header1.pngadmin-web/src/assets/imgs/no.pngadmin-web/src/assets/imgs/orderIndex.pngadmin-web/src/assets/imgs/pc.pngadmin-web/src/assets/imgs/phoneBox.pngadmin-web/src/assets/imgs/pingjia.pngadmin-web/src/assets/imgs/pricetitle.jpgadmin-web/src/assets/imgs/routine.pngadmin-web/src/assets/imgs/scan.gifadmin-web/src/assets/imgs/shengxian.pngadmin-web/src/assets/imgs/shouhuo.pngadmin-web/src/assets/imgs/tabBar/cart.pngadmin-web/src/assets/imgs/tabBar/cartd.pngadmin-web/src/assets/imgs/tabBar/cate.pngadmin-web/src/assets/imgs/tabBar/cated.pngadmin-web/src/assets/imgs/tabBar/index.pngadmin-web/src/assets/imgs/tabBar/indexd.pngadmin-web/src/assets/imgs/tabBar/user.pngadmin-web/src/assets/imgs/tabBar/userd.pngadmin-web/src/assets/imgs/tuikuan.pngadmin-web/src/assets/imgs/user_bg.pngadmin-web/src/assets/imgs/wechat_h5.pngadmin-web/src/assets/imgs/weixin.pngadmin-web/src/assets/imgs/wutu.pngadmin-web/src/assets/imgs/youxuan.pngadmin-web/src/assets/logo/logo.pngadmin-web/src/assets/theme/goodsList1.pngadmin-web/src/assets/theme/goodsList2.pngadmin-web/src/assets/theme/goodsList3.pngadmin-web/src/assets/theme/theme1.pngadmin-web/src/assets/theme/theme2.pngadmin-web/src/assets/theme/theme3.pngadmin-web/src/assets/theme/theme4.pngadmin-web/src/assets/theme/theme5.pngadmin-web/src/settings.js
@@ -5,7 +5,7 @@ // 接口请求地址 apiBaseURL: VUE_APP_API_URL, title: '固定资产项目进度', title: '低值易耗品库存管理系统', /** * @type {boolean} true | false admin-web/src/views/dashboard/index.vue
@@ -13,7 +13,7 @@ </el-radio-group> <div class="to-more" @click="nav('/stock/transfer/transferissue')">查看更多 ></div> </div> <el-table v-loading="waitLoading" :data="waitWorkData" class="top-tb" height="265" :show-header="false" <el-table v-loading="waitLoading" :data="waitWorkData" class="top-tb" height="220" :show-header="false" size="medium"> <el-table-column prop="businessFormCode" align="center" width="130"></el-table-column> <el-table-column prop="inWarehouseName" align="left" min-width="130"> @@ -34,7 +34,7 @@ </el-table-column> <el-table-column prop="date" label="操作" fixed="right" align="center" width="80"> <template slot-scope="scope"> <el-button @click.native.prevent="aduitThis(scope.row)" size="mini" type="primary">处理</el-button> <el-button style="padding: 4.5px 15px" @click.native.prevent="aduitThis(scope.row)" size="mini" type="primary">处理</el-button> </template> </el-table-column> <el-empty slot="empty" description="暂无数据"></el-empty> @@ -54,7 +54,7 @@ </el-radio-group> <div class="to-more" @click="nav('/stock/ledger/alertQuery')">查看更多 ></div> </div> <el-table v-loading="earlyLoading" :data="earlyWarningData" class="top-tb" height="265" :show-header="false" <el-table v-loading="earlyLoading" :data="earlyWarningData" class="top-tb" height="220" :show-header="false" size="medium"> <el-table-column prop="baseGoodsTemplateName" align="left" min-width="130"> <template slot-scope="{row}"> @@ -334,9 +334,10 @@ .total-item { width: 19%; padding: 12px 20px; border-radius: 8px; border-radius: 4px; margin-right: 1%; background-color: #FFFFFF; border-left: 4px solid #fb6260; } .total-item:last-child { admin-web/src/views/departmentitem/itemdis/disDetails/edit.vue
@@ -173,6 +173,7 @@ }) this.formData.list = model; this.list = res this.loading = false }); }, methods: { admin-web/src/views/login/index.vue
@@ -1,6 +1,6 @@ <template> <div class="login-container"> <img src="@/assets/images/login-name.png" alt="固定资产项目建设进度" class="logo-name"/> <img src="@/assets/images/login-name.png" alt="低值易耗品库存管理系统" class="logo-name"/> <el-row type="flex" justify="center" admin-web/src/views/stock/accessStock/outbound/edit.vue
@@ -1,6 +1,6 @@ <template> <win-md class="stock-edit" :title="`${setting.title}出库`" @close="close" :width="'800px'"> <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> <el-form v-loading="loading" class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> <div class="main-w"> <el-row :gutter="24" class="headerHeight"> <el-col :span="12"> @@ -205,7 +205,7 @@ callback(); }; return { loading: false, loading: true, btnloading: false, warehouseOptions: [], // 出库仓库列表 categoryOptions: [], // 物品分类列表 @@ -264,17 +264,18 @@ }, methods: { async init() { this.getWarehouseList(); this.getgoodsTemplate(); this.getgoodsModel(); await this.getWarehouseList(); await this.getgoodsTemplate(); await this.getgoodsModel(); // 获取物品分类列表 const treeRes = await getTree(); this.categoryOptions = this.removeEmptyChildren(treeRes); this.loading = false }, // 获取出库仓库列表 getWarehouseList() { selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) async getWarehouseList() { await selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) .then((res) => { this.warehouseOptions = res; if (res.length) { @@ -302,8 +303,8 @@ }, // 获取物品名称列表 getgoodsTemplate(id, index) { goodsTemplate({ categoryId: id || '' }).then((res) => { async getgoodsTemplate(id, index) { await goodsTemplate({ categoryId: id || '' }).then((res) => { if (index || index == 0) { this.$set(this.formData.goods[index], 'goodsOptions', res); } else { @@ -313,8 +314,8 @@ }, // 规格型号 getgoodsModel(id, index) { goodsModel({ goodsTemplatesId: id || '' }).then((res) => { async getgoodsModel(id, index) { await goodsModel({ goodsTemplatesId: id || '' }).then((res) => { if (index || index == 0) { this.$set(this.formData.goods[index], 'modelsOptions', res); } else { @@ -428,18 +429,22 @@ handleSubmit() { this.$refs['ruleForm'].validate((valid) => { if (valid) { if (this.loading) return this.loading = true; this.btnloading = true; console.log('this.formData', this.formData); outputAdd(this.formData) .then((res) => { this.$message.success('保存成功!'); this.btnloading = false; this.loading = false; this.close(); this.$emit('search'); }) .catch((err) => { console.log('edit err', err); this.btnloading = false; this.loading = false; this.$message.error('保存失败'); }); } else { admin-web/src/views/stock/accessStock/outbound/index.vue
@@ -12,8 +12,8 @@ <div class="table-tool-bar" style="margin-bottom: 15px;"> <my-button name="新增" @click="handleAdd" site="tools" size="medium" /> </div> <div> <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading"> <div v-loading="loading"> <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }"> <el-row v-if="list.length" class="card" :gutter="5"> <el-col v-for="(item, index) in list" :key="index" class="cm-item"> <el-card class="card-data"> admin-web/src/views/stock/procure/purchaseOrder/edit.vue
@@ -1,24 +1,24 @@ <template> <win-md class="stock-edit" :title="`${setting.title}采购入库`" @close="close" :width="'800px'" :loading="loading"> <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> <el-form v-loading="loading" class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> <div class="main-w"> <el-row :gutter="24" class="headerHeight"> <el-col :span="12"> <el-form-item label="入库仓库" prop="warehouseId"> <el-select v-model="formData.warehouseId" placeholder="请选择" style="width: 100%"> <el-option v-for="item in warehouses" :key="item.id" :label="item.warehouseName" :value="item.id" /> <el-option v-for="item in warehouses" :key="item.id" :label="item.warehouseName" :value="item.id"/> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="采购时间" prop="procureTime"> <el-date-picker v-model="formData.procureTime" type="datetime" value="yyyy-MM-dd HH:mm:ss" value-format="yyyyMMddHHmmss" placeholder="请选择日期" style="width: 100%" v-model="formData.procureTime" type="datetime" value="yyyy-MM-dd HH:mm:ss" value-format="yyyyMMddHHmmss" placeholder="请选择日期" style="width: 100%" > </el-date-picker> </el-form-item> @@ -28,7 +28,7 @@ <el-col :span="12"> <el-form-item label="采购类型" prop="buyType"> <el-select v-model="formData.buyType" placeholder="请选择" style="width: 100%"> <el-option v-for="item in buyTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in buyTypeOptions" :key="item.value" :label="item.label" :value="item.value"/> </el-select> </el-form-item> </el-col> @@ -44,42 +44,42 @@ <el-row :gutter="24"> <el-col :span="12"> <el-form-item label="物品分类" :prop="`procureGoods[${goodsIndex}].baseCategoryIds`" :rules="{ label="物品分类" :prop="`procureGoods[${goodsIndex}].baseCategoryIds`" :rules="{ required: true, message: '请选择', trigger: 'change', }" > <el-cascader v-model="goodsItem.baseCategoryIds" :options="categoryOptions" :props="{ value: 'id' }" @change="categoryChange($event, goodsIndex)" style="width: 100%" v-model="goodsItem.baseCategoryIds" :options="categoryOptions" :props="{ value: 'id' }" @change="categoryChange($event, goodsIndex)" style="width: 100%" ></el-cascader> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="物品名称" :prop="`procureGoods[${goodsIndex}].baseGoodsTemplateId`" :rules="rules.baseGoodsTemplateId" label="物品名称" :prop="`procureGoods[${goodsIndex}].baseGoodsTemplateId`" :rules="rules.baseGoodsTemplateId" > <el-select v-model="goodsItem.baseGoodsTemplateId" placeholder="请先择物品分类" filterable :disabled="!goodsItem.baseCategoryId" style="width: 100%" @change="goodsTemplateChange($event, goodsIndex)" v-model="goodsItem.baseGoodsTemplateId" placeholder="请先择物品分类" filterable :disabled="!goodsItem.baseCategoryId" style="width: 100%" @change="goodsTemplateChange($event, goodsIndex)" > <el-option v-for="item in goodsItem.goodsOptions" :key="item.id" :label="item.goodsName" :value="item.id" v-for="item in goodsItem.goodsOptions" :key="item.id" :label="item.goodsName" :value="item.id" /> </el-select> </el-form-item> @@ -88,35 +88,35 @@ <el-row :gutter="24"> <el-col :span="12"> <el-form-item label="规格型号" :prop="`procureGoods[${goodsIndex}].modelsIds`" :rules="{ label="规格型号" :prop="`procureGoods[${goodsIndex}].modelsIds`" :rules="{ required: true, message: '请选择', trigger: 'change', }" > <el-select v-model="goodsItem.modelsIds" multiple placeholder="请先择物品名称" :disabled="!goodsItem.baseCategoryId" @change="modelChange($event, goodsIndex)" @remove-tag="modelRemoveTag($event, goodsIndex)" style="width: 100%" v-model="goodsItem.modelsIds" multiple placeholder="请先择物品名称" :disabled="!goodsItem.baseCategoryId" @change="modelChange($event, goodsIndex)" @remove-tag="modelRemoveTag($event, goodsIndex)" style="width: 100%" > <el-option v-for="item in goodsItem.modelsOptions" :key="item.id" :label="item.modelName" :value="item.id" v-for="item in goodsItem.modelsOptions" :key="item.id" :label="item.modelName" :value="item.id" /> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="供货商" prop="supplier"> <el-input v-model="goodsItem.supplier" clearable maxlength="20" show-word-limit /> <el-input v-model="goodsItem.supplier" clearable maxlength="20" show-word-limit/> </el-form-item> </el-col> </el-row> @@ -134,15 +134,15 @@ <el-table-column prop="priceYuan" label="单价(元)" align="center"> <template slot-scope="scope"> <el-form-item label-width="0" style="margin-bottom: 0" :prop="`procureGoods[${goodsIndex}].models[${scope.$index}].priceYuan`" :rules="rules.priceYuan" label-width="0" style="margin-bottom: 0" :prop="`procureGoods[${goodsIndex}].models[${scope.$index}].priceYuan`" :rules="rules.priceYuan" > <el-input type="number" v-model.number="scope.row.priceYuan" @change="priceChange($event, goodsIndex, scope.$index)" type="number" v-model.number="scope.row.priceYuan" @change="priceChange($event, goodsIndex, scope.$index)" ></el-input> </el-form-item> </template> @@ -150,10 +150,10 @@ <el-table-column prop="counts" label="采购数量" align="center"> <template slot-scope="scope"> <el-form-item label-width="0" style="margin-bottom: 0" :prop="`procureGoods[${goodsIndex}].models[${scope.$index}].counts`" :rules="rules.counts" label-width="0" style="margin-bottom: 0" :prop="`procureGoods[${goodsIndex}].models[${scope.$index}].counts`" :rules="rules.counts" > <el-input v-model.number="scope.row.counts"></el-input> </el-form-item> @@ -162,30 +162,32 @@ </el-table> <div class="btn-group"> <el-button v-if="formData.procureGoods.length > 1" name="移除" type="danger" plain size="mini" @click="removeGoods(goodsIndex)" >移除</el-button v-if="formData.procureGoods.length > 1" name="移除" type="danger" plain size="mini" @click="removeGoods(goodsIndex)" >移除 </el-button > <el-button v-if="formData.procureGoods.length - 1 == goodsIndex" name="新增物品" type="primary" plain size="mini" @click="addGoods" >新增物品</el-button v-if="formData.procureGoods.length - 1 == goodsIndex" name="新增物品" type="primary" plain size="mini" @click="addGoods" >新增物品 </el-button > </div> </div> </div> </el-form> <div slot="footer" align="center" class="dialog-footer"> <my-button name="取消" site="form" @click="close" /> <my-button name="保存" site="form" @click="handleSubmit" /> <my-button name="取消" site="form" @click="close"/> <my-button name="保存" site="form" @click="handleSubmit"/> </div> </win-md> </template> @@ -207,11 +209,12 @@ import {mapGetters} from 'vuex'; export default { components: { MyButton, winMd, upload }, components: {MyButton, winMd, upload}, props: { setting: { type: Object, default: () => {}, default: () => { }, }, }, data() { @@ -296,16 +299,16 @@ unit: null, //单位 }, rules: { warehouseId: [{ required: true, message: '请选择', trigger: 'change' }], procureTime: [{ required: true, message: '请选择', trigger: 'change' }], buyType: [{ required: true, message: '请选择', trigger: 'change' }], warehouseId: [{required: true, message: '请选择', trigger: 'change'}], procureTime: [{required: true, message: '请选择', trigger: 'change'}], buyType: [{required: true, message: '请选择', trigger: 'change'}], procureDoc: [{ required: true, message: '请上传', trigger: 'change' }], baseCategoryIds: [{ required: true, message: '请选择', trigger: 'change' }], baseGoodsTemplateId: [{ validator: checkGoodsTemplateId, trigger: ['blur', 'change'] }], modelsIds: [{ required: true, message: '请选择', trigger: 'change' }], priceYuan: [{ validator: checkPrice, trigger: 'blur' }], counts: [{ validator: checkCounts, trigger: 'blur' }], procureDoc: [{required: true, message: '请上传', trigger: 'change'}], baseCategoryIds: [{required: true, message: '请选择', trigger: 'change'}], baseGoodsTemplateId: [{validator: checkGoodsTemplateId, trigger: ['blur', 'change']}], modelsIds: [{required: true, message: '请选择', trigger: 'change'}], priceYuan: [{validator: checkPrice, trigger: 'blur'}], counts: [{validator: checkCounts, trigger: 'blur'}], }, uploadSettings: { @@ -328,55 +331,57 @@ }, methods: { async init() { this.getWarehouseList(); this.getgoodsTemplate(); this.getgoodsModel(); await this.getWarehouseList(); // 获取物品分类列表 const treeRes = await getTree(); this.categoryOptions = this.removeEmptyChildren(treeRes); if (this.setting.id) { const detail = await procureDetail({ id: this.setting.id }); const detail = await procureDetail({id: this.setting.id}); this.formData = Object.assign(this.formData, detail); if (this.formData.procureDoc) { this.fileList = JSON.parse(this.formData.procureDoc); } this.$set(this.formData, 'buyType', this.formData.buyType.toString()); this.formData.procureTime = this.formData.procureTime.toString(); this.formData.procureGoods.map((item, index) => { this.formData.procureGoods.map(async (item, index) => { // 根据子集ID拼接物品分类列表 item.baseCategoryIds = findParentIds(this.categoryOptions, item.baseCategoryId); this.$set( this.formData.procureGoods[index], 'modelsIds', item.models.map((v) => v.baseGoodsModelsId), this.formData.procureGoods[index], 'modelsIds', item.models.map((v) => v.baseGoodsModelsId), ); this.getgoodsTemplate(item.baseCategoryId, index); this.getgoodsModel(item.baseGoodsTemplateId, index); item.models.forEach((child, childIndex) => { await this.getgoodsTemplate(item.baseCategoryId, index); await this.getgoodsModel(item.baseGoodsTemplateId, index); await item.models.forEach((child, childIndex) => { this.$set(this.formData.procureGoods[index].models[childIndex], 'priceYuan', child.price / 100); }); return item; }); } else { await this.getgoodsTemplate(); await this.getgoodsModel(); } this.loading = false; }, // 获取入库仓库列表 getWarehouseList() { selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) .then((res) => { this.warehouses = res; if (!this.setting.id && res.length) { this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); } if (this.warehouses.length && !this.formData.warehouseId) { // 默认选中第一个仓库 this.formData.warehouseId = this.warehouses[0].id; } }) .catch((err) => { console.log('err', err); }); async getWarehouseList() { await selectTenantWarehouse({agencyId: this.userInfo.tenantId}) .then((res) => { this.warehouses = res; if (!this.setting.id && res.length) { this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); } if (this.warehouses.length && !this.formData.warehouseId) { // 默认选中第一个仓库 this.formData.warehouseId = this.warehouses[0].id; } }) .catch((err) => { console.log('err', err); }); }, removeEmptyChildren(arr) { @@ -391,8 +396,8 @@ }, // 获取物品名称列表 getgoodsTemplate(id, index) { goodsTemplate({ categoryId: id || '' }).then((res) => { async getgoodsTemplate(id, index) { await goodsTemplate({categoryId: id || ''}).then((res) => { if (index || index == 0) { this.$set(this.formData.procureGoods[index], 'goodsOptions', res); } else { @@ -402,8 +407,8 @@ }, // 规格型号 getgoodsModel(id, index) { goodsModel({ goodsTemplatesId: id || '' }).then((res) => { async getgoodsModel(id, index) { await goodsModel({goodsTemplatesId: id || ''}).then((res) => { if (index || index == 0) { this.$set(this.formData.procureGoods[index], 'modelsOptions', res); } else { @@ -462,7 +467,7 @@ e.forEach((item) => { if (str.indexOf(item) == -1) { let temp = this.goodsModelAll.find((v) => v.id == item); arr.push({ ...this.modelsItem, baseGoodsModelsId: item, unit: temp.unit }); arr.push({...this.modelsItem, baseGoodsModelsId: item, unit: temp.unit}); } }); this.formData.procureGoods[index].models = arr; @@ -500,29 +505,30 @@ handleSubmit() { this.$refs['ruleForm'].validate((valid) => { if (valid) { if (this.loading) return this.loading = true; if (!this.setting.id) { procureAdd(this.formData) .then((res) => { this.$message.success('保存成功!'); this.close(); this.$emit('search'); }) .catch((err) => { this.loading = false; this.$message.error('保存失败'); }); .then((res) => { this.$message.success('保存成功!'); this.close(); this.$emit('search'); }) .catch((err) => { this.loading = false; this.$message.error('保存失败'); }); } else { procureEdit(this.formData) .then((res) => { this.$message.success('保存成功!'); this.close(); this.$emit('search'); }) .catch((err) => { this.loading = false; this.$message.error('保存失败'); }); .then((res) => { this.$message.success('保存成功!'); this.close(); this.$emit('search'); }) .catch((err) => { this.loading = false; this.$message.error('保存失败'); }); } } else { this.$message.error('校验未通过,请检查。'); admin-web/vue.config.js
@@ -6,7 +6,7 @@ return path.join(__dirname, dir) } const name = defaultSettings.title || '低值易耗品管理系统' // page title const name = defaultSettings.title || '低值易耗品库存管理系统' // page title // If your port is set to 80, // use administrator privileges to execute the command line.