From d68b036a3b3c67273b8effa3c9925ef3869a91ba Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 07 二月 2024 13:56:50 +0800 Subject: [PATCH] wms项目 wms系统参数设置的页面开发+路由+是否显示表头配置 --- src/views/warehouseManage/position/AddDialog.vue | 214 ++++++++++++++++++++++++++++++----------------------- 1 files changed, 121 insertions(+), 93 deletions(-) diff --git a/src/views/warehouseManage/position/AddDialog.vue b/src/views/warehouseManage/position/AddDialog.vue index e61fef4..b7f7ca6 100644 --- a/src/views/warehouseManage/position/AddDialog.vue +++ b/src/views/warehouseManage/position/AddDialog.vue @@ -19,7 +19,14 @@ <span>鍔ㄤ綔</span> <!-- <el-button plain size="mini" style="margin-left: 15px" @click="deleteClick">鍒犻櫎</el-button> --> </span> - <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">缂栬緫</el-button> + <el-button + v-if="showEdit && editConfig.infomation.type == 3" + plain + size="mini" + style="margin-left: 15px" + @click="editClick" + >缂栬緫</el-button + > </div> </div> <!-- 鍐呭 --> @@ -27,115 +34,118 @@ ref="form" :model="editConfig.infomation" :rules="rules" - label-position="left" - label-width="110px" + label-position="right" + label-width="130px" size="mini" - style="height: 60vh; overflow-x: hidden" > - <div> - <!-- <div>aaa</div> --> - <FormBtnsView :showPosition="true" :showWarehouse="false" @productClick="productClick" /> + <div class="content-number-bg"> + <FormBtnsView :showPosition="true" :showPositionCursor="this.editConfig.title != '鏂板缓'?true:false" @positionReport="positionReport" :showWarehouse="false" @productClick="productClick" /> </div> <div class="basic-info"> <div class="basic-info-view"> <el-row> - <el-col :span="24" class="line_height_30px"> + <el-col :span="12" class="line_height_30px"> <el-form-item label="浣嶇疆鍚嶇О" prop="name"> <el-input :disabled="!showFooter" v-model="editConfig.infomation.name" placeholder="璇疯緭鍏�" + style="width: 90%" ></el-input> </el-form-item> </el-col> - <el-col :span="24"> + <el-col :span="12"> <el-form-item label="涓婄骇浣嶇疆" prop="parentId"> <el-select v-model="editConfig.infomation.parentId" placeholder="璇烽�夋嫨" size="mini" - style="width: 45%" - :disabled="!showFooter" + :disabled="editCommonConfig.title != '鏂板缓'" + style="width: 90%" > - <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"> + <el-option v-for="item in positionList" :key="item.id" :label="item.jointName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> </el-row> - </div> - <div class="bottom"> - <div class="left"> - <div class="second-label">鍏朵粬淇℃伅</div> - <el-form-item label="浣嶇疆绫诲瀷" prop="type"> - <el-select - v-model="editConfig.infomation.type" - filterable - :disabled="!showFooter" - placeholder="璇烽�夋嫨" - style="width: 100%" - no-data-text="鏆傛棤鏁版嵁" + <div class="purchase-view"> + <div class="left"> + <el-form-item label="浣嶇疆绫诲瀷" prop="type"> + <el-select + v-model="editConfig.infomation.type" + filterable + :disabled="editCommonConfig.title != '鏂板缓'" + placeholder="璇烽�夋嫨" + style="width: 90%" + no-data-text="鏆傛棤鏁版嵁" + > + <el-option v-for="item in positionTypeList" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item + label="鏄竴涓姤搴熶綅缃�" + v-if="editConfig.infomation.type == 3 || editConfig.infomation.type == 5" + prop="isScrapLocation" > - <el-option v-for="item in positionTypeList" :key="item.id" :label="item.name" :value="item.id"> - </el-option> - </el-select> - </el-form-item> - <el-form-item - label="鏄竴涓姤搴熶綅缃�" - v-if="editConfig.infomation.type == 3 || editConfig.infomation.type == 5" - prop="isScrapLocation" - > - <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.isScrapLocation"> </el-checkbox> - </el-form-item> - <el-form-item label="鏄竴涓��鍥炰綅缃�" prop="isReturnLocation"> - <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.isReturnLocation"> </el-checkbox> - </el-form-item> - <el-form-item label="琛ュ厖浣嶇疆" v-if="editConfig.infomation.type == 3" prop="replenishLocation"> - <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.replenishLocation"> </el-checkbox> - </el-form-item> + <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.isScrapLocation"> </el-checkbox> + </el-form-item> + <el-form-item label="鏄竴涓��鍥炰綅缃�" prop="isReturnLocation"> + <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.isReturnLocation"> </el-checkbox> + </el-form-item> + <el-form-item label="琛ュ厖浣嶇疆" v-if="editConfig.infomation.type == 3" prop="replenishLocation"> + <el-checkbox :disabled="!showFooter" v-model="editConfig.infomation.replenishLocation"> </el-checkbox> + </el-form-item> + </div> + <div class="right" v-if="editConfig.infomation.type == 3 || editConfig.infomation.type == 7"> + <!-- <div class="second-label">寰幆璁℃暟</div> --> + <el-form-item label="鐩樼偣棰戠巼锛堝ぉ锛�" prop="countFrequency"> + <el-input + :disabled="!showFooter" + v-model="editConfig.infomation.countFrequency" + placeholder="璇疯緭鍏�" + style="width: 90%" + ></el-input> + </el-form-item> + <el-form-item label="鏈�杩戞湁鏁堢洏鐐�" prop="recentlyCount"> + <el-date-picker + :disabled="!showFooter" + v-model="editConfig.infomation.recentlyCount" + type="date" + placeholder="閫夋嫨鏃ユ湡" + value-format="yyyy-MM-dd" + style="width: 90%" + > + </el-date-picker> + </el-form-item> + <el-form-item label="棰勮涓嬩竴娆$洏鐐�" prop="nextCount"> + <el-date-picker + :disabled="!showFooter" + v-model="editConfig.infomation.nextCount" + type="date" + placeholder="閫夋嫨鏃ユ湡" + value-format="yyyy-MM-dd" + style="width: 90%" + > + </el-date-picker> + </el-form-item> + </div> </div> - <div class="left" v-if="editConfig.infomation.type == 3 || editConfig.infomation.type == 7"> - <div class="second-label">寰幆璁℃暟</div> - <el-form-item label="鐩樼偣棰戠巼锛堝ぉ锛�" prop="countFrequency"> - <el-input - :disabled="!showFooter" - v-model="editConfig.infomation.countFrequency" - placeholder="璇疯緭鍏�" - ></el-input> - </el-form-item> - <el-form-item label="鏈�杩戞湁鏁堢洏鐐�" prop="recentlyCount"> - <el-date-picker - :disabled="!showFooter" - v-model="editConfig.infomation.recentlyCount" - type="date" - placeholder="閫夋嫨鏃ユ湡" - value-format="yyyy-MM-dd" - > - </el-date-picker> - </el-form-item> - <el-form-item label="棰勮涓嬩竴娆$洏鐐�" prop="nextCount"> - <el-date-picker - :disabled="!showFooter" - v-model="editConfig.infomation.nextCount" - type="date" - placeholder="閫夋嫨鏃ユ湡" - value-format="yyyy-MM-dd" - > - </el-date-picker> - </el-form-item> - </div> + <el-form-item label="澶囨敞" prop="notes"> + <el-input + :disabled="!showFooter" + type="textarea" + placeholder="澶栭儴澶囨敞" + :autosize="{ minRows: 3, maxRows: 4 }" + maxlength="500" + clearable + v-model="editConfig.infomation.notes" + style="width: 96%" + ></el-input> + </el-form-item> </div> - <el-form-item label="" prop="notes" label-width="20px"> - <el-input - :disabled="!showFooter" - type="textarea" - placeholder="澶栭儴澶囨敞" - :autosize="{ minRows: 3, maxRows: 4 }" - maxlength="500" - clearable - v-model="editConfig.infomation.notes" - ></el-input> - </el-form-item> + <div class="bottom"> <!-- <div class="left"> --> <!-- <div class="second-label">鐗╂祦</div> --> @@ -163,9 +173,9 @@ </div> </el-form> <!-- 灏� --> - <div v-if="showFooter" slot="footer" class="dialog-footer"> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" size="small" @click="saveClick('form')" :disabled="!showFooter">淇濆瓨</el-button> <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> @@ -199,6 +209,8 @@ editConfig: this.editCommonConfig, rules: { name: [{ required: true, message: "璇疯緭鍏�", trigger: "change" }], + // parentId: [{ required: true, message: "璇烽�夋嫨浣嶇疆绫诲瀷", trigger: "change" }], + type: [{ required: true, message: "璇烽�夋嫨涓婄骇浣嶇疆", trigger: "change" }], countFrequency: [ { required: false, @@ -217,6 +229,7 @@ } }, created() { + console.log(this.editConfig.infomation) this.setBottonView() }, methods: { @@ -236,11 +249,22 @@ callback() } }, + // 褰撳墠搴撳瓨 + positionReport(){ + if(this.editConfig.title != '鏂板缓'){ + this.$router.push({ + name: "locationReport", + params: { + locationId: this.editConfig.infomation.id + } + }) + } + }, // 璺嚎 productClick() {}, // 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず setBottonView() { - if (this.editConfig.title === "鏂板缓") { + if (this.editConfig.title === "鏂板缓" || this.editConfig.title === "缂栬緫") { this.showEdit = false this.showFooter = true } else if (this.editConfig.infomation.status === "瀹屾垚") { @@ -290,6 +314,7 @@ } if (data.id) { params.id = data.id + params.jointName = data.jointName } return params }, @@ -347,18 +372,21 @@ .content-status { display: flex; } +.content-number-bg { + margin-top: 10px; +} .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; - } + // 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 { display: flex; margin-left: 20px; -- Gitblit v1.8.0