From e7ccd2a06e4cdf3709e699507e1e15379ded5b83 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期一, 06 十一月 2023 11:25:09 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/WMS into dev
---
src/views/overview/OverviewListView.vue | 14
src/views/reportForm/inventoryReport/index.vue | 4
src/views/warehouseManage/listingRules/index.vue | 119 ++++--
src/views/productManage/product/index.vue | 20
src/views/warehouseManage/warehouse/index.vue | 6
src/views/overview/index.vue | 8
src/api/warehouseManage/warehouse.js | 13
src/components/makepager/SearchCommonView.vue | 142 ++++++++
src/components/makepager/CommonFormTableView.vue | 4
src/api/reportForm/inventoryRwport.js | 7
src/api/overview/overview.js | 13
src/views/productManage/product/AddProductDialog.vue | 58 ++
src/views/warehouseManage/bussinessType/index.vue | 6
src/views/overview/AddOverviewDialog.vue | 10
src/views/warehouseManage/bussinessType/AddBussinessType.vue | 4
src/common/untils/request.js | 61 +++
src/views/productManage/reorderRules/index.vue | 20 +
src/api/common/other.js | 8
src/views/operate/orderPoint/index.vue | 232 ++++++-------
src/views/productManage/productCategory/AddProductCategoryDialog.vue | 93 +++--
src/components/makepager/FormBtnsView.vue | 29 +
src/api/product/reorderRules.js | 9
src/views/warehouseManage/position/index.vue | 45 +-
23 files changed, 612 insertions(+), 313 deletions(-)
diff --git a/src/api/common/other.js b/src/api/common/other.js
index 08db148..733ab2b 100644
--- a/src/api/common/other.js
+++ b/src/api/common/other.js
@@ -1,9 +1,11 @@
// import request from "@/common/untils/request.js"
-import axios from "axios"
+import request from "@/common/untils/request";
// 鏌ヨ鍏徃鍒楄〃
-export const getCompanyList = async (data) => {
- return await axios.get(`/api-wms/v1/company/company`, {
+export const getCompanyList = (data) => {
+ return request({
+ url: "/api-wms/v1/company/company",
+ method: "get",
params: data
})
}
diff --git a/src/api/overview/overview.js b/src/api/overview/overview.js
index 3e2190b..2420df3 100644
--- a/src/api/overview/overview.js
+++ b/src/api/overview/overview.js
@@ -1,15 +1,18 @@
import request from "@/common/untils/request.js"
-import axios from "axios"
// 鏌ヨ涓氬姟绫诲瀷鍒楄〃
-export const getOperationType = async (data) => {
- return await axios.get(`/api-wms/v1/operationType/operationType`, {
+export const getOperationType = (data) => {
+ return request({
+ url: "/api-wms/v1/operationType/operationType",
+ method: "get",
params: data
})
}
// 鏌ヨ涓氬姟绫诲瀷鍒楄〃--鍐呴儴璋冩嫧
-export const getListTransfer = async (data) => {
- return await axios.get(`/api-wms/v1/operationType/listTransfer`, {
+export const getListTransfer = (data) => {
+ return request({
+ url: "/api-wms/v1/operationType/listTransfer",
+ method: "get",
params: data
})
}
diff --git a/src/api/product/reorderRules.js b/src/api/product/reorderRules.js
index 2ddd9e9..62bc0b9 100644
--- a/src/api/product/reorderRules.js
+++ b/src/api/product/reorderRules.js
@@ -39,11 +39,10 @@
data
})
}
-// 鑾峰彇浣嶇疆鍒楄〃
-export function getLocationList(data) {
+// 鑾峰彇浣嶇疆鍒楄〃鏍�
+export function getLocationTreeList() {
return request({
- url: "/api-wms/v1/location/getLocationList",
- method: "post",
- data
+ url: "/api-wms/v1/location/getLocationTreeList",
+ method: "get"
})
}
diff --git a/src/api/reportForm/inventoryRwport.js b/src/api/reportForm/inventoryRwport.js
index 114eb10..68eaa3a 100644
--- a/src/api/reportForm/inventoryRwport.js
+++ b/src/api/reportForm/inventoryRwport.js
@@ -1,6 +1,5 @@
// 搴撳瓨鎶ヨ〃
import request from "@/common/untils/request.js"
-import axios from "axios"
// 鑾峰彇搴撳瓨鎶ヨ〃
@@ -13,8 +12,10 @@
}
// 浠撳簱绫诲瀷鍒楄〃
-export const getWarehouseList = async (data) => {
- return await axios.get(`/api-wms/v1/warehouse/warehouse`, {
+export const getWarehouseList = (data) => {
+ return request({
+ url: "/api-wms/v1/warehouse/warehouse",
+ method: "get",
params: data
})
}
diff --git a/src/api/warehouseManage/warehouse.js b/src/api/warehouseManage/warehouse.js
index 94ce3d5..d9b2874 100644
--- a/src/api/warehouseManage/warehouse.js
+++ b/src/api/warehouseManage/warehouse.js
@@ -1,9 +1,10 @@
import request from "@/common/untils/request.js"
-import axios from "axios"
// 浠撳簱鍒楄〃
-export const getWarehouseList = async (data) => {
- return await axios.get(`/api-wms/v1/warehouse/warehouse`, {
+export const getWarehouseList = (data) => {
+ return request({
+ url: "/api-wms/v1/warehouse/warehouse",
+ method: "get",
params: data
})
}
@@ -32,8 +33,10 @@
})
}
// 涓氬姟绫诲瀷 鍒楄〃
-export const getOperationTypeList = async (data) => {
- return await axios.get(`/api-wms/v1/operationType/operationType`, {
+export const getOperationTypeList = (data) => {
+ return request({
+ url: "/api-wms/v1/operationType/operationType",
+ method: "get",
params: data
})
}
diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 9270bbc..ef8fcc9 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -3,6 +3,35 @@
// import router from '@/router'
+// 寮�鍙戠幆澧冧笅灏嗚嚜宸辩殑token澶嶅埗鍒拌繖閲�, 涔熷彲浠ュ湪娴忚鍣ㄤ腑鎵嬪姩娣诲姞token鍒癱ookie涓�,cookie涓殑token浼樺厛
+const DEV_TOKEN = ''
+function environmentType(){
+ let type
+ if (location.href.includes('192.168.20.119')) {
+ type = 'test'
+ } else if (location.href.includes('192.168') || location.href.includes('localhost')) {
+ type = 'dev'
+ } else {
+ type = 'prod'
+ }
+
+ return type
+}
+const isDev = environmentType() === 'dev'
+
+const getApsPage = () => {
+ // 棣栭〉閮ㄧ讲鍦ㄥ悇涓幆澧冪殑绔彛
+ const loginPathMap = {
+ prod:`//${window.location.hostname}:9080`,
+ test:`//192.168.20.119:9080`,
+ // 鎯宠烦鍒版湰鍦板惎鍔ㄧ殑鐧诲綍椤电殑璇濋渶瑕佹妸dev鏀规垚浣犳湰鍦伴」鐩矾寰�
+ dev: `//192.168.20.124:8081`
+ }
+
+ return loginPathMap[environmentType()]
+}
+
+
const Axios = axios.create({
responseType: "json",
withCredentials: true // 鏄惁鍏佽甯ookie杩欎簺
@@ -11,11 +40,16 @@
/* //POST浼犲弬搴忓垪鍖�(娣诲姞璇锋眰鎷︽埅鍣�) */
Axios.interceptors.request.use(
(config) => {
- // 鑻ユ槸鏈夊仛閴存潈token , 灏辩粰澶撮儴甯︿笂token
- // let token = util.cookies.get("token");
- // if (token != undefined) {
- // config.headers.Authorization = "Bearer " + token;
- // }
+ let token = document.cookie.replace(
+ /(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/,
+ "$1",
+ );
+ if (isDev){
+ token = token || DEV_TOKEN
+ }
+ if (token) {
+ config.headers.Authorization = "Bearer " + token;
+ }
return config
},
@@ -30,6 +64,14 @@
/* //瀵瑰搷搴旀暟鎹仛浜涗簨 */
if (res.data.code === 200) {
return res.data ? res.data : {}
+ }else if([2012,2013,2014,2015].includes(res.data.code)){
+ if (isDev){
+ alert("JWT澶辨晥")
+ }else {
+ // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
+ window.location = getApsPage()+'/login'
+ }
+ return Promise.reject(res.data)
} else {
Message({
message: res.data.msg,
@@ -40,6 +82,15 @@
}
},
(error) => {
+ if (error.response.status === 401){
+ if (isDev){
+ alert("JWT澶辨晥")
+ }else {
+ // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
+ window.location = getApsPage()+'/login'
+ }
+ }
+
let { message } = error
if (message === "Network Error") {
message = "鍚庣鎺ュ彛杩炴帴寮傚父"
diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index 39f484e..d2d5e5b 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -504,8 +504,8 @@
async getCompanyList() {
await getCompanyList().then((res) => {
console.log(res)
- if (res.data.code === 200) {
- this.companyOptions = res.data.data
+ if (res.code === 200) {
+ this.companyOptions = res.data
}
})
},
diff --git a/src/components/makepager/FormBtnsView.vue b/src/components/makepager/FormBtnsView.vue
index b27b6b1..653231a 100644
--- a/src/components/makepager/FormBtnsView.vue
+++ b/src/components/makepager/FormBtnsView.vue
@@ -7,9 +7,10 @@
<div class="right-label">棰濆鐨勪环鏍�</div>
</div>
</div> -->
- <div v-if="!showProduct && !showWarehouse && !showPosition && !addProduct"
- class="sub-number left_border cursor_pointer"
- @click="inLibraryClick()"
+ <div
+ v-if="!showProduct && !showWarehouse && !showPosition && !addProduct"
+ class="sub-number left_border cursor_pointer"
+ @click="inLibraryClick()"
>
<div class="left"><i class="el-icon-present"></i></div>
<div class="right">
@@ -48,21 +49,25 @@
<div class="right-label">BOM</div>
</div>
</div> -->
- <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number no-cursor">
+ <div
+ v-if="!showProduct && !showWarehouse && !showPosition"
+ class="sub-number yes-cursor"
+ @click="reorderRulesClick"
+ >
<div class="left"><i class="el-icon-refresh"></i></div>
<div class="right">
- <div class="right-label">{{ (countObject?.reorderRule ?? 0) }}</div>
+ <div class="right-label">{{ countObject?.reorderRule ?? 0 }}</div>
<div class="right-label">閲嶈璐ц鍒�</div>
</div>
</div>
<div v-if="showProduct" class="sub-number left_border yes-cursor" @click="productClick">
<div class="left"><i class="el-icon-s-fold"></i></div>
<div class="right">
- <div class="right-label">{{ (countObject?.product ?? 0) }}</div>
+ <div class="right-label">{{ countObject?.product ?? 0 }}</div>
<div class="right-label">浜у搧</div>
</div>
</div>
- <div v-if="!showWarehouse" class="sub-number left_border no-cursor">
+ <div v-if="!showWarehouse" class="sub-number left_border yes-cursor" @click="listingRulesClick">
<div class="left"><i class="el-icon-refresh"></i></div>
<div class="right">
<div class="right-one">涓婃灦瑙勫垯</div>
@@ -151,8 +156,16 @@
this.$emit("productClick")
},
// 鍦ㄥ簱
- inLibraryClick(){
+ inLibraryClick() {
this.$emit("inLibraryClick")
+ },
+ // 涓婃灦瑙勫垯
+ listingRulesClick() {
+ this.$emit("listingRulesClick")
+ },
+ // 閲嶈璐ц鍒�
+ reorderRulesClick() {
+ this.$emit("reorderRulesClick")
}
}
}
diff --git a/src/components/makepager/SearchCommonView.vue b/src/components/makepager/SearchCommonView.vue
index 205de19..3c280c3 100644
--- a/src/components/makepager/SearchCommonView.vue
+++ b/src/components/makepager/SearchCommonView.vue
@@ -2,7 +2,9 @@
<div class="search-list">
<div class="search-top">
<div class="left">
- <el-button v-if="showAdd" :disabled="isDisabled" type="primary" size="mini" @click="addBtn">{{ addTitle }}</el-button>
+ <el-button v-if="showAdd" :disabled="isDisabled" type="primary" size="mini" @click="addBtn">{{
+ addTitle
+ }}</el-button>
<el-button v-if="showDiscard" size="mini" @click="discardBtn" style="margin-left: 0px">{{ "鍙栨秷" }}</el-button>
<div class="download" @click="downloadClick" :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }">
<img src="@/assets/img/xiazai.png" style="width: 13px" />
@@ -49,19 +51,60 @@
@change="searchClick"
@clear="clearClick"
>
+ <template v-if="selectArr?.length > 0" slot="prepend">
+ <div style="display: flex">
+ <div v-for="(val, i) in selectArr" :key="i" class="pre-views">
+ <span style="margin-left: 5px">{{ val?.title ?? val }}</span>
+ <i @click="delSelectClick(val)" class="el-icon-close" style="margint: 0 5px"></i>
+ </div>
+ </div>
+ </template>
<i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="searchClick"></i>
</el-input>
</template>
<div class="search-Btn">
- <div class="common">
+ <div v-if="showSreen" class="common no-cursor">
<img src="@/assets/img/shaixuan.png" style="width: 10px" />
<span>绛涢��</span>
</div>
- <div class="common">
+ <el-dropdown
+ v-else
+ style="
+ cursor: pointer;
+ font-weight: 500;
+ font-size: 16px;
+ line-height: 1;
+ letter-spacing: 0.09px;
+ color: #202224;
+ "
+ trigger="click"
+ :hide-on-click="false"
+ placement="bottom"
+ @command="switchKeywords($event, selList)"
+ >
+ <div class="common yes-cursor">
+ <img src="@/assets/img/shaixuan.png" style="width: 10px" />
+ <span>绛涢��</span>
+ </div>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item
+ v-for="(item, key) in screenArray"
+ :key="key"
+ :command="item.title"
+ :class="{ selected: status == item.title }"
+ >
+ <div class="dropdown-view">
+ <i v-show="getClass(selList, item)" class="el-icon-check icon-view"></i>
+ {{ item.title }}
+ </div>
+ </el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+ <div class="common no-cursor">
<i class="el-icon-s-fold"></i>
<span>鍒嗙粍</span>
</div>
- <div class="common">
+ <div class="common no-cursor">
<i class="el-icon-star-on"></i>
<span>鏀惰棌</span>
</div>
@@ -83,9 +126,9 @@
type: Boolean,
default: true
},
- isDisabled:{
- type:Boolean,
- default:false
+ isDisabled: {
+ type: Boolean,
+ default: false
},
showDiscard: {
default: false
@@ -177,6 +220,18 @@
inputName: {
type: String,
default: ""
+ },
+ showSreen: {
+ type: Boolean,
+ default: true
+ },
+ searchTaskMap: {
+ type: Array,
+ default: () => []
+ },
+ screenArray: {
+ type: Array,
+ default: () => []
}
},
watch: {
@@ -184,11 +239,27 @@
this.searchInput = val
}
},
+ computed: {
+ getClass() {
+ return function (row, i) {
+ return row.includes(i.title) ? "selected" : null
+ }
+ }
+ },
data() {
return {
searchInput: "",
- searchSelValue: this.searchSel
+ searchSelValue: this.searchSel,
+ status: "",
+ selList: [],
+ selectArr: []
}
+ },
+ mounted() {
+ this.searchTaskMap.forEach((ele) => {
+ this.selList.push(ele.title)
+ })
+ this.selectArr = this.searchTaskMap
},
methods: {
// 鎼滅储
@@ -218,6 +289,31 @@
// 妯″叿-妫�鏌ラ厤缃�
inspectionConfigClick() {
this.$emit("inspectionConfigClick")
+ },
+ switchKeywords(command, item) {
+ console.log("index", command, item)
+ this.status = command
+ const oldValue = item
+ console.log(oldValue)
+ this.selectArr = oldValue
+ if (item.includes(command)) {
+ oldValue.splice(
+ oldValue.findIndex((e) => e === command),
+ 1
+ )
+ } else {
+ oldValue.push(command)
+ }
+ this.$emit("switchKeywords", item)
+ },
+ // 鍒犻櫎绛涢�夊唴瀹�
+ delSelectClick(item) {
+ console.log(item)
+ this.selectArr.splice(
+ this.selectArr.findIndex((e) => e === item),
+ 1
+ )
+ this.$emit("delSelectClick", item)
}
}
}
@@ -301,7 +397,7 @@
margin-right: 20px;
margin-left: 20px;
.el-icon-search {
- margin-top: 22px;
+ margin-top: 10px;
}
.search-Btn {
display: flex;
@@ -313,7 +409,16 @@
.common {
width: 50px;
text-align: center;
- cursor: no-drop;
+ }
+ }
+ .pre-views {
+ border: 1px solid #c0c0c0;
+ font-size: 12px;
+ margin-right: 5px;
+ border-radius: 3px;
+ background: #f0f0f0;
+ &:last-child {
+ margin-right: 0px;
}
}
}
@@ -323,6 +428,17 @@
}
.yellow {
background: #e6a23c;
+ }
+}
+.selected {
+ color: #606266;
+}
+.dropdown-view {
+ position: relative;
+ .icon-view {
+ position: absolute;
+ left: -15px;
+ top: 11px;
}
}
@@ -343,7 +459,8 @@
width: 130px;
}
.input-with-select .el-input-group__prepend {
- background-color: #da2323;
+ padding: 0 10px;
+ background-color: #ffffff;
}
// .el-input__suffix {
// // 澶勭悊鍓嶇紑鍥炬爣涓嶅瀭鐩村眳涓殑闂
@@ -363,5 +480,8 @@
padding-right: 20px;
}
}
+ .el-dropdown-menu__item {
+ padding-left: 20px;
+ }
}
</style>
diff --git a/src/views/operate/orderPoint/index.vue b/src/views/operate/orderPoint/index.vue
index eb8596f..092a1d9 100644
--- a/src/views/operate/orderPoint/index.vue
+++ b/src/views/operate/orderPoint/index.vue
@@ -1,29 +1,55 @@
<template>
<div class="rightContent">
<div class="top">
- <SearchCommonView :add-title="addTitle" :show-discard="showDiscard" :show-apply="false" :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
- :amount-view="false" @addCommonClick="addProductClick" @searchClick="getList"
- @discardBtnClick="discardBtnClick" />
+ <SearchCommonView
+ :add-title="addTitle"
+ :show-discard="showDiscard"
+ :show-apply="false"
+ :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
+ :amount-view="false"
+ :search-task-map="searchTaskMap"
+ :show-sreen="false"
+ :screen-array="screenArray"
+ @addCommonClick="addProductClick"
+ @searchClick="getList"
+ @discardBtnClick="discardBtnClick"
+ @delSelectClick="delSelectClick"
+ @switchKeywords="switchKeywords"
+ />
</div>
<div class="content_wrap">
<div class="con_left">
- <p>浣嶇疆</p>
- <div class="stash">
- <template>
- <el-tree :data="datas" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
- </template>
- </div>
+ <p>浣嶇疆</p>
+ <div class="stash">
+ <template>
+ <el-tree :data="datas" :props="defaultProps" @node-click="handleNodeClick">
+ <span class="span-ellipsis" slot-scope="{ node }">
+ <span :title="node.label">{{ node.label }}</span>
+ </span>
+ </el-tree>
+ </template>
+ </div>
</div>
<div class="list-view">
<div class="table">
- <CommonFormTableView ref="tablelistRef" :isReorder="true" :product-table-list="tableList"
- @inputContent="inputContent" @selLocationClick="selLocationClick" @selProductClick="selProductClick"
- @tableRowClick="tableRowClick" @selRouteClick="selRouteClick">
+ <CommonFormTableView
+ ref="tablelistRef"
+ :isReorder="true"
+ :product-table-list="tableList"
+ @inputContent="inputContent"
+ @selLocationClick="selLocationClick"
+ @selProductClick="selProductClick"
+ @tableRowClick="tableRowClick"
+ @selRouteClick="selRouteClick"
+ >
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="180" align="center">
<template slot-scope="scope">
- <span v-if="scope.row.isEdit && scope.row.isView" @click.stop="handleOrderOnceClick(scope.row)"
- class="yes-cursor">
+ <span
+ v-if="scope.row.isEdit && scope.row.isView"
+ @click.stop="handleOrderOnceClick(scope.row)"
+ class="yes-cursor"
+ >
<i class="el-icon-truck"></i>
<span>璁㈣喘涓�娆�</span>
</span>
@@ -43,7 +69,13 @@
<script>
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getReorderRuleList, addReorderRule, updateReorderRule, orderAgain,getLocationList } from "@/api/product/reorderRules"
+import {
+ getReorderRuleList,
+ addReorderRule,
+ updateReorderRule,
+ orderAgain,
+ getLocationTreeList
+} from "@/api/product/reorderRules"
import { currentTime } from "@/common/config/index"
export default {
name: "ReorderRules",
@@ -53,45 +85,10 @@
computed: {},
data() {
return {
- datas:[],
- // datas: [{
- // label: '涓�绾� 1',
- // children: [{
- // label: '浜岀骇 1-1',
- // children: [{
- // label: '涓夌骇 1-1-1'
- // }]
- // }]
- // }, {
- // label: '涓�绾� 2',
- // children: [{
- // label: '浜岀骇 2-1',
- // children: [{
- // label: '涓夌骇 2-1-1'
- // }]
- // }, {
- // label: '浜岀骇 2-2',
- // children: [{
- // label: '涓夌骇 2-2-1'
- // }]
- // }]
- // }, {
- // label: '涓�绾� 3',
- // children: [{
- // label: '浜岀骇 3-1',
- // children: [{
- // label: '涓夌骇 3-1-1'
- // }]
- // }, {
- // label: '浜岀骇 3-2',
- // children: [{
- // label: '涓夌骇 3-2-1'
- // }]
- // }]
- // }],
+ datas: [],
defaultProps: {
- children: 'children',
- label: 'jointName'
+ children: "children",
+ label: "jointName"
},
addTitle: "鏂板缓",
showDiscard: false,
@@ -109,11 +106,15 @@
maxInventory: 0,
orderNumber: 0,
unit: "",
- reorderId: 0
+ reorderId: 0,
+ searchTaskMap: [],
+ type: "bh",
+ screenArray: [{ id: "0", type: "bh", title: "閲嶆柊璁㈣喘" }]
}
},
created() {
this.setTable()
+ this.searchTaskMap = [{ id: "0", type: this.type, title: "閲嶆柊璁㈣喘" }]
this.getData()
this.getLocationList()
},
@@ -137,14 +138,17 @@
}
},
// 璇锋眰鏁版嵁
- async getData() {
+ async getData(data) {
await getReorderRuleList({
+ locationId: data?.id,
+ type: this.type,
+ keyWord: data?.jointName,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
if (res.code === 200) {
console.log(res)
- const list = res.data.map((item) => {
+ const list = res.data?.map((item) => {
let orderNum = 0
if (parseFloat(item.minInventory) - parseFloat(item.prediction) > 0) {
orderNum = this.caculateOrderNumber(
@@ -356,54 +360,31 @@
},
//鏍戠偣鍑�
handleNodeClick(data) {
- console.log(data,"sss");
- getReorderRuleList({
- locationId:data.id,
- page:1,
- pageSize:15,
- type:"",
- keyWord:data.jointName,
- }).then((res)=>{
- console.log(res,"res999")
- if (res.code === 200) {
- console.log(res)
- const list = res.data.map((item) => {
- let orderNum = 0
- if (parseFloat(item.minInventory) - parseFloat(item.prediction) > 0) {
- orderNum = this.caculateOrderNumber(
- parseFloat(item.minInventory),
- parseFloat(item.maxInventory),
- parseFloat(item.prediction)
- )
- }
- return {
- ...item,
- productName: item.product.name,
- locationName: item.location.name,
- isSet: false,
- isEdit: true,
- editable: true,
- isOrder: true,
- isView: item?.minInventory - item?.prediction > 0 ? true : false,
- orderNumber: orderNum
- }
- })
- this.tableList.tableData = list || []
- this.tableData = list || []
- this.pagerOptions.totalCount = res.total
- }
+ console.log(data, "sss")
+ this.getData(data)
+ },
+ async getLocationList() {
+ await getLocationTreeList().then((res) => {
+ this.datas = [
+ {
+ id: 0,
+ jointName: "鍏ㄩ儴",
+ children: []
+ },
+ ...res.data
+ ]
+ console.log(res, "res666")
})
},
- async getLocationList(){
- await getLocationList({
- categoryId:"",
- keyWord:"",
- // page:1,
- // pageSize:,
- }).then((res)=>{
- this.datas=res.data
- console.log(res,"res666")
- })
+ // 鍒犻櫎type
+ delSelectClick() {
+ this.type = ""
+ this.getData()
+ },
+ switchKeywords(item) {
+ console.log(item, "switchKeywords")
+ this.type = item?.length > 0 ? "bh" : ""
+ this.getData()
}
}
}
@@ -418,28 +399,37 @@
overflow: auto;
}
.content_wrap {
- height: calc(100% - 0px);
- display: flex;
- justify-content: space-between;
- .con_left {
- width: 200px;
- .el-checkbox-group {
- width:100%;
- display: flex;
- flex-direction: column;
- }
- .stash {
- display: flex;
- flex-direction: column;
- .el-tree{
- background-color: #E6ECF2;
+ height: calc(100% - 0px);
+ display: flex;
+ justify-content: space-between;
+ .con_left {
+ max-height: calc(100% - 40px);
+ overflow: hidden;
+ width: 190px;
+ margin-right: 10px;
+ .el-checkbox-group {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ }
+ .stash {
+ display: flex;
+ flex-direction: column;
+ .el-tree {
+ background-color: #e6ecf2;
+ }
}
}
+ .list-view {
+ flex: 1;
+ }
}
- .list-view {
- flex: 1;
+ .span-ellipsis {
+ width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ font-size: 13px;
}
-}
-
}
</style>
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index 19c0ba2..e11476a 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/src/views/overview/AddOverviewDialog.vue
@@ -365,8 +365,8 @@
async getCompanyList() {
await getCompanyList().then((res) => {
console.log(res)
- if (res.data.code === 200) {
- this.companyOptions = res.data.data
+ if (res.code === 200) {
+ this.companyOptions = res.data
}
})
},
@@ -391,9 +391,9 @@
page: 0,
pageSize: 0
}).then((res) => {
- console.log(res.data.data)
- if (res.data.code === 200) {
- const list = res.data.data.map((item) => {
+ console.log(res.data)
+ if (res.code === 200) {
+ const list = res.data.map((item) => {
return {
name: item.name,
id: item.id
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 1da054c..fc3a8d8 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -8,8 +8,10 @@
:add-title="'鏂板缓'"
:placeholder="'璇疯緭鍏ュ崟鍙�/鏉ユ簮鍗曟嵁'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addBtnClick"
@searchClick="getList"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
@@ -79,7 +81,8 @@
displayEdit: false,
formLabel: "",
toLabel: "",
- addName: ""
+ addName: "",
+ searchTaskMap: []
}
},
created() {
@@ -95,6 +98,8 @@
sessionStorage.setItem("paramsData", JSON.stringify(params))
}
this.params = params
+ this.searchTaskMap =
+ this.params.status > 0 ? [{ id: this.params.id, title: this.getStatus(this.params.status) }] : []
this.getData()
// console.log(this.$route.params.workType)
},
@@ -275,7 +280,12 @@
},
// 鐘舵��
getStatus(val) {
- return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
+ return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : val === 4 ? "瀹屾垚" : ""
+ },
+ // 鍒犻櫎鎼滅储鐘舵��
+ delSelectClick() {
+ this.params.status = 0
+ this.getData()
}
}
}
diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue
index 68f17c7..a4b17f1 100644
--- a/src/views/overview/index.vue
+++ b/src/views/overview/index.vue
@@ -99,15 +99,15 @@
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
- console.log(res.data.data)
- if (res.data.code === 200) {
- const list = res.data.data.map((item) => {
+ console.log(res.data)
+ if (res.code === 200) {
+ const list = res.data.map((item) => {
return {
...item
}
})
this.tableList = list || []
- this.pagerOptions.totalCount = res.data.total
+ this.pagerOptions.totalCount = res.total
}
})
},
diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index e24ecd2..5c63af6 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/src/views/productManage/product/AddProductDialog.vue
@@ -43,6 +43,8 @@
:show-procure="showProcure"
:countObject="statisticsMap"
:show-sale="showSale"
+ @listingRulesClick="listingRulesClick"
+ @reorderRulesClick="reorderRulesClick"
/>
<div class="bottom">
<el-tabs v-model="activeName" type="card">
@@ -558,22 +560,24 @@
/**
* 闈炲繀濉」鍚庣杩斿洖鐨勬槸鏁板瓧 0,琛ㄥ崟闇�瑕佺┖涓叉墠鑳借涓烘湭閫夋嫨鍥炴樉
*/
- setOptionalFieldsToEmpty(){
- ['productType','categoryId']
- .filter(filed => this.editConfig.infomation[filed] === 0)
- .forEach(filed => {
- this.editConfig.infomation[filed] = ''
- })
+ setOptionalFieldsToEmpty() {
+ let arr = ["productType", "categoryId"]
+ arr
+ .filter((filed) => this.editConfig.infomation[filed] === 0)
+ .forEach((filed) => {
+ this.editConfig.infomation[filed] = ""
+ })
},
/**
* 鍚庣鍙帴鍙楁暟瀛楀舰寮�, 淇濆瓨鏃惰繕寰楀啀杞洖鍘�
*/
- unsetFieldsToNumber(){
- ['productType','categoryId']
- .filter(filed => this.editConfig.infomation[filed] === '')
- .forEach(filed => {
- this.editConfig.infomation[filed] = 0
- })
+ unsetFieldsToNumber() {
+ let arr = ["productType", "categoryId"]
+ arr
+ .filter((filed) => this.editConfig.infomation[filed] === "")
+ .forEach((filed) => {
+ this.editConfig.infomation[filed] = 0
+ })
},
// 鑾峰彇浜у搧绫诲埆
async getProductCategoryList() {
@@ -645,7 +649,7 @@
this.$message.success("娣诲姞鎴愬姛")
this.$parent.getData()
}
- },console.error)
+ }, console.error)
}
})
},
@@ -779,6 +783,34 @@
})
}
},
+ // 涓婃灦瑙勫垯
+ listingRulesClick() {
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.$router.push({
+ path: "/warehouseManage/listingRules",
+ query: {
+ productName: this.editConfig.infomation.name,
+ productId: this.editConfig.title === "鏂板缓" ? "" : this.editConfig.infomation.id
+ }
+ })
+ }
+ })
+ },
+ // 閲嶈璐鍒�
+ reorderRulesClick() {
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.$router.push({
+ path: "/productManage/reorderRules",
+ query: {
+ productName: this.editConfig.infomation.name,
+ productId: this.editConfig.title === "鏂板缓" ? "" : this.editConfig.infomation.id
+ }
+ })
+ }
+ })
+ },
// 鍙攢鍞�/鍙噰璐�
checkboxChange(val, param) {
if (val === "閲囪喘") {
diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
index 0b32e39..c5855a4 100644
--- a/src/views/productManage/product/index.vue
+++ b/src/views/productManage/product/index.vue
@@ -5,8 +5,10 @@
:add-title="'鏂板缓'"
:placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addBtnClick"
@searchClick="searchClick"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
@@ -54,11 +56,7 @@
</div>
<!-- 鍒楄〃褰㈠紡 -->
<div v-if="isIconIndex === '2'" class="product-list">
- <TableCommonView
- ref="tableListRef"
- :table-list="tableList"
- @selTableCol="selTableCol"
- >
+ <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol">
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="90" align="center">
<template slot-scope="scope">
@@ -114,15 +112,18 @@
url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
pageSizes: [15, 30],
keyWord: "",
- categoryId: null
+ categoryId: null,
+ searchTaskMap: []
}
},
created() {
this.setTable()
let query = this.$route.query
if (query) {
+ console.log("ssssss")
this.categoryId = query.id ? Number(query.id) : null
this.pagerOptions.currPage = 1
+ this.searchTaskMap = query.id ? [{ categoryId: this.categoryId, title: query.categoryName }] : []
}
this.getData()
},
@@ -272,7 +273,7 @@
this.editConfig.visible = true
},
// 缂栬緫
- editRow(row){
+ editRow(row) {
this.editConfig.autoEdit = true
this.editConfig.title = "缂栬緫"
this.editConfig.infomation = { ...row }
@@ -290,6 +291,11 @@
this.pagerOptions.pageSize = 15
}
this.getData()
+ },
+ // 鍒犻櫎浜у搧绫诲瀷
+ delSelectClick() {
+ this.categoryId = 0
+ this.getData()
}
}
}
diff --git a/src/views/productManage/productCategory/AddProductCategoryDialog.vue b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
index b8453ee..63c4f32 100644
--- a/src/views/productManage/productCategory/AddProductCategoryDialog.vue
+++ b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -38,7 +38,12 @@
size="mini"
>
<div class="basic-info">
- <FormBtnsView :showProduct="true" :countObject="statisticsMap" @productClick="productClick" />
+ <FormBtnsView
+ :showProduct="true"
+ :countObject="statisticsMap"
+ @productClick="productClick"
+ @listingRulesClick="listingRulesClick"
+ />
<div class="basic-info-view">
<!-- <el-row> -->
<!-- <el-col :span="24">
@@ -173,7 +178,7 @@
import { addProductCategory, updateProductCategory, deleteProductCategory } from "@/api/product/productCategory"
import { getDataByType } from "@/api/data"
-import {getProductList} from "@/api/product/product";
+import { getProductList } from "@/api/product/product"
export default {
name: "AddProductCategoryDialog",
props: {
@@ -184,7 +189,7 @@
visible: false,
title: "鏂板缓",
infomation: { type: [] },
- autoEdit: false,
+ autoEdit: false
}
}
},
@@ -197,13 +202,13 @@
},
components: {},
computed: {
- modalTitle(){
- if (this.editConfig.title === '缂栬緫' && this.editConfig.autoEdit){
- return '缂栬緫'
- }else if (this.editConfig.title === '缂栬緫') {
- return !this.showEdit ? '缂栬緫' : '鏌ョ湅'
- }else {
- return '鏂板缓'
+ modalTitle() {
+ if (this.editConfig.title === "缂栬緫" && this.editConfig.autoEdit) {
+ return "缂栬緫"
+ } else if (this.editConfig.title === "缂栬緫") {
+ return !this.showEdit ? "缂栬緫" : "鏌ョ湅"
+ } else {
+ return "鏂板缓"
}
}
},
@@ -225,7 +230,7 @@
showEdit: false, // 鏄惁鏄剧ず缂栬緫鎸夐挳
isDelClick: false, // 鍒犻櫎鎸夐挳鏄惁鍙偣鍑�
showFooter: false, // 鏄惁鏄剧ず鍙栨秷淇濆瓨,
- statisticsMap:{
+ statisticsMap: {
product: 0 // 浜у搧鏁伴噺
}
}
@@ -233,7 +238,7 @@
created() {
this.setBottonView()
this.getProductCount()
- if (this.editConfig.autoEdit){
+ if (this.editConfig.autoEdit) {
this.editClick()
}
this.setOptionalFieldsToEmpty()
@@ -242,40 +247,44 @@
/**
* 闈炲繀濉」鍚庣杩斿洖鐨勬槸鏁板瓧 0,琛ㄥ崟闇�瑕佺┖涓叉墠鑳借涓烘湭閫夋嫨鍥炴樉
*/
- setOptionalFieldsToEmpty(){
- ['parentId','costingMethod','inventoryValuation','forceRemovalStrategy']
- .filter(filed => this.editConfig.infomation[filed] === 0)
- .forEach(filed => {
- this.editConfig.infomation[filed] = ''
- })
+ setOptionalFieldsToEmpty() {
+ let arr = ["parentId", "costingMethod", "inventoryValuation", "forceRemovalStrategy"]
+ arr
+ .filter((filed) => this.editConfig.infomation[filed] === 0)
+ .forEach((filed) => {
+ this.editConfig.infomation[filed] = ""
+ })
},
/**
* 鍚庣鍙帴鍙楁暟瀛楀舰寮�, 淇濆瓨鏃惰繕寰楀啀杞洖鍘�
*/
- unsetFieldsToNumber(){
- ['parentId','costingMethod','inventoryValuation','forceRemovalStrategy']
- .filter(filed => this.editConfig.infomation[filed] === '')
- .forEach(filed => {
- this.editConfig.infomation[filed] = 0
- })
+ unsetFieldsToNumber() {
+ let arr = ["parentId", "costingMethod", "inventoryValuation", "forceRemovalStrategy"]
+ arr
+ .filter((filed) => this.editConfig.infomation[filed] === "")
+ .forEach((filed) => {
+ this.editConfig.infomation[filed] = 0
+ })
},
// 鑾峰彇浜у搧鏁伴噺
- getProductCount(){
+ getProductCount() {
getProductList({
- keyWord: '',
+ keyWord: "",
categoryId: this.editConfig.title === "鏂板缓" ? null : this.editConfig.infomation.id,
page: 1,
pageSize: 1
- }).then((res) => {
- if (res.code === 200) {
- this.statisticsMap.product = res?.total ?? 0
- }else{
- this.statisticsMap.product = 0
- }
- }).catch(err=>{
- console.error(err)
- this.statisticsMap.product = 0
})
+ .then((res) => {
+ if (res.code === 200) {
+ this.statisticsMap.product = res?.total ?? 0
+ } else {
+ this.statisticsMap.product = 0
+ }
+ })
+ .catch((err) => {
+ console.error(err)
+ this.statisticsMap.product = 0
+ })
},
// 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
setBottonView() {
@@ -374,6 +383,20 @@
})
}
})
+ },
+ // 涓婃灦瑙勫垯
+ listingRulesClick() {
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.$router.push({
+ path: "/warehouseManage/listingRules",
+ query: {
+ categoryName: this.editConfig.infomation.name,
+ id: this.editConfig.title === "鏂板缓" ? "" : this.editConfig.infomation.id
+ }
+ })
+ }
+ })
}
}
}
diff --git a/src/views/productManage/reorderRules/index.vue b/src/views/productManage/reorderRules/index.vue
index 9384663..57d32fa 100644
--- a/src/views/productManage/reorderRules/index.vue
+++ b/src/views/productManage/reorderRules/index.vue
@@ -7,9 +7,11 @@
:show-apply="false"
:placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addProductClick"
@searchClick="getList"
@discardBtnClick="discardBtnClick"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
@@ -76,11 +78,21 @@
maxInventory: 0,
orderNumber: 0,
unit: "",
- reorderId: 0
+ reorderId: 0,
+ queryProductId: null,
+ searchTaskMap: []
}
},
created() {
this.setTable()
+ let query = this.$route.query
+ if (query) {
+ this.queryProductId = query.productId?.length ? query.productId : null
+ this.pagerOptions.currPage = 1
+ this.searchTaskMap =
+ query.productId?.length > 0 ? [{ productId: this.queryProductId, title: query.productName }] : []
+ console.log(this.searchTaskMap)
+ }
this.getData()
},
methods: {
@@ -105,6 +117,7 @@
// 璇锋眰鏁版嵁
async getData() {
await getReorderRuleList({
+ productId: this.queryProductId ? this.queryProductId : null,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
@@ -319,6 +332,11 @@
// 鑾峰彇褰撳墠鏃堕棿
currentTime() {
return currentTime()
+ },
+ // 鍒犻櫎浜у搧
+ delSelectClick() {
+ this.queryProductId = ""
+ this.getData()
}
}
}
diff --git a/src/views/reportForm/inventoryReport/index.vue b/src/views/reportForm/inventoryReport/index.vue
index d3b066d..eaef51d 100644
--- a/src/views/reportForm/inventoryReport/index.vue
+++ b/src/views/reportForm/inventoryReport/index.vue
@@ -399,8 +399,8 @@
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
- if (res.data.code === 200) {
- this.warehouseList = res.data.data
+ if (res.code === 200) {
+ this.warehouseList = res.data
}
})
}
diff --git a/src/views/warehouseManage/bussinessType/AddBussinessType.vue b/src/views/warehouseManage/bussinessType/AddBussinessType.vue
index 39d532e..b3d2827 100644
--- a/src/views/warehouseManage/bussinessType/AddBussinessType.vue
+++ b/src/views/warehouseManage/bussinessType/AddBussinessType.vue
@@ -280,8 +280,8 @@
page: 0,
pageSize: 0
}).then((res) => {
- if (res.data.code == 200) {
- this.warehouseList = res.data.data ? res.data.data : []
+ if (res.code == 200) {
+ this.warehouseList = res.data ? res.data : []
}
})
},
diff --git a/src/views/warehouseManage/bussinessType/index.vue b/src/views/warehouseManage/bussinessType/index.vue
index 3f6eeea..679d229 100644
--- a/src/views/warehouseManage/bussinessType/index.vue
+++ b/src/views/warehouseManage/bussinessType/index.vue
@@ -108,10 +108,10 @@
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
- if (res.data.code === 200) {
- const list = res.data.data
+ if (res.code === 200) {
+ const list = res.data
this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.data.total
+ this.pagerOptions.totalCount = res.total
}
})
},
diff --git a/src/views/warehouseManage/listingRules/index.vue b/src/views/warehouseManage/listingRules/index.vue
index 6e0c9d6..de53dd3 100644
--- a/src/views/warehouseManage/listingRules/index.vue
+++ b/src/views/warehouseManage/listingRules/index.vue
@@ -4,12 +4,14 @@
<SearchCommonView
:add-title="addTitle"
:show-discard="showDiscard"
- :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
+ :placeholder="'璇疯緭鍏ヤ骇鍝�/浜у搧绫诲埆'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addProductClick"
@searchClick="getList"
@discardBtnClick="discardBtnClick"
@applyBtnClick="applyBtnClick"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
@@ -89,15 +91,32 @@
isRowClick: false,
areaId: 0,
productId: 0,
- productCategoryId:0,
+ productCategoryId: 0,
subLocationId: 0,
currentRowId: 0,
- rowIndex:-1,
- RuleType:0,
+ rowIndex: -1,
+ RuleType: 0,
+ queryProductId: null,
+ categoryId: null,
+ searchTaskMap: []
}
},
created() {
this.setTable()
+ let query = this.$route.query
+ if (query) {
+ console.log("aaaaaaaaaaaaa", query)
+ this.queryProductId = query.productId?.length ? query.productId : null
+ this.categoryId = query.id ? Number(query.id) : null
+ this.pagerOptions.currPage = 1
+ this.searchTaskMap =
+ query?.id > 0
+ ? [{ categoryId: this.categoryId, title: query.categoryName }]
+ : query.productId?.length > 0
+ ? [{ productId: this.queryProductId, title: query.productName }]
+ : []
+ console.log(this.searchTaskMap)
+ }
this.getData()
},
methods: {
@@ -109,7 +128,7 @@
tableColumn: [
{ label: "褰撲骇鍝佸埌杈�", prop: "areaName", location: true },
{ label: "浜у搧", prop: "productName", product: true },
- { label: "浜у搧绫诲埆", prop: "productCategory",productType: true },
+ { label: "浜у搧绫诲埆", prop: "productCategory", productType: true },
{ label: "瀛樺偍鍒板瓙浣嶇疆", prop: "subLocation", location: true }
// { label: "鍏徃", prop: "companyName", company: true }
]
@@ -118,7 +137,8 @@
// 璇锋眰鏁版嵁
async getData() {
await getListingRulesList({
- // keyword: this.keyword,
+ productId: this.queryProductId ? this.queryProductId : null,
+ productCategoryId: this.categoryId ? this.categoryId : null,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
@@ -151,8 +171,8 @@
},
// 鏂板
addProductClick() {
- this.tableList.tableColumn[1].product=true
- this.tableList.tableColumn[2].productType=true
+ this.tableList.tableColumn[1].product = true
+ this.tableList.tableColumn[2].productType = true
console.log(this.tableData)
this.isSel()
if (this.isNoProduct && this.addTitle === "鏂板缓") {
@@ -181,7 +201,7 @@
} else {
if (this.areaId === 0) {
this.$message.error("璇烽�夋嫨褰撳墠浜у搧鍒拌揪浣嶇疆")
- } else if (this.productId === 0 && this.productCategoryId==='') {
+ } else if (this.productId === 0 && this.productCategoryId === "") {
this.$message.error("璇烽�夋嫨浜у搧鎴栦骇鍝佺被鍒�")
} else if (this.subLocationId === 0) {
this.$message.error("璇烽�夋嫨瀛樺偍鍒板瓙浣嶇疆")
@@ -200,12 +220,12 @@
})
let requestUrl = this.currentRowId === 0 ? addListingRules : updateListingRules
requestUrl({
- RuleType:this.RuleType,
- id: this.currentRowId,
- areaId: this.areaId,
- locationId: this.subLocationId,
- productCategoryId: this.productCategoryId||'',
- productId: this.productId||''
+ RuleType: this.RuleType,
+ id: this.currentRowId,
+ areaId: this.areaId,
+ locationId: this.subLocationId,
+ productCategoryId: this.productCategoryId || "",
+ productId: this.productId || ""
}).then((res) => {
console.log(res)
if (res.code === 200) {
@@ -230,8 +250,8 @@
},
// 鍙栨秷
discardBtnClick() {
- this.tableList.tableColumn[1].product=true
- this.tableList.tableColumn[2].productType=true
+ this.tableList.tableColumn[1].product = true
+ this.tableList.tableColumn[2].productType = true
if (this.isRowClick) {
this.tableData.map((item) => {
item.isEdit = true
@@ -275,12 +295,12 @@
},
// 琛岀偣鍑�
tableRowClick(row, rowIndex) {
- this.rowIndex=rowIndex
+ this.rowIndex = rowIndex
this.isSel()
if (!this.isNoProduct && this.currentRowId === 0) {
this.$message.error("璇峰畬鎴愬綋鍓嶆柊寤烘垨鍙栨秷鏂板缓")
} else {
- this.tableList.tableColumn[2].productType=true
+ this.tableList.tableColumn[2].productType = true
this.currentRowId = row.id
this.addTitle = "淇濆瓨"
this.showDiscard = true
@@ -300,14 +320,17 @@
this.subLocationId = row.locationId
this.productCategoryId = row.productCategoryId
this.productId = row.productId
- if(this.tableList.tableData[rowIndex].productName===""||this.tableList.tableData[rowIndex].productName===" "){
- this.tableList.tableColumn[1].product=false
- this.tableList.tableColumn[2].productType=true
- }else{
- this.tableList.tableColumn[1].product=true
- this.tableList.tableColumn[2].productType=false
+ if (
+ this.tableList.tableData[rowIndex].productName === "" ||
+ this.tableList.tableData[rowIndex].productName === " "
+ ) {
+ this.tableList.tableColumn[1].product = false
+ this.tableList.tableColumn[2].productType = true
+ } else {
+ this.tableList.tableColumn[1].product = true
+ this.tableList.tableColumn[2].productType = false
}
- }
+ }
},
// 鎼滅储
getList(val) {
@@ -343,22 +366,22 @@
},
// 閫変腑浜у搧鏂规硶
selProductClick(item) {
- console.log(item,"浜у搧")
- this.RuleType=1
- this.tableList.tableColumn[2].productType=false
+ console.log(item, "浜у搧")
+ this.RuleType = 1
+ this.tableList.tableColumn[2].productType = false
this.productId = item.value
this.productCategoryId = item.categoryId
},
// 閫変腑浜у搧绫诲瀷鏂规硶
selProductTypeClick(item) {
- this.RuleType=2
- if(this.currentRowId===0){
- this.productCategoryId=item.value
- }else{
- this.tableList.tableColumn[1].product=false
- this.tableList.tableData[this.rowIndex].productName=' '
- this.productId=''
- this.productCategoryId=this.tableList.tableData[this.rowIndex].productCategoryId
+ this.RuleType = 2
+ if (this.currentRowId === 0) {
+ this.productCategoryId = item.value
+ } else {
+ this.tableList.tableColumn[1].product = false
+ this.tableList.tableData[this.rowIndex].productName = " "
+ this.productId = ""
+ this.productCategoryId = this.tableList.tableData[this.rowIndex].productCategoryId
}
},
// 鍒犻櫎
@@ -370,16 +393,22 @@
this.getData()
}
})
+ },
+ // 鍒犻櫎浜у搧绫诲瀷
+ delSelectClick() {
+ this.categoryId = 0
+ this.queryProductId = ""
+ this.getData()
}
},
- watch:{
- rowIndex(newVal){
- if(this.tableList.tableData[newVal].productName===" "){
- this.tableList.tableColumn[1].product=false
- this.tableList.tableColumn[2].productType=true
- }else{
- this.tableList.tableColumn[1].product=true
- this.tableList.tableColumn[2].productType=false
+ watch: {
+ rowIndex(newVal) {
+ if (this.tableList.tableData[newVal].productName === " ") {
+ this.tableList.tableColumn[1].product = false
+ this.tableList.tableColumn[2].productType = true
+ } else {
+ this.tableList.tableColumn[1].product = true
+ this.tableList.tableColumn[2].productType = false
}
}
}
diff --git a/src/views/warehouseManage/position/index.vue b/src/views/warehouseManage/position/index.vue
index 5ab6b05..b1bc80c 100644
--- a/src/views/warehouseManage/position/index.vue
+++ b/src/views/warehouseManage/position/index.vue
@@ -5,36 +5,24 @@
:add-title="'鏂板缓'"
:placeholder="'璇疯緭鍏ュ崟鍙�'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addBtnClick"
@searchClick="getList"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
<div class="table">
- <TableCommonView
- ref="tableListRef"
- :table-list="tableList"
- :show-checkcol="false"
- >
- <template slot="tableButton">
+ <TableCommonView ref="tableListRef" :table-list="tableList" :show-checkcol="false">
+ <template slot="tableButton">
<el-table-column label="鎿嶄綔" width="120" fixed="right">
<template slot-scope="scope">
- <el-button
- @click="tableRowClick(scope.row,'edit')"
- type="text"
- size="small"
- >缂栬緫</el-button
- >
- <el-button
- type="text"
- size="small"
- @click="tableRowClick(scope.row,'look')"
- >鏌ョ湅</el-button
- >
+ <el-button @click="tableRowClick(scope.row, 'edit')" type="text" size="small">缂栬緫</el-button>
+ <el-button type="text" size="small" @click="tableRowClick(scope.row, 'look')">鏌ョ湅</el-button>
</template>
</el-table-column>
</template>
- </TableCommonView>
+ </TableCommonView>
</div>
<div class="btn-pager">
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -70,11 +58,14 @@
title: "鏂板缓",
infomation: {}
},
- positionTypeList: getDataByType("positionType")
+ positionTypeList: getDataByType("positionType"),
+ searchTaskMap: [],
+ type: 3
}
},
created() {
this.setTable()
+ this.searchTaskMap = [{ id: "3", title: "鍐呴儴浣嶇疆" }]
this.getData()
},
methods: {
@@ -134,6 +125,7 @@
// 璇锋眰鏁版嵁
async getData() {
await getLocationList({
+ type: this.type,
keyword: this.keyword,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
@@ -156,10 +148,12 @@
this.getData()
},
// 琛岀偣鍑�
- tableRowClick(row,val) {
- this.editConfig.title = val=='look'?'鏌ョ湅':"缂栬緫"
+ tableRowClick(row, val) {
+ this.editConfig.title = val == "look" ? "鏌ョ湅" : "缂栬緫"
this.editConfig.infomation = { ...row }
- this.editConfig.infomation.parentId = this.editConfig.infomation.parentId?Number(this.editConfig.infomation.parentId):null
+ this.editConfig.infomation.parentId = this.editConfig.infomation.parentId
+ ? Number(this.editConfig.infomation.parentId)
+ : null
this.editConfig.visible = true
},
// 鏂板缓
@@ -178,6 +172,11 @@
}
this.editConfig.visible = true
this.editConfig.title = "鏂板缓"
+ },
+ // 鍒犻櫎浣嶇疆
+ delSelectClick() {
+ this.type = 0
+ this.getData()
}
}
}
diff --git a/src/views/warehouseManage/warehouse/index.vue b/src/views/warehouseManage/warehouse/index.vue
index 3cacba9..03e589f 100644
--- a/src/views/warehouseManage/warehouse/index.vue
+++ b/src/views/warehouseManage/warehouse/index.vue
@@ -125,10 +125,10 @@
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
- if (res.data.code == 200) {
- const list = res.data.data?res.data.data:[]
+ if (res.code == 200) {
+ const list = res.data?res.data:[]
this.tableList.tableInfomation = list
- this.pagerOptions.totalCount = res.data.total
+ this.pagerOptions.totalCount = res.total
}
})
},
--
Gitblit v1.8.0