| | |
| | | function stockType(str, selStr,color) { |
| | | color=color||'#F3595A' |
| | | //str为要改变颜色的字符(传入的参数) |
| | | //selStr是指定的字符串 |
| | | let res = new RegExp('(' + str + ')', 'g'); |
| | | return selStr.replace(res, `<span style='color:${color}'>${str}</span>`); |
| | | function stockType(row) { |
| | | let result = ''; |
| | | let arr = ['采购入库', '调拨', '其他出库', '部门分发', '报废出库', '部门物品回退仓库', '物品盘点']; |
| | | if (row.businessType == 7) { |
| | | if (row.thisType == 1) { |
| | | result = '盘盈入库'; |
| | | } else { |
| | | result = '盘亏出库'; |
| | | } |
| | | } else if (row.businessType == 2) { |
| | | if (row.thisType == 1) { |
| | | result = '调拨入库'; |
| | | } else { |
| | | result = '调拨出库'; |
| | | } |
| | | } else if (row.businessType == 4) { |
| | | if (row.thisType == 1) { |
| | | result = '退还入库'; |
| | | } else { |
| | | result = '申领出库'; |
| | | } |
| | | } else { |
| | | result = arr[row.businessType - 1]; |
| | | } |
| | | export default stockType; |
| | | |
| | | return result |
| | | } |
| | | export default stockType; |