diff --git a/package.json b/package.json index 652ddff82c650713c9ccbbfbf991c49ff3a2d905..565b28413d4bd8d3aa0eb00df96a9e988e35ceb9 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "axios": "0.16.2", - "element-ui": "2.0.7", + "element-ui": "2.1.0", "file-saver": "^1.3.8", "js-cookie": "2.1.4", "normalize.css": "7.0.0", diff --git a/src/api/house/storeArea.js b/src/api/house/storeArea.js index ba67ffe0c27e6b8eb58f21d0ab85f0af3a9b1207..f38def808de0be9d11e07c45bd0533f3c095ecee 100644 --- a/src/api/house/storeArea.js +++ b/src/api/house/storeArea.js @@ -35,3 +35,11 @@ export function updateStoreArea(data) { data: data }) } +// 批量 修改 库位类型 +export function batchUpdateLocationType(data) { + return fetch({ + url: '/storeArea/batchUpdateLocationType', + method: 'post', + data: data + }) +} diff --git a/src/filter/customFilters.js b/src/filter/customFilters.js index ad16fdebcc24359204b876c8015e66064ada9d01..cc3b8690f9542f334469b1f13295bd81e234680b 100644 --- a/src/filter/customFilters.js +++ b/src/filter/customFilters.js @@ -332,27 +332,24 @@ Vue.filter('storeAreaStatusFilter', (v) => { }) // 库位类型 Vue.filter('storeLocationTypeFilter', (v) => { - if (v === '10') { - return '普通库区' - } else if (v === '20') { - return '临时库区' - } else if (v === '30') { - return '虚拟库区' - } else if (v === '40') { - return '大库区' - } else { - return v + const status = parseInt(v) + const statusMap = { + 10: '普通库区', + 20: '临时库区', + 30: '虚拟库区', + 40: '大库区', + 50: '中库区' } + return statusMap[status] }) // 库位状态 Vue.filter('storeLocationStatusFilter', (v) => { - if (v === '10') { - return '正常' - } else if (v === '20') { - return '失效' - } else { - return v + const status = parseInt(v) + const statusMap = { + 10: '正常', + 20: '失效' } + return statusMap[status] }) // 仓库状态 Vue.filter('storeHouseFilter', (v) => { diff --git a/src/styles/index.scss b/src/styles/index.scss index aff06f268e69500a308762db3e6bbfce8d8290d6..ee0ae2523419ef463c6b5702361d20a6e50f5e74 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -200,6 +200,12 @@ a:hover { .w163{ width: 163px!important; } +.w184{ + width: 184px!important; +} +.web_form_active{ + height: 42px; +} .fsc-keep div{ word-break:keep-all !important; } diff --git a/src/utils/index.js b/src/utils/index.js index a6fbf1b34014a1fa994013246a97f25a0a2e4dcb..2e6c1ecaa43bd2c27bde57833f0b68425b33814f 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -114,4 +114,49 @@ export function array_cut_item(arr, item, idKey) { } return arr } +/** + * 对象数组去重 + * */ +export function arrayUnique2(arr, name) { + const hash = {} + return arr.reduce(function(item, next) { + hash[next[name]] ? '' : hash[next[name]] = true && item.push(next) + return item + }, []) +} +// 重置 (objEditData) 对象的各属性值 +export function resetObjEditDataFunc(objEditData) { + for (const i in objEditData) { + objEditData[i] = null + } + return objEditData +} +/** + * 例子: ['abc','efg'] => 'abc,efg' + * */ +export function arrayToStringFunc(array) { + let now_str = '' + if (array) { + if (array.length > 1) { + now_str = array.join(',') + } else { + now_str = (array[0]) + '' + } + } + return now_str +} +/** + * 例子: 'abc,efg' => ['abc','efg'] + * */ +export function stringToArrayFunc(string) { + let now_arr = [] + if (string) { + if (string.indexOf(',') !== -1) { + now_arr = string.split(',') + } else { + now_arr.push(string) + } + } + return now_arr +} diff --git a/src/views/house/storeLocation.vue b/src/views/house/storeLocation.vue index 90180cce847da307d8ba7781d16dd612f675d383..dfd9b95653cbabf67a8edd90f1aeb9c509c66e60 100644 --- a/src/views/house/storeLocation.vue +++ b/src/views/house/storeLocation.vue @@ -1,14 +1,10 @@ diff --git a/src/views/house/storeLocationConfig/storeLocationEdit.vue b/src/views/house/storeLocationConfig/storeLocationEdit.vue new file mode 100644 index 0000000000000000000000000000000000000000..04ae53353d61e5359742f10641f0a76f40e7f71d --- /dev/null +++ b/src/views/house/storeLocationConfig/storeLocationEdit.vue @@ -0,0 +1,222 @@ + + + + diff --git a/src/views/house/storeLocationConfig/storeTypeEdit.vue b/src/views/house/storeLocationConfig/storeTypeEdit.vue new file mode 100644 index 0000000000000000000000000000000000000000..e2a41a590fa92645ccfe9db5dccb0dd775e29f38 --- /dev/null +++ b/src/views/house/storeLocationConfig/storeTypeEdit.vue @@ -0,0 +1,119 @@ + + + + +