Commit a9e327f4 by peii

未授权显示过滤但可下单bug修复

parent 59be04fa
......@@ -717,9 +717,10 @@ class ChooseProductPage extends Component {
* @description: 搜索过滤
* @param {array} list 要过滤的数组
* @param {boolean} isChildFilter 子组件调用(三级调用)
* @param {boolean} isOperation 子组件操作时调用(三级调用)
* @return {*}
*/
rightNameFilter(list = [], isChildFilter = false) {
rightNameFilter(list = [], isChildFilter = false, isOperation = false) {
if(isBlank(list)) return []
const {searchValue, authorizations, productAuthorization, topActiveIndex, topProcOptionList } = this.state
......@@ -736,6 +737,10 @@ class ChooseProductPage extends Component {
list = []
}
}
if (isOperation) {
return list
}
if (isBlank(searchValue)) return list
const keys = ['general_name', 'item_name', 'specification', 'manufacturer_product_code', 'initials_pinyin', 'serial_number', 'category_name']
......
......@@ -74,23 +74,24 @@ class ProductRightStyle extends Component {
// 大类加减时,小类所有加1/减1
handleAllPlusReduce(curData, curIndex, isPlus) {
if (curData.details && curData.details.length > 0) {
let sumCount = 0
curData[LocalVariable.QUANTITY_FIELD] = 0 // 初始化
curData.details.forEach(function (line_val) {
if (!line_val[LocalVariable.QUANTITY_FIELD]) {
line_val[LocalVariable.QUANTITY_FIELD] = 0
}
if (isPlus) {
line_val[LocalVariable.QUANTITY_FIELD] += 1
} else if (line_val[LocalVariable.QUANTITY_FIELD] > 0) {
line_val[LocalVariable.QUANTITY_FIELD] -= 1
}
sumCount += line_val[LocalVariable.QUANTITY_FIELD]
})
curData[LocalVariable.QUANTITY_FIELD] = sumCount
this.handleCalCallBack(curData, curIndex, 'rightSecondData', LocalVariable.QUANTITY_FIELD)
}
const list = this.props.rightNameFilter(curData.details, true, true)
if (isBlank(list)) return
let sumCount = 0
curData[LocalVariable.QUANTITY_FIELD] = 0 // 初始化
list.forEach(function (line_val) {
if (!line_val[LocalVariable.QUANTITY_FIELD]) {
line_val[LocalVariable.QUANTITY_FIELD] = 0
}
if (isPlus) {
line_val[LocalVariable.QUANTITY_FIELD] += 1
} else if (line_val[LocalVariable.QUANTITY_FIELD] > 0) {
line_val[LocalVariable.QUANTITY_FIELD] -= 1
}
sumCount += line_val[LocalVariable.QUANTITY_FIELD]
})
curData[LocalVariable.QUANTITY_FIELD] = sumCount
this.handleCalCallBack(curData, curIndex, 'rightSecondData', LocalVariable.QUANTITY_FIELD)
}
// 手术套包-编辑页面回调
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment