From e3cadadc1e03e0648a079f7fc8bf8b3d0d64bc27 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 15 四月 2024 15:54:04 +0800 Subject: [PATCH] wms的出库入库调拨 3个模块新建,编辑,列表增加 主管,会计,保管员3个字段以及新建,编辑联调 --- src/components/makepager/SimpleSearchInput.vue | 139 +++++++++++++++++++++++++++++++++------------ 1 files changed, 101 insertions(+), 38 deletions(-) diff --git a/src/components/makepager/SimpleSearchInput.vue b/src/components/makepager/SimpleSearchInput.vue index 76a5dee..9b93314 100644 --- a/src/components/makepager/SimpleSearchInput.vue +++ b/src/components/makepager/SimpleSearchInput.vue @@ -44,21 +44,37 @@ <ul class="infinite-list" @scroll="loadList"> <div class="background_color_eee"> <el-row :gutter="0"> - <el-col :span="13"> - <div class="grid-content bg-purple"> - <span class="name">浜у搧鍚嶇О</span> - </div> - </el-col> - <el-col :span="8"> - <div class="grid-content bg-purple">浜у搧缂栫爜</div> - </el-col> + <template v-if="request==2"> + <el-col :span="12"> + <div class="grid-content bg-purple"> + <span class="name">浜哄憳鍚嶇О</span> + </div> + </el-col> + <el-col :span="12"> + <div class="grid-content bg-purple">浜哄憳ID</div> + </el-col> - <!-- <el-col :span="5"> - <div class="grid-content bg-purple">鍦ㄥ簱鏁伴噺</div> - </el-col> --> - <el-col :span="3"> - <div class="grid-content bg-purple">鍗曚綅</div> - </el-col> + <!-- <el-col :span="5"> + <div class="grid-content bg-purple">鍦ㄥ簱鏁伴噺</div> + </el-col> --> + </template> + <template v-else> + <el-col :span="13"> + <div class="grid-content bg-purple"> + <span class="name">浜у搧鍚嶇О</span> + </div> + </el-col> + <el-col :span="8"> + <div class="grid-content bg-purple">浜у搧缂栫爜</div> + </el-col> + + <!-- <el-col :span="5"> + <div class="grid-content bg-purple">鍦ㄥ簱鏁伴噺</div> + </el-col> --> + <el-col :span="3"> + <div class="grid-content bg-purple">鍗曚綅</div> + </el-col> + </template> </el-row> </div> <li class="empty" v-if="listData.length === 0">鏆傛棤鏁版嵁</li> @@ -70,26 +86,45 @@ :class="selectValue == user.id ? 'highlight-color' : ''" > <el-row :gutter="0"> - <el-col :span="13"> - <div class="grid-content bg-purple" :title="user[obj.name]"> - {{ user[obj.name] || "--" }} - </div> - </el-col> - <el-col :span="8"> - <div class="grid-content bg-purple" :title="user.id"> - <span class="name">{{ user.id || "--" }}</span> - </div> - </el-col> - <!-- <el-col :span="6"> - <div class="grid-content bg-purple" :title="user.amount"> - {{ user.amount || "--" }} - </div> - </el-col> --> - <el-col :span="3"> - <div class="grid-content bg-purple" :title="user.unit"> - {{ user.unit || "--" }} - </div> - </el-col> + <template v-if="request==2"> + <el-col :span="12"> + <div class="grid-content bg-purple" :title="user[obj.name]"> + {{ user[obj.name] || "--" }} + </div> + </el-col> + <el-col :span="12"> + <div class="grid-content bg-purple" :title="user.id"> + <span class="name">{{ user.id || "--" }}</span> + </div> + </el-col> + <!-- <el-col :span="6"> + <div class="grid-content bg-purple" :title="user.amount"> + {{ user.amount || "--" }} + </div> + </el-col> --> + </template> + <template v-else> + <el-col :span="13"> + <div class="grid-content bg-purple" :title="user[obj.name]"> + {{ user[obj.name] || "--" }} + </div> + </el-col> + <el-col :span="8"> + <div class="grid-content bg-purple" :title="user.id"> + <span class="name">{{ user.id || "--" }}</span> + </div> + </el-col> + <!-- <el-col :span="6"> + <div class="grid-content bg-purple" :title="user.amount"> + {{ user.amount || "--" }} + </div> + </el-col> --> + <el-col :span="3"> + <div class="grid-content bg-purple" :title="user.unit"> + {{ user.unit || "--" }} + </div> + </el-col> + </template> </el-row> </li> <li class="loading">{{ loading ? "鍔犺浇涓�" : "宸茬粡鍒板簳" }}</li> @@ -103,7 +138,7 @@ </template> <script> -import { getProductList } from "@/api/product/product" +import { getProductList,getPersonnelList } from "@/api/product/product" // import DataSet from "@/views/ShopFloorControl/facilty/components/DataSet"; export default { name: "UserSimpleSearchInput", @@ -151,7 +186,8 @@ size: { type: [String], defalut: "medium" - } + }, + }, data() { return { @@ -203,10 +239,16 @@ name: "gaugeName", id: "id" } + }else if (val == 2) { + // 鍏朵粬鎼滅储閰嶇疆杩欓噷 + this.obj = { + name: "name", + id: "id" + } } }, // 鏇存柊鎼滅储鍒楄〃 - updateSearchList(needInit = false, param = {}) { + async updateSearchList(needInit = false, param = {}) { let listParams // 鍒濆鍖栫敤鎴蜂俊鎭垪琛ㄥ叆鍙� if (needInit) { @@ -224,9 +266,30 @@ this.loading = true if (this.request) { // 鍏朵粬 + // 浜哄憳 + if (this.request == 2) { + //浜哄憳 request==1 + listParams = { + condition: this.keyword, + page: this.page, + pageSize: this.pageSize, + ...param, + }; + const res = await getPersonnelList(listParams); + if (res && res.code == "200" && res.data) { + this.loading = false; + this.page = res.page + 1; + this.count = res.total; + if (res.data && Array.isArray(res.data)) { + let arr = JSON.parse(JSON.stringify(res.data)); + this.listData = this.listData.concat(arr); + } + this.num += 1; + } + } } else { // 浜у搧 - getProductList(listParams).then((res) => { + await getProductList(listParams).then((res) => { if (res && res.code === 200 && res.data) { this.loading = false this.page = this.page + 1 -- Gitblit v1.8.0